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.
Go to type is opening wrong binary (1.) and source instead of binary class (2.) To reproduce: 1.) open all 3 projects from 'MavenProjects.zip' 2.) open 'openingIncorrectEGitBinary.zip' 3.) CTRL + O and search for IGit*Constants => 4 items should be found and the last one (EGit 1.3.6 would open EGit 2.1.0 binary) 4.) close project from 'openingIncorrectEGitBinary.zip' and open 'openingSourceInsteadOfEGitBinary.zip' project 5.) again CTRL + O and search for IGit*Constants => 4 items should be found and the last one (EGIt 1.3.6 would open source file) NetBeans 7.3 Beta 2, JDK 6u34
Created attachment 127157 [details] mavenProjects
Created attachment 127159 [details] openingIncorrectEGitBinary
Probably wrong maven classpath.
The report is incomplete so I cannot reproduce the problem. After step 3 I have only 3 item none from EGit 1.3.6 seems a different content of .m2. Also there is no 'openingSourceInsteadOfEGitBinary.zip'. The problem is probably the compile classpath reported by the maven. for example for org.eclipse.egit.github.core-2.1.0.jar the compile cp is: /Users/tom/Downloads/mor/MavenProjects/mavenproject1/target/classes:/Users/tom/.m2/repository/com/google/code/gson/gson/2.1/gson-2.1.jar:/Users/tom/.m2/repository/org/testng/testng/6.7/testng-6.7.jar:/Users/tom/Downloads/mor/MavenProjects/EGit_2_1_0/target/classes:/Users/tom/Downloads/mor/MavenProjects/EGit_2_0_4/target/classes:/Users/tom/.m2/repository/org/yaml/snakeyaml/1.6/snakeyaml-1.6.jar:/Users/tom/Downloads/mor/mavenproject3/target/test-classes:/Users/tom/.m2/repository/org/beanshell/bsh/2.0b4/bsh-2.0b4.jar:/Users/tom/.m2/repository/com/beust/jcommander/1.12/jcommander-1.12.jar:/Users/tom/Downloads/mor/MavenProjects/EGit_2_0_4/target/test-classes:/Users/tom/.m2/repository/junit/junit/4.10/junit-4.10.jar:/Users/tom/Downloads/mor/MavenProjects/mavenproject1/target/test-classes:/Users/tom/Downloads/mor/mavenproject3/target/classes:/Users/tom/Downloads/mor/MavenProjects/EGit_2_1_0/target/test-classes:/Users/tom/.m2/repository/joda-time/joda-time/2.1/joda-time-2.1.jar:/Users/tom/.m2/repository/org/eclipse/mylyn/github/org.eclipse.egit.github.core/2.1.0/org.eclipse.egit.github.core-2.1.0.jar:/Users/tom/.m2/repository/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1.jar which is strange when the type in cp from 2.1.0 shadows the file from 1.3.6 it opens the one from 2.1.0 which is correct. The problem is the mvn provided classpath. I believe I can narrow the CP to prevent such a problem. However as there is no reproduceable test case it's hard to say if it's the case.
Fixed jet-main 7287144dbcd9
Created attachment 127237 [details] openingSourceInsteadOfEGitBinary
Attached forgotten Maven multimodule project. In step 3 you need to open the nested Maven project called 'nested project'.
Integrated into 'main-golden', will be available in build *201211080001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/7287144dbcd9 User: Tomas Zezula <tzezula@netbeans.org> Log: #221499:Go to type is opening wrong binary and source instead of binary class