Maven JAR Plugin
  1. Maven JAR Plugin
  2. MJAR-114

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Not A Problem
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows XP SP3, Java 1.5.0.11, x86-64.

      Description

      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.

        Activity

        Costin Caraivan created issue -
        Benjamin Bentmann made changes -
        Field Original Value New Value
        Resolution Not A Bug [ 6 ]
        Assignee Benjamin Bentmann [ bentmann ]
        Status Open [ 1 ] Closed [ 6 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 10:31:03 UTC 2015 [ 1428229863560 ]
        Mark Thomas made changes -
        Workflow jira [ 12722000 ] Default workflow, editable Closed status [ 12759467 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 00:05:23 UTC 2015 [ 1428278723217 ]
        Mark Thomas made changes -
        Workflow jira [ 12959581 ] Default workflow, editable Closed status [ 12996508 ]

          People

          • Assignee:
            Benjamin Bentmann
            Reporter:
            Costin Caraivan
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development