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 206152 - copylibs task from SE project causes problems in FX project
Summary: copylibs task from SE project causes problems in FX project
Status: RESOLVED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Deployment (show other bugs)
Version: 7.1
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Petr Somol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-08 16:44 UTC by Stepan Zebra
Modified: 2012-01-31 14:45 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stepan Zebra 2011-12-08 16:44:59 UTC
Task copylibs, inherited to FX from SE project, causes incorrect placing of project libraries and notably slows down whole deploy process of FX project. It should be modified and optimized for FX project.
Comment 1 Petr Somol 2011-12-20 13:19:57 UTC
The <copylibs> Ant task used in J2SE projects is disadvantageous in JavaFX context because:
- it can not just copy dependent libs, it always copies also the main J2SE jar and creates README.TXT relevant for J2SE projects only
- for projects to be used in GlassFish <copylibs> provides the option to rebase Class-Path path records in JAR manifests of all JARs in lib/ subdirectory, so that they point at their current location in lib/ instead of the original location. <copylibs> implementation, however, is not usable with JavaFX JARs where the manifest entry is named JavaFX-Class-Path instead of Class-Path
- to ensure consistency with Run infrastructure and to prevent performance hog <copylibs> copies only libraries with direct dependence, i.e., JARs that are on run.classpath. In JavaFX the Run model differs and providing transitive dependent JARs copy is realizable with less obstacles than in J2SE case

Changeset
http://hg.netbeans.org/jet-main/rev/a3ba274654dc
not only fixes bug #205844 but also replaces <copylibs> calls by more effective (without J2SE related side-effects) scripted implementation inside jfx-impl.xml. This implementation simply copies directly dependent lib JARs to current project's lib/ subdirectory

Changeset
http://hg.netbeans.org/jet-main/rev/407fa6fbccef
implements optional rebase functionality. It is disabled by default
because rebasing slows down the build process and is necessary only if a project with dependencies is to be used in GlassFish. To enable the rebase mechanism set the following property in project.properties file:
javafx.rebase.libs=true
Note that this implementation can rebase both J2SE and FX JARs, but similarly to <copylibs> can not rebase signed JARs as it would break the signature.

Changeset
http://hg.netbeans.org/jet-main/rev/6d605c40d7f7
extends the dependent JAR copy mechanism to be transitive (in case of FX projects only). This ensures that having FX projects A, B, C where
A depends on B and
B depends on C,
the build process on A creates A.jar in A's dist/ directory and copies both B.jar and C.jar to A's dist/lib/ directory. Both B.jar and C.jar are then taken into account during FX deployment, i.e., they are referred from jnlp file as well as in A.jar manifest.
Comment 2 Quality Engineering 2011-12-21 15:38:06 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/407fa6fbccef
User: Petr Somol <psomol@netbeans.org>
Log: #206152 - missing copylibs rebase functionality implemented in jfx-impl.xml