Reduce size of bungeerotator jar
Make use of the maven shade plugin's `minimizeJar` option to filter out classes not explicitly mentioned, and use two artifact filters to explicitly include classes used. Also removes the mysql driver check in the main method as it is not necessary for this program to work.
This commit is contained in:
parent
cea08cae67
commit
6f2705f0e4
@ -23,15 +23,6 @@
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-bundle</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.ws.security</groupId>
|
||||
<artifactId>wss4j</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpcore</artifactId>
|
||||
<version>4.4.5</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
@ -47,6 +38,36 @@
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>2.4</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<minimizeJar>true</minimizeJar>
|
||||
<filters>
|
||||
<filter>
|
||||
<artifact>org.apache.commons:commons-pool2</artifact>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
</filter>
|
||||
<filter>
|
||||
<artifact>commons-logging:commons-logging</artifact>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
</filter>
|
||||
</filters>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
@ -40,16 +40,7 @@ public class BungeeRotator
|
||||
private static boolean _debug = false;
|
||||
|
||||
public static void main(String args[])
|
||||
{
|
||||
try
|
||||
{
|
||||
Class.forName("com.mysql.jdbc.Driver");
|
||||
}
|
||||
catch (ClassNotFoundException e1)
|
||||
{
|
||||
e1.printStackTrace();
|
||||
}
|
||||
|
||||
{
|
||||
try
|
||||
{
|
||||
FileHandler fileHandler = new FileHandler("rotator.log", true);
|
||||
|
Loading…
Reference in New Issue
Block a user