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 201443 - Maven Dependency Download Strategy should have option like "Every change in POM"
Summary: Maven Dependency Download Strategy should have option like "Every change in POM"
Status: RESOLVED WONTFIX
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.0.1
Hardware: All All
: P4 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-30 14:56 UTC by muzPayne
Modified: 2016-07-07 08:37 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description muzPayne 2011-08-30 14:56:06 UTC
Current Maven Dependency Download Strategies consist of:
 * Never
 * First Project Open Only
 * Every Project Open

It will be very usable if we can add option like "Every change in POM", so all artifacts binaries/javadoc/sources can be automatically downloaded every time there is a change in POM...
Comment 1 Jesse Glick 2011-08-30 22:27:49 UTC
Agreed. I would actually prefer to switch the default to "Every Project Open" (or your proposed option such as "Every Project Change"), since I think the performance issues can be overcome, and it is certainly more convenient to have everything downloaded for you.

The main issue is that if the download from the IDE hangs, e.g. due to a transient network issue, it is very difficult to kill it cleanly - java.net.HttpURLConnection (used by the default "lightweight" HTTP wagon) does not seem to respond to Thread.interrupt, or anything else short of Thread.stop, contrary to what the Javadoc of InterruptedIOException might lead you to believe. Getting dependencies from a regular forked build is more robust since the Stop button just kills the process and any open sockets with it.

(For this reason NB 7.1 no longer has the "reloading online" feature, but just prompts you to run an external build when one is needed to obtain critical artifacts such as a parent POM.)
Comment 2 muzPayne 2011-08-31 08:42:16 UTC
So if I get it right, there will not be anything like this in NetBeans 7.1?
Comment 3 Jesse Glick 2011-09-01 17:26:41 UTC
Definitely not; 7.1 feature freeze was on Monday. It may make it into a subsequent release if I can find time to work on it, though there are hundreds of competing open issues.
Comment 4 Milos Kleint 2012-02-16 12:00:33 UTC
open question is how to define pom change though. When we get the event that the pom file was modified, or when the user or the codebase refreshes the project?

Eg. the project can be change even by a change in settings file (different mirror or added repository, different profile) or the parent pom as well. 

Automated project refreshes could be too frequent though, maybe just the manually triggered ones? doesn't fully match the "on project change" description though..
Comment 5 crazyjavahacking 2012-02-16 14:09:40 UTC
The rationale behind it was to automatically get the artifacts when POM file was changed.

I don't really thought about any other changes, that time...

I think that changes in settings.xml, pom.xml + possible parents should trigger possible downloading of artifacts. Nothing else.
Comment 6 Martin Balin 2016-07-07 08:37:58 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss