Browse Source

feat: working

master
QuentinN42 9 months ago
parent
commit
0ee7d0bed8
Signed by: number42 GPG Key ID: 2CD7D563712B3A50
  1. 12
      Makefile
  2. 39
      dependency-reduced-pom.xml
  3. 24
      pom.xml

12
Makefile

@ -0,0 +1,12 @@
.PHONY: all clean build run
all: clean build run
clean:
mvn clean
build:
mvn package
run:
java -jar target/project-1.0.jar

39
dependency-reduced-pom.xml

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.project</groupId>
<artifactId>project</artifactId>
<name>project</name>
<version>1.0</version>
<url>http://maven.apache.org</url>
<build>
<plugins>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<transformers>
<transformer>
<manifestEntries>
<Main-Class>com.project.Main</Main-Class>
<Build-Number>123</Build-Number>
</manifestEntries>
</transformer>
</transformers>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<maven.compiler.target>1.6</maven.compiler.target>
<maven.compiler.source>1.6</maven.compiler.source>
</properties>
</project>

24
pom.xml

@ -1,10 +1,9 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.project</groupId>
<artifactId>project</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<version>1.0</version>
<name>project</name>
<url>http://maven.apache.org</url>
<properties>
@ -16,7 +15,7 @@
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
</dependency>
</dependencies>
<build>
<plugins>
@ -25,12 +24,15 @@
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<configuration>
<archive>
<manifest>
<mainClass>com.project.Main</mainClass>
</manifest>
</archive>
</configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Main-Class>com.project.Main</Main-Class>
<Build-Number>123</Build-Number>
</manifestEntries>
</transformer>
</transformers>
</configuration>
<executions>
<execution>
<phase>package</phase>
@ -42,4 +44,4 @@
</plugin>
</plugins>
</build>
</project>
</project>
Loading…
Cancel
Save