Thanks to all who suggested Netbeans 12.0. I finally found time from other projects to install it and the problem is now resolved.

Bayless


On 8/17/20 11:36 AM, Gianluca Ruggero wrote:
Hi Bayless,
I have had the same problem in Netbeans 11 with all my ant based projects created with Netbeans 8.2. But with Netbeans 12 seems resolved. I've successfully built my ant projects and the dist folder has been created correctly.

Gianluca


Il giorno dom 16 ago 2020 alle ore 23:26 Bayless Kirtley <bk...@cox.net <mailto:bk...@cox.net>> ha scritto:

    Thanks guys. I'm old and retired and have used Netbeans with ant
    since
    version 5.0. I still maintain a couple of charity applications for
    them
    so this is important. Suddenly it stops including the lib
    directory. I
    have tried adding the lib directory to the dist directory but still
    nothing. The jar file just goes to lunch. Something about
    compiling or
    building the executable doesn't seem to recognize the libraries.

    To solve a problem for a food pantry (charity project) I had to
    revert
    to an older version of Linux on a questionable disk where Netbeans
    8.1
    with Java 1.8 still works. I don't see that as a long term solution
    though as the disk is too undependable.

    A few weeks ago I thought I saw a related reference here but
    failed to
    save it as I didn't know I had a problem at the time. Can anyone
    recall
    that or explain it again please?

    Bayless

    On 8/16/20 1:42 AM, Mark Eggers wrote:
    > I do something similar and then package up everything as a zip
    file or
    > tar.gz with the assembly plugin.
    >
    > Something like this:
    >
    > <!-- this is an old project. use updated plugin versions
    >          or better yet, pluginManagement -->
    >              <plugin>
    > <groupId>org.apache.maven.plugins</groupId>
    > <artifactId>maven-assembly-plugin</artifactId>
    >                  <version>2.6</version>
    >                  <configuration>
    > <descriptor>src/main/assembly/assembly.xml</descriptor>
    >                  </configuration>
    >              </plugin>
    >
    > And the assembly.xml file (leaving out the schema for brevity):
    > <?xml version="1.0" encoding="UTF-8"?>
    > <assembly>
    >      <id>bin</id>
    >      <formats>
    >          <format>tar.gz</format>
    >          <format>zip</format>
    >      </formats>
    > <includeBaseDirectory>false</includeBaseDirectory>
    > <includeSiteDirectory>false</includeSiteDirectory>
    >      <fileSets>
    >          <fileSet>
    >              <directory>target</directory>
    > <outputDirectory></outputDirectory>
    >              <includes>
    >                  <include>*.jar</include>
    >                  <include>lib/</include>
    >              </includes>
    >          </fileSet>
    >      </fileSets>
    > </assembly>
    >
    > Then, mvn package followed by mvn assembly:single gives me a
    tar.gz and
    > a zip file containing the correct structure. I can ship that around,
    > unpack it, and run the program from the command line with:
    >
    > java -jar ./jarname.jar
    >
    > Works for me.
    >
    > . . . just my two cents
    > /mde/
    >
    > On 8/15/2020 9:07 PM, Bradley Willcott wrote:
    >> Hi Bayless,
    >>
    >> Are you using an Ant build or Maven?  If Maven, have a look at
    >> "maven-jar-plugin" and "maven-dependency-plugin". Here is an
    example of
    >> both from one of my projects:
    >>
    >>      <build>
    >>          <plugins>
    >>              <plugin>
    >> <groupId>org.apache.maven.plugins</groupId>
    >> <artifactId>maven-jar-plugin</artifactId>
    >>                  <version>3.2.0</version>
    >>                  <configuration>
    >>                      <archive>
    >>                          <manifest>
    >> <addClasspath>true</addClasspath>
    >> <classpathPrefix>libs/</classpathPrefix> <<===  Important
    >> <mainClass>org.markdownj.cli.Main</mainClass>
    >> <addBuildEnvironmentEntries>true</addBuildEnvironmentEntries>
    >>
    <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
    >>                          </manifest>
    >>                      </archive>
    >>                  </configuration>
    >>              </plugin>
    >>              <plugin>
    >> <groupId>org.apache.maven.plugins</groupId>
    >> <artifactId>maven-dependency-plugin</artifactId>
    >>                  <version>3.1.1</version>
    >>                  <executions>
    >>                      <execution>
    >> <id>copy-dependencies</id>
    >> <phase>prepare-package</phase>
    >>                          <goals>
    >> <goal>copy-dependencies</goal>
    >>                          </goals>
    >>                          <configuration>
    >> <includeScope>runtime</includeScope>
    >> <excludeScope>test</excludeScope>
    >>                              <outputDirectory>
    >> ${project.build.directory}/libs
    >> <<===  Important
    >>                              </outputDirectory>
    >>                          </configuration>
    >>                      </execution>
    >>                  </executions>
    >>              </plugin>
    >>          </plugins>
    >>      </build>
    >>
    >> Of course, the "<<===  Important" text is not part of the POM text.
    >>
    >> All you need to do then is copy the 'libs' directory to the same
    >> directory you install the 'jar' file to, and then it should work a
    >> charm.  Does for me.
    >>
    >> Brad.
    >>
    >> On 15/8/20 8:13 pm, Bayless Kirtley wrote:
    >>> I recently upgraded from Netbeans 8.1 to 11.1 and due to problems
    >>> with java 8 I also went to 11. I have been working on some
    existing
    >>> projects and everything works fine from within Netbeans. When
    I try to
    >>> deploy though, it seems that Netbeans is no longer including
    the lib
    >>> directory in the dist directory and the programs will not run.
    Even
    >>> when I just replace the jar file in the dist directory,
    leaving the
    >>> lib directory as it was, the programs still will not run. What
    do I
    >>> need to do to correct this situation?
    >>>
    >>> Bayless
    >>>
    >>>
    >>>
    >
    ---------------------------------------------------------------------
    > To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
    <mailto:users-unsubscr...@netbeans.apache.org>
    > For additional commands, e-mail: users-h...@netbeans.apache.org
    <mailto:users-h...@netbeans.apache.org>
    >
    > For further information about the NetBeans mailing lists, visit:
    > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
    >

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
    <mailto:users-unsubscr...@netbeans.apache.org>
    For additional commands, e-mail: users-h...@netbeans.apache.org
    <mailto:users-h...@netbeans.apache.org>

    For further information about the NetBeans mailing lists, visit:
    https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to