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.
In a Maven project, NetBeans opens wrong source jar for given class. It happened to me several times. Two cases: 1) The project has other dep version, e.g. Wicket 1.5.9. But NetBeans opens /home/ondra/.m2/repository/org/apache/wicket/wicket-core/6.3.0/wicket-core-6.3.0-sources.jar:org/apache/wicket/Component.java 2) Even the source of other project opened in the IDE is ignored and instead, old SNAPSHOT from Maven repo is opened. (Note that if not running Maven up to the `install` stage, it doesn't replace the jar in local repo; so the right -source.jar is the one in <project>/target/ .)
7.3.beta2
Annoying workaround: Delete all newer versions than the required from local repo.
can you check your <Nb_user_dir>/Preferences/org/netbeans/modules/maven/attachedSource.properties file of occurences of your wicket-core artifact?
I'm not able to reproduce. 1. created a project depending on wicket-core:6.3.0, downloaded sources. 2. Component.java from 6.3.0 source jar. Ok. 3. change dependency to 1.5.9 4. check Component.java. Is from generated source file. ok. 5. download sources for 1.5.9, Component.java comes from correct source jar again. Looking at the code, the only part that could mix up/randomize the results is the SourceJavadocByHash related code that gets triggered when you click "Attach sources" button in the generated source file. The maven repository index is then checked for SHA1 match of the binary file and the resulting GAV's source jar is associated with the binary's url.
also could you try with the latest dev build? some changes were done in this area since beta2. The dev build should be more stable than beta2, we've just reached code freeze, RC1 will be out soon.
maybe issue 216448 is related?
closing as worksforme, please reopen with more details
(In reply to comment #3) > can you check your > <Nb_user_dir>/Preferences/org/netbeans/modules/maven/attachedSource.properties > file of occurences of your wicket-core artifact? There's no such file in /home/ondra/.netbeans/7.3beta/config/Preferences/org/netbeans/modules/maven
Related to 225650