maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grant Ingersoll" <GSIng...@syr.edu>
Subject [m1] Dynamically generating classpath and documentation question
Date Mon, 01 Aug 2005 19:05:42 GMT
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


Mime
View raw message