<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>
  <parent>
    <groupId>org.jboss</groupId>
    <artifactId>jboss-parent</artifactId>
    <version>10</version>
    <relativePath />
  </parent>
  <groupId>com.sun.faces</groupId>
  <artifactId>jsf-project</artifactId>
  <version>2.2.13.SP5</version>
  <packaging>pom</packaging>

  <name>JSF Parent</name>
  <description>JSF (JSR 314) Parent</description>
  <url>https://javaserverfaces.java.net/</url>
  <inceptionYear>2010</inceptionYear>
  <licenses>
    <license>
      <name>CDDL+GPL</name>
      <url>https://glassfish.dev.java.net/public/CDDL+GPL.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <modules>
    <module>jsf-tools</module>
    <module>jsf-api</module>
    <module>jsf-ri</module>
  </modules>

  <scm>
    <connection>scm:git:git@github.com:jboss/mojarra.git</connection>
    <developerConnection>scm:git:git@github.com:jboss/mojarra.git</developerConnection>
    <url>https://github.com/jboss/mojarra.git</url>
    <tag>2.2.13.SP5</tag>
  </scm>
  <distributionManagement>
    <repository>
      <id>jboss-releases-repository</id>
      <name>JBoss Releases Repository</name>
      <url>https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/</url>
    </repository>
    <snapshotRepository>
      <id>jboss-snapshots-repository</id>
      <name>JBoss Snapshots Repository</name>
      <url>https://repository.jboss.org/nexus/content/repositories/snapshots/</url>
    </snapshotRepository>
  </distributionManagement>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>ant-contrib</groupId>
        <artifactId>ant-contrib</artifactId>
        <version>1.0b3</version>
        <exclusions>
          <exclusion>
           <groupId>ant</groupId>
            <artifactId>ant</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>biz.aQute</groupId>
        <artifactId>bnd</artifactId>
        <version>1.50.0</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-ant-tasks</artifactId>
        <version>2.1.3</version>
      </dependency>
      <dependency>
        <groupId>rhino</groupId>
        <artifactId>js</artifactId>
        <version>1.7R2</version>
      </dependency>
      <dependency>
        <groupId>taglibrarydoc</groupId>
        <artifactId>tlddoc</artifactId>
        <version>1.3</version>
      </dependency>
      <dependency>
        <groupId>com.yahoo.platform.yui</groupId>
        <artifactId>yuicompressor</artifactId>
        <version>2.4.8</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <dependencies>
      <dependency>
        <groupId>javax.el</groupId>
        <artifactId>javax.el-api</artifactId>
        <version>2.2.1</version>
        <scope>provided</scope>
        <optional>true</optional>
      </dependency>
      <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>
        <version>3.0.1</version>
        <scope>provided</scope>
        <optional>true</optional>
      </dependency>
      <dependency>
        <groupId>javax.servlet.jsp</groupId>
        <artifactId>javax.servlet.jsp-api</artifactId>
        <version>2.2.1</version>
        <scope>provided</scope>
        <optional>true</optional>
      </dependency>
      <dependency>
        <groupId>javax.annotation</groupId>
        <artifactId>jsr250-api</artifactId>
        <version>1.0</version>
        <scope>provided</scope>
        <optional>true</optional>
      </dependency>
      <dependency>
        <groupId>org.codehaus.groovy</groupId>
        <artifactId>groovy-all</artifactId>
        <version>1.6.9</version>
        <scope>provided</scope>
        <optional>true</optional>
      </dependency>
      <dependency>
        <groupId>javax.validation</groupId>
        <artifactId>validation-api</artifactId>
        <version>1.0.0.GA</version>
        <scope>provided</scope>
        <optional>true</optional>
      </dependency>
      <dependency>
        <groupId>javax.inject</groupId>
        <artifactId>javax.inject</artifactId>
        <version>1</version>
        <scope>provided</scope>
        <optional>true</optional>
      </dependency>
      <dependency>
        <groupId>javax.servlet.jsp.jstl</groupId>
        <artifactId>jstl-api</artifactId>
        <version>1.2</version>
        <scope>provided</scope>
        <optional>true</optional>
      </dependency>
      <dependency>
        <groupId>org.jboss.spec</groupId>
        <artifactId>jboss-javaee-6.0</artifactId>
        <version>1.0.0.Final</version>
        <type>pom</type>
        <scope>provided</scope>
        <optional>true</optional>
        <exclusions>
          <exclusion>
            <groupId>com.sun.faces</groupId>
            <artifactId>jsf-api</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>com.sun.el</groupId>
        <artifactId>el-ri</artifactId>
        <version>1.0</version>
        <scope>provided</scope>
        <optional>true</optional>
      </dependency>
      <dependency>
        <groupId>javax.enterprise</groupId>
        <artifactId>cdi-api</artifactId>
        <version>1.1</version>
        <scope>provided</scope>
        <optional>true</optional>
      </dependency>
      <dependency>
        <groupId>com.sun.faces</groupId>
        <artifactId>jsf-spi</artifactId>
        <version>1.0</version>
        <scope>provided</scope>
        <optional>true</optional>
      </dependency>
      <dependency>
        <groupId>commons-digester</groupId>
        <artifactId>commons-digester</artifactId>
        <version>1.5</version>
        <scope>provided</scope>
        <optional>true</optional>
      </dependency>
      <dependency>
        <groupId>commons-beanutils</groupId>
        <artifactId>commons-beanutils</artifactId>
        <version>1.6.1</version>
        <scope>provided</scope>
        <optional>true</optional>
      </dependency>
  </dependencies>

  <repositories>
    <repository>
      <id>jboss-public-repository-group</id>
      <name>JBoss Public Repository Group</name>
      <url>http://repository.jboss.org/nexus/content/groups/public/</url>
      <layout>default</layout>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </releases>
      <snapshots>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </snapshots>
    </repository>
  </repositories>

  <pluginRepositories>
    <pluginRepository>
      <id>jboss-public-repository-group</id>
      <name>JBoss Public Repository Group</name>
      <url>http://repository.jboss.org/nexus/content/groups/public/</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </pluginRepository>
  </pluginRepositories>

  <build>
   <sourceDirectory>xxx</sourceDirectory>
   <testSourceDirectory>xxx/test</testSourceDirectory>
   <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <executions>
            <execution>
              <id>enforce-java-version</id>
              <goals>
                <goal>enforce</goal>
              </goals>
              <configuration>
                <rules>
                  <!-- JDK 1.7 is required to build Mojarra 2.2.x. -->
                  <requireJavaVersion>
                    <message>
                      To build this project, JDK 1.7 is required. Please install it.
                    </message>
                    <version>[1.7,1.8)</version>
                  </requireJavaVersion>
                </rules>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5</version>
          <configuration>
            <tagNameFormat>@{project.version}</tagNameFormat>
            <autoVersionSubmodules>true</autoVersionSubmodules>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>1.8</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>2.10</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.9.1</version>
          <executions>
            <execution>
              <id>attach-javadoc</id>
              <phase>package</phase>
              <goals>
                <goal>jar</goal>
              </goals>
              <configuration>
                <attach>false</attach>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.4</version>
          <executions>
            <execution>
              <id>attach-sources</id>
              <phase>package</phase>
              <goals>
                <goal>jar</goal>
              </goals>
              <configuration>
                <attach>false</attach>
                <skipSource>true</skipSource>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <artifactId>maven-assembly-plugin</artifactId>
          <executions>
            <execution>
              <id>source-release-assembly</id>
              <configuration>
                <skipAssembly>true</skipAssembly>
              </configuration>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <inherited>false</inherited>
        <executions>
          <execution>
            <id>compile</id>
            <phase>compile</phase>
            <configuration>
              <target>
                <delete dir="${project.basedir}/target" />
                <delete dir="${project.basedir}/jar-main" />
                <delete dir="${project.basedir}/jar-javadoc" />
                <delete dir="${project.basedir}/jar-sources" />
                <copy file="${project.basedir}/build.properties.glassfish" tofile="${project.basedir}/build.properties" preservelastmodified="true" overwrite="true" />
                <property name="compile.classpath" refid="maven.compile.classpath" />
                <taskdef resource="net/sf/antcontrib/antlib.xml">
                  <classpath>
                    <pathelement location="${project.basedir}/common/lib/ant-contrib.jar" />
                  </classpath>
                </taskdef>
                <propertyregex property="build.jbossorg" input="${project.version}" regexp=".*(.SP.*)" select="\1" />
                <propertyregex property="logging.version" input="${project.version}" regexp="(.*.SP\d+?)(-SNAPSHOT)?" select="\1" />
                <propertyfile file="${project.basedir}/build.properties" comment="${project.name}-${project.version} properties">
                  <entry key="jsf.build.home" value="${user.dir}" />
                  <entry key="jsf-tools.jar" value="${project.basedir}/jsf-tools/target/jsf-tools-${project.version}.jar" />
                  <entry key="build.source" value="true" />
                  <entry key="build.number" value="" />
                  <entry key="build.type" value="${build.jbossorg}" />
                  <entry key="compile.path" value="${compile.classpath}" />
                  <entry key="logging.version" value="${logging.version}" />
                </propertyfile>
                <ant antfile="${project.basedir}/build.xml" target="dist" inheritRefs="true" />
              </target>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>com.sun</groupId>
            <artifactId>tools</artifactId>
            <version>1.7.0</version>
            <scope>system</scope>
            <systemPath>${java.home}/../lib/tools.jar</systemPath>
          </dependency>
        </dependencies>
      </plugin>
      <!-- Disable signing as we don't do this on jboss artifacts -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <executions>
          <execution>
            <phase>none</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <inherited>false</inherited>
        <executions>
          <execution>
            <id>copy</id>
            <phase>initialize</phase>
            <goals>
              <goal>copy</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>ant-contrib</groupId>
                  <artifactId>ant-contrib</artifactId>
                  <outputDirectory>${project.basedir}/common/lib</outputDirectory>
                </artifactItem>
                <artifactItem>
                  <groupId>biz.aQute</groupId>
                  <artifactId>bnd</artifactId>
                  <outputDirectory>${project.basedir}/common/lib</outputDirectory>
                  <destFileName>bnd-1.50.0.jar</destFileName>
                </artifactItem>
                <artifactItem>
                  <groupId>org.apache.maven</groupId>
                  <artifactId>maven-ant-tasks</artifactId>
                  <outputDirectory>${project.basedir}/common/lib</outputDirectory>
                  <destFileName>maven-ant-tasks-2.1.3.jar</destFileName>
                </artifactItem>
                <artifactItem>
                  <groupId>rhino</groupId>
                  <artifactId>js</artifactId>
                  <outputDirectory>${project.basedir}/dependencies/jars</outputDirectory>
                </artifactItem>
                <artifactItem>
                  <groupId>taglibrarydoc</groupId>
                  <artifactId>tlddoc</artifactId>
                  <outputDirectory>${project.basedir}/dependencies/jars</outputDirectory>
                  <destFileName>tlddoc-1.3.jar</destFileName>
                </artifactItem>
                <artifactItem>
                  <groupId>com.yahoo.platform.yui</groupId>
                  <artifactId>yuicompressor</artifactId>
                  <outputDirectory>${project.basedir}/dependencies/jars</outputDirectory>
                </artifactItem>
              </artifactItems>
              <overWriteReleases>true</overWriteReleases>
              <overWriteSnapshots>true</overWriteSnapshots>
              <stripVersion>true</stripVersion>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>javadoc</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <inherited>false</inherited>
            <executions>
              <execution>
                <id>compile-javadoc</id>
                <phase>compile</phase>
                <configuration>
                  <target>
                    <delete dir="${project.basedir}/jar-javadoc" />
                    <ant antfile="${project.basedir}/build.xml" target="dist-javadocs" inheritRefs="true" />
                  </target>
                </configuration>
                <goals>
                  <goal>run</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
