Skip to content

Instantly share code, notes, and snippets.

@VxDxK
Last active September 9, 2021 19:20
Show Gist options
  • Save VxDxK/7926e1e10a0605d657375f28e17ae56f to your computer and use it in GitHub Desktop.
Save VxDxK/7926e1e10a0605d657375f28e17ae56f to your computer and use it in GitHub Desktop.
<?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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.vdk</groupId>
<artifactId>example-test</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<java.version>8</java.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>Main</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<goals><goal>java</goal></goals>
<phase>verify</phase>
</execution>
</executions>
<configuration>
<mainClass>Main</mainClass>
<cleanupDaemonThreads>false</cleanupDaemonThreads>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>java-version</id>
<activation>
<jdk>11</jdk>
</activation>
<properties>
<java.version>11</java.version>
</properties>
</profile>
</profiles>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment