According to the site:
http://maven.apache.org/plugins/maven-source-plugin/jar-mojo.html

source:jar

This plugin bundles all the sources into a jar archive.

Mojo Attributes:

    * Requires a Maven 2.0 project to execute.
    * Since version: 2.0
    * Automatically executes within the lifecycle phase: package
    * Invokes the execution of the lifecycle phase generate-sources
prior to executing itself.

Notice the last statement. If you have anything bound to
generate-sources (I think this is the default binding of the dependency
plugin) then it will run multiple times.

-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Steinar Bang
Sent: Wednesday, January 09, 2008 12:55 PM
To: [email protected]
Subject: Re: Why do maven lifecycles fork?

>>>>> "Brian E. Fox" <[EMAIL PROTECTED]>:

> Any plugin that declares @execute [phase] will cause the build to
> fork.  The dependency plugin does not, but one of your other plugins
> must. I know that javadoc did, assembly does (depending on which
> goal), enforcer:enforce-once does. Take a look at the various plugins
> you have bound and see which one is forking the build. If it's in a
> parent pom, it will fork the entire multi-module build.

Ok, thanx for the tip!

I'll walk through the parent POMs, then.

Company SuperPOM, content of <build><plugins/></build> :
 maven-source-plugin, execution of jar and test-jar with no phase
 binding

 maven-bundle-plugin, configuration but no execution

 maven-compiler-plugin, configuration but no execution

 maven-surefire-plugin, configuration but no execution

 maven-project-info-reports-plugin, no configuration, no execution

 maven-jxr-plugin, no configuration, no execution

 maven-surefire-report-plugin, no configuration, no execution

 maven-javadoc-plugin, configuration, no execution

Project parent POM, , content of <build><plugins/></build> :
 maven-source-plugin, execution of jar and test-jar with no phase
 binding

 maven-compiler-plugin, configuration but no execution

 maven-bundle-plugin, configuration but no execution

 maven-surefire-plugin, configuration but no execution

 maven-clean-plugin, configuration but no execution

 maven-project-info-reports-plugin, no configuration, no execution

 maven-jxr-plugin, no configuration, no execution

 maven-surefire-report-plugin, no configuration, no execution

 maven-pmd, configuration but no execution

 emma-maven-plugin, no configuration, no execution

 maven-javadoc-plugin, configuration, no execution

 maven-project-info-reports-plugin, configuration, no execution


The maven-source-plugin looks like a likely culprit.  

At the very least there is no need for two of it, and what I originally
tried to accomplish (creating source jars for both the artifact and its
test jar).


---------------------------------------------------------------------
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