java - How to build jars with and without test classes with Spring Boot with Maven -
i using build fat jar
<plugin> <groupid>org.springframework.boot</groupid> <artifactid>spring-boot-maven-plugin</artifactid> </plugin>
i added this, generated *-test.jar, not include dependency, testng classes necessary running test on command line.
<plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-jar-plugin</artifactid> <version>2.6</version> <executions> <execution> <goals> <goal>test-jar</goal> </goals> </execution> </executions> </plugin> </plugins>
java -classpath target/mypackage-tests.jar mytest exception in thread "main" java.lang.noclassdeffounderror: org/testng/testng ...
Comments
Post a Comment