3

I want to have a lib folder with all dependent libraries in the dist folder when I create my Netbeans-Project (with Ant and java 11).

I have all my libs within the project at Libraries (you can see them at Project->Properties->Libraries under Classpath) and I also have the checkbox "Copy Dependent Libraries" at Project->Properties->Build->Packaging enabled

I thought the checkbox enables copylibs, but there is no lib folder.

STeVe
  • 35
  • 6

2 Answers2

5

It's a NetBeans 9.0-11.0 bug.

https://issues.apache.org/jira/browse/NETBEANS-1097

There is a work-around in there.

Basically in your build-impl.xml file, delete this after <condition property="do.mkdist">:

 <not>
        <istrue value="${modules.supported.internal}"/>
 </not>
trilogy
  • 1,738
  • 15
  • 31
  • 3
    Thanks for your answer. I don't know, if this is the same bug, because it seams to be a problem with Netbeans 11. But your solution looks very similar to what I did: I set do.mkdist=true in the nbproject/private/private.properties. After that, everything worked as before. – STeVe Jun 28 '19 at 21:28
  • 2
    Verified your solution: Works like a charm, and I think it's more nice then my hack. Thanks a lot trilogy! – STeVe Jun 28 '19 at 21:37
  • 1
    Perhaps we should open an issue at Apache board if it's not opened yet? – Ernestas Gruodis Jul 22 '19 at 19:36
2

On one of my NetBeans 11 projects showed the same problem that in the dist folder no lib subfolder was created during build. The project was using JDK12. After i changed Project properties->Sources->Source/Binary Format to JDK8, the dist/lib folder was created and populated.

Michael Besteck
  • 2,415
  • 18
  • 10