Xml文件  |  138行  |  5.08 KB

<?xml version="1.0" encoding="UTF-8"?>
<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>
    <artifactId>antlr-complete</artifactId>
    <packaging>jar</packaging>

    <name>ANTLR 3 Complete</name>
    <description>Complete distribution for ANTLR 3</description>

  <!--

    Inherit from the ANTLR master pom, which tells us what
    version we are and allows us to inherit dependencies
    and so on.

    -->
    <parent>
        <groupId>org.antlr</groupId>
        <artifactId>antlr-master</artifactId>
        <version>3.5.2</version>
    </parent>

    <url>http://antlr.org/</url>

    <!--
        The complete distribution includes the following modules and their dependencies:
            ANTLR 3 Tool
            ANTLR 3 Runtime
            gUnit for ANTLR 3
            StringTemplate 4 (dependency of code generator in the ANTLR 3 Tool)
            StringTemplate 3 (dependency of grammars with output=template)
            ANTLR 2.7.7 (dependency of template parser in StringTemplate 3)
    -->
    <dependencies>

        <dependency>
            <groupId>org.antlr</groupId>
            <artifactId>antlr</artifactId>
            <version>${project.version}</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.antlr</groupId>
            <artifactId>antlr-runtime</artifactId>
            <version>${project.version}</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.antlr</groupId>
            <artifactId>gunit</artifactId>
            <version>${project.version}</version>
            <scope>compile</scope>
        </dependency>

    </dependencies>

    <build>

        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>2.0</version>
                <configuration>
                    <minimizeJar>false</minimizeJar>
                    <createSourcesJar>true</createSourcesJar>
                    <filters>
                        <filter>
                            <artifact>org.antlr:antlr-complete</artifact>
                            <includes>
                                <include>META-INF/**</include>
                            </includes>
                        </filter>
                    </filters>
                    <transformers>
                        <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                            <mainClass>org.antlr.Tool</mainClass>
                        </transformer>
                    </transformers>
                </configuration>
                <executions>
                    <execution>
                        <id>complete-no-st3</id>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <createDependencyReducedPom>false</createDependencyReducedPom>
                            <shadedArtifactAttached>true</shadedArtifactAttached>
                            <shadedClassifierName>no-st3</shadedClassifierName>
                            <filters>
                                <filter>
                                    <artifact>antlr:antlr</artifact>
                                    <excludes>
                                        <exclude>**</exclude>
                                    </excludes>
                                </filter>
                                <filter>
                                    <artifact>org.antlr:stringtemplate</artifact>
                                    <excludes>
                                        <exclude>**</exclude>
                                    </excludes>
                                </filter>
                            </filters>
                        </configuration>
                    </execution>

                    <execution>
                        <id>complete</id>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <createDependencyReducedPom>false</createDependencyReducedPom>
                            <shadedArtifactAttached>false</shadedArtifactAttached>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <includeDependencySources>true</includeDependencySources>
                </configuration>
            </plugin>
        </plugins>

    </build>

</project>