Spring Tool Suite
  1. Spring Tool Suite
  2. STS-2349

Creating duplicate pom.properties and pom.xml files in jar file

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.8.1.RELEASE
    • Fix Version/s: 2.9.0.M2
    • Component/s: MAVEN
    • Labels:
      None
    • Environment:

      Windows 7
      JDK 1.6.29

      Description

      To reproduce, I've just downloaded the STS, then created a new maven project, then run install on the project. In the jar file that is produced in

      META-INF\maven\test\test\

      (test is the name for the project), I get two pom.properties, and two pom.xml.

      The two pom.properties have these lines at the top:

      #Generated by Maven Integration for Eclipse
      #Thu Dec 22 08:22:50 NZDT 2011

      and

      #Generated by Maven
      #Thu Dec 22 08:23:05 NZDT 2011

      So looks like there are two passes giving two sets of files?

      I've also pulled down Indigo, and done the same there - which seems to work fine, hence I'm logging it here.

      Hope you can provide a way forward for this - the duplicate files cause other parts of the build to break.

      Thanks,

      Matt

        Activity

        Hide
        Andrew Eisenberg (c) added a comment -

        Does the "null" error go away after a Maven update project configuration? My guess is that there is some confusion and that something is trying to call the WTP plugin even though it is not around. Also, try open/close of your project.

        Show
        Andrew Eisenberg (c) added a comment - Does the "null" error go away after a Maven update project configuration? My guess is that there is some confusion and that something is trying to call the WTP plugin even though it is not around. Also, try open/close of your project.
        Hide
        Matthew Harrison added a comment -

        Yes the null error does go away after updating the configuration.

        But I guess the real question is what is the WTP plugin up to?

        Show
        Matthew Harrison added a comment - Yes the null error does go away after updating the configuration. But I guess the real question is what is the WTP plugin up to?
        Hide
        Andrew Eisenberg (c) added a comment -

        Honestly...I am not sure exactly how it works. I do know that it is not simple. It controls which menu commands are active based on your pom.

        I'm guessing that there is a conflict between WTP and some other plugin. Do you have any idea which one that might be? If so, I'm sure that the M2E team would like to hear about that.

        Show
        Andrew Eisenberg (c) added a comment - Honestly...I am not sure exactly how it works. I do know that it is not simple. It controls which menu commands are active based on your pom. I'm guessing that there is a conflict between WTP and some other plugin. Do you have any idea which one that might be? If so, I'm sure that the M2E team would like to hear about that.
        Hide
        Matthew Harrison added a comment -

        I posted to a couple of other places, and ended up getting this response:

        It seems the maven archiver doesn't like when the output directory already contains the maven descriptors. I think the duplicate files thing should be fixed in the maven archiver plugin. You should raise an issue on the CodeHaus JIRA

        Anyway, you need to execute a clean build when running a CLI build (mvn clean package)

        In Eclipse, Maven descriptors are generated by org.sonatype.m2e.mavenarchiver, a dependency of m2e-wtp. If you want to be able to disable their generation, I suggest you speak up on https://github.com/sonatype/m2eclipse-extras/issues/9"

        So it seems to be that the m2e.mavenarchiver is creating pom.xml files etc. in the target directory, then these get pulled in by the maven archiver maven plugin, which then also creates its own files - hence the duplicates. I've posted some bits as per the suggestions from the quote - I'll update if I see any other comments/resolutions.

        Thanks

        Show
        Matthew Harrison added a comment - I posted to a couple of other places, and ended up getting this response: It seems the maven archiver doesn't like when the output directory already contains the maven descriptors. I think the duplicate files thing should be fixed in the maven archiver plugin. You should raise an issue on the CodeHaus JIRA Anyway, you need to execute a clean build when running a CLI build (mvn clean package) In Eclipse, Maven descriptors are generated by org.sonatype.m2e.mavenarchiver , a dependency of m2e-wtp. If you want to be able to disable their generation, I suggest you speak up on https://github.com/sonatype/m2eclipse-extras/issues/9 " So it seems to be that the m2e.mavenarchiver is creating pom.xml files etc. in the target directory, then these get pulled in by the maven archiver maven plugin, which then also creates its own files - hence the duplicates. I've posted some bits as per the suggestions from the quote - I'll update if I see any other comments/resolutions. Thanks
        Hide
        Andrew Eisenberg (c) added a comment -

        Thanks for the feedback. Closing this issue.

        Show
        Andrew Eisenberg (c) added a comment - Thanks for the feedback. Closing this issue.

          People

          • Assignee:
            Andrew Eisenberg (c)
            Reporter:
            Matthew Harrison
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              First Response Date: