[BUILD-119] mvn eclipse:eclipse not working in magnolia_main.pub Created: 29/Jan/13  Updated: 19/Sep/13  Resolved: 19/Sep/13

Status: Closed
Project: Build
Component/s: Poms
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Achim Wiedemann Assignee: Magnolia International
Resolution: Outdated Votes: 0
Labels: None
Remaining Estimate: 0.25h
Time Spent: Not Specified
Original Estimate: 0.25h
Environment:

Windows, Maven 3.0.4


Attachments: Text File pom.xml.patch    
Template:
Patch included:
Yes
Acceptance criteria:
Empty
Date of First Response:

 Description   

Used code from main branch, so should affect Magnolia 4.5.7.

Problem

When I try to create an Eclipse project with Maven (mvn eclipse:eclipse) from the Magnolia source code (magnolia_main.pub), I always get the following error from Maven:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-eclipse-plugin:2.8
:eclipse (default-cli) on project magnolia-core: Request to merge when 'filterin
g' is not identical. Original=resource src/main/resources: output=target/classes
, include=[**/*], exclude=[**/*.java], test=false, filtering=false, merging with
=resource src/main/resources: output=target/classes, include=[META-INF/magnolia/
*|**/license.xml], exclude=[**/*.java], test=false, filtering=true -> [Help 1]

Suggested Solution

Apparently it helps to explicitly specify the plugin-version when running the maven-eclipse plugin:

$ mvn org.apache.maven.plugins:maven-eclipse-plugin:2.6:eclipse

However, the plugin version can also be specified in the (parent-) pom.xml like this:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-eclipse-plugin</artifactId>
  <version>2.6</version>
</plugin>

If specified like this, you can simply run the usual mvn eclipse:eclipse without getting that strange error. Might save people some time.



 Comments   
Comment by Magnolia International [ 04/Apr/13 ]

Hey Achim, thanks for the report. You're right, we should specify plugin versions explicitly. We do it for most plugins nowadays, and I think this one (and probably the idea equivalent) was left out because we don't really use it anymore; instead we use the IDEs "import from pom.xml" features, which seem to work better for us and are overall more straightforward. Details on our wiki if you're interested.
However, if you feel this plugin is still useful, I'll be happy to update this in the next release of our parent poms. But I suppose we should go for a more recent version (2.8 or more), but as your report implies, there seems to be some incompatibility with our current poms anyway...

Comment by Magnolia International [ 19/Sep/13 ]

Achim, I just checked... and this has been done in our parent a long while ago; what branch of Magnolia were you trying to build ?
As far as I can tell, it's been fixed with MAGNOLIA-2607, i.e since Magnolia 4.1.

Generated at Sun Feb 11 23:38:56 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.