You need to add a <relativePath> for parent elements. Its mandatory in Maven 3. Add those and your builds should work.
And you can always see other issues about compatibility by googling. Subir -----Original Message----- From: Robert Einsle [mailto:[email protected]] Sent: Tuesday, April 27, 2010 12:59 PM To: Maven Users List Subject: Different behavior of Maven 2 and 3 on Flat Projekt Layout Hy List, lets assume i have 3 Projects: xx.yy.app.parent xx.yy.app.module1 xx.yy.app.module2 .parent is Parent of both modules --- cut --- <parent> <artifactId>xx.yy.app.parent</artifactId> <groupId>xx.yy.app</groupId> <version>1.0.0-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> <groupId>xx.yy.app</groupId> <artifactId>xx.yy.app.module1</artifactId> <version>1.0.0-SNAPSHOT</version> <name>Module 1</name> --- cut --- , in .parent the both modules are linked with: --- cut --- <modules> <module>../xx.yy.app.module1</module> <module>../xx.yy.app.module2</module> </modules> --- cut --- Now i start "clean package" on Eclipse, my output is: --- cut --- [INFO] Scanning for projects... [ERROR] The build could not read 2 projects -> [Help 1] [ERROR] The project xx.yy.app:xx.yy.app.module1:1.0.0-SNAPSHOT (D:\Eclipse_Workspaces\maven-3.5.2\xx.yy.app.module1\pom.xml) has 1 error [ERROR] Non-resolvable parent POM xx.yy.app:xx.yy.app.parent:1.0.0-SNAPSHOT for xx.yy.app:xx.yy.app.module1:1.0.0-SNAPSHOT: Failed to resolve POM for xx.yy.app:xx.yy.app.parent:1.0.0-SNAPSHOT due to Missing: ---------- 1) xx.yy.app:xx.yy.app.parent:pom:1.0.0-SNAPSHOT ---------- 1 required artifact is missing. for artifact: xx.yy.app:xx.yy.app.parent:pom:1.0.0-SNAPSHOT from the specified remote repositories: central (http://repo1.maven.org/maven2, releases=true, snapshots=false) -> [Help 2] [ERROR] The project xx.yy.app:xx.yy.app.module2:1.0.0-SNAPSHOT (D:\Eclipse_Workspaces\maven-3.5.2\xx.yy.app.module2\pom.xml) has 1 error [ERROR] Non-resolvable parent POM xx.yy.app:xx.yy.app.parent:1.0.0-SNAPSHOT for xx.yy.app:xx.yy.app.module2:1.0.0-SNAPSHOT: Failed to resolve POM for xx.yy.app:xx.yy.app.parent:1.0.0-SNAPSHOT due to Missing: ---------- 1) xx.yy.app:xx.yy.app.parent:pom:1.0.0-SNAPSHOT ---------- 1 required artifact is missing. for artifact: xx.yy.app:xx.yy.app.parent:pom:1.0.0-SNAPSHOT from the specified remote repositories: central (http://repo1.maven.org/maven2, releases=true, snapshots=false) -> [Help 2] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingExceptio n [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelExcept ion --- cut --- when i run this on Maven 2.2.1 --- cut --- [INFO] Scanning for projects... [INFO] Reactor build order: [INFO] Application Parent [INFO] Module 1 [INFO] Module 2 [INFO] ------------------------------------------------------------------------ [INFO] Building Application Parent [INFO] task-segment: [clean, package] [INFO] ------------------------------------------------------------------------ [INFO] [clean:clean {execution: default-clean}] [INFO] [site:attach-descriptor {execution: default-attach-descriptor}] [INFO] ------------------------------------------------------------------------ [INFO] Building Module 1 [INFO] task-segment: [clean, package] [INFO] ------------------------------------------------------------------------ [INFO] [clean:clean {execution: default-clean}] [INFO] Deleting directory D:\Eclipse_Workspaces\maven-3.5.2\xx.yy.app.module1\target [INFO] [resources:resources {execution: default-resources}] [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 0 resource [INFO] [compiler:compile {execution: default-compile}] [INFO] Nothing to compile - all classes are up to date [INFO] [resources:testResources {execution: default-testResources}] [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory D:\Eclipse_Workspaces\maven-3.5.2\xx.yy.app.module1\src\test\resources [INFO] [compiler:testCompile {execution: default-testCompile}] [INFO] No sources to compile [INFO] [surefire:test {execution: default-test}] [INFO] No tests to run. [INFO] [jar:jar {execution: default-jar}] [INFO] Building jar: D:\Eclipse_Workspaces\maven-3.5.2\xx.yy.app.module1\target\xx.yy.app.mod ule1-1.0.0-SNAPSHOT.jar [INFO] ------------------------------------------------------------------------ [INFO] Building Module 2 [INFO] task-segment: [clean, package] [INFO] ------------------------------------------------------------------------ [INFO] [clean:clean {execution: default-clean}] [INFO] Deleting directory D:\Eclipse_Workspaces\maven-3.5.2\xx.yy.app.module2\target [INFO] [resources:resources {execution: default-resources}] [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 0 resource [INFO] [compiler:compile {execution: default-compile}] [INFO] Nothing to compile - all classes are up to date [INFO] [resources:testResources {execution: default-testResources}] [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory D:\Eclipse_Workspaces\maven-3.5.2\xx.yy.app.module2\src\test\resources [INFO] [compiler:testCompile {execution: default-testCompile}] [INFO] No sources to compile [INFO] [surefire:test {execution: default-test}] [INFO] No tests to run. [INFO] [jar:jar {execution: default-jar}] [INFO] Building jar: D:\Eclipse_Workspaces\maven-3.5.2\xx.yy.app.module2\target\xx.yy.app.mod ule2-1.0.0-SNAPSHOT.jar [INFO] [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] ------------------------------------------------------------------------ [INFO] Application Parent .................................... SUCCESS [3.453s] [INFO] Module 1 .............................................. SUCCESS [1.953s] [INFO] Module 2 .............................................. SUCCESS [0.125s] [INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5 seconds [INFO] Finished at: Tue Apr 27 09:21:48 CEST 2010 [INFO] Final Memory: 14M/34M [INFO] ------------------------------------------------------------------------ --- cut --- The same behavoir i have running it on plain Maven. Does maven 3 don't allow flat multi project layout? how can i resolve this Problem? Thanks Robert -- Robert Einsle [email protected] http://www.einsle.de --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] Please do not print this email unless it is absolutely necessary. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
