Hi All

I have a maven web project that has packaging as "war". the package generates 
war file that confirms to war format. But, i like to package the project as a 
"jar" as well along with the default "war" format. So, I am trying to use 
"maven jar" plugin to achieve that. I am using the following jar plugin 
configuration.


<plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <executions>
                <execution>
                    <id>make-a-jar</id>
                    <phase>package</phase>
                    <goals>
                        <goal>jar</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                
<classesDirectory>${project.build.outputDirectory}</classesDirectory>
                <includes>
                    <include>../../src/main/webapp/**</include>
                    <include>**/*</include>
                </includes>
            </configuration>
</plugin>

The "package" command produces a jar file that contains the classes and the 
contents of 'resources' folder and war file produces a proper 'war' file. But 
the contents of 'src/main/webapp' are not included in the jar file. How to 
include the contents of src/main/webapp in the jar using the jar plugin?

Stack Overflow Question
http://stackoverflow.com/questions/15509893/how-to-create-a-war-and-jar-from-a-web-project

Reply via email to