<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>
        <artifactId>jboss-seam-parent</artifactId>
        <groupId>com.github.albfernandez.seam</groupId>
        <version>2.3.26.ayg</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <artifactId>jboss-seam-ui</artifactId>
    <name>Seam UI JSF2 support</name>

	<properties>
		<automatic.module.name>com.github.albfernandez.seam.ui</automatic.module.name>
	</properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>com.github.albfernandez.richfaces.cdk</groupId>
                <artifactId>richfaces-cdk-maven-plugin</artifactId>
                <version>${version.richfaces.cdk}</version>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <library>
                        <prefix>org.jboss.seam.ui</prefix>
                        <description>JSF controls for JBoss Seam</description>
                        <!-- This is configured now in java-package.info file in UI component package -->
                        <!-- 						<taglib> -->
                        <!-- 							<displayName>JBoss Seam UI</displayName> -->
                        <!-- 							<shortName>s</shortName> -->
                        <!-- 							<uri>http://jboss.org/schema/seam/taglib</uri> -->
                        <!-- 							<tlibVersion>2.0</tlibVersion> -->
                        <!-- 							<jspVersion>2.1</jspVersion> -->
                        <!-- 						</taglib> -->
                    </library>
                </configuration>
            </plugin>
            <!-- This need to be after Richfaces CDK plugin -->
            <plugin>
               <groupId>org.jboss.seam</groupId>
               <artifactId>seam-cdk-helper</artifactId>
               <version>1.0.1</version>
               <executions>
                  <execution>
                     <phase>generate-sources</phase>
                     <goals>
                        <goal>execute</goal>
                     </goals>
                  </execution>
               </executions>
            </plugin>
            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                	<source>7</source>
                    <links>
                        <link>https://docs.oracle.com/javase/7/docs/api/</link>
                    </links>
                    <keywords>true</keywords>
                    <author>true</author>
                    <doctitle>JBoss Seam ${project.name} API ${project.version}</doctitle>
                    <!-- Used by javadoc:javadoc goal -->
                    <detectOfflineLinks>false</detectOfflineLinks>
                    <additionalOptions>${javadoc.opts}</additionalOptions>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-checkstyle-plugin</artifactId>
            </plugin>
            <plugin>
			    <groupId>com.github.spotbugs</groupId>
			    <artifactId>spotbugs-maven-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-pmd-plugin</artifactId>
			</plugin>
            <plugin>
                <groupId>org.owasp</groupId>
                <artifactId>dependency-check-maven</artifactId>
            </plugin>
        </plugins>
        <pluginManagement>
           <plugins>
              <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
              <plugin>
                 <groupId>org.eclipse.m2e</groupId>
                 <artifactId>lifecycle-mapping</artifactId>
                 <version>1.0.0</version>
                 <configuration>
                    <lifecycleMappingMetadata>
                       <pluginExecutions>
                          <pluginExecution>
                             <pluginExecutionFilter>
                                <groupId>com.github.albfernandez.richfaces.cdk</groupId>
                                <artifactId>
                                   maven-cdk-plugin
                                </artifactId>
                                <versionRange>
                                   [4.2.2.Final,)
                                </versionRange>
                                <goals>
                                   <goal>generate</goal>
                                </goals>
                             </pluginExecutionFilter>
                             <action>
                                <ignore/>
                             </action>
                          </pluginExecution>
                       </pluginExecutions>
                    </lifecycleMappingMetadata>
                 </configuration>
              </plugin>
           </plugins>
        </pluginManagement>
    </build>

    <!-- See parent pom for notes on how to declare dependencies -->
    <dependencies>

        <dependency>
            <groupId>org.jboss.spec.javax.servlet</groupId>
            <artifactId>jboss-servlet-api_3.1_spec</artifactId>
            <optional>true</optional>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.jboss.spec.javax.servlet.jsp</groupId>
            <artifactId>jboss-jsp-api_2.3_spec</artifactId>
            <optional>true</optional>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.github.albfernandez.seam</groupId>
            <artifactId>jboss-seam</artifactId>
            <type>ejb</type>
        </dependency>
        <dependency>
            <groupId>antlr</groupId>
            <artifactId>antlr</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>com.github.albfernandez.richfaces.cdk</groupId>
            <artifactId>annotations</artifactId>
            <version>${version.richfaces.cdk}</version>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.jboss.spec.javax.faces</groupId>
            <artifactId>jboss-jsf-api_2.2_spec</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.sun.faces</groupId>
            <artifactId>jsf-impl</artifactId>
            <scope>provided</scope>
        </dependency>


	<dependency>
		<groupId>com.github.albfernandez</groupId>
		<artifactId>jbpm-jpdl</artifactId>
		<version>3.2.17.ayg</version>
		<optional>true</optional>
		<exclusions>
			<exclusion>
				<groupId>commons-logging</groupId>
				<artifactId>commons-logging</artifactId>
			</exclusion>
			<exclusion>
				<groupId>commons-collections</groupId>
				<artifactId>commons-collections</artifactId>
			</exclusion>
		</exclusions>
	</dependency>

        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-core</artifactId>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>

<!--         <dependency> -->
<!--             <groupId>org.jboss.spec.javax.el</groupId> -->
<!--             <artifactId>jboss-el-api_3.0_spec</artifactId> -->
<!--             <scope>provided</scope> -->
<!--         </dependency> -->

			<dependency>
			    <groupId>javax.annotation</groupId>
			    <artifactId>javax.annotation-api</artifactId>
			    <version>1.3.2</version>
			</dependency>

        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <profiles>
        <profile>
            <id>distribution</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>copy-dependencies</id>
                                <goals>
                                    <goal>copy-dependencies</goal>
                                </goals>
                                <phase>package</phase>
                                <configuration>
                                    <excludeGroupIds>com.github.albfernandez.seam</excludeGroupIds>
                                    <excludeClassifiers>sources, project, distribution</excludeClassifiers>
                                    <outputDirectory>../jar-dependencies</outputDirectory>
                                    <stripVersion>true</stripVersion>
                                    <type>jar</type>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>validate</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>xml-maven-plugin</artifactId>
                        <configuration>
                           <catalogs>
                                <catalog>../jboss-seam/src/main/resources/org/jboss/seam/catalog.xml</catalog>
                            </catalogs>
                            <validationSets>
                                <validationSet>
                                    <dir>src/main/resources/META-INF/</dir>
                                    <includes>
                                        <include>components.xml</include>
                                        <include>faces-config.xml</include>
                                    </includes>
                                    <validating>true</validating>
                                </validationSet>
                            </validationSets>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
