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 256367 - [81cat] Groovy/Maven: must build after every source modification
Summary: [81cat] Groovy/Maven: must build after every source modification
Status: STARTED
Alias: None
Product: groovy
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.2
Hardware: All All
: P3 normal (vote)
Assignee: bruno.flavio
URL:
Keywords:
: 236438 246191 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-11-04 16:53 UTC by aquaglia
Modified: 2016-02-10 22:13 UTC (History)
2 users (show)

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 aquaglia 2015-11-04 16:53:21 UTC
Product Version: NetBeans IDE 8.1 (Build 201510222201)
Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b15
System: Windows 7 version 6.1 running on amd64; Cp1252; en_GB (nb)
User directory: C:\Users\quaglan\AppData\Roaming\NetBeans\8.1
Cache directory: C:\Users\quaglan\AppData\Local\NetBeans\Cache\8.1

I have a Groovy/Maven project.

When I modify a groovy source file and then try run a JUnit test I get a NoClassDefFound error:

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.096 sec <<< FAILURE! - in eu.europa.ec.inspire.geoportal.client.pullreport.PullReportClientTest
testMain(eu.europa.ec.inspire.geoportal.client.pullreport.PullReportClientTest)  Time elapsed: 0.02 sec  <<< ERROR!
java.lang.NoClassDefFoundError: eu/europa/ec/inspire/geoportal/client/pullreport/PullReportClient

If I rebuild the project, the test runs fine.
Comment 1 bruno.flavio 2015-11-08 23:43:37 UTC
(In reply to aquaglia from comment #0)

Hello, if you run the tests directly from maven (cli) does it also fail until the project is rebuilt?

Could you give me some hints as to how I could recreate a similar setup to yours? If you used a maven archetype, or the relevant plugins to create a working pom.

Thank you.
Comment 2 aquaglia 2015-11-09 17:44:55 UTC
I have just sent via email the zipped project.
How do I test "directly from maven (cli)"?
Comment 3 aquaglia 2015-11-10 10:43:22 UTC
It is a very annoying behaviour.
Comment 4 bruno.flavio 2016-01-28 00:51:04 UTC
Hi, can you check if disabling the compile on save feature the problem disappears?

To disable compile on save go to File > Project Properties > Build > Compile and remove the "Compile On Save" option.
Comment 5 aquaglia 2016-01-28 07:37:41 UTC
Yes, disabling the compile on save feature the problem disappears.
Comment 6 bruno.flavio 2016-02-10 22:11:04 UTC
*** Bug 236438 has been marked as a duplicate of this bug. ***
Comment 7 bruno.flavio 2016-02-10 22:12:57 UTC
*** Bug 246191 has been marked as a duplicate of this bug. ***