You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Grant Ingersoll <GS...@syr.edu> on 2005/08/01 21:05:42 UTC
[m1] Dynamically generating classpath and documentation
question
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