You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Daniel Roig (JIRA)" <ji...@apache.org> on 2016/07/06 13:11:11 UTC

[jira] [Commented] (MNG-5940) Change the maven-source-plugin jar goal into jar-no-fork in Maven Super POM

    [ https://issues.apache.org/jira/browse/MNG-5940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15364280#comment-15364280 ] 

Daniel Roig commented on MNG-5940:
----------------------------------

This will be a much-awaited fix for my part. It manifested itself quite strangely. In Maven 3.3.9 it made the {{source}} plugin deploy twice, which Artifactory didn't think was too amusing when performing a release. 

If I used (in 3.3.9):

{noformat}
<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-source-plugin</artifactId>
	<executions>
		<execution>
			<id>attach-sources</id>
			<phase>package</phase>
			<goals>
				<goal>jar-no-fork</goal>
				<goal>test-jar-no-fork</goal>
			</goals>
		</execution>
	</executions>
</plugin>
{noformat}

I would wind up with the effective pom:

{noformat}
<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-source-plugin</artifactId>
	<executions>
		<execution>
			<id>attach-sources</id>
			<phase>package</phase>
			<goals>
                                <goal>jar</goal>
				<goal>jar-no-fork</goal>
				<goal>test-jar-no-fork</goal>
			</goals>
		</execution>
	</executions>
</plugin>
{noformat}

But it somehow worked fine in Maven 3.0.5. Now, in 3.3.9, I use: 

{noformat}
<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-source-plugin</artifactId>
	<executions>
		<execution>
			<id>attach-sources</id>
			<phase>package</phase>
			<goals>
                                <goal>jar</goal>
				<goal>test-jar-no-fork</goal>
			</goals>
		</execution>
	</executions>
</plugin>
{noformat}

in order to match the super POM.

Nevertheless, thanks for fixing this. I'll be sure to remember to change my POM back to {{<goal>jar-no-fork</goal>}} when 3.4.0 is released.

> Change the maven-source-plugin jar goal into jar-no-fork in Maven Super POM
> ---------------------------------------------------------------------------
>
>                 Key: MNG-5940
>                 URL: https://issues.apache.org/jira/browse/MNG-5940
>             Project: Maven
>          Issue Type: Improvement
>          Components: core
>            Reporter: Karl Heinz Marbaise
>            Assignee: Christian Schulte
>            Priority: Minor
>             Fix For: 3.4.0
>
>
> At the moment the {{maven-source-plugin:jar}} goal is defined in the Maven super pom:
> {code:xml}
>   <plugin>
>             <inherited>true</inherited>
>             <artifactId>maven-source-plugin</artifactId>
>             <executions>
>               <execution>
>                 <id>attach-sources</id>
>                 <goals>
>                   <goal>jar</goal>
>                 </goals>
>               </execution>
>             </executions>
>           </plugin>
> {code}
> where the goal of {{maven-source-plugin}} should be changed from {{jar}} into {{jar-no-fork}}, cause most of the time you need to override this behaviour.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)