Updated pom.xml to produce a 'ready to run' jar

This commit is contained in:
Erik Broes 2011-01-01 19:37:22 +01:00
parent f199cc7190
commit 98b405139e

22
pom.xml
View File

@ -28,20 +28,28 @@
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
</dependencies> </dependencies>
<!-- to add the manifest with the Main-Class --> <!-- This builds a completely 'ready to start' jar with all dependencies inside -->
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId> <artifactId>maven-shade-plugin</artifactId>
<version>2.3.1</version> <version>1.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration> <configuration>
<archive> <transformers>
<manifest> <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.bukkit.craftbukkit.Main</mainClass> <mainClass>org.bukkit.craftbukkit.Main</mainClass>
</manifest> </transformer>
</archive> </transformers>
</configuration> </configuration>
</execution>
</executions>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>