Maven 1.x Eclipse Plugin
  1. Maven 1.x Eclipse Plugin
  2. MPECLIPSE-46

Overriden jar that resides outside maven repo doesn't get resolved properly

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9
    • Labels:
      None
    • Environment:
      Win32, JDK1.4
    • Number of attachments :
      3

      Description

      Opening a new bug for MPECLIPSE-38 since I coudn't reopen it.

      The fix for MPECLIPSE-38 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()}

      "/>

      1. override.fix.patch
        1 kB
        Archimedes Trajano
      2. override.patch
        1 kB
        Archimedes Trajano
      3. override.patch
        1 kB
        Archimedes Trajano

        Activity

        Hide
        Archimedes Trajano added a comment -

        Alternate patch I wrote up for this problem

        Show
        Archimedes Trajano added a comment - Alternate patch I wrote up for this problem
        Hide
        Archimedes Trajano added a comment -

        Alternate patch I wrote up for this problem

        Show
        Archimedes Trajano added a comment - Alternate patch I wrote up for this problem
        Hide
        Archimedes Trajano added a comment -

        I uploaded the wrong patch file. override.fix.patch is the correct one.

        Should've used "lib" instead of "var"

        Show
        Archimedes Trajano added a comment - I uploaded the wrong patch file. override.fix.patch is the correct one. Should've used "lib" instead of "var"
        Hide
        David Eric Pugh added a comment -

        Thanks for the fix..

        Show
        David Eric Pugh added a comment - Thanks for the fix..

          People

          • Assignee:
            David Eric Pugh
            Reporter:
            Sebastien Sahuc
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: