Sorry for the late reply, have been ill for a couple of days... ATM the source-plugin is not explicitly mapped to a phase, which implcitly maps it to the 'package'-phase. When I run 'mvn clean install', everything runs fine until I get to the package- phase. Here my package is build and source:jar splits of a new life-cycle, running everything except the packaging again.
Here's the fragment of my POM: <plugin> <artifactId>maven-source-plugin</artifactId> <inherited>true</inherited> <executions> <execution> <id>jar</id> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> which gives me the following output: [INFO] ---------------------------------------------------------------------------- [INFO] Building Hermes Person - Shared module [INFO] task-segment: [clean, install] [INFO] ---------------------------------------------------------------------------- [INFO] [clean:clean] [INFO] Deleting directory /home/asr/Projects/Hermes/workspace-hermes/hermes/../hermes-person/../hermes-person-shared/target [INFO] Deleting directory /home/asr/Projects/Hermes/workspace-hermes/hermes/../hermes-person/../hermes-person-shared/target/classes [INFO] Deleting directory /home/asr/Projects/Hermes/workspace-hermes/hermes/../hermes-person/../hermes-person-shared/target/test-classes [INFO] [antrun:run {execution: sources}] [INFO] Executing tasks [echo] *********************** start ant build.xml user.name: asr ******************************** [echo] ----------------------- generate sources -------------------------------- generateSources: [mkdir] Created dir: /home/asr/Projects/Hermes/workspace-hermes/hermes-person-shared/target/generated-sources/main/java [echo] ************************ end ant build.xml user.name: asr ********************************* [INFO] Executed tasks [INFO] Registering compile source root /home/asr/Projects/Hermes/workspace-hermes/hermes/../hermes-person/../hermes-person-shared/target/generated-sources/main/java [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [antrun:run {execution: resources}] [INFO] Executing tasks [echo] *********************** start ant build.xml user.name: asr ******************************** [echo] ----------------------- process resources -------------------------------- processResources: [echo] ************************ end ant build.xml user.name: asr ********************************* [INFO] Executed tasks [INFO] [compiler:compile] Compiling 13 source files to /home/asr/Projects/Hermes/workspace-hermes/hermes/../hermes-person/../hermes-person-shared/target/classes [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] [INFO] Building jar: /home/asr/Projects/Hermes/workspace-hermes/hermes/../hermes-person/../hermes-person-shared/target/hermes-person-shared-0.0.1.jar [INFO] Preparing source:jar [WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation. [INFO] [antrun:run {execution: sources}] [INFO] Executing tasks [echo] *********************** start ant build.xml user.name: asr ******************************** [echo] ----------------------- generate sources -------------------------------- generateSources: [echo] ************************ end ant build.xml user.name: asr ********************************* [INFO] Executed tasks [INFO] Registering compile source root /home/asr/Projects/Hermes/workspace-hermes/hermes/../hermes-person/../hermes-person-shared/target/generated-sources/main/java [INFO] [source:jar {execution: jar}] [INFO] Building jar: /home/asr/Projects/Hermes/workspace-hermes/hermes/../hermes-person/../hermes-person-shared/target/hermes-person-shared-0.0.1-sources.jar [INFO] [install:install] [INFO] Installing /home/asr/Projects/Hermes/workspace-hermes/hermes/../hermes-person/../hermes-person-shared/target/hermes-person-shared-0.0.1.jar to /home/asr/.m2/repository/at/cfc/hermes/hermes-person/hermes-person-shared/0.0.1/hermes-person-shared-0.0.1.jar [INFO] Installing /home/asr/Projects/Hermes/workspace-hermes/hermes/../hermes-person/../hermes-person-shared/target/hermes-person-shared-0.0.1-sources.jar to /home/asr/.m2/repository/at/cfc/hermes/hermes-person/hermes-person-shared/0.0.1/hermes-person-shared-0.0.1-sources.jar This did not happen when using the old 2.0 plugin, which just packaged my sources in the same life-cycle! I'm not sure about the -DperformRelease though: I do not explicitly add it to my command-line, but maybe it's true per default?? Roland On Thursday 11 May 2006 20:18, Kenney Westerhof wrote: > On Thu, 11 May 2006, Roland Asmann wrote: > > The way I see it, it runs through the generate-sources phase no matter > > what! The 2.0.1 is per default bound to the package phase, and I just run > > 'mvn clean install', which triggers everything up to 'package' twice... > > Ok, but package implies that generate-sources is run anyway. It shouldn't > run things twice, though. Are you using maven 2.0.4? > > Btw, IIRC the sources plugin skips execution if you're not doing a release > (-DperformRelease=true). So even without the source plugin you end up > generating the sources, but you know that. > > So, are you telling me that if you use maven-sources-plugin 2.0 an 'mvn > clean install' only generates the sources once, and if you use 2.0.1, > they get generated twice? > > When is the sources-plugin run anyway? Did you bind it to a phase in the > pom, or are you specifing -DperformRelease=true, or..? > > -- Kenney > > > Roland > > > > On Thursday 11 May 2006 19:48, Kenney Westerhof wrote: > > > On Thu, 11 May 2006, Roland Asmann wrote: > > > > > > The source plugin needs to run the generate-sources phase, else it > > > might miss something in creating a jar. This was indeed fixed in 2.0.1. > > > > > > If you do 'mvn clean source:jar' on a source-generating project, the > > > jar won't contain the generated sources. Usually the sources are only > > > generated when you deploy, so if you run 'mvn source:jar deploy' it > > > won't generate the sources twice. Neither will it do that if you bind > > > it to package. > > > > > > -- Kenney > > > > > > > Hi, > > > > > > > > I've noticed that the new version of this plugin forks a new > > > > lifecycle... Can anybody clarify why this has been done? My builds > > > > are getting very slow because of this, since I have a pretty large > > > > source-code generator in the generate- sources phase... > > > > Are there any other changes compared to 2.0? If not, I think I'll > > > > move back to that one... > > > > > > > > Thanks, > > > > > > > > Roland > > > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > -- > > > Kenney Westerhof > > > http://www.neonics.com > > > GPG public key: http://www.gods.nl/~forge/kenneyw.key > > > > > > --------------------------------------------------------------------- > > > 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] > > -- > Kenney Westerhof > http://www.neonics.com > GPG public key: http://www.gods.nl/~forge/kenneyw.key > > --------------------------------------------------------------------- > 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]