NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
pgwiazda
Joined: 11 Feb 2011 Posts: 2
|
Posted: Fri Feb 11, 2011 7:08 am Post subject: Running single test with maven fails because of "compile on save" option |
|
|
I use NB 6.9.1 with external Maven 2. I have the old problem described here :
http://forums.netbeans.org/viewtopic.php?t=21044
I've started a new topic because this one is very old.
I'm trying to run one test file only (Right click + Test File). Sometimes NB runs maven, and I can see in output
| Code: | | mvn.bat -test=<class> ...etc |
but sometimes NB just runs tests and my application logs are first lines in output. The second one fails on processing entities and named queries (JPA2-Hibernate).
It's just the same problem like the one in NB6.8 from 2009 described above. Running all test works fine.
I've done some research and found that it looks like a problem with classpath or working directory.
- in the first case hibernate says that "PU root URL: file:/E:/workspaces/netbeans/pxcrm/target/classes" wich is good. It finds entities classes here
- in the second case hibernate says that "PU root URL: file:/E:/workspaces/netbeans/pxcrm/src/main/resources/" which is obviously wrong
It looks like someone had similiar problem here :
http://forums.netbeans.org/viewtopic.php?t=21803
I've changed "compile on save" to "For application execution only" and it looks like NB is running maven explicitly every time.
I'm not sure if this is a bug or I'm doing something wrong. It works for me for now, but maybe this should be fixed. What do you think?
This post can be a temporary solution for those, who have this problem[/code] |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|