maven-users mailing list archives

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


Mime
View raw message