zDev - M2E - WTP OSS
  1. zDev - M2E - WTP OSS
  2. MECLIPSEWTP-232

Dependencies of the same name and version are copied to the root folder of target/

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Not A Bug
    • Affects Version/s: 0.15.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:
      OS: windows 2003
      jdk: 1.6
      eclipse: Helios Service Release 2
      m2e: 1.0.100.20110804
      m2e-wtp: 0.15.1.20120208
    • Global Rank:
      22620

      Description

      Suppose I have a "war" packaging project and it has dependencies on two artifacts which have the same name and version, when I import the project into eclipse (having m2e-wtp feature installed), it will:

      #1. put those two artifacts under the root folder of target/
      #2. update Maven Dependencies classpath container to point to those artifacts under target/ instead of the artifacts in local maven repository.

      This is not correct and confusing.

      More worse, if I run "mvn clean package" in command line, the two artifacts are erased from target/ folder, leaving the project in warning status in eclipse.

      It (#1+#2) happens every time I import/reopen the project or change pom.xml.

      Steps to re-produce:
      1. download the attached zip and extract
      2. import the sample project into eclipse

      You should be able to see two jars in target/ folder.
      junit-junit-3.8.2.jar
      org.mod4j.org-junit-3.8.2.jar

        Issue Links

          Activity

          Shen Emac created issue -
          Hide
          Shen Emac added a comment -
          Show
          Shen Emac added a comment - It's a very similar issue to https://issues.sonatype.org/browse/MECLIPSEWTP-184 .
          Fred Bricon made changes -
          Field Original Value New Value
          Link This issue is related to MNGECLIPSE-679 [ MNGECLIPSE-679 ]
          Hide
          Fred Bricon added a comment -

          This is intentional and caused by the fix for MNGECLIPSE-679.
          Basically, WTP doesn't support the deployment of artifacts having the same filename. Since the artifacts are referenced from a classpath library, we have to make a copy of the files with different names.

          We will be able to fix the problem when WTP supports adding a custom archiveName attribute to classpath entries : https://bugs.eclipse.org/bugs/show_bug.cgi?id=359385

          Show
          Fred Bricon added a comment - This is intentional and caused by the fix for MNGECLIPSE-679 . Basically, WTP doesn't support the deployment of artifacts having the same filename. Since the artifacts are referenced from a classpath library, we have to make a copy of the files with different names. We will be able to fix the problem when WTP supports adding a custom archiveName attribute to classpath entries : https://bugs.eclipse.org/bugs/show_bug.cgi?id=359385
          Fred Bricon made changes -
          Component/s Project Converter [ 11161 ]
          Hide
          Shen Emac added a comment -

          That makes sense to me. Thanks!

          Show
          Shen Emac added a comment - That makes sense to me. Thanks!
          Fred Bricon made changes -
          Labels upstream
          Fred Bricon made changes -
          Affects Version/s 0.15.1 [ 12022 ]
          Hide
          Fred Bricon added a comment -

          Closing as this is the expected behaviour

          Show
          Fred Bricon added a comment - Closing as this is the expected behaviour
          Fred Bricon made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Not A Bug [ 7 ]

            People

            • Assignee:
              Fred Bricon
              Reporter:
              Shen Emac
              Last Updated By:
              Fred Bricon
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: