<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>jboss-seam-parent</artifactId>
		<groupId>com.github.albfernandez.seam</groupId>
		<version>2.3.26.ayg</version>
		<relativePath>../pom.xml</relativePath>
	</parent>
	<modelVersion>4.0.0</modelVersion>

    <artifactId>jboss-seam-excel</artifactId>
    <packaging>jar</packaging>
    <name>Seam Excel</name>
    
    <properties>
    	<automatic.module.name>com.github.albfernandez.seam.excel</automatic.module.name>
    </properties>

    <dependencies>

        <dependency>
            <groupId>com.github.albfernandez.seam</groupId>
            <artifactId>jboss-seam-ui</artifactId>
        </dependency>

        <dependency>
            <groupId>com.github.albfernandez.seam</groupId>
            <artifactId>jboss-seam</artifactId>
            <type>ejb</type>
        </dependency>
        <dependency>
            <groupId>org.jboss.spec.javax.faces</groupId>
            <artifactId>jboss-jsf-api_2.2_spec</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.sourceforge.jexcelapi</groupId>
            <artifactId>jxl</artifactId>
            <exclusions>
            	<exclusion>
            		<groupId>log4j</groupId>
            		<artifactId>log4j</artifactId>
            	</exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>jfree</groupId>
            <artifactId>jfreechart</artifactId>
            <optional>true</optional>
        </dependency>



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

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

        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>

            <optional>true</optional>
            <exclusions>
                <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>

    <build>
    	<plugins>
    		<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>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
            </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>
    </build>
    <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>
                                </validationSet>
                                <validationSet>
                                    <dir>src/main/resources/org/jboss/seam/excel</dir>
                                </validationSet>
                            </validationSets>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
