This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 258365 - Maven project source code change does not get recognized by JUnit test case
Summary: Maven project source code change does not get recognized by JUnit test case
Status: RESOLVED INCOMPLETE
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-14 19:29 UTC by wqtnetbeans
Modified: 2016-06-29 16:19 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description wqtnetbeans 2016-03-14 19:29:53 UTC
In a Maven Java or EJB module, if I change the source code without doing "clean", and just save the change and run the corresponding JUnit test case, the test case would still run on the old source code before the change. Ex. if I change the log message's verbiage in the source code, save it, and run the JUnit, it is the old log message being printed out, instead of the new/changed one.
Comment 1 wqtnetbeans 2016-03-14 19:34:48 UTC
Here is the IDE console log when I run the Junit (ctrl + f6):

cd C:\Users\d54a\sf-svn\esignature-R22318\ClaimsConsentESignatureListener\1.0\trunk\ClaimsConsentESignatureListener-EJB; "JAVA_HOME=C:\\Program Files\\Java\\jdk1.8.0_72" "M2_HOME=C:\\Program Files\\Apache Software Foundation\\apache-maven-3.2.5" cmd /c "\"\"C:\\Program Files\\Apache Software Foundation\\apache-maven-3.2.5\\bin\\mvn.bat\" -Dtest=sf.claims.claimsconsentesiglistener.facade.TerminalEventHandlerTest -Dmaven.ext.class.path=\"C:\\Program Files\\NetBeans 8.1\\java\\maven-nblib\\netbeans-eventspy.jar;C:\\Program Files\\NetBeans 8.1\\java\\maven-nblib\\netbeans-cos.jar\" -Dfile.encoding=UTF-8 -Ppitest surefire:test\""
Running NetBeans Compile On Save execution. Phase execution is skipped and output directories of dependency projects (with Compile on Save turned on) will be used instead of their jar artifacts.
Scanning for projects...

It does say the "compile on save" folder will be used instead of the JAR, but it doesn't seem to actually pick up the latest change.
Comment 2 Tomas Stupka 2016-06-29 16:19:36 UTC
sounds like a duplicate of issue #248628
what nb build do you use?