建文 wrote: > Junit is added in dependencies,and i can run Junit test in my Eclipse, > but when run mvn clean install -DskipTests=true fail
Maven is about conventions. If you don't follow its conventions, you'll run into trouble. Like this. Maven separates between the main source and the code for test (unlike Eclipse) and uses different class paths. JUnit is *only* on the classpath for the test code, which is expected by Maven in the subdirectory src/test/java. As long as you insists on violating Maven's conventions (like keeping test code in src/main/java), you'll face such problems. That's what peoples tried to tell you already. Cheers, Jörg --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org