jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Signup
Maven 1.x Eclipse Plugin
  • Maven 1.x Eclipse Plugin
  • MPECLIPSE-38

Jar overrides are not supported

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8
  • Fix Version/s: 1.9
  • Labels:
    None
  • Environment:
    all
  • Number of attachments :
    0

Description

This plugin is unusable for projects that contain jar overrides. Jar override properties are completely ignored and overridden jars are assumed to exist in the local repository. Obviously this is incorrect since such jars are overridden exactly because they do NOT reside in the local repository.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
David Eric Pugh added a comment - 24/Sep/04 8:29 AM

I added a unit test to verify that jar overrides work.. Check it out, and reopen if you disagree.. A unit test demontrating what you mean would be good.

Show
David Eric Pugh added a comment - 24/Sep/04 8:29 AM I added a unit test to verify that jar overrides work.. Check it out, and reopen if you disagree.. A unit test demontrating what you mean would be good.
Hide
Permalink
David Eric Pugh added a comment - 24/Sep/04 11:54 AM

Turns out what I understood as jar overrides was wrong.

Show
David Eric Pugh added a comment - 24/Sep/04 11:54 AM Turns out what I understood as jar overrides was wrong.
Hide
Permalink
David Eric Pugh added a comment - 24/Sep/04 11:58 AM

okay, now it all works properly!

Show
David Eric Pugh added a comment - 24/Sep/04 11:58 AM okay, now it all works properly!
Hide
Permalink
Sebastien Sahuc added a comment - 24/Sep/04 2:05 PM

Thanks for the fix. Unfortunately I'm tempted in reopening the bug (once I figure how to do it )

The fix is actually not working properly if the jar itself isn't located in the mavenrepo.

Let's take an example that part of our build scheme:

In the build.properties we defines the following (variable defined in maven script loader):

maven.jar.tools = $

{tools.jar}

Then in the project.xml we defined the dependency:

<dependency>
<id>tools</id>
</dependency>

This unfortunately ends up being wrong in the final .classpath generated by the eclipse plugin.

Here is the patch we're using for the moment until a final solution is found for those overriden jar that doesn't exist in the maven repository.

Index: classpath.jelly
===================================================================
RCS file: /home/cvspublic/maven-plugins/eclipse/src/plugin-resources/templates/classpath.jelly,v
retrieving revision 1.21
diff -u -r1.21 classpath.jelly
— classpath.jelly 24 Sep 2004 15:51:01 -0000 1.21
+++ classpath.jelly 24 Sep 2004 17:58:02 -0000
@@ -145,6 +145,10 @@
<j:when test="$

{lib.dependency.groupId == 'cactus' and ignoreCactus}

">
<!-- ignoring junit dependency as we've already created it -->
</j:when>
+ <j:when test="$

{lib.dependency.id == 'tools:tools'}

">
+ <!-- add tools.jar specified from maven tools.jar location -->
+ <classpathentry kind="lib" path="$

{lib.path}

"/>
+ </j:when>
<j:otherwise>
<!-- make sure it's a classpath dependency -->
<j:set var="isClasspath" value="$

{lib.dependency.isAddedToClasspath()}

"/>

Show
Sebastien Sahuc added a comment - 24/Sep/04 2:05 PM Thanks for the fix. Unfortunately I'm tempted in reopening the bug (once I figure how to do it ) The fix is actually not working properly if the jar itself isn't located in the mavenrepo. Let's take an example that part of our build scheme: In the build.properties we defines the following (variable defined in maven script loader): maven.jar.tools = $ {tools.jar} Then in the project.xml we defined the dependency: <dependency> <id>tools</id> </dependency> This unfortunately ends up being wrong in the final .classpath generated by the eclipse plugin. Here is the patch we're using for the moment until a final solution is found for those overriden jar that doesn't exist in the maven repository. Index: classpath.jelly =================================================================== RCS file: /home/cvspublic/maven-plugins/eclipse/src/plugin-resources/templates/classpath.jelly,v retrieving revision 1.21 diff -u -r1.21 classpath.jelly — classpath.jelly 24 Sep 2004 15:51:01 -0000 1.21 +++ classpath.jelly 24 Sep 2004 17:58:02 -0000 @@ -145,6 +145,10 @@ <j:when test="$ {lib.dependency.groupId == 'cactus' and ignoreCactus} "> <!-- ignoring junit dependency as we've already created it --> </j:when> + <j:when test="$ {lib.dependency.id == 'tools:tools'} "> + <!-- add tools.jar specified from maven tools.jar location --> + <classpathentry kind="lib" path="$ {lib.path} "/> + </j:when> <j:otherwise> <!-- make sure it's a classpath dependency --> <j:set var="isClasspath" value="$ {lib.dependency.isAddedToClasspath()} "/>
Hide
Permalink
David Eric Pugh added a comment - 24/Sep/04 4:28 PM

Go ahead and reopoen it.. I think the challenge I ran into was the need to have it be relative to an Eclipse classpath variable... I'd be happy to see any patches you can offer.

Show
David Eric Pugh added a comment - 24/Sep/04 4:28 PM Go ahead and reopoen it.. I think the challenge I ran into was the need to have it be relative to an Eclipse classpath variable... I'd be happy to see any patches you can offer.

People

  • Assignee:
    David Eric Pugh
    Reporter:
    Chuck Daniels
Vote (0)
Watch (1)

Dates

  • Created:
    14/Aug/04 6:42 PM
    Updated:
    24/Sep/04 4:28 PM
    Resolved:
    24/Sep/04 11:58 AM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.