You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Wierenga, R. - SPLXE" <Ro...@klm.com> on 2005/08/08 11:19:40 UTC

launching java process from maven

Hi,

 

I'm wondering if it would be possible to launch a java process from maven
providing it the project.xml dependencies classpath?

 

To be more precice I want to launch jmeter but i don't want to manually
create the classpath in a batch file or something because it already nicely
exists in a project file. 

 

I already got to the stage that i created an maven.xml file, included a new
goal and executed a process using ant:exec. But i'm stuck at the point in
which i have to insert the classpath value, where do i get it from?

 

Can anyone help?

 

Thanks,

Robin



**********************************************************************
For information, services and offers, please visit our web site: http://www.klm.com. This e-mail and any attachment may contain confidential and privileged material intended for the addressee only. If you are not the addressee, you are notified that no part of the e-mail or any attachment may be disclosed, copied or distributed, and that any other action related to this e-mail or attachment is strictly prohibited, and may be unlawful. If you have received this e-mail by error, please notify the sender immediately by return e-mail, and delete this message. Koninklijke Luchtvaart Maatschappij NV (KLM), its subsidiaries and/or its employees shall not be liable for the incorrect or incomplete transmission of this e-mail or any attachments, nor responsible for any delay in receipt.
**********************************************************************


Re: launching java process from maven

Posted by Andy Glick <an...@acm.org>.
Wierenga, R. - SPLXE wrote:

> I already got to the stage that i created an maven.xml file, included a new
> goal and executed a process using ant:exec. But i'm stuck at the point in
> which i have to insert the classpath value, where do i get it from?
> 

You can use the ant:java task rather than ant:exec since ant:exec does 
not provide a <classpath> tag. Since you are using a maven.xml file, you 
can specify a classpath in it rather than by using a batch file.  You 
might want to look at the plugin.jelly files of the installed plugins. 
Maven unpacks the plugin jar files in subdirectories of the cache 
directory. It is located, by default, at ${user.home}/.maven/cache. 
Reading these files is a normal way to learn Maven jelly scripting 
conventions.

The Maven path id for the POM classpath is maven.dependency.classpath. 
If you need to add the recently built code to the classpath you could do 
that as follows:

<classpath>
   <pathelement path=${maven.build.dest}/>
   <path refid="maven.dependency.classpath"/>
<classpath>

Hope that this helps.


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