Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <groupId>com.my.test</groupId>
- <artifactId>test</artifactId>
- <version>1.0</version>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.5.3</version>
- <executions>
- <execution>
- <id>jar-with-dependencies</id>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- <configuration>
- <descriptorRefs>
- <descriptorId>jar-with-dependencies</descriptorId>
- </descriptorRefs>
- <archive>
- <manifest>
- <mainClass>test.main.MainClass</mainClass>
- </manifest>
- </archive>
- <classifier>exec</classifier>
- <appendAssemblyId>false</appendAssemblyId>
- </configuration>
- </execution>
- <execution>
- <id>all</id>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- <configuration>
- <finalName>server-bundle</finalName>
- <descriptors>
- <descriptor>src/main/assembly/test.xml</descriptor>
- </descriptors>
- </configuration>
- </execution>
- </executions>
- <configuration>
- <outputDirectory>${project.build.directory}/</outputDirectory>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-install-plugin</artifactId>
- <version>2.5.2</version>
- <executions>
- <execution>
- <goals>
- <goal>install-file</goal>
- </goals>
- <phase>install</phase>
- <configuration>
- <finalName>server-bundle</finalName>
- <file>${project.build.directory}/server-bundle.tar</file>
- <generatePom>false</generatePom>
- <pomFile>pom.xml</pomFile>
- <version>${project.version}</version>
- <outputFileNameMapping>server-bundle.tar</outputFileNameMapping>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.2</version>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.jdom</groupId>
- <artifactId>jdom2</artifactId>
- <version>2.0.4</version>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-lang3</artifactId>
- <version>3.4</version>
- </dependency>
- <dependency>
- <groupId>com.github.stefanbirkner</groupId>
- <artifactId>system-rules</artifactId>
- <version>1.12.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.12</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.projectlombok</groupId>
- <artifactId>lombok</artifactId>
- <version>1.16.18</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>jaxen</groupId>
- <artifactId>jaxen</artifactId>
- <version>1.1.6</version>
- </dependency>
- </dependencies>
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- </properties>
- <distributionManagement>
- <repository>
- <id>central</id>
- <name>releases</name>
- <url>https://localhost/artifactory/release-local</url>
- </repository>
- </distributionManagement>
- <assembly
- xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
- <id>bundle</id>
- <formats>
- <format>tar</format>
- </formats>
- <includeBaseDirectory>false</includeBaseDirectory>
- <fileSets>
- <fileSet>
- <directory>environment</directory>
- <outputDirectory>/</outputDirectory>
- <includes>
- <include>file1.txt</include>
- <include>file2.txt</include>
- <include>file3.jar</include>
- </includes>
- </fileSet>
- <fileSet>
- <directory>target</directory>
- <outputDirectory>/</outputDirectory>
- <includes>
- <include>${project.artifactId}.jar</include>
- </includes>
- </fileSet>
- </fileSets>
Add Comment
Please, Sign In to add comment