Problem w/ HttpUtils

2005-01-30 Thread Chris Berry
Greetings,
I am using HttpUtils to manually fetch dependencies. I
do this because maven does not adequately chain
dependencies. I.e if A depends on B, and B depends on
C, then B should chain in it's own dependencies and
not force A to prescribe them (since A should not know
this directly)

So I create a package (a tarball or a jar), for, say,
B, and store a filelist in that tarball listing it's
dependencies. Then A depends on B -- and B knows that
it has further dependencies and manually brings them
in  -- using maven's HttpUtils.

So far so good. I have all of this working. But when I
moved the process forward to a different point in my
build cycle (i.e. in my plugin) it fails. I get a
class not found for HttpUtils. 

Can someone please explain how to make this work??
HttpUtils is a part of maven, and I can see it in
maven.jar -- and it works at a later point in my
process -- so some other plugin I'm using must set
stuff up for me. I suspect that there is some magic
line of jelly that I need to add, but looking thru
plugins, I cannot discern what it is...

BTW: The file I'm fetching exists and the
maven.repo.remote is correct. 

I'm confused.
Thanks,
-- Chris 

Further info follows::
---
Here is the jelly::

   j:catch var=ex
  j:invokeStatic var=dummy
method=getFile 
 
className=org.apache.maven.util.HttpUtils
 j:arg type=java.lang.String
value=${remoteFile} /
 j:arg type=java.io.File
value=${localFile}/
 j:arg type=boolean value=false/
 j:arg type=boolean value=true/
 j:arg type=java.lang.String
value=${maven.proxy.host} /
 j:arg type=java.lang.String
value=${maven.proxy.port} /
 j:arg type=java.lang.String
value=${maven.proxy.username} /
 j:arg type=java.lang.String
value=${maven.proxy.password} /
 j:arg type=boolean value=false/
  /j:invokeStatic
/j:catch

And here is the error::

et:expand-jar-dependencies:
jws:expand-jarlist-to-dir:
[echo]  jarsFlist=
commons-logging/jars/commons-logging-1.0.3.jar,junit/jars/junit-3.8.1.jar,log4j/jars/log4j-1.2.8.jar,commons-beanutil
s/jars/commons-beanutils-1.7.0.jar,commons-cli/jars/commons-cli-1.0.jar,commons-collections/jars/commons-collections-3.1.jar,commons-dbcp/ja
rs/commons-dbcp-1.2.1.jar,commons-digester/jars/commons-digester-1.5.jar,commons-messenger/jars/commons-messenger-1.0-dev-14.jar,commons-poo
l/jars/commons-pool-1.2.jar,jms/jars/jms-1.0.2.jar,spiritcache/jars/spirit-cache-2.0.14.jar,dom4j/jars/dom4j-1.4.jar,xalan/jars/xalan-2.5.1.
jar,xerces/jars/xercesImpl-2.6.1.jar,xml-apis/jars/xml-apis-1.0.b2.jar,
[echo] Trying to load localFile=
C:\cberry\work\jws-engine-maven-1.2\jwseng\pkg\shared\lib\commons-logging-1.0.3.jar
[echo] os.name = Windows XP
[echo] isWindows = true
[echo] Trying to download
file:/C:/cberry/work/3rdparty-repo/commons-logging/jars/commons-logging-1.0.3.jar
[echo] ex=
org.apache.commons.jelly.JellyTagException:
C:\cberry\.maven\cache\maven-etrade-plugin-1.0.0\plugin.jelly:547:75:
lt;j:invok
eStaticgt; Could not load class:
org.apache.maven.util.HttpUtils. Reason:
java.lang.reflect.InvocationTargetException
[echo] os.name = Windows XP
[echo] isWindows = true
[echo] Trying to download
http://svn.etrade.com/java-repo/maven/commons-logging/jars/commons-logging-1.0.3.jar
[echo] ex=
org.apache.commons.jelly.JellyTagException:
C:\cberry\.maven\cache\maven-etrade-plugin-1.0.0\plugin.jelly:547:75:
lt;j:invok
eStaticgt; Could not load class:
org.apache.maven.util.HttpUtils. Reason:
java.lang.reflect.InvocationTargetException

BUILD FAILED
File..
C:\cberry\.maven\cache\maven-etrade-plugin-1.0.0\plugin.jelly
Element... ant:fail
Line.. 568
Column 52
Unable to find jar
Total time: 6 seconds
Finished at: Sat Jan 29 17:25:39 CST 2005





__ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



multiple vesions of a plugin

2005-01-30 Thread Chris Berry
Greetings,
Is it possible for multiple versions of the same
plugin to exist simultaneously in a cache?? If so, how
does one specify explicitly which plugin to use??

Imagine the following: You are working on several
projects simultaneously, all on their own lifecycles.
Project A is code frozen and is using verion 1.1 of
your plugin. Project B is more fresh and needs 1.3.
And you need to be able to switch back and forth
seamlessly. 

Another scenario; You have a project and you must
simultaneously support the release in Production
(using 1.1 of your plugin) and also the ongoing
develeopment which is using version 1.3...

Thanks,
-- Chris 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Errors on maven genapp and libraries available offline but not found!

2005-01-30 Thread Inandjo Taurel
Hi, I'm a newbie, trying to get started with M.E.T.A, but I have the
following problem when I run maven genapp:
[INFO] App - - __  __
[INFO] App - -|  \/  |__ _Apache__ ___
[INFO] App - -| |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
[INFO] App - -|_|  |_\__,_|\_/\___|_||_|  v. 1.0.2
[INFO] App - -
log4j:WARN No appenders could be found for logger
(org.apache.commons.beanutils.
BeanUtils).
log4j:WARN Please initialize the log4j system properly.
[WARN] DependencyVerifier - -The use of the remote repository has been
disabled.
[WARN] DependencyVerifier - -The use of the remote repository has been
disabled.
Enter a project template to use: [default]
Please specify an id for your application:  [app]
myapp
Please specify a name for your application:  [Example Application]
helloworld
Please specify the package for your application:  [example.app]
helloworld.app
build:start:
genapp:
[copy] Copying 1 file to C:\dev\tests\src\java\helloworld\app
[copy] Copying 3 files to C:\dev\tests\src\test\helloworld\app
BUILD FAILED
File.. C:\Documents and
Settings\Administrateur\.maven\cache\maven-genapp-pl
ugin-2.2\plugin.jelly
element... ant:include
Line.. 140
Column 41
java.lang.NullPointerException
[INFO] App - -Total time: 28 seconds
[INFO] App - -Finished at: Sun Jan 30 04:54:37 GMT 2005
[INFO] App - -
I followed the instructions on the Getting started page in the maven
homesite, but whether I use a build.properties file or not, the output is
still the same, and doesn't change anything to the behavior of maven. The
file jelly.properties in the cache folder, is the default one given along
with maven distribution. The problematic lines are the following:
ant:fileset dir=${maven.genapp.resources}
  j:forEach var=res items=${maven.genapp.filter.split}
!-- THE FOLLOWING LINE IS PROBLEMANTIC--
  ant:include name=${res}/
  /j:forEach
/ant:fileset

Also, whenever I try to run maven -Dturbine.app.name=helloworld
turbine:setup and I have a relevant build.properties file, maven always try
to download the maven-torque-plugin-3.1.1.jar file, despite the fact that I
already have that plugin in the repository, and that i have disabled the
access to the remote repository.
This is the content of my setup.properties file:
maven.mode.online=false
maven.plugin.unpacked.dir=C:/Documents and
Settings/Administrateur/.maven/cache
maven.plugin.dir=C:/Program Files/Apache Group/Maven 1.0.2/plugins
maven.repo.local=C:/Documents and Settings/Administrateur/.maven/repository
maven.repo.remote.enabled=false
How can I tell maven that the file is already in the local repository
anyway??

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: multiple vesions of a plugin

2005-01-30 Thread Inandjo Taurel
Hi chris,
I tried that, and it bit me back: I had incompatibility errors on running 
maven-turbine-plugin, whilst the plugin I had brought in was torque...


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Problem w/ HttpUtils

2005-01-30 Thread Ole Matzura
Hi!
 
have you tried to add maven-1.0.2.jar to your dependency classpath in your 
jelly script? Or maybe just create 
a standard dependency to it in project.xml?
 
ie
 
dependency
groupIdmaven/groupId
artifactIdmaven/artifactId
version1.0.2/version
/dependency
 
regards!
 
/Ole



From: Chris Berry [mailto:[EMAIL PROTECTED]
Sent: Sun 30/01/2005 17:51
To: users@maven.apache.org
Subject: Problem w/ HttpUtils



Greetings,
I am using HttpUtils to manually fetch dependencies. I
do this because maven does not adequately chain
dependencies. I.e if A depends on B, and B depends on
C, then B should chain in it's own dependencies and
not force A to prescribe them (since A should not know
this directly)

So I create a package (a tarball or a jar), for, say,
B, and store a filelist in that tarball listing it's
dependencies. Then A depends on B -- and B knows that
it has further dependencies and manually brings them
in  -- using maven's HttpUtils.

So far so good. I have all of this working. But when I
moved the process forward to a different point in my
build cycle (i.e. in my plugin) it fails. I get a
class not found for HttpUtils.

Can someone please explain how to make this work??
HttpUtils is a part of maven, and I can see it in
maven.jar -- and it works at a later point in my
process -- so some other plugin I'm using must set
stuff up for me. I suspect that there is some magic
line of jelly that I need to add, but looking thru
plugins, I cannot discern what it is...

BTW: The file I'm fetching exists and the
maven.repo.remote is correct.

I'm confused.
Thanks,
-- Chris

Further info follows::
---
Here is the jelly::

   j:catch var=ex
  j:invokeStatic var=dummy
method=getFile

className=org.apache.maven.util.HttpUtils
 j:arg type=java.lang.String
value=${remoteFile} /
 j:arg type=java.io.File
value=${localFile}/
 j:arg type=boolean value=false/
 j:arg type=boolean value=true/
 j:arg type=java.lang.String
value=${maven.proxy.host} /
 j:arg type=java.lang.String
value=${maven.proxy.port} /
 j:arg type=java.lang.String
value=${maven.proxy.username} /
 j:arg type=java.lang.String
value=${maven.proxy.password} /
 j:arg type=boolean value=false/
  /j:invokeStatic
/j:catch

And here is the error::

et:expand-jar-dependencies:
jws:expand-jarlist-to-dir:
[echo]  jarsFlist=
commons-logging/jars/commons-logging-1.0.3.jar,junit/jars/junit-3.8.1.jar,log4j/jars/log4j-1.2.8.jar,commons-beanutil
s/jars/commons-beanutils-1.7.0.jar,commons-cli/jars/commons-cli-1.0.jar,commons-collections/jars/commons-collections-3.1.jar,commons-dbcp/ja
rs/commons-dbcp-1.2.1.jar,commons-digester/jars/commons-digester-1.5.jar,commons-messenger/jars/commons-messenger-1.0-dev-14.jar,commons-poo
l/jars/commons-pool-1.2.jar,jms/jars/jms-1.0.2.jar,spiritcache/jars/spirit-cache-2.0.14.jar,dom4j/jars/dom4j-1.4.jar,xalan/jars/xalan-2.5.1.
jar,xerces/jars/xercesImpl-2.6.1.jar,xml-apis/jars/xml-apis-1.0.b2.jar,
[echo] Trying to load localFile=
C:\cberry\work\jws-engine-maven-1.2\jwseng\pkg\shared\lib\commons-logging-1.0.3.jar
[echo] os.name = Windows XP
[echo] isWindows = true
[echo] Trying to download
file:/C:/cberry/work/3rdparty-repo/commons-logging/jars/commons-logging-1.0.3.jar
[echo] ex=
org.apache.commons.jelly.JellyTagException:
C:\cberry\.maven\cache\maven-etrade-plugin-1.0.0\plugin.jelly:547:75:
lt;j:invok
eStaticgt; Could not load class:
org.apache.maven.util.HttpUtils. Reason:
java.lang.reflect.InvocationTargetException
[echo] os.name = Windows XP
[echo] isWindows = true
[echo] Trying to download
http://svn.etrade.com/java-repo/maven/commons-logging/jars/commons-logging-1.0.3.jar
[echo] ex=
org.apache.commons.jelly.JellyTagException:
C:\cberry\.maven\cache\maven-etrade-plugin-1.0.0\plugin.jelly:547:75:
lt;j:invok
eStaticgt; Could not load class:
org.apache.maven.util.HttpUtils. Reason:
java.lang.reflect.InvocationTargetException

BUILD FAILED
File..
C:\cberry\.maven\cache\maven-etrade-plugin-1.0.0\plugin.jelly
Element... ant:fail
Line.. 568
Column 52
Unable to find jar
Total time: 6 seconds
Finished at: Sat Jan 29 17:25:39 CST 2005



   
   
__
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: Problem w/ HttpUtils

2005-01-30 Thread Chris Berry
Unfortunately, that doesn't help.

--- Ole Matzura [EMAIL PROTECTED] wrote:

 Hi!
  
 have you tried to add maven-1.0.2.jar to your
 dependency classpath in your jelly script? Or maybe
 just create 
 a standard dependency to it in project.xml?
  
 ie
  
 dependency
 groupIdmaven/groupId
 artifactIdmaven/artifactId
 version1.0.2/version
 /dependency
  
 regards!
  
 /Ole
 
 
 
 From: Chris Berry [mailto:[EMAIL PROTECTED]
 Sent: Sun 30/01/2005 17:51
 To: users@maven.apache.org
 Subject: Problem w/ HttpUtils
 
 
 
 Greetings,
 I am using HttpUtils to manually fetch dependencies.
 I
 do this because maven does not adequately chain
 dependencies. I.e if A depends on B, and B depends
 on
 C, then B should chain in it's own dependencies and
 not force A to prescribe them (since A should not
 know
 this directly)
 
 So I create a package (a tarball or a jar), for,
 say,
 B, and store a filelist in that tarball listing it's
 dependencies. Then A depends on B -- and B knows
 that
 it has further dependencies and manually brings them
 in  -- using maven's HttpUtils.
 
 So far so good. I have all of this working. But when
 I
 moved the process forward to a different point in my
 build cycle (i.e. in my plugin) it fails. I get a
 class not found for HttpUtils.
 
 Can someone please explain how to make this work??
 HttpUtils is a part of maven, and I can see it in
 maven.jar -- and it works at a later point in my
 process -- so some other plugin I'm using must set
 stuff up for me. I suspect that there is some magic
 line of jelly that I need to add, but looking thru
 plugins, I cannot discern what it is...
 
 BTW: The file I'm fetching exists and the
 maven.repo.remote is correct.
 
 I'm confused.
 Thanks,
 -- Chris
 
 Further info follows::
 ---
 Here is the jelly::
 
j:catch var=ex
   j:invokeStatic var=dummy
 method=getFile
 
 className=org.apache.maven.util.HttpUtils
  j:arg type=java.lang.String
 value=${remoteFile} /
  j:arg type=java.io.File
 value=${localFile}/
  j:arg type=boolean
 value=false/
  j:arg type=boolean
 value=true/
  j:arg type=java.lang.String
 value=${maven.proxy.host} /
  j:arg type=java.lang.String
 value=${maven.proxy.port} /
  j:arg type=java.lang.String
 value=${maven.proxy.username} /
  j:arg type=java.lang.String
 value=${maven.proxy.password} /
  j:arg type=boolean
 value=false/
   /j:invokeStatic
 /j:catch
 
 And here is the error::
 
 et:expand-jar-dependencies:
 jws:expand-jarlist-to-dir:
 [echo]  jarsFlist=

commons-logging/jars/commons-logging-1.0.3.jar,junit/jars/junit-3.8.1.jar,log4j/jars/log4j-1.2.8.jar,commons-beanutil

s/jars/commons-beanutils-1.7.0.jar,commons-cli/jars/commons-cli-1.0.jar,commons-collections/jars/commons-collections-3.1.jar,commons-dbcp/ja

rs/commons-dbcp-1.2.1.jar,commons-digester/jars/commons-digester-1.5.jar,commons-messenger/jars/commons-messenger-1.0-dev-14.jar,commons-poo

l/jars/commons-pool-1.2.jar,jms/jars/jms-1.0.2.jar,spiritcache/jars/spirit-cache-2.0.14.jar,dom4j/jars/dom4j-1.4.jar,xalan/jars/xalan-2.5.1.

jar,xerces/jars/xercesImpl-2.6.1.jar,xml-apis/jars/xml-apis-1.0.b2.jar,
 [echo] Trying to load localFile=

C:\cberry\work\jws-engine-maven-1.2\jwseng\pkg\shared\lib\commons-logging-1.0.3.jar
 [echo] os.name = Windows XP
 [echo] isWindows = true
 [echo] Trying to download

file:/C:/cberry/work/3rdparty-repo/commons-logging/jars/commons-logging-1.0.3.jar
 [echo] ex=
 org.apache.commons.jelly.JellyTagException:

C:\cberry\.maven\cache\maven-etrade-plugin-1.0.0\plugin.jelly:547:75:
 lt;j:invok
 eStaticgt; Could not load class:
 org.apache.maven.util.HttpUtils. Reason:
 java.lang.reflect.InvocationTargetException
 [echo] os.name = Windows XP
 [echo] isWindows = true
 [echo] Trying to download

http://svn.etrade.com/java-repo/maven/commons-logging/jars/commons-logging-1.0.3.jar
 [echo] ex=
 org.apache.commons.jelly.JellyTagException:

C:\cberry\.maven\cache\maven-etrade-plugin-1.0.0\plugin.jelly:547:75:
 lt;j:invok
 eStaticgt; Could not load class:
 org.apache.maven.util.HttpUtils. Reason:
 java.lang.reflect.InvocationTargetException
 
 BUILD FAILED
 File..

C:\cberry\.maven\cache\maven-etrade-plugin-1.0.0\plugin.jelly
 Element... ant:fail
 Line.. 568
 Column 52
 Unable to find jar
 Total time: 6 seconds
 Finished at: Sat Jan 29 17:25:39 CST 2005
 
 
 


 __
 Do you Yahoo!?
 Yahoo! Mail - You care about security. So do we.
 http://promotions.yahoo.com/new_mail
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 

RE: Problem w/ HttpUtils

2005-01-30 Thread Ole Matzura
hmm.. 
 
sorry for some basic questions; httputils has dependencies on httpclient and 
commons-lang, are they all in your
plugins' dependency-list?
 
/Ole



From: Chris Berry [mailto:[EMAIL PROTECTED]
Sent: Sun 30/01/2005 19:25
To: Maven Users List
Subject: RE: Problem w/ HttpUtils



Unfortunately, that doesn't help.

--- Ole Matzura [EMAIL PROTECTED] wrote:

 Hi!
 
 have you tried to add maven-1.0.2.jar to your
 dependency classpath in your jelly script? Or maybe
 just create
 a standard dependency to it in project.xml?
 
 ie
 
 dependency
 groupIdmaven/groupId
 artifactIdmaven/artifactId
 version1.0.2/version
 /dependency
 
 regards!
 
 /Ole

 

 From: Chris Berry [mailto:[EMAIL PROTECTED]
 Sent: Sun 30/01/2005 17:51
 To: users@maven.apache.org
 Subject: Problem w/ HttpUtils



 Greetings,
 I am using HttpUtils to manually fetch dependencies.
 I
 do this because maven does not adequately chain
 dependencies. I.e if A depends on B, and B depends
 on
 C, then B should chain in it's own dependencies and
 not force A to prescribe them (since A should not
 know
 this directly)

 So I create a package (a tarball or a jar), for,
 say,
 B, and store a filelist in that tarball listing it's
 dependencies. Then A depends on B -- and B knows
 that
 it has further dependencies and manually brings them
 in  -- using maven's HttpUtils.

 So far so good. I have all of this working. But when
 I
 moved the process forward to a different point in my
 build cycle (i.e. in my plugin) it fails. I get a
 class not found for HttpUtils.

 Can someone please explain how to make this work??
 HttpUtils is a part of maven, and I can see it in
 maven.jar -- and it works at a later point in my
 process -- so some other plugin I'm using must set
 stuff up for me. I suspect that there is some magic
 line of jelly that I need to add, but looking thru
 plugins, I cannot discern what it is...

 BTW: The file I'm fetching exists and the
 maven.repo.remote is correct.

 I'm confused.
 Thanks,
 -- Chris

 Further info follows::
 ---
 Here is the jelly::

j:catch var=ex
   j:invokeStatic var=dummy
 method=getFile

 className=org.apache.maven.util.HttpUtils
  j:arg type=java.lang.String
 value=${remoteFile} /
  j:arg type=java.io.File
 value=${localFile}/
  j:arg type=boolean
 value=false/
  j:arg type=boolean
 value=true/
  j:arg type=java.lang.String
 value=${maven.proxy.host} /
  j:arg type=java.lang.String
 value=${maven.proxy.port} /
  j:arg type=java.lang.String
 value=${maven.proxy.username} /
  j:arg type=java.lang.String
 value=${maven.proxy.password} /
  j:arg type=boolean
 value=false/
   /j:invokeStatic
 /j:catch
 
 And here is the error::

 et:expand-jar-dependencies:
 jws:expand-jarlist-to-dir:
 [echo]  jarsFlist=

commons-logging/jars/commons-logging-1.0.3.jar,junit/jars/junit-3.8.1.jar,log4j/jars/log4j-1.2.8.jar,commons-beanutil

s/jars/commons-beanutils-1.7.0.jar,commons-cli/jars/commons-cli-1.0.jar,commons-collections/jars/commons-collections-3.1.jar,commons-dbcp/ja

rs/commons-dbcp-1.2.1.jar,commons-digester/jars/commons-digester-1.5.jar,commons-messenger/jars/commons-messenger-1.0-dev-14.jar,commons-poo

l/jars/commons-pool-1.2.jar,jms/jars/jms-1.0.2.jar,spiritcache/jars/spirit-cache-2.0.14.jar,dom4j/jars/dom4j-1.4.jar,xalan/jars/xalan-2.5.1.

jar,xerces/jars/xercesImpl-2.6.1.jar,xml-apis/jars/xml-apis-1.0.b2.jar,
 [echo] Trying to load localFile=

C:\cberry\work\jws-engine-maven-1.2\jwseng\pkg\shared\lib\commons-logging-1.0.3.jar
 [echo] os.name = Windows XP
 [echo] isWindows = true
 [echo] Trying to download

file:/C:/cberry/work/3rdparty-repo/commons-logging/jars/commons-logging-1.0.3.jar
 [echo] ex=
 org.apache.commons.jelly.JellyTagException:

C:\cberry\.maven\cache\maven-etrade-plugin-1.0.0\plugin.jelly:547:75:
 lt;j:invok
 eStaticgt; Could not load class:
 org.apache.maven.util.HttpUtils. Reason:
 java.lang.reflect.InvocationTargetException
 [echo] os.name = Windows XP
 [echo] isWindows = true
 [echo] Trying to download

http://svn.etrade.com/java-repo/maven/commons-logging/jars/commons-logging-1.0.3.jar
 [echo] ex=
 org.apache.commons.jelly.JellyTagException:

C:\cberry\.maven\cache\maven-etrade-plugin-1.0.0\plugin.jelly:547:75:
 lt;j:invok
 eStaticgt; Could not load class:
 org.apache.maven.util.HttpUtils. Reason:
 java.lang.reflect.InvocationTargetException

 BUILD FAILED
 File..

C:\cberry\.maven\cache\maven-etrade-plugin-1.0.0\plugin.jelly
 Element... ant:fail
 Line.. 568
 Column 52
 Unable to find jar
 Total time: 6 seconds
 Finished at: Sat Jan 29 17:25:39 CST 2005



   
   
 

RE: Problem w/ HttpUtils

2005-01-30 Thread Chris Berry
These jars are a part of maven itself 
I don't think that I should have to explicitly declare
them. And also, this same code works fine when used
slightly differently (in a slightly different call
sequence). Regardless, I tried your suggestion, and it
has no effect...

Is there a way for the plugin.jelly itself to import
this class -- i.e. to explicitly make sure that it is
present before trying to use it...

Thanks,
-- Chris 

--- Ole Matzura [EMAIL PROTECTED] wrote:

 hmm.. 
  
 sorry for some basic questions; httputils has
 dependencies on httpclient and commons-lang, are
 they all in your
 plugins' dependency-list?
  
 /Ole
 
 
 
 From: Chris Berry [mailto:[EMAIL PROTECTED]
 Sent: Sun 30/01/2005 19:25
 To: Maven Users List
 Subject: RE: Problem w/ HttpUtils
 
 
 
 Unfortunately, that doesn't help.
 
 --- Ole Matzura [EMAIL PROTECTED] wrote:
 
  Hi!
  
  have you tried to add maven-1.0.2.jar to your
  dependency classpath in your jelly script? Or
 maybe
  just create
  a standard dependency to it in project.xml?
  
  ie
  
  dependency
  groupIdmaven/groupId
  artifactIdmaven/artifactId
  version1.0.2/version
  /dependency
  
  regards!
  
  /Ole
 
  
 
  From: Chris Berry [mailto:[EMAIL PROTECTED]
  Sent: Sun 30/01/2005 17:51
  To: users@maven.apache.org
  Subject: Problem w/ HttpUtils
 
 
 
  Greetings,
  I am using HttpUtils to manually fetch
 dependencies.
  I
  do this because maven does not adequately chain
  dependencies. I.e if A depends on B, and B depends
  on
  C, then B should chain in it's own dependencies
 and
  not force A to prescribe them (since A should not
  know
  this directly)
 
  So I create a package (a tarball or a jar), for,
  say,
  B, and store a filelist in that tarball listing
 it's
  dependencies. Then A depends on B -- and B knows
  that
  it has further dependencies and manually brings
 them
  in  -- using maven's HttpUtils.
 
  So far so good. I have all of this working. But
 when
  I
  moved the process forward to a different point in
 my
  build cycle (i.e. in my plugin) it fails. I get a
  class not found for HttpUtils.
 
  Can someone please explain how to make this work??
  HttpUtils is a part of maven, and I can see it in
  maven.jar -- and it works at a later point in my
  process -- so some other plugin I'm using must set
  stuff up for me. I suspect that there is some
 magic
  line of jelly that I need to add, but looking thru
  plugins, I cannot discern what it is...
 
  BTW: The file I'm fetching exists and the
  maven.repo.remote is correct.
 
  I'm confused.
  Thanks,
  -- Chris
 
  Further info follows::
  ---
  Here is the jelly::
 
 j:catch var=ex
j:invokeStatic var=dummy
  method=getFile
 
  className=org.apache.maven.util.HttpUtils
   j:arg type=java.lang.String
  value=${remoteFile} /
   j:arg type=java.io.File
  value=${localFile}/
   j:arg type=boolean
  value=false/
   j:arg type=boolean
  value=true/
   j:arg type=java.lang.String
  value=${maven.proxy.host} /
   j:arg type=java.lang.String
  value=${maven.proxy.port} /
   j:arg type=java.lang.String
  value=${maven.proxy.username} /
   j:arg type=java.lang.String
  value=${maven.proxy.password} /
   j:arg type=boolean
  value=false/
/j:invokeStatic
  /j:catch
  
  And here is the error::
 
  et:expand-jar-dependencies:
  jws:expand-jarlist-to-dir:
  [echo]  jarsFlist=
 

commons-logging/jars/commons-logging-1.0.3.jar,junit/jars/junit-3.8.1.jar,log4j/jars/log4j-1.2.8.jar,commons-beanutil
 

s/jars/commons-beanutils-1.7.0.jar,commons-cli/jars/commons-cli-1.0.jar,commons-collections/jars/commons-collections-3.1.jar,commons-dbcp/ja
 

rs/commons-dbcp-1.2.1.jar,commons-digester/jars/commons-digester-1.5.jar,commons-messenger/jars/commons-messenger-1.0-dev-14.jar,commons-poo
 

l/jars/commons-pool-1.2.jar,jms/jars/jms-1.0.2.jar,spiritcache/jars/spirit-cache-2.0.14.jar,dom4j/jars/dom4j-1.4.jar,xalan/jars/xalan-2.5.1.
 

jar,xerces/jars/xercesImpl-2.6.1.jar,xml-apis/jars/xml-apis-1.0.b2.jar,
  [echo] Trying to load localFile=
 

C:\cberry\work\jws-engine-maven-1.2\jwseng\pkg\shared\lib\commons-logging-1.0.3.jar
  [echo] os.name = Windows XP
  [echo] isWindows = true
  [echo] Trying to download
 

file:/C:/cberry/work/3rdparty-repo/commons-logging/jars/commons-logging-1.0.3.jar
  [echo] ex=
  org.apache.commons.jelly.JellyTagException:
 

C:\cberry\.maven\cache\maven-etrade-plugin-1.0.0\plugin.jelly:547:75:
  lt;j:invok
  eStaticgt; Could not load class:
  org.apache.maven.util.HttpUtils. Reason:
  java.lang.reflect.InvocationTargetException
  [echo] os.name = Windows XP
  [echo] isWindows = true
  

RE: Problem w/ HttpUtils

2005-01-30 Thread Chris Berry
Sorry. Pilot error ;-)
Turns out that I was getting fooled by the error
message. It had nothing to do with not finding the
HttpUtils class. It was that my dest dir was not yet
created and the failure was internal to HttpUtils --
but this fact was masked by the
InvocationTargetException. 
I figured this out by switching to Ant's Get Task...
Oh well, live and learn.
Thanks,
-- Chris 

--- Ole Matzura [EMAIL PROTECTED] wrote:

 hmm..
  
 judging from your error message and the source code
 for the InvokeStatic tag

(http://cvs.apache.org/viewcvs.cgi/jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/InvokeStaticTag.java?rev=1.9view=auto)
 it seems your exception is created using the
 createLoadClassFailedException method (at the
 bottom). Strangely though, for
 InvocationTargetException, this should not be the
 case as it has its own catch clause which does not
 use that method for creating its exception (or I am
 just too tired now ??) .. maybe you dont have the
 latest version of the jelly core? (which on the
 other hand doesn't fit with your invocation working
 later on..)
  
 sorry for making stupid suggestions.. just trying to
 help out :-)
  
 good luck!
 
 /Ole
 
 
 
 From: Chris Berry [mailto:[EMAIL PROTECTED]
 Sent: Sun 30/01/2005 19:56
 To: Maven Users List
 Subject: RE: Problem w/ HttpUtils
 
 
 
 These jars are a part of maven itself
 I don't think that I should have to explicitly
 declare
 them. And also, this same code works fine when used
 slightly differently (in a slightly different call
 sequence). Regardless, I tried your suggestion, and
 it
 has no effect...
 
 Is there a way for the plugin.jelly itself to
 import
 this class -- i.e. to explicitly make sure that it
 is
 present before trying to use it...
 
 Thanks,
 -- Chris
 
 --- Ole Matzura [EMAIL PROTECTED] wrote:
 
  hmm..
  
  sorry for some basic questions; httputils has
  dependencies on httpclient and commons-lang, are
  they all in your
  plugins' dependency-list?
  
  /Ole
 
  
 
  From: Chris Berry [mailto:[EMAIL PROTECTED]
  Sent: Sun 30/01/2005 19:25
  To: Maven Users List
  Subject: RE: Problem w/ HttpUtils
 
 
 
  Unfortunately, that doesn't help.
 
  --- Ole Matzura [EMAIL PROTECTED] wrote:
 
   Hi!
  
   have you tried to add maven-1.0.2.jar to your
   dependency classpath in your jelly script? Or
  maybe
   just create
   a standard dependency to it in project.xml?
  
   ie
  
   dependency
   groupIdmaven/groupId
   artifactIdmaven/artifactId
   version1.0.2/version
   /dependency
  
   regards!
  
   /Ole
  
   
  
   From: Chris Berry
 [mailto:[EMAIL PROTECTED]
   Sent: Sun 30/01/2005 17:51
   To: users@maven.apache.org
   Subject: Problem w/ HttpUtils
  
  
  
   Greetings,
   I am using HttpUtils to manually fetch
  dependencies.
   I
   do this because maven does not adequately chain
   dependencies. I.e if A depends on B, and B
 depends
   on
   C, then B should chain in it's own dependencies
  and
   not force A to prescribe them (since A should
 not
   know
   this directly)
  
   So I create a package (a tarball or a jar), for,
   say,
   B, and store a filelist in that tarball listing
  it's
   dependencies. Then A depends on B -- and B knows
   that
   it has further dependencies and manually brings
  them
   in  -- using maven's HttpUtils.
  
   So far so good. I have all of this working. But
  when
   I
   moved the process forward to a different point
 in
  my
   build cycle (i.e. in my plugin) it fails. I get
 a
   class not found for HttpUtils.
  
   Can someone please explain how to make this
 work??
   HttpUtils is a part of maven, and I can see it
 in
   maven.jar -- and it works at a later point in my
   process -- so some other plugin I'm using must
 set
   stuff up for me. I suspect that there is some
  magic
   line of jelly that I need to add, but looking
 thru
   plugins, I cannot discern what it is...
  
   BTW: The file I'm fetching exists and the
   maven.repo.remote is correct.
  
   I'm confused.
   Thanks,
   -- Chris
  
   Further info follows::
   ---
   Here is the jelly::
  
  j:catch var=ex
 j:invokeStatic var=dummy
   method=getFile
 
   className=org.apache.maven.util.HttpUtils
j:arg type=java.lang.String
   value=${remoteFile} /
j:arg type=java.io.File
   value=${localFile}/
j:arg type=boolean
   value=false/
j:arg type=boolean
   value=true/
j:arg type=java.lang.String
   value=${maven.proxy.host} /
j:arg type=java.lang.String
   value=${maven.proxy.port} /
j:arg type=java.lang.String
   value=${maven.proxy.username} /
j:arg type=java.lang.String
   value=${maven.proxy.password} /
j:arg type=boolean