Skip to main content
Added closing bracket in a place that looks appropriate
Source Link
kryger
  • 13.1k
  • 8
  • 46
  • 67

This appears to occur because only the source code is compiling when you use mvn clean compile (I'm using maven 3.1.0 so I'm not sure if it always behaved like this).

If you run mvn test, the test code will compile as well, but then it runs the tests (which may not be immediately desirable if you're trying to run them through Eclipse.) The way around this is to add test-compile to your Maven command sequence whenever you do a mvn clean. For example, you would run mvn clean compile test-compile.

This appears to occur because only the source code is compiling when you use mvn clean compile (I'm using maven 3.1.0 so I'm not sure if it always behaved like this).

If you run mvn test, the test code will compile as well, but then it runs the tests (which may not be immediately desirable if you're trying to run them through Eclipse. The way around this is to add test-compile to your Maven command sequence whenever you do a mvn clean. For example, you would run mvn clean compile test-compile.

This appears to occur because only the source code is compiling when you use mvn clean compile (I'm using maven 3.1.0 so I'm not sure if it always behaved like this).

If you run mvn test, the test code will compile as well, but then it runs the tests (which may not be immediately desirable if you're trying to run them through Eclipse.) The way around this is to add test-compile to your Maven command sequence whenever you do a mvn clean. For example, you would run mvn clean compile test-compile.

Remove sentences which do not contribute to the solution. Add some formatting.
Source Link

I realize this is a bit belated of a response, but I was running into the same issue and thought I would contribute the solution I found.

This appears to occur because only the source code is compiling when you use "mvn clean compile" mvn clean compile (I'm using maven 3.1.0 so I'm not sure if it always behaved like this). 

If you run "mvn test"mvn test, the test code will compile as well, but then it runs the tests (which may not be immediately desirable if you're trying to run them through Eclipse. The way around this is to add test-compiletest-compile to your mvnMaven command sequence whenever you do a "mvn clean"mvn clean. For example, you would run "mvn clean compile test-compile"mvn clean compile test-compile.

I realize this is a bit belated of a response, but I was running into the same issue and thought I would contribute the solution I found.

This appears to occur because only the source code is compiling when you use "mvn clean compile" (I'm using maven 3.1.0 so I'm not sure if it always behaved like this). If you run "mvn test", the test code will compile as well, but then it runs the tests (which may not be immediately desirable if you're trying to run them through Eclipse. The way around this is to add test-compile to your mvn command sequence whenever you do a "mvn clean". For example, you would run "mvn clean compile test-compile".

This appears to occur because only the source code is compiling when you use mvn clean compile (I'm using maven 3.1.0 so I'm not sure if it always behaved like this). 

If you run mvn test, the test code will compile as well, but then it runs the tests (which may not be immediately desirable if you're trying to run them through Eclipse. The way around this is to add test-compile to your Maven command sequence whenever you do a mvn clean. For example, you would run mvn clean compile test-compile.

Source Link
Newtrino
  • 1.6k
  • 1
  • 11
  • 4

I realize this is a bit belated of a response, but I was running into the same issue and thought I would contribute the solution I found.

This appears to occur because only the source code is compiling when you use "mvn clean compile" (I'm using maven 3.1.0 so I'm not sure if it always behaved like this). If you run "mvn test", the test code will compile as well, but then it runs the tests (which may not be immediately desirable if you're trying to run them through Eclipse. The way around this is to add test-compile to your mvn command sequence whenever you do a "mvn clean". For example, you would run "mvn clean compile test-compile".