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.
Summary: | libary path best be relative instead of absolute | ||
---|---|---|---|
Product: | java | Reporter: | yizhan <yizhan> |
Component: | Project | Assignee: | David Konecny <dkonecny> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | dkonecny, mkleint, mkubec, pjiricka, sustaining |
Priority: | P2 | ||
Version: | 6.x | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | proposed patch |
Description
yizhan
2008-05-06 09:18:41 UTC
Please check out Library Folder functionality of NetBeans projects in version 6.1. This is exactly the functionality you are looking for. Take a look at http://www.netbeans.org/community/articles/netbeans61.html topic: Sharability of Projects (aka Sharable Libraries). I am using version 6.1. Library path is still absolute. I am running under Windows XP. Is this a bug? Did you set the project to use shared library folder? Please describe exactly how you set up the project. Thanks. I see, I need to select a library folder. Thanks! NetBeans 6.1 added 'sharable libraries' feature which solves problems of project sharability. There is though considerable regression which lot of users seems to experience (this issue or e.g. http://www.nabble.com/absolute-paths-in-jar-dependencies---regression-in-6.1--td17088241.html#a17088241 ): adding a jar to non-sharable project (ie. project without dedicated libraries folder) is always referenced via absolute path stored in project.properties. In NB6.0 the path was relative due to collocation query. For sharable projects this is not an issue as custom file chooser is shown letting user decide whether path should be absolute or relative. After discussion with Milos Kleint we've agreed to fix this by showing custom file chooser even in non-sharable projects and therefore letting user decide how the file will be referenced. Created attachment 61309 [details]
proposed patch
patch looks good. I think you got al the relevant places. one thing needs to be mentioned though. The fix will only allow to reference new jars with relative path. The existing ones (from 6.0) will preserve the relative+absolute referencing and will appear as absolute path in project customizer. to get rid of that, either delete the nbproject/private/private.properties file or remove the relevant entries from there. Integrated into 'main-golden', available in NB_Trunk_Production #195 build Changeset: http://hg.netbeans.org/main/rev/730087737c66 User: David Konecny <dkonecny@netbeans.org> Log: #134570 - libary path best be relative instead of absolute As recommended by Petr Blaha, marking this fix as candidate for NB 6.1 patch 2. verified The fix has been ported into the release61_fixes branch: http://hg.netbeans.org/release61_fixes/04b270241e4a |