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 70077 - CopyLibs task should create archives from folders
Summary: CopyLibs task should create archives from folders
Alias: None
Product: java
Classification: Unclassified
Component: Classpath (show other bugs)
Version: 7.0
Hardware: PC All
: P2 blocker with 2 votes (vote)
Assignee: Tomas Zezula
: 73400 91116 122049 167849 192376 195378 (view as bug list)
Depends on:
Reported: 2005-12-08 11:43 UTC by Tomas Zezula
Modified: 2011-02-21 01:28 UTC (History)
3 users (show)

See Also:
Issue Type: TASK
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Zezula 2005-12-08 11:43:09 UTC
Currently the CopyLibs task does not create libs folder in case when there is
a folder on the runtime classpath of the project. It may create an archive file 
from the folder and copy it. The problem may be the performance of archive 
Comment 1 giorgio42 2006-02-23 21:03:37 UTC
This bug is biting me really hard, because most of my projects have a conf
folder on their runtime classpath, that contains log4j.xml and Java properties

I verified the behaviour described in the bug report by removing the conf folder
in one project and rebuilt it, and, voila, there it is, the libs folder inside
the jar produced in the dist folder.

Any suggestions how to work around this? Or when the bug will be fixed?

Comment 2 Tomas Zezula 2006-02-24 07:42:10 UTC
Originally only the swinglayou.jar was copied, we changed it co copy all the
archives. We intentionally didn't copy folders (it may be very time consuming),
if we decide to change it, it would rather create jar archives from folders on
the classpath. The fix is quite easy, I will try to get it into the 5.5 release.
Here is a workaround: Create a j2se library project with external sources which
has no sources only the source root is set to the folder with configuration
files and add the dependency of your project(s) on this project. It should work
Comment 3 Tomas Zezula 2006-03-13 10:41:46 UTC
*** Issue 73400 has been marked as a duplicate of this issue. ***
Comment 4 Tomas Zezula 2007-01-04 09:36:48 UTC
*** Issue 91116 has been marked as a duplicate of this issue. ***
Comment 5 Tomas Zezula 2007-11-16 09:31:09 UTC
*** Issue 122049 has been marked as a duplicate of this issue. ***
Comment 6 ottorey 2007-11-18 16:52:18 UTC
At least copy jars files and give and "optional" option to package / copy or wahtever with folders. In my case, copying
only jars files and excluding folders is ok.
Comment 7 Jiri Prox 2008-04-11 00:51:40 UTC
moving opened issues from TM <= 6.1 to TM=Dev
Comment 8 Tomas Zezula 2010-11-24 09:18:53 UTC
*** Bug 192376 has been marked as a duplicate of this bug. ***
Comment 9 dgtombs 2010-11-24 15:49:33 UTC
I second the motion for the quick but reasonable fix now: just skip directories and copy the jars. That would also be fine for my use case.
Comment 10 Tomas Zezula 2010-11-24 16:15:40 UTC
Comment 11 Tomas Zezula 2010-11-24 17:48:25 UTC
Done according to dgtombs. Now it only warns about such a folder but copies the rest
jet-main 2d7b54823a64
Comment 12 dgtombs 2010-11-25 00:14:48 UTC
Thank you.
Comment 13 Quality Engineering 2010-11-25 06:19:23 UTC
Integrated into 'main-golden', will be available in build *201011250001* on (upload may still be in progress)
User: Tomas Zezula <>
Log: #70077:CopyLibs task should create archives from folders
Comment 14 Tomas Zezula 2010-12-06 19:03:02 UTC
*** Bug 167849 has been marked as a duplicate of this bug. ***
Comment 15 Tomas Zezula 2011-02-14 09:49:10 UTC
*** Bug 195378 has been marked as a duplicate of this bug. ***
Comment 16 uspace 2011-02-16 04:13:30 UTC
NetBeans omits a folder classpath at Class-Path of MANIFEST.MF 
My application must load classfile dynamically from the folder.
That folder has class files uploaded from network on the fly.

Libraries path of netbeans can add a folder, jar, zip.
But, MANIFEST.MF's Class-Path property omits the folder classpath. 
The packaging jar must contain a relative folder path for correct execution.
Comment 17 Tomas Zezula 2011-02-16 18:13:22 UTC
And what it should do with such a folder?
It can pack it into zip (which does not solve tour problem at all) or it can copy it into lib folder which is slow during build and also may slow distribution.
>That folder has class files uploaded from network on the fly.
In such a case the folder probably should not be copied into dist/lib anyway.
The copylibs cannot create references outside of dist folder as it makes distribution.
Comment 18 uspace 2011-02-21 01:28:14 UTC
My java application must load the class bytecode dynamically at the folder on the fly (on the runtime, after starting).

The class bytecode (as class file) will be uploaded to the folder from network after my java program starting.

The folder contains the class bytecode from a networked java program of internet at runtime.
My java application does not know the class bytecode at the starting time.

NetBeans must contain the folder classpath at Class-Path of MANIFEST.MF