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 247982

Summary: Compile on Save does not work for maven submodules
Product: java Reporter: peathal <peathal>
Component: CompilerAssignee: Dusan Balek <dbalek>
Status: RESOLVED INVALID    
Severity: normal    
Priority: P3    
Version: 8.0.1   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description peathal 2014-10-16 13:55:30 UTC
When I use NetBeans with CoS for my graphhopper project and start the 'web' module which depends on the 'core' module then it often does not use the latest version of my classes, instead it seem to use the local jar or something else.

I'm not sure if you can reproduce it, I can always reproduce it. Please try:

 1. Download GraphHopper here: https://github.com/graphhopper/graphhopper
 2. Then open 'core' and 'web' in NetBeans. Include a System.out.println("now") statement at the beginning of GraphHopper.importOrLoad. Build the 'core' project
 3. Start 'web' via run. If config.properties is not found copy from config-examples.properties. You should see 'now'
 4. Now change 'now' into 'wow'. Run 'web' and NetBeans will pick the old value 'now', the expected would be the new one 'wow'.

Running xubuntu 14.04 and jdk7u67. Let me know if you need further details!


## Other observations possibly related to this. 

1. When I create a new class in 'core' then 'web' does not find them and says NoClassDefFoundError: com/graphhopper/routing/util/Weighting$Params

2. When no jar of the 'core' is available then 'web' is downloading it instead of creating and using the local classes:

Downloading: https://oss.sonatype.org/content/repositories/snapshots/com/graphhopper/graphhopper/0.4-SNAPSHOT/graphhopper-0.4-20141015.160048-50.jar
             
Downloaded: https://oss.sonatype.org/content/repositories/snapshots/com/graphhopper/graphhopper/0.4-SNAPSHOT/graphhopper-0.4-20141015.160048-50.jar (536 KB at 354.3 KB/sec)
Comment 1 peathal 2014-10-16 16:55:44 UTC
Strange: my colleague cannot reproduce it.

I'm using a fresh install of netbeans, I even droped the ~/.netbeans folder etc

And even more strange: when I call clean of 'core' it still uses the old version, the only work around is to build the jar of it.
Comment 2 peathal 2014-10-16 20:01:39 UTC
I think I have found the problem! When I use maven 3.2.3 (which contains an important security fix as it downloads JARS over HTTPS) this does not work. Using the embedded maven version and restarting helped to get it working. I've created a new issue and closed this here:
https://netbeans.org/bugzilla/show_bug.cgi?id=247988
Comment 3 markiewb 2014-10-16 21:07:59 UTC
(In reply to peathal from comment #2)
> I've created a new issue and closed this here:
> https://netbeans.org/bugzilla/show_bug.cgi?id=247988

So the state is now resolved invalid - not resolved fixed.