Hello,

I've created a maven project with eclipse.
My maven project has 3 source folders : 

- src/main/resources
- src/main/java
- src/test/java

When I use maven compile, it compiles all except the classes in
src/test/java, but as I use eclipse, when I  modify something in
src/test/java, it compiles it also in target/classes as maven.

The problem is that during war packaging, it includes all in target/classes
in my war so it includes test classes.

I'd like to use maven plugin war, to tell him to exlude all classes java in
src/test/java.

I read other threads that talking about not compile classes that we don't
want to have to packaging, but it's not pratical for me because eclipse will
compile all...

I try that in my pom.xml :

     <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.0.2</version>
                <configuration>
                        <excludes>
                                <exclude>**/Exemple*.class</exclude>
                        </excludes>
                </configuration>
          </plugin>

and I also try that :

     <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.0.2</version>
                <configuration>
                        <excludes>
                                
<exclude>target/classes/com/pv/rules/test/*.*</exclude>
                        </excludes>
                </configuration>
          </plugin>

but it doesn't work.

To be more precise on my structure, on my source folder stc/test/java, I've
created a package com.pv.rules.test where I put a test java classe.

Do you have an idea?

Thanks :-)






-- 
View this message in context: 
http://www.nabble.com/how-to-exclude-classes-from-package-in-target-classes-to-be-copied-to-WAR-in-packaging-tp21540465p21540465.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