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 109605

Summary: Reference to environment variables in classpath
Product: projects Reporter: viggonavarsete <viggonavarsete>
Component: LibrariesAssignee: issues@java <issues>
Status: VERIFIED DUPLICATE    
Severity: blocker CC: anebuzelsky, novakm, phrebejk
Priority: P1    
Version: 6.x   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description viggonavarsete 2007-07-13 10:37:31 UTC
It must be possible to reference environment variables in classpath. When several persons in a team are working on the
same Netbeans project, it's not acceptable that classpath entries use absolute path.

Scenario:
1. Person A creates a Netbeans project locally (doesn't matter what kind of project)
2. Person A goes to Tools-Libraries and creates a New Library called MyLibrary. Add a jar file located somewhere
locally, e.g. at /home/viggo/.m2/repository/com/sun/faces/portlet/jsf-portlet/1.2/jsf-portlet-1.2.jar
The path to the jar file is absolute, and will cause problems for other developers opening the same project from another
 computer. 
3. Person A adds MyLibrary to the Libraries section of the project
4. Person A adds the project to Subversion
5. Person B check out the project from Subversion
6. Person B get the message "Reference Problems" when opening the project
7. When Person B looks at the "Resolve Reference Problems" he can see that the library referred to doesn't exist.

A better solution is to reference jar files on classpath using an environment variable. Instead of 
/home/viggo/.m2/repository/com/sun/faces/portlet/jsf-portlet/1.2/jsf-portlet-1.2.jar
it should have been like this
$M2_HOME/com/sun/faces/portlet/jsf-portlet/1.2/jsf-portlet-1.2.jar where M2_HOME is an environment variable referring to
/home/viggo/.m2/repository

Eclipse has this feature, and makes it _much_ easier to share projects among team members in a team.


This issue is also related to http://www.netbeans.org/issues/show_bug.cgi?id=109598
Comment 1 novakm 2007-07-16 16:34:29 UTC
Reassigning to java for evaluation (I hope it is the right component)
Comment 2 Tomas Zezula 2007-07-17 09:22:37 UTC
NetBeans refers everything but the libraries in relative path stored in the project.properties. Unfortunately the
concept of the project libraries was not included, for more details see issue #44035

*** This issue has been marked as a duplicate of 44035 ***
Comment 3 Jesse Glick 2007-07-17 16:57:05 UTC
Yes, issue #44035.