Skip to content
pom.xml 11.4 KiB
Newer Older
<?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>

    <parent>
        <groupId>it.inaf.ia2.tsm</groupId>
        <artifactId>tasman-bom</artifactId>
        <version>1.3.2</version>
    </parent>
    
    <artifactId>tasman-webapp</artifactId>
    <packaging>war</packaging>

    <properties>
        <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
Sonia Zorba's avatar
Sonia Zorba committed
        <jersey.version>2.23.2</jersey.version>
        <deltaspike.version>1.7.2</deltaspike.version>
        <enable.weld.config.start></enable.weld.config.start>
        <enable.weld.config.end></enable.weld.config.end>
        <enable.jetty.config.start></enable.jetty.config.start>
        <enable.jetty.config.end></enable.jetty.config.end>
    </properties>
            <activation>
                <property>
                    <name>environment</name>
                </property>
                <activeByDefault>true</activeByDefault>
            </activation>
        </profile>
        
        <profile>
            <activation>
                <property>
                    <name>environment</name>
                </property>
            </activation>
            <properties>                
                <enable.weld.config.start>&lt;!-- </enable.weld.config.start>
                <enable.weld.config.end> --&gt;</enable.weld.config.end>
            </properties>
            <dependencies>
                <dependency>
                    <groupId>org.glassfish</groupId>
                    <artifactId>javax.faces</artifactId>
                    <version>2.2.8-02</version>
                    <scope>runtime</scope>
                </dependency>
                <dependency>
                    <groupId>org.jboss.weld.servlet</groupId>
                    <artifactId>weld-servlet</artifactId>
                    <version>2.3.4.Final</version>
                    <scope>runtime</scope>
                </dependency>
                <dependency>
                    <groupId>org.glassfish.jersey.containers</groupId>
                    <artifactId>jersey-container-servlet</artifactId>
                    <version>${jersey.version}</version>
                    <scope>runtime</scope>
                </dependency>
                <dependency>
                    <groupId>org.glassfish.jersey.ext.cdi</groupId>
                    <artifactId>jersey-cdi1x</artifactId>
                    <version>${jersey.version}</version>
                    <scope>runtime</scope>
                </dependency>
                <dependency>
                    <groupId>org.glassfish.jersey.media</groupId>
                    <artifactId>jersey-media-json-jackson</artifactId>
                    <version>${jersey.version}</version>
                    <scope>runtime</scope>
                </dependency>
                <dependency>
                    <groupId>org.glassfish</groupId>
                    <artifactId>javax.json</artifactId>
                    <version>1.0.4</version>
                    <scope>runtime</scope>
                </dependency>
                <dependency>
                    <groupId>org.glassfish</groupId>
                    <artifactId>javax.el</artifactId>
                    <!-- http://stackoverflow.com/a/33420995/771431 -->
                    <version>3.0.1-b08</version>
                </dependency>
                <dependency>
                    <groupId>javax.servlet</groupId>
                    <artifactId>jstl</artifactId>
                    <version>1.2</version>
                    <scope>runtime</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>Jetty</id>
            <!-- for Jetty use both this and the ServletContainer profile -->
            <activation>
                <property>
                    <name>environment</name>
                    <value>Jetty</value>
                </property>
            </activation>
            <properties>
                <enable.jetty.config.start>&lt;!-- </enable.jetty.config.start>
                <enable.jetty.config.end> --&gt;</enable.jetty.config.end>
            </properties>
            <dependencies>
                <dependency>
                    <groupId>it.inaf.ia2.tap</groupId>
                    <artifactId>tasman-core</artifactId>
                    <exclusions>
                        <!-- exclusion due to tomcat-jdbc dependency conflicting with Jetty -->
                        <exclusion>
                            <groupId>org.apache.tomcat</groupId>
                            <artifactId>tomcat-juli</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
            </dependencies>
Sonia Zorba's avatar
Sonia Zorba committed
        <dependency>
            <groupId>${project.groupId}</groupId>
            <version>${project.version}</version>
        </dependency>
            <groupId>ari.ucidy</groupId>
            <artifactId>ucidy</artifactId>
            <version>1.0</version>
        <dependency>
            <groupId>javax</groupId>
            <artifactId>javaee-web-api</artifactId>
            <version>7.0</version>
            <scope>provided</scope>
        </dependency>
Sonia Zorba's avatar
Sonia Zorba committed
        <dependency>
            <groupId>uk.me.nxg</groupId>
            <artifactId>unity</artifactId>
            <version>1.0</version>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.37</version>
            <type>jar</type>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.deltaspike.modules</groupId>
            <artifactId>deltaspike-jsf-module-impl</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.deltaspike.modules</groupId>
            <artifactId>deltaspike-jsf-module-api</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.deltaspike.core</groupId>
            <artifactId>deltaspike-core-api</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.deltaspike.core</groupId>
            <artifactId>deltaspike-core-impl</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.deltaspike.cdictrl</groupId>
            <artifactId>deltaspike-cdictrl-weld</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.deltaspike.cdictrl</groupId>
            <artifactId>deltaspike-cdictrl-api</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.deltaspike.modules</groupId>
            <artifactId>deltaspike-servlet-module-impl</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.deltaspike.modules</groupId>
            <artifactId>deltaspike-servlet-module-api</artifactId>
            <scope>compile</scope>
        </dependency>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.apache.deltaspike.distribution</groupId>
                <artifactId>distributions-bom</artifactId>
                <version>${deltaspike.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    
            <!-- Include version.txt and filter it -->
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>**/version.txt</include>
                    <include>**/webapp.properties</include>
            <!-- Include all other files without filtering them -->
            <resource>
                <directory>src/main/resources</directory>
                <filtering>false</filtering>
                <excludes>
                    <exclude>**/version.txt</exclude>
                    <exclude>**/webapp.properties</exclude>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                    <compilerArguments>
                        <endorseddirs>${endorsed.dir}</endorseddirs>
                    </compilerArguments>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.3</version>
                <configuration>
Sonia Zorba's avatar
Sonia Zorba committed
                    <attachClasses>true</attachClasses>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                    <webResources> 
                        <resource>
                            <directory>src/main/webapp</directory>
                            <filtering>true</filtering>
                            <includes>
                                <include>**/web.xml</include>
                            </includes>
                        </resource>
                    </webResources>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${endorsed.dir}</outputDirectory>
                            <silent>true</silent>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>javax</groupId>
                                    <artifactId>javaee-endorsed-api</artifactId>
                                    <version>7.0</version>
                                    <type>jar</type>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>