<?xml version="1.0" encoding="UTF-8"?>
<project
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
    xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.ibm.wala</groupId>
  <artifactId>WALA</artifactId>
  <version>1.5.0</version>
  <packaging>pom</packaging>
  <properties>
    <project-version>1.5.0</project-version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <build-alias>b000</build-alias>
    <tycho-version>0.23.1</tycho-version>
    <tycho.scmUrl>scm:git:ssh://github.com:wala/WALA.git</tycho.scmUrl>
  </properties>

      <modules>
	<module>targets</module>
	<module>com.ibm.wala_feature</module>
	<module>com.ibm.wala.core</module>
	<module>com.ibm.wala.shrike</module>
	<module>com.ibm.wala.util</module>
	<module>com.ibm.wala.core.testdata</module>
	<module>com.ibm.wala.core.tests</module>
	<module>com.ibm.wala.cast</module>
	<module>com.ibm.wala.cast.test</module>
	<module>com.ibm.wala.cast.java</module>
	<module>com.ibm.wala.cast.java.test</module>
	<module>com.ibm.wala.cast.java.test.data</module>
	<module>com.ibm.wala.cast.java.ecj</module>
	<module>com.ibm.wala.ide_feature</module>
	<module>com.ibm.wala.ide</module>
	<module>com.ibm.wala.ide.tests</module>
	<module>com.ibm.wala.ide.jdt</module>
	<module>com.ibm.wala.ide.jdt.test</module>
	<module>com.ibm.wala.cast.js</module>
	<module>com.ibm.wala.cast.js.html.nu_validator</module> 
	<module>com.ibm.wala.cast.js.test</module>
	<module>com.ibm.wala.cast.js.test.data</module>
	<module>com.ibm.wala.cast.js.rhino</module>
	<module>com.ibm.wala.cast.js.rhino.test</module>
	<module>com.ibm.wala.cast.js.nodejs</module>
	<module>com.ibm.wala.cast.js.nodejs.test</module>
	<module>com.ibm.wala.ide.jsdt</module>
	<module>com.ibm.wala.ide.jsdt.tests</module>
	<module>com.ibm.wala.dalvik</module>
	<module>com.ibm.wala.dalvik.test</module>
	<module>com.ibm.wala.scandroid</module>
	<module>com.ibm.wala-repository</module>
      </modules>

      <profiles>
    <profile>
      <id>linux</id>
      <activation>
	<os> 
          <family>unix</family> 
          <name>Linux</name>
	</os>
      </activation>
      <build>
	<plugins>
	  <plugin>
	    <groupId>org.eclipse.tycho</groupId>
	    <artifactId>target-platform-configuration</artifactId>
	    <version>${tycho-version}</version>
	    <configuration>
	      <dependency-resolution>
		<optionalDependencies>ignore</optionalDependencies>
	      </dependency-resolution>
	    </configuration>
	  </plugin>
	</plugins>
      </build>
    </profile>
  </profiles>
  
  <build>
    <plugins>
      <plugin>
	<groupId>org.eclipse.tycho</groupId>
	<artifactId>tycho-maven-plugin</artifactId>
	<version>${tycho-version}</version>
	<extensions>true</extensions>
      </plugin>
      <plugin>
	<groupId>org.eclipse.tycho</groupId>
	<artifactId>target-platform-configuration</artifactId>
	<version>${tycho-version}</version>
	<configuration>
	  <target>
	    <artifact>
	      <groupId>com.ibm.wala.target</groupId>
	      <artifactId>e47</artifactId>
	      <version>${project-version}</version>
	    </artifact>
	  </target>
	</configuration>
      </plugin>
      <plugin>
	<groupId>org.eclipse.tycho</groupId>
	<artifactId>tycho-compiler-plugin</artifactId>
	<version>${tycho-version}</version>
	<configuration>
	  <compilerId>jdt</compilerId>
	  <useProjectSettings>true</useProjectSettings>
	</configuration>
      </plugin>
      <plugin>
	<groupId>org.eclipse.tycho</groupId>
	<artifactId>tycho-source-plugin</artifactId>
	<version>${tycho-version}</version>
	<executions>
	  <execution>
	    <id>attach-source</id>
	    <phase>process-classes</phase>
	    <goals>
	      <goal>plugin-source</goal>
	    </goals>
	  </execution>
	</executions>
      </plugin>
      <plugin>
	<groupId>org.eclipse.tycho</groupId>
	<artifactId>tycho-packaging-plugin</artifactId>
	<version>${tycho-version}</version>
	<configuration>
	  <format>'v'yyyyMMdd-HHmm'-${build-alias}'</format>
	  <archiveSite>false</archiveSite>
	  <sourceReferences>
	    <generate>true</generate>
	  </sourceReferences>
	</configuration>
	<dependencies>
	  <dependency>
	    <groupId>org.eclipse.tycho.extras</groupId>
	    <artifactId>tycho-sourceref-jgit</artifactId>
	    <version>${tycho-version}</version>
	  </dependency>
	</dependencies>
      </plugin>
      <plugin>
	<groupId>org.eclipse.tycho</groupId>
	<artifactId>tycho-surefire-plugin</artifactId>
	<version>${tycho-version}</version>
	<configuration>

	  <dependencies>
	    <dependency>
	      <type>eclipse-plugin</type>
	      <artifactId>org.eclipse.osgi.compatibility.state</artifactId>
	      <version>0.0.0</version>
	    </dependency>         
	  </dependencies>

	  <useuiharness>false</useuiharness>
	  <useuithread>false</useuithread>
	  <providerHint>junit47</providerHint>
	  <argLine>${tycho.test.jvmArgs}</argLine>
          <includes>
	    <include>**/Test*.java</include>
	    <include>**/*Test.java</include>
	    <include>**/*TestCase.java</include>
	    <include>**/*Tests.java</include>
	  </includes>
	  <excludes>
	    <exclude>**/*AndroidLibs*.java</exclude>
	  </excludes>
	</configuration>
      </plugin>
      <!-- The tycho-source-feature-plugin needs to be place before the tycho-p2-plugin, as both plugins' goals bind to the same phase -->
      <plugin>
	<groupId>org.eclipse.tycho.extras</groupId>
	<artifactId>tycho-source-feature-plugin</artifactId>
	<version>${tycho-version}</version>
	<executions>
	  <execution>
	    <id>generate-source-feature</id>
	    <goals>
	      <goal>source-feature</goal>
	    </goals>
	  </execution>
	</executions>
      </plugin>
      <plugin>
	<groupId>org.eclipse.tycho</groupId>
	<artifactId>tycho-p2-plugin</artifactId>
	<version>${tycho-version}</version>
	<executions>
	  <execution>
	    <!-- Don't attach (default) metadata before the "generate-source-feature" execution. -->
	    <id>default-p2-metadata-default</id>
	    <configuration>
	      <attachP2Metadata>false</attachP2Metadata>
	    </configuration>
	  </execution>
	  <execution>
	    <!-- Do attach metadata after the "generate-source-feature" execution. -->
	    <id>attach-p2-metadata</id>
	    <phase>package</phase>
	    <goals>
	      <goal>p2-metadata</goal>
	    </goals>
	  </execution>
	</executions>
      </plugin>
      <plugin>
	<groupId>org.eclipse.tycho</groupId>
	<artifactId>tycho-p2-director-plugin</artifactId>
	<version>${tycho-version}</version>
      </plugin>
      <plugin>
	<groupId>org.eclipse.tycho</groupId>
	<artifactId>tycho-p2-repository-plugin</artifactId>
	<version>${tycho-version}</version>
	<configuration>
	  <includeAllDependencies>true</includeAllDependencies>
	</configuration>
      </plugin>
      <plugin>
	<groupId>com.googlecode.maven-download-plugin</groupId>
	<artifactId>maven-download-plugin</artifactId>
	<version>1.0.0</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.14.1</version>
      </plugin>		
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.0.0-M1</version>
            <configuration>
              <additionalparam>-quiet</additionalparam>
              <additionalparam>-private</additionalparam>
              <additionalparam>-Xdoclint:none</additionalparam>
            </configuration>
            <executions>
                <execution>
                    <id>javadoc</id>
                    <goals>
                        <goal>javadoc</goal>
                    </goals>
                    <phase>generate-resources</phase>
                </execution>
            </executions>
        </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <versionRange>[3.0.0-M1,)</versionRange>
                    <goals>
                      <goal>javadoc</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <execute>
                      <runOnIncremental>false</runOnIncremental>
                    </execute>
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.eclipse.tycho</groupId>
                    <artifactId>tycho-source-plugin</artifactId>
                    <versionRange>[0.23.1,)</versionRange>
                    <goals>
                      <goal>plugin-source</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <execute>
                      <runOnIncremental>false</runOnIncremental>
                    </execute>
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
  <pluginRepositories>
  <pluginRepository>
    <id>sonatype-public-repository</id>
    <url>https://oss.sonatype.org/content/groups/public</url>
    <snapshots>
      <enabled>true</enabled>
    </snapshots>
    <releases>
      <enabled>true</enabled>
    </releases>
  </pluginRepository>
</pluginRepositories>	
</project>
