You cannot have two modules in the reactor with the same groupId and artifactId...
from your pom snippets it looks like this is the case... consider changing either the groupId or the artifactId of one of the modA's (Note that the artifactId does not have to be the same as the directory name... it's just that it's nicer if it is ;-) ) -Stephen 2009/3/25 huser <[email protected]> > > Hi, > > I have a situation in which the dir names are same. > > Example: > /base > /base/modA > /base/modA/modA > > I get the following error while trying to run mvn compile. The code for 2 > POM's is below. What should I change in the parent to make this work ? > > Thanks, > > > Reason: Parent element is a duplicate of the current project for project > com.co.t3:modA > > > [INFO] > ------------------------------------------------------------------------ > [INFO] Trace > org.apache.maven.reactor.MavenExecutionException: Parent element is a > duplicate > of the current project for project com.co.t3:modA > at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:378) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:292) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:287) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. > java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces > sorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) > at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) > at > org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) > > at org.codehaus.classworlds.Launcher.main(Launcher.java:375) > > /base/modA/pom.xml > <parent> > <groupId>com.co.t3</groupId> > <artifactId>t3</artifactId> > <version>1.0-SNAPSHOT</version> > <relativePath>../base/pom.xml</relativePath> > </parent> > > <name> modA </name> > <groupId>com.co.t3</groupId> > > <artifactId>modA</artifactId> > > <packaging>pom</packaging> > > <version>1.0-SNAPSHOT</version> > > /base/modA/modA/pom.xml > <parent> > <groupId>com.co.t3</groupId> > <artifactId>modA</artifactId> > <version>1.0-SNAPSHOT</version> > </parent> > <groupId>com.co.t3</groupId> > > <artifactId>modA</artifactId> > > <packaging>jar</packaging> > > <version>1.0-SNAPSHOT</version> > > -- > View this message in context: > http://www.nabble.com/Duplicate-name-in-parent-and-current-tp22707830p22707830.html > Sent from the Maven - Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
