You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Roman Ivanov (JIRA)" <ji...@codehaus.org> on 2012/02/16 01:09:03 UTC

[jira] (MJAR-139) New option to avoid empty jar creation

    [ https://jira.codehaus.org/browse/MJAR-139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=291849#comment-291849 ] 

Roman Ivanov commented on MJAR-139:
-----------------------------------

works fine, thanks for patch

config to use:
            <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-jar-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <skipIfEmpty>true</skipIfEmpty>
                </configuration>
                  <executions>
                    <execution>
                          <goals>
                            <goal>test-jar</goal>
                          </goals>
                    </execution>
                  </executions>
            </plugin>


                
> New option to avoid empty jar creation
> --------------------------------------
>
>                 Key: MJAR-139
>                 URL: https://jira.codehaus.org/browse/MJAR-139
>             Project: Maven 2.x JAR Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.3.1
>            Reporter: Roman Ivanov
>            Assignee: Kristian Rosenvold
>             Fix For: 2.4
>
>         Attachments: MJAR-139.patch
>
>
> Usage of "test-jar" is beneficial for all project, as all of them have tests.
> <plugin>
>  	<groupId>org.apache.maven.plugins</groupId>
>   	<artifactId>maven-jar-plugin</artifactId>
> 	<version>2.3.1</version>
>  	<executions>
> 	    <execution>
>       		<goals>
>        		    <goal>test-jar</goal>
>       		</goals>
> 	    </execution>
>   	</executions>
> </plugin>
> Pom artifacts and some jar artifacts does not have test and will never have them.
> In logs we have: "[WARNING] JAR will be empty - no content was marked for inclusion!"
> and empty and useless artifacts are created, deployed , ...
> It will be convenient to have an plugin option to define whether skip empty jar creation and warning or generate jar with warning in log. Does it make sense ?
> By default option will be FALSE, to comply with previous behavior.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira