You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ja...@barclayscapital.com on 2004/06/14 19:03:32 UTC

Supplying classpath inside a goal

Apologies if this has been answered before but I couldn't see the answer in
the mail archives

If in my maven.xml I have some sort of goal that needs to do this:

<goal name="foo">
	<java fork="true" classname="com.foo.bar"
classpath="XXX/lib-a-1.0.jar;XXX/lib-b-1.0.jar;...">
		<arg line="-W -p com.xxx "/>
	</java>
</goal>

Now that list of jars in the classpath looks like a prime candidate for
referencing via the repository and some sort of dependency declarations in
the POM.  But I can't figure out what to use.  I tried
${maven.dependency.classpath} which seemed a likely choice, but that doesn't
seem right - if I echo out the value of that it's blank.  So either I'm
using the wrong property or I've not set up the dependencies quite right

Can somebody enlighten me?

thanks in advance

James



------------------------------------------------------------------------
For more information about Barclays Capital, please
visit our web site at http://www.barcap.com.


Internet communications are not secure and therefore the Barclays 
Group does not accept legal responsibility for the contents of this 
message.  Although the Barclays Group operates anti-virus programmes, 
it does not accept responsibility for any damage whatsoever that is 
caused by viruses being passed.  Any views or opinions presented are 
solely those of the author and do not necessarily represent those of the 
Barclays Group.  Replies to this email may be monitored by the Barclays 
Group for operational or business reasons.

------------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Supplying classpath inside a goal

Posted by Erik Husby <mh...@broad.mit.edu>.
James.Shute@barclayscapital.com wrote:

>Apologies if this has been answered before but I couldn't see the answer in
>the mail archives
>
>If in my maven.xml I have some sort of goal that needs to do this:
>
><goal name="foo">
>	<java fork="true" classname="com.foo.bar"
>classpath="XXX/lib-a-1.0.jar;XXX/lib-b-1.0.jar;...">
>		<arg line="-W -p com.xxx "/>
>	</java>
></goal>
>
>Now that list of jars in the classpath looks like a prime candidate for
>referencing via the repository and some sort of dependency declarations in
>the POM.  But I can't figure out what to use.  I tried
>${maven.dependency.classpath} which seemed a likely choice, but that doesn't
>seem right - if I echo out the value of that it's blank.  So either I'm
>using the wrong property or I've not set up the dependencies quite right
>
>Can somebody enlighten me?
>
>  
>
Take a look at the jelly code for the Test plugin. It builds up a 
classpath that includes

<path refid="maven.dependency.classpath"/>

among others.

>thanks in advance
>
>James
>
>
>
>------------------------------------------------------------------------
>For more information about Barclays Capital, please
>visit our web site at http://www.barcap.com.
>
>
>Internet communications are not secure and therefore the Barclays 
>Group does not accept legal responsibility for the contents of this 
>message.  Although the Barclays Group operates anti-virus programmes, 
>it does not accept responsibility for any damage whatsoever that is 
>caused by viruses being passed.  Any views or opinions presented are 
>solely those of the author and do not necessarily represent those of the 
>Barclays Group.  Replies to this email may be monitored by the Barclays 
>Group for operational or business reasons.
>
>------------------------------------------------------------------------
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>For additional commands, e-mail: users-help@maven.apache.org
>
>  
>


-- 
Erik Husby
Team Lead for Software Quality Automation
Broad Institute of MIT and Harvard 
Rm. 2192  320 Charles St
Cambridge, MA 02141-2023
mobile: 781.354.6669, office: 617.258.9227, mhusby@broad.mit.edu


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org