Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-4306

Maven Project does not create manifest for running outside of Netbeans

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 11.2
    • None
    • None
    • Win 10 Pro on 64bit HP laptop (intel), OpenJDK 8, 11 (Zulu) using 11 as platform targeting 8 to run

    Description

      The jar file created by clean build (right-click on project, select clean build) does not create a proper jar file with manifest that can be run outside of the IDE.

      This seems to me to be a fundamental element of developing applications. How can it not work out of the box?

      Create a simple HelloWorld as a Maven Project. Add a Main class. Add System.out.println("Hello World"); to the main class.

      Clean and Build.

      Copy the resulting jar from ../target folder to any other folder.

      Open a command window, CD to folder, type the usual java ...

      (I can't type the command because this bizarre editor starts striking through characters).

      Java complains there is no manifest in the jar file.

      With respect, I use an IDE precisely to avoid having to deal with maven for basic things like a deployable jar file. I have used NetBeans for years, with default Ant builds, I did not expect this aggravation starting a new simple maven project.

      Attachments

        Activity

          People

            Unassigned Unassigned
            TurtleBeach Jack Copper
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: