Hey all,
Great success using the M2 Antlib, specifically with the default-install
of Eclipse!
I'm trying to get the classpath that is generated from the
artifact:dependencies to CREATE the eclipse .classpath to keep the
environments in-sync, with the maven pom.xml being the master file.
Build.xml TASK:
===============
<artifact:dependencies pathId="maven.dependency.classpath">
<pom refid="pom"/>
</artifact:dependencies>
<target name="eclipse-classpath">
<echo file=".classpath"><![CDATA[<?xml version="1.0"
encoding="UTF-8"?>
<classpath>
<classpathentry kind="src"
path="src/java"/>
<classpathentry kind="src"
path="src/test"/>
<classpathentry kind="src"
path="target/generated-sources/middlegen"/>
<!-- here is the problem: iterate over for one entry per lib? Comma or
semicolon delimit? -->
<classpathentry kind="lib"
path="${maven.dependency.classpath}"/>
<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<!-- Eclipse autobuild interferes, so keep eclipse .classpath output to
/bin -->
<classpathentry kind="output"
path="bin"/>
</classpath>
]]>
</echo>
</target>
==============
Intent is to run as an Ant task from Eclipse with minimal additional
jars (although I already have maven-artifact-ant-2.0.jar bootstrapped,
could add another if needed) and build the Eclipse classpath using the
Maven repo/dependencies.
As you can see by the notes above, I'm having an issue with the lib's -
Eclipse by default has one lib entry per library, and I have the refid
that lists all the project's maven dependencies. Has anyone already
defeated this challenge or has any recommendations?
Thanks,
-D
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]