Hi all,
I'm relatively new to Maven and I'm working on a web app project. It's
packaged as a war archive, but what I want is to generate an alternative
package that contains also test classes and resources. The ideal situation
is an executable jar from which test classes can be launched. I tried with
the following pom:

<modelVersion>4.0.0</modelVersion>
        <groupId>it.ids</groupId>
        <artifactId>PLX-WS</artifactId>
        <packaging>war</packaging>
        <name>PLX-WS</name>
        <version>0.1</version>
        <parent>
                <groupId>it.ids</groupId>
                <artifactId>PLX-WS</artifactId>
                <version>0.1</version>
        </parent>
        <build>                 
                <plugins>
                              <plugin>
                                        
<groupId>org.apache.maven.plugins</groupId>
                                        
<artifactId>maven-jar-plugin</artifactId>
                                        <version>2.2</version>
                                        <executions>                            
        
                                                <execution>
                                                <includes>
                                                     <include>**</include>
                                                </includes>                     
                                        
                                                <goals>
                                                        <goal>test-jar</goal>
                                                </goals>
                                                <phase>package</phase>
                                                </execution>
                                        </executions>
                                </plugin>
                </plugins>
                                
        </build>

I tried with mvn jar:jar-test but I receive:

V:\Workspace\PLX-WS>mvn jar:test-jar
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'jar'.
[INFO]
------------------------------------------------------------------------
[INFO] Building PLX-WS
[INFO]    task-segment: [jar:test-jar]
[INFO]
------------------------------------------------------------------------
[INFO] [jar:test-jar]
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: V:\Workspace\PLX-WS\target\PLX-WS-tests.jar
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 4 seconds
[INFO] Finished at: Wed Feb 18 14:04:39 CET 2009
[INFO] Final Memory: 10M/18M
[INFO]
------------------------------------------------------------------------

and an empty Jar is created. If I change to <packaging>jar</packaging>
however it works...
What should I change in my configuration? Is there a common practice to
create test packages for web applications? Can you give me some
recommendations?
Thanks in advance

-- 
View this message in context: 
http://www.nabble.com/Best-practices-to-generate-a-webapp-test-package--tp22078616p22078616.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to