maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <>
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 

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.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message