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 75801 - Need to be able to import/export J2SE platforms and libraries.
Summary: Need to be able to import/export J2SE platforms and libraries.
Status: RESOLVED WONTFIX
Alias: None
Product: projects
Classification: Unclassified
Component: Libraries (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Tomas Zezula
URL:
Keywords:
: 104250 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-05-02 20:42 UTC by rptmaestro
Modified: 2016-07-07 08:38 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 rptmaestro 2006-05-02 20:42:44 UTC
In a shared environment, it would help developers avoid repetition of work to 
be able to share library and platform definitions. Many development 
organizations keep distributed and third-party jars in some location in their 
VCS. It would be particularly useful to be able to use Ant-style variables to 
define the location of jars and files referenced by the library descriptor, so 
the developer needs only import the library descriptors into his IDE and set 
the variable to his local value.

For example, whereas the non-portable library descriptor for log4j under the 
current schema would look like this:

<library version="1.0">
  <name>log4j-1.2.8</name>
  <type>j2se</type>
  <volume>
    <type>classpath</type>
    <resource>jar:file:/C:/depot/dev/lib/java/log4j/1.2.8/log4j-
1.2.8.jar!/</resource>
    <resource>jar:file:/C:/depot/dev/lib/java/log4j/1.2.8/log4j-
contribs.jar!/</resource>
  </volume>
  <volume>
    <type>src</type>
    <resource>jar:file:/C:/depot/dev/lib/java/log4j/1.2.8/src/log4j-1.2.8-
src.zip!/</resource>
  </volume>
  <volume>
    <type>javadoc</type>
    <resource>jar:file:/C:/depot/dev/lib/java/log4j/1.2.8/javadoc/log4j-1.2.8-
api.zip!/</resource>
  </volume>
</library>

Under a more portable schema, an exportable library that uses Ant-style 
variables might look like this:

<library version="1.0">
  <name>log4j-1.2.8</name>
  <type>j2se</type>
  <volume>
    <type>classpath</type>
    <resource>jar:file:/${shared.libraries}/log4j/1.2.8/log4j-
1.2.8.jar!/</resource>
    <resource>jar:file:/${shared.libraries}/log4j/1.2.8/log4j-
contribs.jar!/</resource>
  </volume>
  <volume>
    <type>src</type>
    <resource>jar:file:/${shared.libraries}/log4j/1.2.8/src/log4j-1.2.8-
src.zip!/</resource>
  </volume>
  <volume>
    <type>javadoc</type>
    <resource>jar:file:/${shared.libraries}/log4j/1.2.8/javadoc/log4j-1.2.8-
api.zip!/</resource>
  </volume>
</library>

The advantages of this would be substantial. First, the library descriptor 
could be exported or versioned and the developer that imports the library 
descriptor would only have to define a single variable for his system that 
could be stored in the user profile.

Another needed solution to making projects more portable would be to 
(optionally) automatically create missing library descriptors and open up the 
library manager so the user can define the classpath elements for the missing 
library.
Comment 1 Peter Pis 2008-08-20 15:24:29 UTC
Reassigning to projects.
Comment 2 Peter Pis 2008-08-20 15:25:42 UTC
*** Issue 104250 has been marked as a duplicate of this issue. ***
Comment 3 Martin Balin 2016-07-07 08:38:11 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