I know there many versions of this question is all over the place. However, I went through most of them and it did not work for me.
I followed this link https://netbeans.org/kb/docs/java/javase-deploy.html to package my java source but the folders build and dist are not added to the project folder as it's stated in the official article. The folder I see after building the application are
- classes
- maven-archiver
- surefire
- surefire-report
- test-classes
- myApp.jar file
Additionally, I set the main class to the main class of my Application in the Netbeans by choosing properties->run->Main Class.
Now, the problem is that the jar file is not executed and gives me the "no main manifest attribute" error. Also, I tried to add some of the suggested tags in the pom.xml but that gave me errors as well. How could I fix this?
my pom.xml file:
http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0
<groupId>com.mycompany</groupId>
<artifactId>TerminalGUI</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>TerminalGUI</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.googlecode.lanterna</groupId>
<artifactId>lanterna</artifactId>
<version>2.1.6</version>
</dependency>
</dependencies>
Thanks,