exclude icu4j from the final jar

This commit is contained in:
Tom Everett 2017-03-09 18:36:25 -07:00
parent 2c0ef5529d
commit cf422bb107
2 changed files with 245 additions and 271 deletions

262
pom.xml
View File

@ -1,145 +1,141 @@
<!--
~ Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
~ Use of this file is governed by the BSD 3-clause license that
~ can be found in the LICENSE.txt file in the project root.
-->
<!-- ~ Copyright (c) 2012-2016 The ANTLR Project. All rights reserved. ~ Use of this file is governed by the BSD 3-clause license that ~ can be found in the LICENSE.txt file in the project root. -->
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>9</version>
</parent>
<groupId>org.antlr</groupId>
<artifactId>antlr4-master</artifactId>
<version>4.7-SNAPSHOT</version>
<packaging>pom</packaging>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>9</version>
</parent>
<groupId>org.antlr</groupId>
<artifactId>antlr4-master</artifactId>
<version>4.7-SNAPSHOT</version>
<packaging>pom</packaging>
<name>ANTLR 4</name>
<description>ANTLR 4 Master Build POM</description>
<url>http://www.antlr.org</url>
<inceptionYear>1992</inceptionYear>
<organization>
<name>ANTLR</name>
<url>http://www.antlr.org</url>
</organization>
<name>ANTLR 4</name>
<description>ANTLR 4 Master Build POM</description>
<url>http://www.antlr.org</url>
<inceptionYear>1992</inceptionYear>
<organization>
<name>ANTLR</name>
<url>http://www.antlr.org</url>
</organization>
<licenses>
<license>
<name>The BSD License</name>
<url>http://www.antlr.org/license.html</url>
<distribution>repo</distribution>
</license>
</licenses>
<licenses>
<license>
<name>The BSD License</name>
<url>http://www.antlr.org/license.html</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<name>Terence Parr</name>
<url>http://parrt.cs.usfca.edu</url>
<roles>
<role>Project lead - ANTLR</role>
</roles>
</developer>
<developer>
<name>Sam Harwell</name>
<url>http://tunnelvisionlabs.com</url>
<roles>
<role>Developer</role>
</roles>
</developer>
<developer>
<name>Eric Vergnaud</name>
<roles>
<role>Developer - JavaScript, C#, Python 2, Python 3</role>
</roles>
</developer>
<developer>
<name>Peter Boyer</name>
<roles>
<role>Developer - Go</role>
</roles>
</developer>
<developer>
<name>Jim Idle</name>
<email>jimi@idle.ws</email>
<url>http://www.linkedin.com/in/jimidle</url>
<roles>
<role>Developer - Maven Plugin</role>
</roles>
</developer>
<developer>
<name>Mike Lischke</name>
<roles>
<role>Developer - C++ Target</role>
</roles>
</developer>
</developers>
<developers>
<developer>
<name>Terence Parr</name>
<url>http://parrt.cs.usfca.edu</url>
<roles>
<role>Project lead - ANTLR</role>
</roles>
</developer>
<developer>
<name>Sam Harwell</name>
<url>http://tunnelvisionlabs.com</url>
<roles>
<role>Developer</role>
</roles>
</developer>
<developer>
<name>Eric Vergnaud</name>
<roles>
<role>Developer - JavaScript, C#, Python 2, Python 3</role>
</roles>
</developer>
<developer>
<name>Peter Boyer</name>
<roles>
<role>Developer - Go</role>
</roles>
</developer>
<developer>
<name>Jim Idle</name>
<email>jimi@idle.ws</email>
<url>http://www.linkedin.com/in/jimidle</url>
<roles>
<role>Developer - Maven Plugin</role>
</roles>
</developer>
<developer>
<name>Mike Lischke</name>
<roles>
<role>Developer - C++ Target</role>
</roles>
</developer>
</developers>
<modules>
<module>runtime/Java</module>
<module>tool</module>
<module>antlr4-maven-plugin</module>
<module>tool-testsuite</module>
<module>runtime-testsuite/annotations</module>
<module>runtime-testsuite/processors</module>
<module>runtime-testsuite</module>
</modules>
<modules>
<module>runtime/Java</module>
<module>tool</module>
<module>antlr4-maven-plugin</module>
<module>tool-testsuite</module>
<module>runtime-testsuite/annotations</module>
<module>runtime-testsuite/processors</module>
<module>runtime-testsuite</module>
</modules>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<antlr.testinprocess>true</antlr.testinprocess>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<antlr.testinprocess>true</antlr.testinprocess>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
<mailingLists>
<mailingList>
<name>antlr-discussion</name>
<archive>https://groups.google.com/forum/?fromgroups#!forum/antlr-discussion</archive>
</mailingList>
</mailingLists>
<mailingLists>
<mailingList>
<name>antlr-discussion</name>
<archive>https://groups.google.com/forum/?fromgroups#!forum/antlr-discussion</archive>
</mailingList>
</mailingLists>
<issueManagement>
<system>GitHub Issues</system>
<url>https://github.com/antlr/antlr4/issues</url>
</issueManagement>
<issueManagement>
<system>GitHub Issues</system>
<url>https://github.com/antlr/antlr4/issues</url>
</issueManagement>
<scm>
<url>https://github.com/antlr/antlr4/tree/master</url>
<connection>scm:git:git://github.com/antlr/antlr4.git</connection>
<developerConnection>scm:git:git@github.com:antlr/antlr4.git</developerConnection>
<tag>HEAD</tag>
</scm>
<scm>
<url>https://github.com/antlr/antlr4/tree/master</url>
<connection>scm:git:git://github.com/antlr/antlr4.git</connection>
<developerConnection>scm:git:git@github.com:antlr/antlr4.git</developerConnection>
<tag>HEAD</tag>
</scm>
<build>
<resources>
<resource>
<directory>resources</directory>
</resource>
</resources>
<testResources>
<testResource>
<directory>test</directory>
</testResource>
</testResources>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
</plugins>
</pluginManagement>
</build>
<build>
<resources>
<resource>
<directory>resources</directory>
</resource>
</resources>
<testResources>
<testResource>
<directory>test</directory>
</testResource>
</testResources>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>

View File

@ -1,21 +1,16 @@
<!--
~ Copyright (c) 2012-2016 The ANTLR Project. All rights reserved.
~ Use of this file is governed by the BSD 3-clause license that
~ can be found in the LICENSE.txt file in the project root.
-->
<!-- ~ Copyright (c) 2012-2016 The ANTLR Project. All rights reserved. ~ Use of this file is governed by the BSD 3-clause license that ~ can be found in the LICENSE.txt file in the project root. -->
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.antlr</groupId>
<artifactId>antlr4-master</artifactId>
<version>4.7-SNAPSHOT</version>
</parent>
<artifactId>antlr4</artifactId>
<name>ANTLR 4 Tool</name>
<url>http://www.antlr.org</url>
<description>The ANTLR 4 grammar compiler.</description>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.antlr</groupId>
<artifactId>antlr4-master</artifactId>
<version>4.7-SNAPSHOT</version>
</parent>
<artifactId>antlr4</artifactId>
<name>ANTLR 4 Tool</name>
<url>http://www.antlr.org</url>
<description>The ANTLR 4 grammar compiler.</description>
<dependencies>
<dependency>
<groupId>org.antlr</groupId>
@ -42,14 +37,13 @@
<artifactId>javax.json</artifactId>
<version>1.0.4</version>
</dependency>
<dependency>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j</artifactId>
<version>58.2</version>
</dependency>
<dependency>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j</artifactId>
<version>58.2</version>
</dependency>
</dependencies>
<build>
<build>
<sourceDirectory>src</sourceDirectory>
<testResources>
<testResource>
@ -85,128 +79,112 @@
</execution>
</executions>
</plugin>
<plugin> <!-- include code-generated sources -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${project.build.directory}/generated-sources/antlr4-tool-codegen</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin> <!-- include code-generated sources -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${project.build.directory}/generated-sources/antlr4-tool-codegen</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin> <!-- this makes a fat jar with all dependencies -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<phase>package</phase>
<configuration>
<phase>package</phase>
<configuration>
<minimizeJar>false</minimizeJar>
<createDependencyReducedPom>false</createDependencyReducedPom>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>complete</shadedClassifierName>
</configuration>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- can't get this to add bundle items
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.5.4</version>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<configuration>
<instructions>
<Bundle-SymbolicName>org.antlr.antlr4-tool</Bundle-SymbolicName>
</instructions>
</configuration>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
</plugin>
-->
<plugin> <!-- this just jars up tool stuff and sets main class -->
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<mainClass>org.antlr.v4.Tool</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr3-maven-plugin</artifactId>
<version>3.5.2</version>
<configuration>
<sourceDirectory>src</sourceDirectory>
<verbose>true</verbose>
</configuration>
<executions>
<execution>
<goals>
<goal>antlr</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.webguys</groupId>
<artifactId>string-template-maven-plugin</artifactId>
<version>1.1</version>
<!-- this nonsense is for some reason needed to make this plugin
work with maven 3 -->
<dependencies>
<dependency>
<groupId>org.twdata.maven</groupId>
<artifactId>mojo-executor</artifactId>
<version>2.1.0</version>
</dependency>
</dependencies>
<configuration>
<templates>
<template>
<directory>${basedir}/resources/org/antlr/v4/tool/templates</directory>
<name>unicodedata</name>
<target>${basedir}/target/generated-sources/tool/src/org/antlr/v4/unicode/UnicodeData.java</target>
<controller>
<className>org.antlr.v4.unicode.UnicodeDataTemplateController</className>
<sourceVersion>1.7</sourceVersion>
<targetVersion>1.7</targetVersion>
<method>getProperties</method>
</controller>
</template>
</templates>
</configuration>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>render</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<shadedClassifierName>complete</shadedClassifierName>
<artifactSet>
<excludes>
<exclude>com.ibm.icu:*</exclude>
</excludes>
</artifactSet>
</configuration>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- can't get this to add bundle items <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <version>2.5.4</version> <executions> <execution> <id>bundle-manifest</id> <phase>process-classes</phase> <configuration> <instructions> <Bundle-SymbolicName>org.antlr.antlr4-tool</Bundle-SymbolicName> </instructions> </configuration> <goals> <goal>manifest</goal> </goals> </execution> </executions> </plugin> -->
<plugin> <!-- this just jars up tool stuff and sets main class -->
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<mainClass>org.antlr.v4.Tool</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr3-maven-plugin</artifactId>
<version>3.5.2</version>
<configuration>
<sourceDirectory>src</sourceDirectory>
<verbose>true</verbose>
</configuration>
<executions>
<execution>
<goals>
<goal>antlr</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.webguys</groupId>
<artifactId>string-template-maven-plugin</artifactId>
<version>1.1</version>
<!-- this nonsense is for some reason needed to make this plugin work with maven 3 -->
<dependencies>
<dependency>
<groupId>org.twdata.maven</groupId>
<artifactId>mojo-executor</artifactId>
<version>2.1.0</version>
</dependency>
</dependencies>
<configuration>
<templates>
<template>
<directory>${basedir}/resources/org/antlr/v4/tool/templates</directory>
<name>unicodedata</name>
<target>${basedir}/target/generated-sources/tool/src/org/antlr/v4/unicode/UnicodeData.java</target>
<controller>
<className>org.antlr.v4.unicode.UnicodeDataTemplateController</className>
<sourceVersion>1.7</sourceVersion>
<targetVersion>1.7</targetVersion>
<method>getProperties</method>
</controller>
</template>
</templates>
</configuration>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>render</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>