Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] m2e 1.4 RC1 build available (1.4.0.20130516-1039)

Thu, 16 May 2013 13:58:54 +0200, /Fred Bricon/:

> As per [3], this RC1 build will go live next thursday, So please 
> give it a try while we can still fix/respin it if necessary.

I have a legacy project which was retrofitted to a Maven
multi-module project couple of years ago. Its configuration doesn't
conform strictly to Maven conventions (lots of source, resources and
plugin customization went initially to migrate preserving most of
the original structure), but is otherwise o.k.

Using m2e 1.1 and 1.3.1 I don't observe the problem but using m2e
1.4 I get the following error for two of the modules:

---
Error Updating Maven Configuration

Unable to update maven configuration for the following projects:

child-module  |  Build path contains duplicate entry: '/.../resources' for project 'child-module'
other-module  |  Build path contains duplicate entry: '/.../resources' for project 'other-module'
---

Now the modules in question really use non-conventional (and not
recommended) configuration like:

    <build>
        <resources>
            <resource>
                <directory>${basedir}/../resources</directory>
                <includes>
                    <include>foo</include>
                </includes>
            </resource>
        </resources>

but there are no duplicate entries in the module configurations
alone, really.

I've tried creating minimal sample with a parent POM and a child
module with the given configuration - the problem is not observed.
Adding a second child module referring the same resource directory -
the problem appears.

Here's the source for the sample project demonstrating the problem
as a unified diff:

diff -r 000000000000 -r ff4e28e023c8 child-module/pom.xml
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/child-module/pom.xml	Wed May 22 00:42:28 2013 +0300
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0";
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+                            http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>net.example.m2e</groupId>
+        <artifactId>parent-reactor</artifactId>
+        <version>0.0.1-SNAPSHOT</version>
+    </parent>
+    <artifactId>child-module</artifactId>
+
+    <name>child-module</name>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>${basedir}/../resources</directory>
+                <includes>
+                    <include>bar</include>
+                </includes>
+            </resource>
+        </resources>
+    </build>
+
+</project>
diff -r 000000000000 -r ff4e28e023c8 other-module/pom.xml
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/other-module/pom.xml	Wed May 22 00:42:28 2013 +0300
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0";
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+                            http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>net.example.m2e</groupId>
+        <artifactId>parent-reactor</artifactId>
+        <version>0.0.1-SNAPSHOT</version>
+    </parent>
+    <artifactId>other-module</artifactId>
+
+    <name>other-module</name>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>${basedir}/../resources</directory>
+                <includes>
+                    <include>foo</include>
+                </includes>
+            </resource>
+        </resources>
+    </build>
+
+</project>
diff -r 000000000000 -r ff4e28e023c8 pom.xml
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pom.xml	Wed May 22 00:42:28 2013 +0300
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0";
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+                            http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>net.example.m2e</groupId>
+    <artifactId>parent-reactor</artifactId>
+    <version>0.0.1-SNAPSHOT</version>
+    <packaging>pom</packaging>
+
+    <name>parent-reactor</name>
+
+    <modules>
+        <module>child-module</module>
+        <module>other-module</module>
+    </modules>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <maven.compiler.source>1.6</maven.compiler.source>
+        <maven.compiler.target>1.6</maven.compiler.target>
+    </properties>
+
+</project>
diff -r 000000000000 -r ff4e28e023c8 resources/bar
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/resources/bar	Wed May 22 00:42:28 2013 +0300
@@ -0,0 +1,1 @@
+2
diff -r 000000000000 -r ff4e28e023c8 resources/foo
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/resources/foo	Wed May 22 00:42:28 2013 +0300
@@ -0,0 +1,1 @@
+1

Here's the sample directory structure:

pom.xml
resources/
  foo
  bar
child-module/
  pom.xml
other-module/
  pom.xml

-- 
Stanimir


Back to the top