I didn't see my last post come through, so I thought I would try again. I have a multi level maven project. That consists of 4 jars and a web application.
The source is at http://www.weseewhathappens.com/mvn.zip There is a parent module. Jar a has no internal depenedencies Jar b has is dependent on jar a and uses the maven ant plugin to generate sources. jar c has no internal dependencies jar d depends on jar c webapp depends on jars a c and d. If I run mvn clean package at the top level everything works fine. If I run mvn clean package assembly:assembly, I see the ant task for jar -b run twice. This results in a corrupt jar-b.jar as the generated code must have clean run before you can generate the source. The pom's are attached. [INFO] Scanning for projects... [INFO] Reactor build order: [INFO] Parent POM [INFO] Jar A [INFO] Jar B [INFO] Jar-c [INFO] Jar-d [INFO] Webapp A [INFO] ------------------------------------------------------------------------ [INFO] Building Parent POM [INFO] task-segment: [clean, package] [INFO] ------------------------------------------------------------------------ [INFO] [clean:clean {execution: default-clean}] [INFO] Deleting directory C:\dev\maven\Copy of enterprise\target [INFO] [site:attach-descriptor {execution: default-attach-descriptor}] [INFO] ------------------------------------------------------------------------ [INFO] Building Jar A [INFO] task-segment: [clean, package] [INFO] ------------------------------------------------------------------------ [INFO] [clean:clean {execution: default-clean}] [INFO] Deleting directory C:\dev\maven\Copy of enterprise\jar-a\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] Copying 0 resource [INFO] [compiler:testCompile {execution: default-testCompile}] [INFO] Nothing to compile - all classes are up to date [INFO] [surefire:test {execution: default-test}] [INFO] Surefire report directory: C:\dev\maven\Copy of enterprise\jar-a\target\surefire-reports ------------------------------------------------------- T E S T S ------------------------------------------------------- There are no tests to run. Results : Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 [INFO] [jar:jar {execution: default-jar}] [INFO] Building jar: C:\dev\maven\Copy of enterprise\jar-a\target\jar-a.jar [INFO] ------------------------------------------------------------------------ [INFO] Building Jar B [INFO] task-segment: [clean, package] [INFO] ------------------------------------------------------------------------ [INFO] [clean:clean {execution: default-clean}] [INFO] Deleting directory C:\dev\maven\Copy of enterprise\jar-b\target [INFO] [antrun:run {execution: WebLogicMBeanMaker}] [INFO] Executing tasks [echo] Building Authentication provider with WebLogicMBeanMaker... [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [INFO] Executed tasks [INFO] Registering compile source root C:\dev\maven\Copy of enterprise\jar-b\target\generated-sources\main\java [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 C:\dev\maven\Copy of enterprise\jar-b\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: C:\dev\maven\Copy of enterprise\jar-b\target\jar-b.jar [INFO] ------------------------------------------------------------------------ [INFO] Building Jar-c [INFO] task-segment: [clean, package] [INFO] ------------------------------------------------------------------------ [INFO] [clean:clean {execution: default-clean}] [INFO] Deleting directory C:\dev\maven\Copy of enterprise\jar-c\target [INFO] [resources:resources {execution: default-resources}] [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory C:\dev\maven\Copy of enterprise\jar-c\src\main\resources [INFO] [compiler:compile {execution: default-compile}] [INFO] No sources to compile [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 C:\dev\maven\Copy of enterprise\jar-c\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}] [WARNING] JAR will be empty - no content was marked for inclusion! [INFO] Building jar: C:\dev\maven\Copy of enterprise\jar-c\target\jar-c-0.0.1-SNAPSHOT.jar [INFO] ------------------------------------------------------------------------ [INFO] Building Jar-d [INFO] task-segment: [clean, package] [INFO] ------------------------------------------------------------------------ [INFO] [clean:clean {execution: default-clean}] [INFO] Deleting directory C:\dev\maven\Copy of enterprise\jar-d\target [INFO] [resources:resources {execution: default-resources}] [WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent! [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 0 resource [INFO] skip non existing resourceDirectory C:\dev\maven\Copy of enterprise\jar-d\src\main\resources\localizations [INFO] Copying 0 resource [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] Copying 0 resource [INFO] [compiler:testCompile {execution: default-testCompile}] [INFO] Nothing to compile - all classes are up to date [INFO] [surefire:test {execution: default-test}] [INFO] Surefire report directory: C:\dev\maven\Copy of enterprise\jar-d\target\surefire-reports ------------------------------------------------------- T E S T S ------------------------------------------------------- There are no tests to run. Results : Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 [INFO] [jar:jar {execution: default-jar}] [INFO] Building jar: C:\dev\maven\Copy of enterprise\jar-d\target\jar-d.jar [INFO] ------------------------------------------------------------------------ [INFO] Building Webapp A [INFO] task-segment: [clean, package] [INFO] ------------------------------------------------------------------------ [INFO] [clean:clean {execution: default-clean}] [INFO] Deleting directory C:\dev\maven\Copy of enterprise\webapp-a\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 C:\dev\maven\Copy of enterprise\webapp-a\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] [war:war {execution: default-war}] [INFO] Packaging webapp [INFO] Assembling webapp[webapp-a] in [C:\dev\maven\Copy of enterprise\webapp-a\target\webapp-a] [INFO] Processing war project [INFO] Copying webapp resources[C:\dev\maven\Copy of enterprise\webapp-a\src\main\webapp] [INFO] Webapp assembled in [78 msecs] [INFO] Building war: C:\dev\maven\Copy of enterprise\webapp-a\target\webapp-a.war [INFO] ------------------------------------------------------------------------ [INFO] Building Parent POM [INFO] task-segment: [assembly:assembly] (aggregator-style) [INFO] ------------------------------------------------------------------------ [INFO] Preparing assembly:assembly [INFO] ------------------------------------------------------------------------ [INFO] Building Parent POM [INFO] ------------------------------------------------------------------------ [INFO] [site:attach-descriptor {execution: default-attach-descriptor}] [INFO] ------------------------------------------------------------------------ [INFO] Building Jar A [INFO] ------------------------------------------------------------------------ [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] Copying 0 resource [INFO] [compiler:testCompile {execution: default-testCompile}] [INFO] Nothing to compile - all classes are up to date [INFO] [surefire:test {execution: default-test}] [INFO] Surefire report directory: C:\dev\maven\Copy of enterprise\jar-a\target\surefire-reports ------------------------------------------------------- T E S T S ------------------------------------------------------- There are no tests to run. Results : Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 [INFO] [jar:jar {execution: default-jar}] [INFO] ------------------------------------------------------------------------ [INFO] Building Jar B [INFO] ------------------------------------------------------------------------ [INFO] [antrun:run {execution: WebLogicMBeanMaker}] [INFO] Executing tasks [echo] Building Authentication provider with WebLogicMBeanMaker... [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [echo] Building Authentication provider with WebLogicMBeanMaker. DONE! [INFO] Executed tasks [INFO] Registering compile source root C:\dev\maven\Copy of enterprise\jar-b\target\generated-sources\main\java [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 C:\dev\maven\Copy of enterprise\jar-b\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] ------------------------------------------------------------------------ [INFO] Building Jar-c [INFO] ------------------------------------------------------------------------ [INFO] [resources:resources {execution: default-resources}] [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory C:\dev\maven\Copy of enterprise\jar-c\src\main\resources [INFO] [compiler:compile {execution: default-compile}] [INFO] No sources to compile [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 C:\dev\maven\Copy of enterprise\jar-c\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}] [WARNING] JAR will be empty - no content was marked for inclusion! [INFO] ------------------------------------------------------------------------ [INFO] Building Jar-d [INFO] ------------------------------------------------------------------------ [INFO] [resources:resources {execution: default-resources}] [WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent! [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 0 resource [INFO] skip non existing resourceDirectory C:\dev\maven\Copy of enterprise\jar-d\src\main\resources\localizations [INFO] Copying 0 resource [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] Copying 0 resource [INFO] [compiler:testCompile {execution: default-testCompile}] [INFO] Nothing to compile - all classes are up to date [INFO] [surefire:test {execution: default-test}] [INFO] Surefire report directory: C:\dev\maven\Copy of enterprise\jar-d\target\surefire-reports ------------------------------------------------------- T E S T S ------------------------------------------------------- There are no tests to run. Results : Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 [INFO] [jar:jar {execution: default-jar}] [INFO] ------------------------------------------------------------------------ [INFO] Building Webapp A [INFO] ------------------------------------------------------------------------ [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 C:\dev\maven\Copy of enterprise\webapp-a\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] [war:war {execution: default-war}] [INFO] Packaging webapp [INFO] Assembling webapp[webapp-a] in [C:\dev\maven\Copy of enterprise\webapp-a\target\webapp-a] [INFO] Processing war project [INFO] Copying webapp resources[C:\dev\maven\Copy of enterprise\webapp-a\src\main\webapp] [INFO] Webapp assembled in [16 msecs] [INFO] Building war: C:\dev\maven\Copy of enterprise\webapp-a\target\webapp-a.war [INFO] [assembly:assembly {execution: default-cli}] [INFO] Reading assembly descriptor: etc/assembly/assembly.xml [WARNING] NOTE: Currently, inclusion of module dependencies may produce unpredictable results if a version conflict occurs. [INFO] Processing DependencySet (output=weblogic/server/lib/mbeantypes) [WARNING] NOTE: Currently, inclusion of module dependencies may produce unpredictable results if a version conflict occurs. [INFO] Processing DependencySet (output=auth/lib) [WARNING] NOTE: Currently, inclusion of module dependencies may produce unpredictable results if a version conflict occurs. [INFO] Processing DependencySet (output=applications/myapp.ear/APP-INF/lib) [WARNING] NOTE: Currently, inclusion of module dependencies may produce unpredictable results if a version conflict occurs. [INFO] Building zip: C:\dev\maven\Copy of enterprise\target\myproject-0.0.1-SNAPSHOT_null-bin.zip [INFO] [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] ------------------------------------------------------------------------ [INFO] Parent POM ............................................ SUCCESS [2.406s] [INFO] Jar A ................................................. SUCCESS [1.703s] [INFO] Jar B ................................................. SUCCESS [0.313s] [INFO] Jar-c ................................................. SUCCESS [0.016s] [INFO] Jar-d ................................................. SUCCESS [0.640s] [INFO] Webapp A .............................................. SUCCESS [0.797s] [INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 8 seconds [INFO] Finished at: Sat Jan 16 15:09:57 EST 2010 [INFO] Final Memory: 26M/47M [INFO] ------------------------------------------------------------------------
