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 209100 - Allow Libraries to provide properties
Summary: Allow Libraries to provide properties
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Libraries (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks: 209602
  Show dependency tree
 
Reported: 2012-03-02 12:58 UTC by Tomas Zezula
Modified: 2012-09-03 13:03 UTC (History)
3 users (show)

See Also:
Issue Type: TASK
Exception Reporter:


Attachments
Diff file (34.31 KB, patch)
2012-03-02 13:07 UTC, Tomas Zezula
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Zezula 2012-03-02 12:58:35 UTC
Use case: The JavaScript library requires properties like library version, CND site of origin, library homepage, etc to be associated with library.
Comment 1 Tomas Zezula 2012-03-02 13:07:03 UTC
Created attachment 116296 [details]
Diff file
Comment 2 Jesse Glick 2012-03-07 23:55:23 UTC
Comment to diff format: library-declaration-3_0.xsd could probably be marked as a copy of library-declaration-2_0.xsd, making the diff more apparent.


[JG01] Avoid java.util.Properties in API signatures whenever possible, as it is poorly typed. Map<String,String> would be preferable. Also consider using Collections.immutableMap.


[JG02] Various libraries use a special volume type maven-pom to give corresponding Maven coordinates, but it is difficult to parse this back out into usable form (repositoryId, repositoryUrl, groupId, artifactId, version, classifier), and the maven-pom volume tends to get clobbered after user customizations to other volumes anyway. Do you think these libraries can be updated to use <properties> instead?


[JG03] Typo (2x): "SAXException;;"
Comment 3 David Konecny 2012-03-08 01:21:32 UTC
Re. JG02 - yes. That's very similar to what I'm doing with JavaScript libraries loaded from some public CDN. In additional to some URL in a volume I'm providing via properties additional information for each JS library like CDN source, library version, etc. At the moment properties are per library and not per volume but I do not think that's a problem.
Comment 4 Tomas Zezula 2012-03-12 16:54:00 UTC
JG01: Fixed.

JG02: Yes, it can be. The question is how to solve the backward compatibility. Should it be solved by Maven (when Library has no properties it asks about POM volume) or should the LibraryParser allow some update interfaces to be registered which convert the old POM volume libs into LibraryImplementation3?

JG03: Fixed.
Comment 5 Tomas Zezula 2012-03-13 16:09:01 UTC
Fixed jet-main 63e9b72e0d64
Comment 6 Quality Engineering 2012-03-17 10:40:13 UTC
Integrated into 'main-golden', will be available in build *201203170400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/63e9b72e0d64
User: Tomas Zezula <tzezula@netbeans.org>
Log: #209100:Allow Libraries to provide properties
Comment 7 Quality Engineering 2012-09-03 13:03:44 UTC
Integrated into 'main-golden', will be available in build *201209031048* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/07201ffb951e
User: David Konecny <dkonecny@netbeans.org>
Log: hand merging #209100 into easel branch to minimize future conflicts