> Parsons, David wrote:
> > I need to write a goal to invoke the main() method of a class in my 
> > Maven project.  Following suggestions in a recent thread on this
list, 
> > I am attempting this with the <ant:java/> tag.  The problem I am 
> > having is with the classpath, which needs to include the project's 
> > dependencies. First I tried to use ${maven.dependency.classpath},
like 
> > so:
> >  
> >     <goal name="perfmon:run">
> >  
> >
<echo>maven.dependency.classpath=${maven.dependency.classpath}</echo>
> >         <ant:java jar="${basedir}/target/perfmon-0.1.jar"
fork="true">
> >             <ant:classpath>
> >                 <ant:path path="${maven.dependency.classpath}"/>
> >             </ant:classpath>
> >         </ant:java>
> >     </goal>
> > 
> > ...which fails because apparently maven.dependency.classpath is not 
> > set (according to the <echo/> tag).  My second attempt was to
hardcode 
> > the necessary dependencies, but this fails for a different reason:
 
matthew.hawthorne wrote:
> Try it like this:
> <ant:path path="maven.dependency.classpath"/>

Tried that, and it makes no difference.  maven.dependency.classpath is
not defined, and the classpath that gets passed to the java command line
is empty according to maven -X:

    [java] [DEBUG] Execute:Java13CommandLauncher: Executing 'java.exe'
with arguments:
'-jar'
'C:\p4\dev\ims\test\perfmon\target\perfmon-0.1.jar'

Any other ideas?

Thanks - David

---------------------------------------------------------------------
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]

Reply via email to