exclude Test.java class from maven build war -
i've tried exclude .java file of src/test/java being packaged in maven build. pom.xml is:
plugins> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-compiler-plugin</artifactid> <inherited>true</inherited> <configuration> <source>1.6</source> <target>1.6</target> </configuration> <executions> <execution> <id>default-testcompile</id> <phase>test-compile</phase> <configuration> < test excludes > <exclude>**/test1.java</exclude> <exclude>**/test2.java</exclude> <exclude>**/test3.java</exclude> <exclude>**/test4.java</exclude> <exclude>**/test5.java</exclude> </testexcludes> </configuration> <goals> <goal>testcompile</goal> </goals> </execution> </executions> enter code here
but when i'm trying run test classes excluded build, giving classnotfoundexception.
kindly, guide me..
i have added below plugins skipping test cases:
<plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-surefire-plugin</artifactid> <version>2.12.2</version> <configuration> <skiptests>true</skiptests> </configuration> </plugin>
Comments
Post a Comment