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/ProjectBuildingException [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
--- 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.module1-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.module2-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]

Reply via email to