Xml文件  |  233行  |  10.37 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/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>javaparser-parent</artifactId>
        <groupId>com.github.javaparser</groupId>
        <version>3.5.16-SNAPSHOT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>javaparser-symbol-solver-testing</artifactId>
    <description>A Symbol Solver for Java, built on top of JavaParser (tests)</description>

    <licenses>
        <license>
            <name>GNU Lesser General Public License</name>
            <url>http://www.gnu.org/licenses/lgpl-3.0.html</url>
            <distribution>repo</distribution>
        </license>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>

    <profiles>
        <profile>
            <id>NonSlowTests</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <excludedGroups>com.github.javaparser.SlowTest</excludedGroups>
                            <parallel>methods</parallel>
                            <threadCount>4</threadCount>
                        </configuration>
                    </plugin>
                </plugins>

            </build>
        </profile>
        <profile>
            <id>AlsoSlowTests</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <parallel>methods</parallel>
                            <threadCount>4</threadCount>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>


    <build>
        <plugins>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>jacoco-initialize</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>jacoco-site</id>
                        <phase>package</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-resources</id>
                        <phase>pre-integration-test</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <encoding>UTF-8</encoding>
                            <outputDirectory>${basedir}/target/classes</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>../javaparser-core/target/classes</directory>
                                    <filtering>false</filtering>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>unpack-test-jss-sources</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>com.github.javaparser</groupId>
                                    <artifactId>java-symbol-solver-core</artifactId>
                                    <version>0.6.0</version>
                                    <classifier>sources</classifier>
                                    <outputDirectory>
                                        ${project.build.directory}/test-classes/javasymbolsolver_0_6_0/src/java-symbol-solver-core
                                    </outputDirectory>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>com.github.javaparser</groupId>
                                    <artifactId>java-symbol-solver-logic</artifactId>
                                    <version>0.6.0</version>
                                    <classifier>sources</classifier>
                                    <outputDirectory>
                                        ${project.build.directory}/test-classes/javasymbolsolver_0_6_0/src/java-symbol-solver-logic
                                    </outputDirectory>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>com.github.javaparser</groupId>
                                    <artifactId>java-symbol-solver-model</artifactId>
                                    <version>0.6.0</version>
                                    <classifier>sources</classifier>
                                    <outputDirectory>
                                        ${project.build.directory}/test-classes/javasymbolsolver_0_6_0/src/java-symbol-solver-model
                                    </outputDirectory>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-test-jss-libs</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>com.google.guava</groupId>
                                    <artifactId>guava</artifactId>
                                    <version>21.0</version>
                                    <outputDirectory>
                                        ${project.build.directory}/test-classes/javasymbolsolver_0_6_0/lib
                                    </outputDirectory>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>com.github.javaparser</groupId>
                                    <artifactId>javaparser-core</artifactId>
                                    <version>3.5.10</version>
                                    <outputDirectory>
                                        ${project.build.directory}/test-classes/javasymbolsolver_0_6_0/lib
                                    </outputDirectory>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>io.javaslang</groupId>
                                    <artifactId>javaslang</artifactId>
                                    <version>2.0.3</version>
                                    <outputDirectory>
                                        ${project.build.directory}/test-classes/javasymbolsolver_0_6_0/lib
                                    </outputDirectory>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.javassist</groupId>
                                    <artifactId>javassist</artifactId>
                                    <version>3.19.0-GA</version>
                                    <outputDirectory>
                                        ${project.build.directory}/test-classes/javasymbolsolver_0_6_0/lib
                                    </outputDirectory>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <configuration>
                    <!-- no need to release this module -->
                    <skip>true</skip>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
        <dependency>
            <groupId>com.github.javaparser</groupId>
            <artifactId>javaparser-symbol-solver-logic</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.github.javaparser</groupId>
            <artifactId>javaparser-symbol-solver-model</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.github.javaparser</groupId>
            <artifactId>javaparser-symbol-solver-core</artifactId>
            <version>${project.version}</version>
        </dependency>
    </dependencies>

</project>