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.
Summary: | copylibs doesn't support the "excludeFromCopy" attribute | ||
---|---|---|---|
Product: | java | Reporter: | assylias <assylias> |
Component: | Project | Assignee: | Tomas Zezula <tzezula> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | CC: | areeda, hernan.eche |
Priority: | P3 | ||
Version: | 7.3 | ||
Hardware: | All | ||
OS: | Windows 7 | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | log file |
Description
assylias
2013-06-18 17:38:33 UTC
have you been manually editing the build-impl.xml file? is your build-impl.xml file in version control? can you do a diff of what was there before the upgrade and what it's there now? (in case the IDE updated the build-impl.xml file). also please attach the IDE log file - http://wiki.netbeans.org/FaqLogMessagesFile No I haven't modified the build-impl manually. And unfortunately no, it is not in version control as it is a dummy project that I use for testing. And my projects which are in a version system use maven... FYI, the problematic line in build-impl is called by: <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.mkdist" name="-do-jar-copylibs"> <j2seproject3:copylibs manifest="${tmp.manifest.file}"/> <echo level="info">To run this application from the command line without Ant, try:</echo> <property location="${dist.jar}" name="dist.jar.resolved"/> <echo level="info">${platform.java} -jar "${dist.jar.resolved}"</echo> </target> I'll try to see if I can reproduce with a new project. Created attachment 135992 [details]
log file
I have created a new project and used the build-impl.xml and the lib folder with the CopyLibs subfolder and the netbeans.properties file. That solved the issue. tzezula: excludeFromCopy was added in may, maybe some sort of incompatibility between the script and the version of copylibs available to the project? New project (project updated created in newer IDE) opened in old (pre NB 7.4) IDE. There are 2 cases: 1st) Shared libraries (project has it's own lib folder containing the CopyLibs.jar) in such a case the CopyLibs.jar is updated to a new version (NB 7.4) when you open the project . 2nd) Non shareable (global) libraries. When you open such a project in older version of NetBeans you don't have a new version of CopyLibs.jar as you run on NB 7.3. In this case you need the older IDE to regenerate the build-impl.xml (for example by deleting it and reopening). I am not 100% sure but I might have opened the project in the nightly build that I use to test Java 8. *** Bug 233020 has been marked as a duplicate of this bug. *** I found a fix to this issue however I still have no idea why this happens. You must go to the build-impl.xml and on line 829 and remove the setting that says excludeFromCopy. This will them allow you to successfully compile your code. The resulting file is also runnable and accurate. This append to me with 7.4.rc2 today. I opened a project with maybe a dozen dependencies in 7.4rc2, clean and build then when I went back to 7.3.1 and try to clean/build the error reported is: <path to 1st dependent project>/nbproject/build-impl.xml:990: The following error occurred while executing this line: <path to 1st dependent project>/nbproject/build-impl.xml:834: copylibs doesn't support the "excludeFromCopy" attribute BUILD FAILED (total time: 25 seconds) I'm running this in a VM on my mac laptop (getting ready for a trip) the NetBeans environments are: 7.4.rc2 for testing Product Version: NetBeans IDE 7.4 RC2 (Build 201309252201) Java: 1.7.0_25; OpenJDK 64-Bit Server VM 23.7-b01 Runtime: OpenJDK Runtime Environment 1.7.0_25-root_2013_06_20_08_47-b00 System: Linux version 2.6.32-358.18.1.el6.x86_64 running on amd64; UTF-8; en_US (nb) User directory: /home/joe/.netbeans/7.4rc2 Cache directory: /home/joe/.cache/netbeans/7.4rc2 7.3.1 where error occurs: Product Version: NetBeans IDE 7.3.1 (Build 201306052037) Java: 1.7.0_25; OpenJDK 64-Bit Server VM 23.7-b01 Runtime: OpenJDK Runtime Environment 1.7.0_25-root_2013_06_20_08_47-b00 System: Linux version 2.6.32-358.18.1.el6.x86_64 running on amd64; UTF-8; en_US (nb) User directory: /home/joe/.netbeans/7.3.1 Cache directory: /home/joe/.cache/netbeans/7.3.1 Editing the build-imp.xml files by hand to remove the excludefromcopy attribute does work. Joe You tries to load project with (NB 7.4 build-impl.xml) in older version of NB 7.3. Hi Tomas, That is correct. I am in a production environment, this project is a Java Web App running under Apache and Tomcat. I am trying to confirm that 7.4 is ready to become our development environment on multiple workstations. If this is a design feature that means code checked in with 7.4 cannot be used with 7.3.1 (without hand editing xml files) so be it but the transition will take longer if it becomes a point of no return. Thanks, Joe The IDE needs to update the build script when the project is opened otherwise the new features and bug fixes will not work. There is an easy way how to solve the problem, delete the build-impl.xml file and reopen the project in NB 7.3. The build-impl.xml is always regenerated when it's missing when the project is opened. Other but more complex solution is using shared libraries which copies the custom tasks among libraries. Hope it helped. Thanks Tomas, I understand the need to occasionally break backward compatibility to add new features. For us I think this means we cannot check in code from 7.4 until everyone agrees to upgrade to 7.4. So far I've seen some nice features (better HTML5 support, better code analysis for Java) but no must-haves that can't wait. With previous versions we were able to have one person work with the pre-release to make sure everything worked while working on actual projects. This time I think we will wait for the release and do the testing and transition all at once. Best, Joe |