maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brett Porter <brett.por...@gmail.com>
Subject Re: [m1] Dynamically generating classpath and documentationquestion
Date Fri, 05 Aug 2005 01:30:28 GMT
Hi Grant,

Feel free to start a wiki page, or a patch against the xdocs. Sorry,
there are plenty of nuances like this that missed the original cut of
the docs.

- Brett

On 8/2/05, Grant Ingersoll <GSIngers@syr.edu> wrote:
> I can answer the first part of my question:
>     <java classname="MyClass"
>             fork="true"
>             failonerror="false"
>             maxmemory="512m">
>             <arg line=""/>
>             <classpath>
>                 <pathelement path="${pom.getDependencyClasspath()}"/>
>                 <fileset dir="${maven.build.dir}">
>                     <include name="${maven.jar.final.name}"/>
>                 </fileset>
>             </classpath>
>         </java>
> 
> but still not sure at the second other than guessing based on what I
> see in the Javadoc.  Should I start a Wiki page?  I would be happy to
> share my (limited) understanding to get things started.
> 
> -Grant
> 
> >>> GSIngers@syr.edu 08/01/05 3:05 PM >>>
> How can I dynamically generate a classpath for use by the ANT Java
> task?
> 
> I have:
> <java classname="MyClass"
>             fork="true"
>             failonerror="false"
>             maxmemory="512m">
>             <arg line=""/>
>             <classpath>
>                 <pathelement
> location="${plugin.getDependencyPath('lucene:luke')}"/>
>                 <pathelement
> location="${plugin.getDependencyPath('lucene:lucene')}"/>
>                 <pathelement
> location="${plugin.getDependencyPath('lucene:lucene-analyzers')}"/>
>             </classpath>
>         </java>
> 
> working, but as you see, the dependencies are hardcoded.
> 
> Would like something like:
> <java classname="MyClass"
>             fork="true"
>             failonerror="false"
>             maxmemory="512m">
>             <arg line=""/>
>             <classpath>
> <j:forEach var="lib" items="${pom.artifacts}">
>             <j:set var="dep" value="${lib.dependency}"/>
>             <j:if test="${dep.type =='jar'}">
>                 <pathelement
> location="${plugin.getDependencyPath(groupId:artifactId)}"/>
>             </j:if>
>  </j:forEach>
>             </classpath>
>         </java>
> 
> 
> Also, where is there documentation for things such as
> ${plugin.getDependencyPath}?  Is there some place that lists what
> things
> are in context (like plugin)?
> 
> Thanks,
> Grant
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
>

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


Mime
View raw message