Shading http components

This commit is contained in:
d2a-raudenaerde 2016-06-29 17:59:35 +02:00
parent f9ab74d407
commit 1a77291d5b

336
pom.xml
View File

@ -1,163 +1,191 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 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> <modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging> <packaging>jar</packaging>
<groupId>org.telegram</groupId> <groupId>org.telegram</groupId>
<artifactId>telegrambots</artifactId> <artifactId>telegrambots</artifactId>
<version>2.3.3.4</version> <version>2.3.3.4</version>
<name>Telegram Bots</name> <name>Telegram Bots</name>
<url>https://telegram.me/JavaBotsApi</url> <url>https://telegram.me/JavaBotsApi</url>
<description>Easy to use library to create Telegram Bots</description> <description>Easy to use library to create Telegram Bots</description>
<licenses> <licenses>
<license> <license>
<name>GNU General Public License (GPL)</name> <name>GNU General Public License (GPL)</name>
<url>http://www.gnu.org/licenses/gpl.html</url> <url>http://www.gnu.org/licenses/gpl.html</url>
</license> </license>
</licenses> </licenses>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<jersey.version>2.23</jersey.version> <jersey.version>2.23</jersey.version>
<jerseybundle.version>1.19.1</jerseybundle.version> <jerseybundle.version>1.19.1</jerseybundle.version>
<httpcompontents.version>4.5.2</httpcompontents.version> <httpcompontents.version>4.5.2</httpcompontents.version>
<json.version>20160212</json.version> <json.version>20160212</json.version>
<jackson.version>2.7.4</jackson.version> <jackson.version>2.7.4</jackson.version>
</properties> </properties>
<dependencyManagement> <dependencyManagement>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.glassfish.jersey</groupId> <groupId>org.glassfish.jersey</groupId>
<artifactId>jersey-bom</artifactId> <artifactId>jersey-bom</artifactId>
<version>${jersey.version}</version> <version>${jersey.version}</version>
<type>pom</type> <type>pom</type>
<scope>import</scope> <scope>import</scope>
</dependency> </dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.glassfish.jersey.containers</groupId> <groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-grizzly2-http</artifactId> <artifactId>jersey-container-grizzly2-http</artifactId>
<version>${jersey.version}</version> <version>${jersey.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.glassfish.jersey.media</groupId> <groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId> <artifactId>jersey-media-json-jackson</artifactId>
<version>${jersey.version}</version> <version>${jersey.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.sun.jersey</groupId> <groupId>com.sun.jersey</groupId>
<artifactId>jersey-bundle</artifactId> <artifactId>jersey-bundle</artifactId>
<version>${jerseybundle.version}</version> <version>${jerseybundle.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.sun.jersey</groupId> <groupId>com.sun.jersey</groupId>
<artifactId>jersey-grizzly2-servlet</artifactId> <artifactId>jersey-grizzly2-servlet</artifactId>
<version>${jerseybundle.version}</version> <version>${jerseybundle.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.json</groupId> <groupId>org.json</groupId>
<artifactId>json</artifactId> <artifactId>json</artifactId>
<version>${json.version}</version> <version>${json.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.httpcomponents</groupId> <groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId> <artifactId>httpclient</artifactId>
<version>${httpcompontents.version}</version> <version>${httpcompontents.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.httpcomponents</groupId> <groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId> <artifactId>httpmime</artifactId>
<version>${httpcompontents.version}</version> <version>${httpcompontents.version}</version>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<directory>${project.basedir}/target</directory> <directory>${project.basedir}/target</directory>
<outputDirectory>${project.build.directory}/classes</outputDirectory> <outputDirectory>${project.build.directory}/classes</outputDirectory>
<finalName>${project.artifactId}-${project.version}</finalName> <finalName>${project.artifactId}-${project.version}</finalName>
<testOutputDirectory>${project.build.directory}/test-classes</testOutputDirectory> <testOutputDirectory>${project.build.directory}/test-classes</testOutputDirectory>
<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory> <sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
<plugins> <plugins>
<plugin> <plugin>
<artifactId>maven-clean-plugin</artifactId> <artifactId>maven-clean-plugin</artifactId>
<version>3.0.0</version> <version>3.0.0</version>
<executions> <executions>
<execution> <execution>
<id>clean-project</id> <id>clean-project</id>
<phase>clean</phase> <phase>clean</phase>
<goals> <goals>
<goal>clean</goal> <goal>clean</goal>
</goals> </goals>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin> <plugin>
<artifactId>maven-assembly-plugin</artifactId> <artifactId>maven-assembly-plugin</artifactId>
<version>2.6</version> <version>2.6</version>
<configuration> <configuration>
<descriptorRefs> <descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef> <descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs> </descriptorRefs>
</configuration> </configuration>
<executions> <executions>
<execution> <execution>
<id>make-assembly</id> <id>make-assembly</id>
<phase>package</phase> <phase>package</phase>
<goals> <goals>
<goal>single</goal> <goal>single</goal>
</goals> </goals>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId> <artifactId>maven-source-plugin</artifactId>
<version>3.0.0</version> <version>3.0.0</version>
<executions> <executions>
<execution> <execution>
<id>attach-sources</id> <id>attach-sources</id>
<phase>verify</phase> <phase>verify</phase>
<goals> <goals>
<goal>jar-no-fork</goal> <goal>jar-no-fork</goal>
</goals> </goals>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId> <artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.3</version> <version>2.10.3</version>
<executions> <executions>
<execution> <execution>
<id>attach-javadocs</id> <id>attach-javadocs</id>
<phase>site</phase> <phase>site</phase>
<goals> <goals>
<goal>javadoc-no-fork</goal> <goal>javadoc-no-fork</goal>
</goals> </goals>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
</plugins> <plugin>
<pluginManagement> <groupId>org.apache.maven.plugins</groupId>
<plugins> <artifactId>maven-shade-plugin</artifactId>
<plugin> <version>2.4.3</version>
<groupId>org.apache.maven.plugins</groupId> <executions>
<artifactId>maven-compiler-plugin</artifactId> <execution>
<configuration> <phase>package</phase>
<source>1.8</source> <goals>
<target>1.8</target> <goal>shade</goal>
<encoding>UTF-8</encoding> </goals>
</configuration> <configuration>
</plugin> <shadedArtifactAttached>false</shadedArtifactAttached>
</plugins> <createDependencyReducedPom>true</createDependencyReducedPom>
</pluginManagement> <artifactSet>
</build> <includes>
<include>org.apache.httpcomponents:*</include>
</includes>
</artifactSet>
<relocations>
<relocation>
<pattern>org.apache.http</pattern>
<shadedPattern>embedded.org.apache.http</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project> </project>