You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by RobJac <ro...@caritor.com> on 2006/07/27 15:08:33 UTC

Include Test classes in Jar

When I am trying to build/jar a project. The test-classes are not getting
jarred. Is there a way I can change settings in my pom.xml to include the
test classes as well when i build my project?
-- 
View this message in context: http://www.nabble.com/Include-Test-classes-in-Jar-tf2009433.html#a5520569
Sent from the Maven - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Include Test classes in Jar

Posted by Alexis Midon <al...@gmail.com>.
you should add the following plugins.
regards

Alexis


        <!--
        | Those 2 plugins allow to build:
        |    - a JAR of the test classes
        |    - a JAR of the sources classes
        |    - a JAR of the test sources classes
        -->
<!-- JAR of the test classes -->
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-jar-plugin</artifactId>
    <executions>
        <execution>
            <id>Build test-jar</id>
            <goals>
                <goal>test-jar</goal>
            </goals>
        </execution>
    </executions>
</plugin>
<!-- JAR of the sources classes & JAR of the test sources classes -->
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-source-plugin</artifactId>
    <executions>
        <execution>
            <id>Build src-jar and src-test-jar</id>
            <goals>
                <goal>jar</goal>
                <goal>test-jar</goal>
            </goals>
        </execution>
    </executions>
</plugin>


On 7/27/06, RobJac <ro...@caritor.com> wrote:
>
>
> When I am trying to build/jar a project. The test-classes are not getting
> jarred. Is there a way I can change settings in my pom.xml to include the
> test classes as well when i build my project?
> --
> View this message in context:
> http://www.nabble.com/Include-Test-classes-in-Jar-tf2009433.html#a5520569
> Sent from the Maven - Users forum at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>