Community
Participate
Working Groups
As discussed on m2e-dev mailing list (http://dev.eclipse.org/mhonarc/lists/m2e-dev/msg00557.html) both m2e-wtp and mavenarchiver.pomproperties provide mapping for maven-jar-plugin jar goal but deal with different aspects of jar packaging (manifest vs pom.properties generation). As a result, these two m2e extensions cannot be installed simultaneously and we had to pull one from m2e marketplace catalog to avoid confusion. To solve this properly, we need to move maven-jar-plugin integration to a separate standalone extension
The manifest generation is not limited to the maven-jar-plugin. Current m2e-wtp implementation reads the archive configuration from maven-jar-plugin, maven-ear-plugin, maven-ejb-plugin, maven-war-plugin and so on. Hence the need to provide different implementations for different packages/plugins. See : https://github.com/sonatype/m2eclipse-wtp/tree/0.13.0.20110623-0455/org.maven.ide.eclipse.wtp/src/org/maven/ide/eclipse/wtp/manifest https://github.com/sonatype/m2eclipse-wtp/blob/0.13.0.20110623-0455/org.maven.ide.eclipse.wtp/src/org/maven/ide/eclipse/wtp/manifest/EarManifestConfigurator.java
Unfortunately, I have to pull m2e-wtp out of m2e marketplace catalog. maven-jar-plugin mapping means that m2e-wtp will be installed by default for all projects that use maven-jar-plugin and this is a show-stopper.
Since the archiver configuration needs to be extracted from different plugins AND the generated manifest needs to be put in a different location depending on the package, what I think we should do is : - rename the org.sonatype.m2e.mavenarchiver.pomproperties plugin into org.sonatype.m2e.mavenarchiver - move (and rename) m2e-wtp's AbstractManifestCofigurator to org.sonatype.m2e.mavenarchiver AbstractMavenArchiverConfigurator - Add the pom properties generation logic to AbstractMavenArchiverConfigurator - move (and rename) m2e-wtp's JarManifestConfigurator to org.sonatype.m2e.mavenarchiver JarMavenArchiverconfigurator - declare the JarMavenArchiverconfigurator as primary configurator for the maven-jar-plugin In m2e-wtp : - add a hard dependency to org.sonatype.m2e.mavenarchiver - refactor existing configurators for WAR, EJB, EAR and RAR packages according to previous changes - declare the org.sonatype.m2e.mavenarchiver update site into m2e-wtp for p2 resolution
Looks reasonable. Let me know if you need any help.
(In reply to comment #4) > Looks reasonable. Let me know if you need any help. Created a pull request : https://github.com/sonatype/m2eclipse-extras/pull/1 (or https://github.com/sonatype/m2eclipse-extras/pull/1.patch for the plain text patch version)
(In reply to comment #5) > (In reply to comment #4) > > Looks reasonable. Let me know if you need any help. > > Created a pull request : https://github.com/sonatype/m2eclipse-extras/pull/1 > > (or https://github.com/sonatype/m2eclipse-extras/pull/1.patch for the plain > text patch version) Unfortunately an error in the site.xml slipped through, which prevents proper publishing of the plugin. The fix is available at https://github.com/sonatype/m2eclipse-extras/pull/2
Can you review / apply the aforementioned (and updated) pull request, then update the m2e-extras forge-sites please ? Once it's done I'll tag m2e-wtp 0.13.1 for release. Thx
git would not apply the second pull request for some reason, so I cherry-picked comming f410d5df730156a1feeb (Catch nasty IllegalArgumentException on resource refresh). let me know if I missed anything.
forgot to mention, git commit is https://github.com/sonatype/m2eclipse-extras/commit/7336a4d2a3ffaa794fc76503e11f97e122debf83 corresponding p2 repository https://repository.sonatype.org/content/repositories/forge-sites/m2e-extras/0.14.0/N/0.14.0.201107260131/
Moved to https://github.com/eclipse-m2e/m2e-core/issues/