You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Costin Caraivan (JIRA)" <ji...@codehaus.org> on 2009/02/03 13:42:19 UTC

[jira] Created: (MJAR-114) For a pom packaging project, the jar created is empty (even using ).

For a pom packaging project, the jar created is empty (even using <includes>).
------------------------------------------------------------------------------

                 Key: MJAR-114
                 URL: http://jira.codehaus.org/browse/MJAR-114
             Project: Maven 2.x Jar Plugin
          Issue Type: Bug
    Affects Versions: 2.0
         Environment: Windows XP SP3, Java 1.5.0.11, x86-64.
            Reporter: Costin Caraivan
            Priority: Minor


Hello.

For a pom packaging project, running a profile with this jar configuration results in a jar containing only the META-INF folder =>
[INFO] [jar:jar {execution: jar-feature}]
[WARNING] JAR will be empty - no content was marked for inclusion!

This is the plugin configuration:

                  <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>jar-feature</id>
                                <phase>process-resources</phase>
                                <configuration>
                                    <includes>
                                        <include>${basedir}/**</include>
                                    </includes>
                                    <classifier>me</classifier>
                                    <forceCreation>true</forceCreation>
                                </configuration>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                        <inherited>false</inherited>
                    </plugin>


I tried all sorts of configurations, all sorts of paths, but it does not work, the jar is still empty (and I'm sure that the path is valid, or so I hope :) ).

PS:
Don't ask why I'm making a jar in a pom packaging project, it has to do with Maven limitations (it is a wonderful tools, but it's not perfect, and real life > any tool :) ). There are ways around this, but this is the most elegant solution (or I'd have to make a 2 step build which is cumbersome for the users of this build, so not an option).

Thank you.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MJAR-114) For a pom packaging project, the jar created is empty (even using ).

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MJAR-114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=163698#action_163698 ] 

Benjamin Bentmann commented on MJAR-114:
----------------------------------------

The includes/excludes are meant to give *relative* paths, so something including the basedir will likely not match anything. The plugin is zipping up the contents specified by the [classesDirectory|http://maven.apache.org/plugins/maven-jar-plugin/jar-mojo.html#classesDirectory], so you might want to try configuring this.

> For a pom packaging project, the jar created is empty (even using <includes>).
> ------------------------------------------------------------------------------
>
>                 Key: MJAR-114
>                 URL: http://jira.codehaus.org/browse/MJAR-114
>             Project: Maven 2.x Jar Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0
>         Environment: Windows XP SP3, Java 1.5.0.11, x86-64.
>            Reporter: Costin Caraivan
>            Priority: Minor
>
> Hello.
> For a pom packaging project, running a profile with this jar configuration results in a jar containing only the META-INF folder =>
> [INFO] [jar:jar {execution: jar-feature}]
> [WARNING] JAR will be empty - no content was marked for inclusion!
> This is the plugin configuration:
>                   <plugin>
>                         <groupId>org.apache.maven.plugins</groupId>
>                         <artifactId>maven-jar-plugin</artifactId>
>                         <executions>
>                             <execution>
>                                 <id>jar-feature</id>
>                                 <phase>process-resources</phase>
>                                 <configuration>
>                                     <includes>
>                                         <include>${basedir}/**</include>
>                                     </includes>
>                                     <classifier>me</classifier>
>                                     <forceCreation>true</forceCreation>
>                                 </configuration>
>                                 <goals>
>                                     <goal>jar</goal>
>                                 </goals>
>                             </execution>
>                         </executions>
>                         <inherited>false</inherited>
>                     </plugin>
> I tried all sorts of configurations, all sorts of paths, but it does not work, the jar is still empty (and I'm sure that the path is valid, or so I hope :) ).
> PS:
> Don't ask why I'm making a jar in a pom packaging project, it has to do with Maven limitations (it is a wonderful tools, but it's not perfect, and real life > any tool :) ). There are ways around this, but this is the most elegant solution (or I'd have to make a 2 step build which is cumbersome for the users of this build, so not an option).
> Thank you.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (MJAR-114) For a pom packaging project, the jar created is empty (even using ).

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MJAR-114?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann closed MJAR-114.
----------------------------------

      Assignee: Benjamin Bentmann
    Resolution: Not A Bug

> For a pom packaging project, the jar created is empty (even using <includes>).
> ------------------------------------------------------------------------------
>
>                 Key: MJAR-114
>                 URL: http://jira.codehaus.org/browse/MJAR-114
>             Project: Maven 2.x Jar Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0
>         Environment: Windows XP SP3, Java 1.5.0.11, x86-64.
>            Reporter: Costin Caraivan
>            Assignee: Benjamin Bentmann
>            Priority: Minor
>
> Hello.
> For a pom packaging project, running a profile with this jar configuration results in a jar containing only the META-INF folder =>
> [INFO] [jar:jar {execution: jar-feature}]
> [WARNING] JAR will be empty - no content was marked for inclusion!
> This is the plugin configuration:
>                   <plugin>
>                         <groupId>org.apache.maven.plugins</groupId>
>                         <artifactId>maven-jar-plugin</artifactId>
>                         <executions>
>                             <execution>
>                                 <id>jar-feature</id>
>                                 <phase>process-resources</phase>
>                                 <configuration>
>                                     <includes>
>                                         <include>${basedir}/**</include>
>                                     </includes>
>                                     <classifier>me</classifier>
>                                     <forceCreation>true</forceCreation>
>                                 </configuration>
>                                 <goals>
>                                     <goal>jar</goal>
>                                 </goals>
>                             </execution>
>                         </executions>
>                         <inherited>false</inherited>
>                     </plugin>
> I tried all sorts of configurations, all sorts of paths, but it does not work, the jar is still empty (and I'm sure that the path is valid, or so I hope :) ).
> PS:
> Don't ask why I'm making a jar in a pom packaging project, it has to do with Maven limitations (it is a wonderful tools, but it's not perfect, and real life > any tool :) ). There are ways around this, but this is the most elegant solution (or I'd have to make a 2 step build which is cumbersome for the users of this build, so not an option).
> Thank you.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MJAR-114) For a pom packaging project, the jar created is empty (even using ).

Posted by "Costin Caraivan (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MJAR-114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=163699#action_163699 ] 

Costin Caraivan commented on MJAR-114:
--------------------------------------

Thank you for the kind comment. This should be written in the documentation though.

Your explanation is crystal clear unlike the documentation you linked to. It could be even copy/pasted in the documentation :)

> For a pom packaging project, the jar created is empty (even using <includes>).
> ------------------------------------------------------------------------------
>
>                 Key: MJAR-114
>                 URL: http://jira.codehaus.org/browse/MJAR-114
>             Project: Maven 2.x Jar Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0
>         Environment: Windows XP SP3, Java 1.5.0.11, x86-64.
>            Reporter: Costin Caraivan
>            Priority: Minor
>
> Hello.
> For a pom packaging project, running a profile with this jar configuration results in a jar containing only the META-INF folder =>
> [INFO] [jar:jar {execution: jar-feature}]
> [WARNING] JAR will be empty - no content was marked for inclusion!
> This is the plugin configuration:
>                   <plugin>
>                         <groupId>org.apache.maven.plugins</groupId>
>                         <artifactId>maven-jar-plugin</artifactId>
>                         <executions>
>                             <execution>
>                                 <id>jar-feature</id>
>                                 <phase>process-resources</phase>
>                                 <configuration>
>                                     <includes>
>                                         <include>${basedir}/**</include>
>                                     </includes>
>                                     <classifier>me</classifier>
>                                     <forceCreation>true</forceCreation>
>                                 </configuration>
>                                 <goals>
>                                     <goal>jar</goal>
>                                 </goals>
>                             </execution>
>                         </executions>
>                         <inherited>false</inherited>
>                     </plugin>
> I tried all sorts of configurations, all sorts of paths, but it does not work, the jar is still empty (and I'm sure that the path is valid, or so I hope :) ).
> PS:
> Don't ask why I'm making a jar in a pom packaging project, it has to do with Maven limitations (it is a wonderful tools, but it's not perfect, and real life > any tool :) ). There are ways around this, but this is the most elegant solution (or I'd have to make a 2 step build which is cumbersome for the users of this build, so not an option).
> Thank you.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira