maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "matthew.hawthorne" <ma...@apache.org>
Subject Re: classpath issue with calling ant:java
Date Wed, 25 Aug 2004 22:53:31 GMT
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:


Try it like this:
<ant:path path="maven.dependency.classpath"/>

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


Mime
View raw message