Hi,

I'm trying to limit the creation of Sources and Javadoc jars to goals only 
after install.

Currently, these two are triggered with profiles (the one for PROD deployment) 
and it works well.

I'd like to have those also created for internal deployment when we don't use 
the PROD profile.

Having the two plugins linked to the install phase for that purpose seemed good 
to me:

<plugin>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.0.4</version>
                <executions>
                    <execution>
                        <phase>install</phase>
                        <goals>
                            <goal>jar</goal>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <quiet>true</quiet>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

and it works to some extends. The articfacts are created (-sources-jar, 
-javadoc.jar) as expected when invoking the install goal.
But they aren't copied to the local repository anymore. (though the sources 
artifacts are when invoking the deploy goal with this config.)

NB: when invoking 'deploy' goal: if Javadoc plugin is linked to deploy phase, 
javadoc artifact doesn't get copied nor uploaded to local and remote repos. If 
linked to the install phase like for the Source plugin, javadoc artifact do get 
copied and then uploaded.

Why is that? 

I have a hard time understanding why they get copied when the plugin 
<execution> section doesn't contain any phase attribute, or when the plugin 
belongs to a Profile and NOT when the <phase>install</phase> is included in the 
plugin.

-nodje
-- 
View this message in context: 
http://n2.nabble.com/Linking-source---javadoc-plugin-to-install-phase---limitation--tp2626903p2626903.html
Sent from the maven users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to