Monday, February 10, 2014

copylibs doesn't support the "excludeFromCopy" attribute

When the java code is updated from code base, sometimes the following error occurs during compiling.

C:\<project root>\<project>\nbproject\build-impl.xml:834: copylibs doesn't support the "excludeFromCopy" attribute

If the person who checked in the code is using a later version of NetBeans IDE and you are using an earlier version, this problem occurs.

To solve this problem:

A. Install the later version of NetBeans.

B. If you do not want to install the later version of NetBeans, do the following to let the code compile

  1. Open <your project>\nbproject\build-impl.xml 
  2. Find the lines containing <copylibs ... excludeFromCopy= ... ></</copylibs> 
  3. Delete the excludeFromCopy attribute from the above lines, and now your code should be able to compile          
----------------------------------------------------------------------------------------------------------------

                        
If you have ever asked yourself these questions, this is the book for you. What is the meaning of life? Why do people suffer? What is in control of my life? Why is life the way it is? How can I stop suffering and be happy? How can I have a successful life? How can I have a life I like to have? How can I be the person I like to be? How can I be wiser and smarter? How can I have good and harmonious relations with others? Why do people meditate to achieve enlightenment? What is the true meaning of spiritual practice? Why all beings are one? Read the book free here.

7 comments:

  1. This is very helpful. Thanks.

    ReplyDelete
  2. How to exclude this excludeFromCopy attribute project creation time only, is there any solution give me .

    ReplyDelete
  3. When you create a new project in NetBeans, I don't think that you deal with the build-impl.xml directly. It is automatically created and I don't think that there are any parameters that you can set to modify this file at project creation time. As soon as your project is created, you can remove the excludeFromCopy attribute form the build-impl.xml.

    You basically need the later version of the org-netbeans-modules-java-j2seproject-copylibstask.jar in the C:\Program Files\NetBeans 7.4\java\ant\extra directory. So, the foundamentl fix is to install the later version of NetBeans or update the above jar file to the later version.

    ReplyDelete
  4. Good morning sister joy, you are a wonderful person, may God bless you, and continue to keep you for us. Harmony Eluwa

    ReplyDelete
  5. Thank you very much.
    You solved the problem.

    ReplyDelete