|
Re: Apparent Maven / JUnit clash in eclipse [message #19346 is a reply to message #19255] |
Mon, 25 May 2009 17:14 |
Abel Mui Messages: 247 Registered: July 2009 |
Senior Member |
|
|
Hello Ben,
BenH wrote:
> Maven likes to compile test code to /target/test-classes
> This isnt part of the default Build Path.
I have created a new maven project by using the wizard and checking the
"Create a simple maven project" checkbox.
In this project, src/main/java has its output folder set to default
(target/classes) and src/test/java has its output folder correctly set to
target/test-classes.
There might be a glitch somewhere else... can you provide more information
on how did you configure your project?
> When eclipse's JUnit launcher runs, it doesnt include /target/test-classes
> in its classpath, and no test classes are found.
This works with the simple project created above (Right-click project, Run
as, Junit Test).
> My workaround is to add /target/test-classes to the Run Classpath of my
> unit test launch shortcut.
If needed, you could set the output folder for the src/test/java source
folder (in the Java Build Path project properties).
> Plus, Ive found I need to run mvn compiler:testCompile manually, because
> the eclipse builder seems not to (always) build that folder automatically?
There have been attempts to improve performance by avoiding running maven
goals when not needed. Maybe there is some corner case that is not
properly handled.
A test case would be very welcome.
> It would be nice to get better integration here eventually.
Sure!
Feedback from the community (like yours) will allow us to achieve it.
--
Abel Muiño
|
|
|
|
Re: Apparent Maven / JUnit clash in eclipse [message #569308 is a reply to message #19255] |
Mon, 25 May 2009 17:14 |
Abel Mui Messages: 247 Registered: July 2009 |
Senior Member |
|
|
Hello Ben,
BenH wrote:
> Maven likes to compile test code to /target/test-classes
> This isnt part of the default Build Path.
I have created a new maven project by using the wizard and checking the
"Create a simple maven project" checkbox.
In this project, src/main/java has its output folder set to default
(target/classes) and src/test/java has its output folder correctly set to
target/test-classes.
There might be a glitch somewhere else... can you provide more information
on how did you configure your project?
> When eclipse's JUnit launcher runs, it doesnt include /target/test-classes
> in its classpath, and no test classes are found.
This works with the simple project created above (Right-click project, Run
as, Junit Test).
> My workaround is to add /target/test-classes to the Run Classpath of my
> unit test launch shortcut.
If needed, you could set the output folder for the src/test/java source
folder (in the Java Build Path project properties).
> Plus, Ive found I need to run mvn compiler:testCompile manually, because
> the eclipse builder seems not to (always) build that folder automatically?
There have been attempts to improve performance by avoiding running maven
goals when not needed. Maybe there is some corner case that is not
properly handled.
A test case would be very welcome.
> It would be nice to get better integration here eventually.
Sure!
Feedback from the community (like yours) will allow us to achieve it.
--
Abel Muiño
|
|
|
|
Powered by
FUDForum. Page generated in 0.04479 seconds