jar creation fix

This commit is contained in:
Klemek
2018-11-07 16:38:57 +01:00
parent 7ad8491e7d
commit 4467d13da1
3 changed files with 19 additions and 21 deletions
Binary file not shown.
+2 -1
View File
@@ -1 +1,2 @@
mvn clean package && del download\*.jar && xcopy /Y target\*.jar download && git add download/*.jar mvn clean package && del download\*.jar && xcopy /Y target\*.jar download && git add download/*.jar
pause
+17 -20
View File
@@ -20,6 +20,7 @@
<groupId>fr.klemek</groupId> <groupId>fr.klemek</groupId>
<artifactId>simple-logger</artifactId> <artifactId>simple-logger</artifactId>
<version>1.3</version> <version>1.3</version>
<scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
@@ -30,7 +31,7 @@
</dependencies> </dependencies>
<build> <build>
<outputDirectory>target/${project.artifactId}/WEB-INF/classes</outputDirectory> <outputDirectory>${project.build.directory}/classes</outputDirectory>
<sourceDirectory>src/main/java</sourceDirectory> <sourceDirectory>src/main/java</sourceDirectory>
<testSourceDirectory>src/test/java</testSourceDirectory> <testSourceDirectory>src/test/java</testSourceDirectory>
<resources> <resources>
@@ -57,21 +58,6 @@
<target>1.8</target> <target>1.8</target>
</configuration> </configuration>
</plugin> </plugin>
<!-- JAR -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>libs/</classpathPrefix>
<mainClass>fr.klemek.mapping.Launch</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId> <artifactId>maven-dependency-plugin</artifactId>
@@ -80,16 +66,27 @@
<id>copy-dependencies</id> <id>copy-dependencies</id>
<phase>prepare-package</phase> <phase>prepare-package</phase>
<goals> <goals>
<goal>copy-dependencies</goal> <goal>unpack-dependencies</goal>
</goals> </goals>
<configuration> <configuration>
<outputDirectory> <outputDirectory>${project.build.directory}/classes</outputDirectory>
${project.build.directory}/libs <includeScope>runtime</includeScope>
</outputDirectory>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<archive>
<manifest>
<mainClass>fr.klemek.mapping.Launch</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
</plugins> </plugins>
</build> </build>
</project> </project>