I am trying to generate JAR file of simple program with log4j in Maven. Here is my XML:
<dependencies>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
<type>jar</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>path.gui.MainGui</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>
I can ensure you that path to my main class IS correct (checked multiple times). Yet, what I am getting after java -jar MyApp.jar is:
no main manifest attribute, in MyApp.jar
What's wrong? Why am I not getting main attribute?