One way is to use maven-jar-plugin and spesify test-jar goal. This gives you a 
jar containing test classes and test resources in addition to the main jar.

I the jar you want to also genrerate a test-jar for:

        <build>
                <plugins>
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-jar-plugin</artifactId>
                                <executions>
                                        <execution>
                                                <goals>
                                                        <goal>test-jar</goal>
                                                </goals>
                                        </execution>
                                </executions>
                        </plugin> 
                </plugins>
        <build>


In a artifact where you want to include your already installed artifact and 
test-jar

                <dependency>
                        <groupId>groupId</groupId>
                        <artifactId>artifactId</artifactId>
                        <version>1.0-SNAPSHOT</version>     
                </dependency>
                <dependency>
                        <groupId>groupId</groupId>
                        <artifactId>artifactId</artifactId>
                        <version>1.0-SNAPSHOT</version>
                        <type>test-jar</type>
                        <scope>test</scope>
                </dependency>

-Ronny

-----Opprinnelig melding-----
Fra: Sybren Stüvel [mailto:[EMAIL PROTECTED] 
Sendt: 9. oktober 2006 13:27
Til: Maven users mailinglist
Emne: Including test classes in snapshot jar

Hi folks,

I'd like to make a snapshot jar from a project, including the test classes, and 
install it into my local M2 repository. Is there some plugin I can use for that?

Greetings,
--
Sybren Stüvel <[EMAIL PROTECTED]>
Software Engineer CHESS iBusiness
Nieuwe Gracht 13, Haarlem
Postbus 5021, 2000 CA Haarlem

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


!DSPAM:452a3239205091336712104!


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to