Why does the Maven goal "package" include the resources in the jar, but the goal "jar:jar" doesnt?

Posted by Bernhard V on Stack Overflow See other posts from Stack Overflow or by Bernhard V
Published on 2010-05-07T08:12:04Z Indexed on 2010/05/07 8:18 UTC
Read the original article Hit count: 181

Filed under:
|
|
|

Hi,

when I package my project with the Maven goal "package", the resources are included as well. They are originally located in the directory "src/main/resources". Because I want to create an executable jar and add the classpath to the manifest, I'm using maven-jar-plugin.

I've configured it as the following likes:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
    <version>2.2</version>
    <configuration>
        <archive>
            <manifest>
                <addClasspath>true</addClasspath>
                <mainClass>at.sozvers.stp.zpv.ekvkumsetzer.Main</mainClass>
            </manifest>
        </archive>
    </configuration>
</plugin>

Why won't the jar file created with "jar:jar" include my resources as well. As far as I'm concerned it should use the same directories as the "package" goal (which are in my case inherited from the Maven Super POM).

© Stack Overflow or respective owner

Related posts about maven-2

Related posts about maven-plugin