NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Running single test with maven fails because of "compile on save" option

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
pgwiazda



Joined: 11 Feb 2011
Posts: 2

PostPosted: Fri Feb 11, 2011 7:08 am    Post subject: Running single test with maven fails because of "compile on save" option Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo