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 231801 - Ant error: copylibs doesn't support the "excludeFromCopy" attribute
Summary: Ant error: copylibs doesn't support the "excludeFromCopy" attribute
Status: RESOLVED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: Autoupdate (show other bugs)
Version: 7.4
Hardware: PC Linux
: P3 normal (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-25 21:16 UTC by converginglight
Modified: 2019-03-15 10:10 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Use case project (12.92 KB, application/x-gzip)
2013-06-25 21:16 UTC, converginglight
Details
Use case project with 1.7 (12.05 KB, application/x-gzip)
2013-06-26 15:37 UTC, converginglight
Details
screenshot (123.08 KB, image/png)
2013-06-26 16:21 UTC, Milos Kleint
Details

Note You need to log in before you can comment on or make changes to this bug.
Description converginglight 2013-06-25 21:16:47 UTC
Created attachment 136295 [details]
Use case project

When building an Ant project with builtin Ant 1.9.0 AND with standalone Ant 1.9.1, following error occurs:

NetBeansProjects/ExcludeFromCopyUseCase/nbproject/build-impl.xml:1017: The following error occurred while executing this line:
NetBeansProjects/ExcludeFromCopyUseCase/nbproject/build-impl.xml:861: copylibs doesn't support the "excludeFromCopy" attribute

To reproduce, create an empty new Java project, or use my attachment.
Tested with netbeans-trunk-nightly-201306242301-javase.
Comment 1 Milos Kleint 2013-06-26 10:33:24 UTC
it could be jdk 8 specific. I cannot verify now as I don't have jdk 8 on my mac, but the project is set to use the jdk8 platform and when I change the version to jdk7 I don't have problems building the project. Please note that also the IDE I'm running on is using JDK 7.

Can you verify that the project runs with JDK7 IDE? Please attach the "About Netbeans" dialog information or IDE log file as well.
Comment 2 converginglight 2013-06-26 15:37:20 UTC
Created attachment 136351 [details]
Use case project with 1.7

I changed JDK to default (which is 1.7) and source format to 1.7.
The error remains. I attach the modified project.

Product Version: NetBeans IDE Dev (Build nbms-and-javadoc-11148-on-20130618)
Java: 1.7.0_21; Java HotSpot(TM) 64-Bit Server VM 23.21-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b11
System: Linux version 3.9.6-desktop running on amd64; UTF-8; en_US (nb)
User directory: /home/username/.netbeans/dev
Cache directory: /home/username/.cache/netbeans/dev
Comment 3 Milos Kleint 2013-06-26 16:21:49 UTC
Created attachment 136353 [details]
screenshot

please see my screenshot, can you tell me what jar does your copylibs library in Tools/Libraries point to? have you changed that possibly at some point in time?
Comment 4 converginglight 2013-06-26 18:03:38 UTC
You where right!
Strangely, the CopyLibs Task global library contained:
/home/username/.netbeans/dev/ant/extra/org-netbeans-modules-java-j2seproject-copylibstask.jar
I changed it to the installation location and it works now:
/usr/install/netbeans-dev/java/ant/extra/org-netbeans-modules-java-j2seproject-copylibstask.jar

The remaining question is: How does it come that it (either the functionality or the file reference) was changed from one nightly build to another. I didn't touch it.
Comment 5 Tomas Zezula 2013-06-27 15:39:07 UTC
Related to the issue #231468.
In fact the correct copylibs is /usr/install/netbeans-dev/java/ant/extra/org-netbeans-modules-java-j2seproject-copylibstask.jar. The Copylibs from /home/username/.netbeans/dev/ant/extra/org-netbeans-modules-java-j2seproject-copylibstask.jar seems to be some old copylibs installed by an auto update.
It's questionable if the obsolete jars should not be deleted, but it's probably impossible for dev builds.
For s release a new user dir is created and such a problem does not happen.
Comment 6 Jiri Rechtacek 2013-07-01 12:14:30 UTC
(In reply to comment #5)
> Related to the issue #231468.
> In fact the correct copylibs is
> /usr/install/netbeans-dev/java/ant/extra/org-netbeans-modules-java-j2seproject-copylibstask.jar.
> The Copylibs from
> /home/username/.netbeans/dev/ant/extra/org-netbeans-modules-java-j2seproject-copylibstask.jar
> seems to be some old copylibs installed by an auto update.
> It's questionable if the obsolete jars should not be deleted, but it's probably
> impossible for dev builds.
> For s release a new user dir is created and such a problem does not happen.

That's right. Sharing the same user dir between different Development builds is risky, even not supported. The supported scenario is uninstall the IDE (with removing of the userdir) and install the newer build then.
Comment 7 jcday 2013-07-19 21:47:55 UTC
I have ran into this error/issue.  I caused it by re-installing Netbeans AFTER uninstalling and re-installing a newer java JDK version.  Netbeans correctly updated itself to use the new SDK as default.

Within Netbeans, the project still showed that it was using "JDK 1.7(Default)" but in reality something in the background was disconnected.

I was able to resolve by going to "Manage Platforms", adding an additional JDK, and switching the project to it, apply, and then switch back to "JDK 1.7(Default)".
Comment 8 bgabrhelik 2014-03-20 11:06:03 UTC
I came across this problem when I was executing build from command line (ant jar). In my case it was enough to delete nbproject/private folder. This problem was caused by opening of the project by older NetBeans (7.3.1) than it has been created (7.4).
Comment 9 Thanos1234 2019-03-15 10:10:57 UTC
Must be like to visit here this amazing post follow here http://solitairetimes.com and join the amazing fun to play free solitaire games without download here.