Hi,

The Eclipse plugin doesn't seem to handle overrides properly.   That is if I
have the following in my project.properties file:

maven.jar.override=on
maven.jar.local=d:/localdir/local.jar

and the following in my project.xml dependencies:

<dependency>
  <groupId>mygroup</groupId>
  <artifactId>local</artifactId>
</dependency>

the plugin generates the following incorrect entry in .classpath:

<classpathentry kind="var" path="MAVEN_REPO/mygroup/jars/local-.jar">
</classpathentry>

when instead, it should be:

<classpathentry kind="lib" path="d:/localdir/local.jar">
</classpathentry>

Notice that not only is the path the value of the maven.jar.local property,
but the kind is also "lib", not "var".  I have corrected this locally by
modifying plugin-resources/templates/classpath.jelly in the Eclipse plugin
directory.  I changed the following line:

<classpathentry kind="var" path="MAVEN_REPO${lib.urlPath}"/>

to this:

<classpathentry kind="lib" path="${lib.path}"/>

which works correctly in all cases.  This, however, ends up eliminating the
use of the MAVEN_REPO Eclipse classpath variable, which may not be
desirable.  Perhaps the best solution would be to determine whether the
dependency is overriden.  If so, then use the "corrected" classpathentry
given above.  If not, use the current classpathentry as it already exists in
classpath.jelly.

-- Chuck

> -----Original Message-----
> From: Kristopher Brown
> [mailto:[EMAIL PROTECTED]
> Sent: Friday, May 21, 2004 9:44 AM
> To: Maven Users List
> Subject: Eclipse Plugin consolidation
>
>
> Hi,
>
> I noticed that there were 18 issues open against the eclipse plugin so I
> wanted to get some of these things fixed.  I've made some changes
> therefore and created an issue in JIRA (MPECLIPSE-27) to hopefully get
> them added.
>
> In summary these are:
> - MPECLIPSE-6: junit dependancies are added even if there are no tests
> and it's a pom dependancy
> - MPECLIPSE-17: maven.eclipse.classpath.includes is used even if there
> are no tests
> - added eclipse:clean to remove the .project and .classpath files
> - modified to update the .project and .classpath files rather than
> overwrite (minimal at present)
> - added a new feature to create workspace dependancies if
> maven.eclipse.workspace.analyse=true and maven.eclipse.workspace is
> supplied.  Give it a try.
>
> I've also made some comments about existing issues that I think can be
> closed.
>
> See http://jira.codehaus.org/browse/MPECLIPSE-27 for more details.
>
> Would appreciated people checking it out and hopefully the changes will
> get added as a platform to make further changes from.  I've looked at
> the other issues against the plugin and would be willing to tackle them
> in the future.
>
> Kris.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to