Re: Duplicate name in parent and current
only because the group ids are the same 2009/3/25 Paul Gier > I think it's the duplicated artifactId's that is causing the problem. > Maybe the artifactId of the pom in the subdirectory modA/modA should be set > to "modA-modA" or something like that. > > > huser wrote: > >> 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 >> >>com.co.t3 >>t3 >>1.0-SNAPSHOT >>../base/pom.xml >> >> >> modA >> com.co.t3 >> >> modA >> >> pom >> >> 1.0-SNAPSHOT >> >> /base/modA/modA/pom.xml >> >>com.co.t3 >>modA >>1.0-SNAPSHOT >> >> com.co.t3 >> >> modA >> >> jar >> >> 1.0-SNAPSHOT >> >> > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > >
Re: Duplicate name in parent and current
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 > > 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 > >com.co.t3 >t3 >1.0-SNAPSHOT >../base/pom.xml > > > modA > com.co.t3 > > modA > > pom > > 1.0-SNAPSHOT > > /base/modA/modA/pom.xml > > com.co.t3 >modA >1.0-SNAPSHOT > > com.co.t3 > > modA > > jar > > 1.0-SNAPSHOT > > -- > 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: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > >
Re: Duplicate name in parent and current
I think it's the duplicated artifactId's that is causing the problem. Maybe the artifactId of the pom in the subdirectory modA/modA should be set to "modA-modA" or something like that. huser wrote: 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 com.co.t3 t3 1.0-SNAPSHOT ../base/pom.xml modA com.co.t3 modA pom 1.0-SNAPSHOT /base/modA/modA/pom.xml com.co.t3 modA 1.0-SNAPSHOT com.co.t3 modA jar 1.0-SNAPSHOT - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Duplicate name in parent and current
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 com.co.t3 t3 1.0-SNAPSHOT ../base/pom.xml modA com.co.t3 modA pom 1.0-SNAPSHOT /base/modA/modA/pom.xml com.co.t3 modA 1.0-SNAPSHOT com.co.t3 modA jar 1.0-SNAPSHOT -- 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: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org