<?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">
    <modelVersion>4.0.0</modelVersion>
    <groupId>ca.mcgill.sable</groupId>
    <artifactId>soot</artifactId>
    <version>3.3.0</version>
    <name>Soot - a J*va Optimization Framework</name>
    <description>A Java Optimization Framework</description>
    <url>https://sable.github.io/soot/</url>
    <organization>
        <name>Sable</name>
        <url>http://www.sable.mcgill.ca/</url>
    </organization>
    <licenses>
        <license>
            <name>GNU LESSER GENERAL PUBLIC LICENSE 2.1</name>
            <url>https://www.gnu.org/licenses/lgpl-2.1.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <developers>
        <developer>
            <name>Manuel Benz</name>
            <email>manuel.benz@upb.de</email>
            <organization>University of Paderborn</organization>
            <organizationUrl>https://www.hni.uni-paderborn.de/en/software-engineering/</organizationUrl>
        </developer>
        <developer>
            <name>Eric Bodden</name>
            <email>eric.bodden@uni-paderborn.de</email>
            <organization>University of Paderborn</organization>
            <organizationUrl>https://www.hni.uni-paderborn.de/en/software-engineering/</organizationUrl>
        </developer>
        <developer>
            <name>Steven Arzt</name>
            <email>eric.bodden@uni-paderborn.de</email>
            <organization>Frauenhofer SIT</organization>
            <organizationUrl>https://www.sit.fraunhofer.de/en/</organizationUrl>
        </developer>
    </developers>
    <scm>
        <connection>scm:git:git@github.com:Sable/soot.git</connection>
        <developerConnection>scm:git:git@github.com:Sable/soot.git</developerConnection>
        <url>https://github.com/Sable/soot/tree/master</url>
    </scm>
    <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <xml-maven-plugin.version>1.0.2</xml-maven-plugin.version>
        <maven-resources-plugin.version>3.0.2</maven-resources-plugin.version>
        <build-helper-maven-plugin.version>3.0.0</build-helper-maven-plugin.version>
        <maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
        <maven-surefire-plugin.version>2.20.1</maven-surefire-plugin.version>
        <maven-assembly-plugin.version>3.1.0</maven-assembly-plugin.version>
        <maven-jar-plugin.version>3.0.2</maven-jar-plugin.version>
        <maven-source-plugin.version>3.0.1</maven-source-plugin.version>
        <maven-javadoc-plugin.version>3.0.0</maven-javadoc-plugin.version>
        <maven-nexus-staging-plugin.version>1.6.8</maven-nexus-staging-plugin.version>
        <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven-checkstyle-plugin.version>3.0.0</maven-checkstyle-plugin.version>
        <checkstyle.version>8.9</checkstyle.version>
        <checkstyle.dir.path>${basedir}/codingstyle</checkstyle.dir.path>
        <checkstyle.file.path>${checkstyle.dir.path}/soot_checkstyle_checks.xml</checkstyle.file.path>
        <checkstyle.failOnViolation>true</checkstyle.failOnViolation>
        <licence-check.failOnMissingHeader>true</licence-check.failOnMissingHeader>
    </properties>
    <build>
        <finalName>sootclasses-trunk</finalName>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>xml-maven-plugin</artifactId>
                <version>${xml-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>transform</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <transformationSets>
                        <!-- make soot singletons -->
                        <transformationSet>
                            <outputDir>${basedir}/src/main/generated/singletons/soot/</outputDir>
                            <dir>${basedir}/src/main/xml/singletons</dir>
                            <includes>
                                <include>singletons.xml</include>
                            </includes>
                            <stylesheet>${basedir}/src/main/xml/singletons/make-singletons.xsl</stylesheet>
                            <fileMappers>
                                <fileMapper implementation="org.codehaus.plexus.components.io.filemappers.MergeFileMapper">
                                    <targetName>Singletons.java</targetName>
                                </fileMapper>
                            </fileMappers>
                        </transformationSet>
                        <!-- make soot options -->
                        <transformationSet>
                            <outputDir>${basedir}/src/main/generated/options/soot/options/</outputDir>
                            <dir>${basedir}/src/main/xml/options/</dir>
                            <includes>
                                <include>soot_options.xml</include>
                            </includes>
                            <stylesheet>${basedir}/src/main/xml/options/make-soot-options.xsl</stylesheet>
                            <fileMappers>
                                <fileMapper implementation="org.codehaus.plexus.components.io.filemappers.MergeFileMapper">
                                    <targetName>Options.java</targetName>
                                </fileMapper>
                            </fileMappers>
                        </transformationSet>
                        <transformationSet>
                            <outputDir>${basedir}/src/main/generated/options/soot/</outputDir>
                            <dir>${basedir}/src/main/xml/options/</dir>
                            <includes>
                                <include>soot_options.xml</include>
                            </includes>
                            <stylesheet>${basedir}/src/main/xml/options/ant-task.xsl</stylesheet>
                            <fileMappers>
                                <fileMapper implementation="org.codehaus.plexus.components.io.filemappers.MergeFileMapper">
                                    <targetName>AntTask.java</targetName>
                                </fileMapper>
                            </fileMappers>
                        </transformationSet>
                        <transformationSet>
                            <outputDir>${basedir}/eclipse/ca.mcgill.sable.soot/src/ca/mcgill/sable/soot/ui/</outputDir>
                            <dir>${basedir}/src/main/xml/options/</dir>
                            <includes>
                                <include>soot_options.xml</include>
                            </includes>
                            <stylesheet>${basedir}/src/main/xml/options/phase_options_dialog.xsl</stylesheet>
                            <fileMappers>
                                <fileMapper implementation="org.codehaus.plexus.components.io.filemappers.MergeFileMapper">
                                    <targetName>PhaseOptionsDialog.java</targetName>
                                </fileMapper>
                            </fileMappers>
                        </transformationSet>
                        <transformationSet>
                            <outputDir>${basedir}/doc/</outputDir>
                            <dir>${basedir}/src/main/xml/options/</dir>
                            <includes>
                                <include>soot_options.xml</include>
                            </includes>
                            <stylesheet>${basedir}/src/main/xml/options/soot_options.xsl</stylesheet>
                            <fileMappers>
                                <fileMapper implementation="org.codehaus.plexus.components.io.filemappers.MergeFileMapper">
                                    <targetName>soot_options.htm</targetName>
                                </fileMapper>
                            </fileMappers>
                        </transformationSet>
                    </transformationSets>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>net.sf.saxon</groupId>
                        <artifactId>Saxon-HE</artifactId>
                        <version>9.8.0-8</version>
                    </dependency>
                </dependencies>
            </plugin>
            <!-- copy the soot_options.css -->
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>${maven-resources-plugin.version}</version>
                <executions>
                    <execution>
                        <id>copy options.css to doc directory</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${basedir}/doc</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>${basedir}/src/main/xml/options/</directory>
                                    <includes>
                                        <include>soot_options.css</include>
                                    </includes>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                    <execution>
                        <id>add system test resources</id>
                        <phase>generate-test-resources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/systemTest-classes</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>src/systemTest/resources</directory>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>${build-helper-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <id>add generated sources</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>${basedir}/src/main/generated/singletons</source>
                                <source>${basedir}/src/main/generated/sablecc</source>
                                <source>${basedir}/src/main/generated/options</source>
                                <source>${basedir}/src/main/generated/jastadd</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                </configuration>
                <executions>
                    <execution>
                        <id>compile system test targets</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>testCompile</goal>
                        </goals>
                        <configuration>
                            <compileSourceRoots>${project.basedir}/src/systemTest/targets</compileSourceRoots>
                            <testIncludes>
                                <testInclude>**/*.java</testInclude>
                            </testIncludes>
                            <outputDirectory>${project.build.directory}/systemTest-target-classes</outputDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>compile-system-tests</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>testCompile</goal>
                        </goals>
                        <configuration>
                            <compileSourceRoots>${project.basedir}/src/systemTest/java</compileSourceRoots>
                            <testIncludes>
                                <testInclude>**/*.java</testInclude>
                            </testIncludes>
                            <outputDirectory>${project.build.directory}/systemTest-classes</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven-surefire-plugin.version}</version>
                <configuration>
                    <reuseForks>false</reuseForks>
                    <forkCount>1</forkCount>
                </configuration>
                <executions>
                    <execution>
                        <id>System-tests</id>
                        <goals>
                            <goal>test
                            </goal>
                        </goals>
                        <configuration>
                            <testClassesDirectory>${project.build.directory}/systemTest-classes</testClassesDirectory>
                            <testSourceDirectory>${project.basedir}/src/systemTest/java</testSourceDirectory>
                            <trimStackTrace>false</trimStackTrace>
                            <reuseForks>false</reuseForks>
                            <forkCount>1</forkCount>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${maven-jar-plugin.version}</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <mainClass>soot.Main</mainClass>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${maven-checkstyle-plugin.version}</version>
                <dependencies>
                    <dependency>
                        <groupId>com.puppycrawl.tools</groupId>
                        <artifactId>checkstyle</artifactId>
                        <version>${checkstyle.version}</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>stylecheck</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <propertyExpansion>config_loc=${checkstyle.dir.path}</propertyExpansion>
                    <configLocation>${checkstyle.file.path}</configLocation>
                    <encoding>UTF-8</encoding>
                    <logViolationsToConsole>true</logViolationsToConsole>
                    <failOnViolation>${checkstyle.failOnViolation}</failOnViolation>
                    <violationSeverity>warning</violationSeverity>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>1.16</version>
                <configuration>
                    <failOnMissingHeader>${licence-check.failOnMissingHeader}</failOnMissingHeader>
                    <failOnNotUptodateHeader>${licence-check.failOnMissingHeader}</failOnNotUptodateHeader>
                    <inceptionYear>1997</inceptionYear>
                    <addJavaLicenseAfterPackage>true</addJavaLicenseAfterPackage>
                    <licenseName>lgpl_v2_1</licenseName>
                    <organizationName>Raja Vallée-Rai and others</organizationName>
                    <roots>
                        <root>src/main/java</root>
                        <root>src/test/java</root>
                        <root>src/it</root>
                        <root>src/systemTest/java</root>
                        <root>src/systemTest/targets</root>
                    </roots>
                </configuration>
                <executions>
                    <execution>
                        <id>license-check</id>
                        <goals>
                            <goal>check-file-header</goal>
                        </goals>
                        <phase>verify</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>${maven-assembly-plugin.version}</version>
                <configuration>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <mainClass>soot.Main</mainClass>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven-source-plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven-javadoc-plugin.version}</version>
                <configuration>
                    <failOnError>false</failOnError>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.6</version>
        </dependency>
        <dependency>
            <groupId>org.smali</groupId>
            <artifactId>dexlib2</artifactId>
            <version>2.2.5</version>
        </dependency>
        <dependency>
            <groupId>org.ow2.asm</groupId>
            <artifactId>asm-debug-all</artifactId>
            <version>5.2</version>
        </dependency>
        <dependency>
            <groupId>org.javassist</groupId>
            <artifactId>javassist</artifactId>
            <version>3.18.2-GA</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>xmlpull</groupId>
            <artifactId>xmlpull</artifactId>
            <version>1.1.3.4d_b4_min</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ant</groupId>
            <artifactId>ant</artifactId>
            <version>1.10.1</version>
            <scope>provided</scope>
        </dependency>
        <!-- Local dependencies -->
        <dependency>
            <groupId>de.upb.cs.swt</groupId>
            <artifactId>axml</artifactId>
            <version>2.0.0</version>
        </dependency>
        <dependency>
            <groupId>ca.mcgill.sable</groupId>
            <artifactId>polyglot</artifactId>
            <version>2006</version>
        </dependency>
        <dependency>
            <groupId>de.upb.cs.swt</groupId>
            <artifactId>heros</artifactId>
            <version>1.1.0</version>
        </dependency>
        <dependency>
            <groupId>ca.mcgill.sable</groupId>
            <artifactId>jasmin</artifactId>
            <version>3.0.1</version>
        </dependency>
        <!-- Logging dependencies -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.5</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>1.7.5</version>
            <optional>true</optional>
        </dependency>
        <!-- Testing dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
            <version>1.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>1.10.19</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-mockito-release-full</artifactId>
            <version>1.6.4</version>
            <type>pom</type>
            <scope>test</scope>
        </dependency>
        <!-- https://mvnrepository.com/artifact/com.google.android/android -->
        <dependency>
            <groupId>com.google.android</groupId>
            <artifactId>android</artifactId>
            <version>4.1.1.4</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
        </snapshotRepository>
    </distributionManagement>
    <profiles>
        <profile>
            <id>deploy</id>
            <activation>
                <property>
                    <name>deploy</name>
                    <value>true</value>
                </property>
            </activation>
            <properties>
                <gpg.executable>gpg2</gpg.executable>
                <gpg.keyname>BA6398DCF4E2C1B6C5C7BDFC364F80C21BCC61BB</gpg.keyname>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>${maven-nexus-staging-plugin.version}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven-gpg-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <!-- This is necessary for gpg to not try to use the pinentry programs -->
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>simple-command</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>single</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>