pom.xml

471 lines | 17.748 kB Blame History Raw Download
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.springframework.samples</groupId>
    <artifactId>spring-petclinic</artifactId>
    <version>4.2.6-SNAPSHOT</version>

    <name>petclinic</name>
    <packaging>war</packaging>

    <properties>

        <!-- Generic properties -->
        <java.version>1.8</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <!-- Spring -->
        <spring-io-platform.version>2.0.8.RELEASE</spring-io-platform.version>
        <spring-data-jdbc.version>1.1.0.RELEASE</spring-data-jdbc.version>


        <!-- Java EE / Java SE dependencies -->
        <tomcat.version>7.0.59</tomcat.version>

        <!-- Test -->
        <assertj.version>2.2.0</assertj.version>

        <!-- Others -->
        <mysql-driver.version>5.1.36</mysql-driver.version>

        <postgresql-driver.version>9.4.1211.jre7</postgresql-driver.version>

        <cobertura.version>2.7</cobertura.version>
    </properties>

    <dependencyManagement>
        <!-- Import the maven Spring IO Platform Bill Of Materials (BOM) -->
        <dependencies>
            <dependency>
                <groupId>io.spring.platform</groupId>
                <artifactId>platform-bom</artifactId>
                <version>${spring-io-platform.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.apache.tomcat</groupId>
            <artifactId>tomcat-servlet-api</artifactId>
            <version>${tomcat.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet.jsp</groupId>
            <artifactId>javax.servlet.jsp-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.tomcat</groupId>
            <artifactId>tomcat-jasper-el</artifactId>
            <version>${tomcat.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>javax.servlet.jsp.jstl</groupId>
            <artifactId>javax.servlet.jsp.jstl-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.taglibs</groupId>
            <artifactId>taglibs-standard-jstlel</artifactId>
        </dependency>
        <!--  JSon -->
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>
        <dependency>
            <groupId>com.jayway.jsonpath</groupId>
            <artifactId>json-path</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- SPRING, SPRING, SPRINGITY SPRING -->
        <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-jpa</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-jdbc-core</artifactId>
            <version>${spring-data-jdbc.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <!--  because Spring Data usually comes with a slightly older version of Spring -->
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
        </dependency>
        <!-- used for EhCacheCacheManager -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context-support</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-oxm</artifactId>
        </dependency>

        <!-- Database connection pool
        See here for more details on commons-dbcp versus tomcat-jdbc:
        http://blog.ippon.fr/2013/03/13/improving-the-performance-of-the-spring-petclinic-sample-application-part-3-of-5/
    -->
        <dependency>
            <groupId>org.apache.tomcat</groupId>
            <artifactId>tomcat-jdbc</artifactId>
            <scope>runtime</scope>
        </dependency>

        <!-- Logging with SLF4J & LogBack -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.2</version>
        </dependency>


        <!-- HIBERNATE -->
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
        </dependency>

        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-ehcache</artifactId>
        </dependency>
        <dependency>
            <groupId>net.sf.ehcache</groupId>
            <artifactId>ehcache</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- Test Artifacts -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>${assertj.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- temporary fix: below dependency should not be necessary as it is a transitive dependency.
        For some reason we can't build the app unless it is a first level dependency -->
        <dependency>
            <groupId>com.googlecode.json-simple</groupId>
            <artifactId>json-simple</artifactId>
        </dependency>


        <!--TODO Jhonny: added adaptive caching-->
        <dependency>
            <groupId>br.ufrgs.inf.prosoft</groupId>
            <artifactId>aplcache</artifactId>
            <version>0.9.0-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.mongodb</groupId>
            <artifactId>mongo-java-driver</artifactId>
            <version>3.2.2</version>
        </dependency>
    </dependencies>

    <!-- Maven plugin versions are mentioned in order to guarantee the build reproducibility in the long term -->
    <build>
        <defaultGoal>install</defaultGoal>
        <finalName>petclinic</finalName>
        <resources>
            <resource>
                <directory>${basedir}/src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <testResources>
            <testResource>
                <!-- declared explicitly so Spring config files can be placed next to their corresponding JUnit test class  -->
                <directory>${project.basedir}/src/test/java</directory>
            </testResource>
            <testResource>
                <directory>${project.basedir}/src/test/resources</directory>
            </testResource>
        </testResources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.3</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <useIncrementalCompilation>false</useIncrementalCompilation>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.13</version>
                <configuration>
                    <includes>
                        <include>**/*Tests.java</include>
                    </includes>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <archiveClasses>true</archiveClasses>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.tomcat.maven</groupId>
                <artifactId>tomcat7-maven-plugin</artifactId>
                <version>2.2</version>
                <configuration>
                    <server>tomcat-development-server</server>
                    <path>/petclinic</path>
                    <systemProperties>
                        <JAVA_OPTS>-Xms1024m -Xmx2048m</JAVA_OPTS>
                    </systemProperties>
                </configuration>
            </plugin>

            <!--Specify the encoding for copying resources-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.0.1</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>

            <!--TODO Jhonny: added adaptive caching-->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>aspectj-maven-plugin</artifactId>
                <version>1.7</version>
                <configuration>
                    <showWeaveInfo>false</showWeaveInfo>
                    <complianceLevel>1.8</complianceLevel>
                    <source>1.8</source>
                    <target>1.8</target>
                    <Xlint>ignore</Xlint>
                    <encoding>UTF-8</encoding>
                    <verbose>false</verbose>
                    <aspectLibraries>
                        <aspectLibrary>
                            <groupId>br.ufrgs.inf.prosoft</groupId>
                            <artifactId>tigris</artifactId>
                        </aspectLibrary>
                    </aspectLibraries>
                </configuration>
                <executions>
                    <execution>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjtools</artifactId>
                        <version>1.8.9</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>
    <profiles>
		<!--<profile>-->
			<!--<id>bower-install</id>-->
  			<!--<build>-->
			<!--<plugins>-->
				<!--<plugin>-->
					<!--<groupId>org.codehaus.mojo</groupId>-->
					<!--<artifactId>exec-maven-plugin</artifactId>-->
                    <!--<version>1.4.0</version>-->
					<!--<executions>-->
						<!--<execution>-->
							<!--<phase>generate-sources</phase>-->
							<!--<goals>-->
								<!--<goal>exec</goal>-->
							<!--</goals>-->
						<!--</execution>-->
					<!--</executions>-->
					<!--<configuration>-->
						<!--<executable>bower</executable>-->
						<!--<arguments>-->
							<!--<argument>install</argument>-->
						<!--</arguments>-->
						<!--<workingDirectory>${basedir}</workingDirectory>-->
					<!--</configuration>-->
				<!--</plugin>-->
			<!--</plugins>-->
		  <!--</build>-->
		<!--</profile>-->
        <!--<profile>-->
            <!--<id>less-install</id>-->
            <!--<build>-->
                <!--<plugins>-->
                    <!--<plugin>-->
                        <!--<groupId>org.lesscss</groupId>-->
                        <!--<artifactId>lesscss-maven-plugin</artifactId>-->
                        <!--<version>1.7.0.1.1</version>-->
                        <!--<configuration>-->
                            <!--<sourceDirectory>${project.basedir}/src/main/webapp/resources/less</sourceDirectory>-->
                            <!--<outputDirectory>${project.basedir}/src/main/webapp/resources/css</outputDirectory>-->
                            <!--<compress>true</compress>-->
                            <!--<includes>-->
                                <!--<include>petclinic.less</include>-->
                            <!--</includes>-->
                        <!--</configuration>-->
                        <!--<executions>-->
                            <!--<execution>-->
                                <!--<goals>-->
                                    <!--<goal>compile</goal>-->
                                <!--</goals>-->
                            <!--</execution>-->
                        <!--</executions>-->
                    <!--</plugin>-->
                <!--</plugins>-->
            <!--</build>-->
        <!--</profile>-->
        <profile>
            <id>HSQLDB</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <db.script>hsqldb</db.script>
                <jpa.database>HSQL</jpa.database>
                <jdbc.driverClassName>org.hsqldb.jdbcDriver</jdbc.driverClassName>
                <jdbc.url>jdbc:hsqldb:mem:petclinic</jdbc.url>
                <jdbc.username>sa</jdbc.username>
                <jdbc.password/>
            </properties>
            <dependencies>
                <dependency>
                    <groupId>org.hsqldb</groupId>
                    <artifactId>hsqldb</artifactId>
                    <scope>runtime</scope>
                </dependency>
            </dependencies>
        </profile>
<!--        <profile>-->
<!--            <id>MySQL</id>-->
<!--            <activation>-->
<!--            <activeByDefault>true</activeByDefault>-->
<!--            </activation>-->
<!--            <properties>-->
<!--                <db.script>mysql</db.script>-->
<!--                <jpa.database>MYSQL</jpa.database>-->
<!--                <jdbc.driverClassName>com.mysql.jdbc.Driver</jdbc.driverClassName>-->
<!--                <jdbc.url>jdbc:mysql://localhost:3306/petclinic?useUnicode=true</jdbc.url>-->
<!--                <jdbc.username>root</jdbc.username>-->
<!--                <jdbc.password>root</jdbc.password>-->
<!--            </properties>-->
<!--            <dependencies>-->
<!--                <dependency>-->
<!--                    <groupId>mysql</groupId>-->
<!--                    <artifactId>mysql-connector-java</artifactId>-->
<!--                    <version>${mysql-driver.version}</version>-->
<!--                    <scope>runtime</scope>-->
<!--                </dependency>-->
<!--            </dependencies>-->
<!--        </profile>-->
        <!--<profile>-->
            <!--<id>PostgreSQL</id>-->
            <!--<properties>-->
                <!--<db.script>postgresql</db.script>-->
                <!--<jpa.database>POSTGRESQL</jpa.database>-->
                <!--<jdbc.driverClassName>org.postgresql.Driver</jdbc.driverClassName>-->
                <!--<jdbc.url>jdbc:postgresql://localhost:5432/petclinic</jdbc.url>-->
                <!--<jdbc.username>postgres</jdbc.username>-->
                <!--<jdbc.password>petclinic</jdbc.password>-->
            <!--</properties>-->
            <!--<dependencies>-->
                <!--<dependency>-->
                    <!--<groupId>org.postgresql</groupId>-->
                    <!--<artifactId>postgresql</artifactId>-->
                    <!--<version>${postgresql-driver.version}</version>-->
                    <!--<scope>runtime</scope>-->
                <!--</dependency>-->
            <!--</dependencies>-->
        <!--</profile>-->
   </profiles>

    <url>demopetclinic</url>
</project>