Well I never saw it from this perspective. But I guess in MDA based projects you will always have to inject source code from you generation process into other modules. Because you will always generate multiple modules from one module. For instance, generating some kind of specification and parts of the implementation from a model.

I don't know what the new strategy of andromda team for maven 2.0 is, maybe I'm going to ask them.

Maybe I just introduce beside src and target a third folder "generated-src" that will contain only generated sources from andromda.

So the project structure would be:

src
   /main
      /java
      /resources
   /test
      /java
      /resources
generated-src
   /main
      /java
      /resources
   /test
      /java
      /resources
target
   /classes
   /test-classes

And the clean project doesn't delete the generated-src folders. What do you think about this?

Regards
-Ingo

Max Cooper schrieb:
It sounds like you figured it out.

In general, maven wants your modules to depend on each other only through artifacts. Generating sources in one module that get injected into another module violates this guideline.

I remember seeing that Andromda used to override the clean target in their Maven1 build. And I know they have moved on to Maven2. How does the maven example project handle 'clean' and it's generated sources? That might help identify a solution for your project.

-Max

Ingo Düppe wrote:
Max Cooper schrieb:

Post the build output that shows the failure.

-Max

Ingo Düppe wrote:

hi,

what is the difference between to separate calls of "mvn clean" and then "mvn install" to one call of "mvn clean install". I thought these calls would be equals, but the second one fails within my project.

Regards
Ingo

Hi,

Enclosed my debug output.

But I guess I know why the results are different between "mvn clean / mvn install" and "mvn clean install". The call order of the modules is different.
In my project I have the following four modules:

framework
   framework-utils
foundation
   foundation-model
   foundation-api
   foundation-core

The call order of my modules:
1. mvn clean / mvn install: [clean] framework-utils [clean] foundation-model [clean] foundation-api [clean] foundation-core [install] framework-utils [install] foundation-model [install] foundation-api [install] foundation-core 2. mvn clean install: [clean] framework-utils [install] framework-utils [clean] foundation-model [install] foundation-model [clean] foundation-api [install] foundation-api [clean] foundation-core [install] foundation-core

I generate source code with andromda within the foundation-model module for the api and core module. That why the second variant fails, because the generated source codes will be deleted during the clean phase of the api and core module
and this happens after the code generation in foundation-model.

Please correct my if I'm wrong.

Regards
Ingo


[INFO] [site:attach-descriptor]
[INFO] [install:install]
[INFO] Installing W:\openuss\foundation\foundation-model\pom.xml to d:\development\repository\maven-2.0\org\openuss\foundation\foundation-model\3.0-SNAPSHOT\foundation-model-3.0-SNAPSHOT.pom [INFO] ----------------------------------------------------------------------------
[INFO] Building OpenUSS - Foundation - API
[INFO]    task-segment: [clean, install]
[INFO] ----------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory W:\openuss\foundation\foundation-api\target
[INFO] Deleting directory W:\openuss\foundation\foundation-api\target\classes [INFO] Deleting directory W:\openuss\foundation\foundation-api\target\test-classes
[INFO] [andromda-multi-source:add-source {execution: add-source}]
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] No sources to compile
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] No sources to compile
[INFO] [surefire:test]
[INFO] No tests to run.
[INFO] [jar:jar]
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: W:\openuss\foundation\foundation-api\target\foundation-api-3.0-SNAPSHOT.jar
[INFO] [install:install]
[INFO] Installing W:\openuss\foundation\foundation-api\target\foundation-api-3.0-SNAPSHOT.jar to d:\development\repository\maven-2.0\org\openuss\foundation\foundation-api\3.0-SNAPSHOT\foundation-api-3.0-SNAPSHOT.jar [INFO] ----------------------------------------------------------------------------
[INFO] Building OpenUSS - Foundation - CORE
[INFO]    task-segment: [clean, install]
[INFO] ---------------------------------------------------------------------------- [INFO] artifact org.codehaus.mojo:build-helper-maven-plugin: checking for updates from andromda
[INFO] [clean:clean]
[INFO] Deleting directory W:\openuss\foundation\foundation-core\target
[INFO] Deleting directory W:\openuss\foundation\foundation-core\target\classes [INFO] Deleting directory W:\openuss\foundation\foundation-core\target\test-classes
[INFO] [andromda-multi-source:add-source {execution: add-source}]
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] artifact org.springframework:spring-mock: checking for updates from ibiblio [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '53fc4dae976137af8ba8899f7ad11473a30bb6c9'; remote = 'da39a3ee5e6b4b0d3255bfef95601890afd80709' - RETRYING [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '53fc4dae976137af8ba8899f7ad11473a30bb6c9'; remote = 'da39a3ee5e6b4b0d3255bfef95601890afd80709' - IGNORING [INFO] artifact org.springframework:spring-mock: checking for updates from andromda [INFO] artifact org.springframework:spring-mock: checking for updates from myfaces-apache [INFO] artifact org.springframework:spring-mock: checking for updates from apache [INFO] artifact org.springframework:spring-mock: checking for updates from central [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '53fc4dae976137af8ba8899f7ad11473a30bb6c9'; remote = 'da39a3ee5e6b4b0d3255bfef95601890afd80709' - RETRYING [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '53fc4dae976137af8ba8899f7ad11473a30bb6c9'; remote = 'da39a3ee5e6b4b0d3255bfef95601890afd80709' - IGNORING [INFO] artifact commons-lang:commons-lang: checking for updates from ibiblio [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '8ddf25a60220efe651706901f00b4531cfb37d83'; remote = 'da39a3ee5e6b4b0d3255bfef95601890afd80709' - RETRYING [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '8ddf25a60220efe651706901f00b4531cfb37d83'; remote = 'da39a3ee5e6b4b0d3255bfef95601890afd80709' - IGNORING [INFO] artifact commons-lang:commons-lang: checking for updates from andromda [INFO] artifact commons-lang:commons-lang: checking for updates from myfaces-apache [INFO] artifact commons-lang:commons-lang: checking for updates from apache [INFO] artifact commons-lang:commons-lang: checking for updates from central [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '8ddf25a60220efe651706901f00b4531cfb37d83'; remote = 'da39a3ee5e6b4b0d3255bfef95601890afd80709' - RETRYING [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '8ddf25a60220efe651706901f00b4531cfb37d83'; remote = 'da39a3ee5e6b4b0d3255bfef95601890afd80709' - IGNORING
[INFO] artifact log4j:log4j: checking for updates from ibiblio
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '17db5589054b2838bc417c173bbe0cab52f1829a'; remote = 'da39a3ee5e6b4b0d3255bfef95601890afd80709' - RETRYING [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '17db5589054b2838bc417c173bbe0cab52f1829a'; remote = 'da39a3ee5e6b4b0d3255bfef95601890afd80709' - IGNORING
[INFO] artifact log4j:log4j: checking for updates from andromda
[INFO] artifact log4j:log4j: checking for updates from myfaces-apache
[INFO] artifact log4j:log4j: checking for updates from apache
[INFO] artifact log4j:log4j: checking for updates from central
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '17db5589054b2838bc417c173bbe0cab52f1829a'; remote = 'da39a3ee5e6b4b0d3255bfef95601890afd80709' - RETRYING [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '17db5589054b2838bc417c173bbe0cab52f1829a'; remote = 'da39a3ee5e6b4b0d3255bfef95601890afd80709' - IGNORING [INFO] artifact org.springframework:spring: checking for updates from ibiblio [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = 'bcd87c7b5007f99e707f192919795b41b83eee54'; remote = 'da39a3ee5e6b4b0d3255bfef95601890afd80709' - RETRYING [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = 'bcd87c7b5007f99e707f192919795b41b83eee54'; remote = 'da39a3ee5e6b4b0d3255bfef95601890afd80709' - IGNORING [INFO] artifact org.springframework:spring: checking for updates from andromda [INFO] artifact org.springframework:spring: checking for updates from myfaces-apache [INFO] artifact org.springframework:spring: checking for updates from apache [INFO] artifact org.springframework:spring: checking for updates from central [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = 'bcd87c7b5007f99e707f192919795b41b83eee54'; remote = 'da39a3ee5e6b4b0d3255bfef95601890afd80709' - RETRYING [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = 'bcd87c7b5007f99e707f192919795b41b83eee54'; remote = 'da39a3ee5e6b4b0d3255bfef95601890afd80709' - IGNORING [INFO] artifact org.hibernate:hibernate: checking for updates from ibiblio [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '0741b7d27060f58e40b98419948ccfad20ed9438'; remote = 'da39a3ee5e6b4b0d3255bfef95601890afd80709' - RETRYING [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '0741b7d27060f58e40b98419948ccfad20ed9438'; remote = 'da39a3ee5e6b4b0d3255bfef95601890afd80709' - IGNORING [INFO] artifact org.hibernate:hibernate: checking for updates from andromda [INFO] artifact org.hibernate:hibernate: checking for updates from myfaces-apache [INFO] artifact org.hibernate:hibernate: checking for updates from apache [INFO] artifact org.hibernate:hibernate: checking for updates from central [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '0741b7d27060f58e40b98419948ccfad20ed9438'; remote = 'da39a3ee5e6b4b0d3255bfef95601890afd80709' - RETRYING [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '0741b7d27060f58e40b98419948ccfad20ed9438'; remote = 'da39a3ee5e6b4b0d3255bfef95601890afd80709' - IGNORING
[INFO] artifact jaybird:jaybird-full: checking for updates from ibiblio
[INFO] artifact jaybird:jaybird-full: checking for updates from andromda
[INFO] artifact jaybird:jaybird-full: checking for updates from myfaces-apache
[INFO] artifact jaybird:jaybird-full: checking for updates from apache
[INFO] artifact jaybird:jaybird-full: checking for updates from central
Downloading: http://www.ibiblio.org/maven2/jaybird/jaybird-full/2.0.1/jaybird-full-2.0.1.pom [WARNING] Unable to get resource from repository ibiblio (http://repo1.ibilio.org/maven2) Downloading: http://team.andromda.org/maven2/jaybird/jaybird-full/2.0.1/jaybird-full-2.0.1.pom [WARNING] Unable to get resource from repository andromda (http://team.andromda.org/maven2) Downloading: http://myfaces.zones.apache.org/dist/maven-repository//jaybird/jaybird-full/2.0.1/jaybird-full-2.0.1.pom [WARNING] Unable to get resource from repository myfaces-apache (http://myfaces.zones.apache.org/dist/maven-repository/) Downloading: http://cvs.apache.org/repository/jaybird/jaybird-full/2.0.1/jaybird-full-2.0.1.pom [WARNING] Unable to get resource from repository apache (http://cvs.apache.org/repository) Downloading: http://repo1.maven.org/maven2/jaybird/jaybird-full/2.0.1/jaybird-full-2.0.1.pom [WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2)
[INFO] [compiler:compile]
Compiling 6 source files to W:\openuss\foundation\foundation-core\target\classes [INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
W:\openuss\foundation\foundation-core\src\main\java\org\openuss\foundation\lecture\EnrollmentImpl.java:[12,42] cannot find symbol
symbol  : class EnrollmentBase
location: package org.openuss.foundation.lecture
W:\openuss\foundation\foundation-core\src\main\java\org\openuss\foundation\lecture\EnrollmentImpl.java:[13,49] cannot find symbol
symbol  : class Enrollment
location: package org.openuss.foundation.lecture
W:\openuss\foundation\foundation-core\src\main\java\org\openuss\foundation\lecture\FacultyServiceImpl.java:[12,42] cannot find symbol
symbol  : class FacultyServiceBase
location: package org.openuss.foundation.lecture
W:\openuss\foundation\foundation-core\src\main\java\org\openuss\foundation\lecture\FacultyServiceImpl.java:[18,69] cannot find symbol
symbol  : class Faculty
location: package org.openuss.foundation.lecture
W:\openuss\foundation\foundation-core\src\main\java\org\openuss\foundation\lecture\FacultyDaoImpl.java:[12,42] cannot find symbol
symbol  : class FacultyDaoBase
location: package org.openuss.foundation.lecture
W:\openuss\foundation\foundation-core\src\main\java\org\openuss\foundation\lecture\SubjectImpl.java:[12,42] cannot find symbol
symbol  : class SubjectBase
location: package org.openuss.foundation.lecture
W:\openuss\foundation\foundation-core\src\main\java\org\openuss\foundation\lecture\SubjectImpl.java:[13,49] cannot find symbol
symbol  : class Subject
location: package org.openuss.foundation.lecture
W:\openuss\foundation\foundation-core\src\main\java\org\openuss\foundation\lecture\PeriodImpl.java:[12,42] cannot find symbol
symbol  : class PeriodBase
location: package org.openuss.foundation.lecture
W:\openuss\foundation\foundation-core\src\main\java\org\openuss\foundation\lecture\PeriodImpl.java:[13,49] cannot find symbol
symbol  : class Period
location: package org.openuss.foundation.lecture
W:\openuss\foundation\foundation-core\src\main\java\org\openuss\foundation\lecture\FacultyImpl.java:[12,42] cannot find symbol
symbol  : class FacultyBase
location: package org.openuss.foundation.lecture
W:\openuss\foundation\foundation-core\src\main\java\org\openuss\foundation\lecture\FacultyImpl.java:[13,49] cannot find symbol
symbol  : class Faculty
location: package org.openuss.foundation.lecture
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4 minutes 12 seconds
[INFO] Finished at: Thu May 25 09:38:13 CEST 2006
[INFO] Final Memory: 25M/53M
[INFO] ------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to