maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <joerg.schai...@swisspost.com>
Subject Re: Can not build with Junit4.18
Date Wed, 02 Sep 2015 09:02:28 GMT
建文 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-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message