ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jing Xue (JIRA)" <>
Subject [jira] Updated: (IVY-1016) Patch to add an ivy:eclipse ant task that generates Eclipse .classpath files
Date Mon, 26 Jan 2009 03:24:59 GMT


Jing Xue updated IVY-1016:


The Ant task implementation. Drop it under src/java/org/apache/ivy/ant/, and apply the following
--- src/java/org/apache/ivy/ant/antlib.xml      (revision 737630)
+++ src/java/org/apache/ivy/ant/antlib.xml      (working copy)
@@ -43,4 +43,5 @@
        <taskdef name="findrevision" classname="org.apache.ivy.ant.IvyFindRevision"/>
        <taskdef name="buildnumber" classname="org.apache.ivy.ant.IvyBuildNumber"/>
        <taskdef name="cleancache" classname="org.apache.ivy.ant.IvyCleanCache"/>
+       <taskdef name="eclipse" classname="org.apache.ivy.ant.EclipseClasspath"/>

> Patch to add an ivy:eclipse ant task that generates Eclipse .classpath files
> ----------------------------------------------------------------------------
>                 Key: IVY-1016
>                 URL:
>             Project: Ivy
>          Issue Type: New Feature
>          Components: Ant
>    Affects Versions: trunk
>            Reporter: Jing Xue
>         Attachments:
> I put together a post-resolve ivy:eclipse task that updates the Eclipse .classpath file
according to the result of ivy:resolve.  It also will discover any source jars if they are
part of the resolve/download, and automatically attach them to the corresponding entries.
> For example,  I have this entry in ivy.xml:
> {code:xml|title=ivy.xml}
> <dependency org="commons-collections" name="commons-collections" rev="3.2.1" conf="compile;references">
>     <artifact name="commons-collections" type="sources" ext="jar" m:classifier="sources"
conf="references" />
> </dependency>
> {code}
> In build.xml, I have:
> {code:xml|title=build.xml}
> <target name="eclipse" description="Updates eclipse classpath.">
>     <ivy:configure settingsId="ivy.eclipse" override="true" />
>     <ivy:resolve settingsRef="ivy.eclipse" conf="compile, references" />
>     <ivy:eclipse settingsRef="ivy.eclipse" conf="compile, references" />
> </target>
> {code}
> And running 'ant eclipse' will update my .classpath with the cache path to the commons-collections
jar, with its sources jar attached.  The classpath entry will be annotated with an ivygen="true".
Next time I run 'ant eclipse', this entry will be recognized and replaced with whatever updated
> This is only the first draft. I know there is IvyDE, but I feel that this could be a
good starting point for a alternative that is more Ant-oriented.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message