I want to get a working jar file with my maven project.
The build part is:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.14</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>6.4.1</version>
</dependency>
</dependencies>
<configuration>
<consoleOutput>true</consoleOutput>
<configLocation>${basedir}/src/test/resources/checkstyle_swt1.xml</configLocation>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<configuration>
<descriptor>src/assembly/src.xml</descriptor>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
<addClasspath>true</addClasspath>
<mainClass>org.jis.Main</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
So my problem right now is that I don'T know how to implement the mainclass properly into my pom.xml and later into my jar file. The Folder Structure is: src/main/java/org/jis/Main.java but if I add the following line
<mainClass>src.main.java.org.jis.Main</mainClass>
It doesn't work.
pom.xml
I get a error. view my pom.xml image with project snapshot. – Danyelldanyelle