mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-12-27 19:07:28 +00:00
340 lines
14 KiB
XML
340 lines
14 KiB
XML
<?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>springboot-petclinic</artifactId>
|
|
<version>1.4.1</version>
|
|
<parent>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-parent</artifactId>
|
|
<version>1.4.1.RELEASE</version>
|
|
</parent>
|
|
<name>petclinic</name>
|
|
<packaging>war</packaging>
|
|
|
|
<properties>
|
|
|
|
<!-- Generic properties -->
|
|
<java.version>1.7</java.version>
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
|
<docker.image.prefix>arey</docker.image.prefix>
|
|
|
|
<!-- Web dependencies -->
|
|
<webjars-bootstrap.version>3.3.6</webjars-bootstrap.version>
|
|
<webjars-jquery-ui.version>1.11.4</webjars-jquery-ui.version>
|
|
<webjars-jquery.version>2.2.4</webjars-jquery.version>
|
|
|
|
<cobertura.version>2.7</cobertura.version>
|
|
|
|
</properties>
|
|
|
|
<dependencies>
|
|
<!-- Spring et Spring Boot dependencies -->
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-actuator</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-cache</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-test</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-web</artifactId>
|
|
<!-- Uncomment bellow lines in order to deploy the Springboot Petlinic WAR file into an external Jetty -->
|
|
<!--exclusions>
|
|
<exclusion>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-tomcat</artifactId>
|
|
</exclusion>
|
|
</exclusions-->
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.apache.tomcat.embed</groupId>
|
|
<artifactId>tomcat-embed-jasper</artifactId>
|
|
<scope>provided</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>javax.servlet</groupId>
|
|
<artifactId>jstl</artifactId>
|
|
</dependency>
|
|
|
|
<!-- Databases - Uses HSQL by default -->
|
|
<dependency>
|
|
<groupId>org.hsqldb</groupId>
|
|
<artifactId>hsqldb</artifactId>
|
|
<scope>runtime</scope>
|
|
</dependency>
|
|
|
|
<!-- For MySql only -->
|
|
<!--dependency>
|
|
<groupId>mysql</groupId>
|
|
<artifactId>mysql-connector-java</artifactId>
|
|
<version>${mysql-driver.version}</version>
|
|
</dependency-->
|
|
|
|
<!-- EhCache -->
|
|
<dependency>
|
|
<groupId>javax.cache</groupId>
|
|
<artifactId>cache-api</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.ehcache</groupId>
|
|
<artifactId>ehcache</artifactId>
|
|
</dependency>
|
|
|
|
<!-- webjars -->
|
|
<dependency>
|
|
<groupId>org.webjars</groupId>
|
|
<artifactId>jquery</artifactId>
|
|
<version>${webjars-jquery.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.webjars</groupId>
|
|
<artifactId>jquery-ui</artifactId>
|
|
<version>${webjars-jquery-ui.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.webjars</groupId>
|
|
<artifactId>bootstrap</artifactId>
|
|
<version>${webjars-bootstrap.version}</version>
|
|
</dependency>
|
|
<!-- end of webjars -->
|
|
|
|
</dependencies>
|
|
|
|
<!-- Maven plugin versions are mentioned in order to guarantee the build reproducibility in the long term -->
|
|
<build>
|
|
<finalName>petclinic</finalName>
|
|
<defaultGoal>install</defaultGoal>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<!-- Spring Boot Actuator displays build-related information if a META-INF/build-info.properties file is present -->
|
|
<goals>
|
|
<goal>build-info</goal>
|
|
</goals>
|
|
<configuration>
|
|
<additionalProperties>
|
|
<encoding.source>${project.build.sourceEncoding}</encoding.source>
|
|
<encoding.reporting>${project.reporting.outputEncoding}</encoding.reporting>
|
|
<java.source>${maven.compiler.source}</java.source>
|
|
<java.target>${maven.compiler.target}</java.target>
|
|
</additionalProperties>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<version>3.0</version>
|
|
<configuration>
|
|
<compilerArguments>
|
|
<Xlint/>
|
|
</compilerArguments>
|
|
<verbose>true</verbose>
|
|
<source>${java.version}</source>
|
|
<target>${java.version}</target>
|
|
<showWarnings>true</showWarnings>
|
|
</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>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-eclipse-plugin</artifactId>
|
|
<version>2.9</version>
|
|
<configuration>
|
|
<downloadSources>true</downloadSources>
|
|
<downloadJavadocs>true</downloadJavadocs>
|
|
<wtpversion>2.0</wtpversion>
|
|
<sourceIncludes>
|
|
<sourceInclude>**/*.*</sourceInclude>
|
|
</sourceIncludes>
|
|
<additionalBuildcommands>
|
|
<buildCommand>
|
|
<name>org.springframework.ide.eclipse.core.springbuilder</name>
|
|
</buildCommand>
|
|
<buildCommand>
|
|
<name>org.eclipse.m2e.core.maven2Builder</name>
|
|
</buildCommand>
|
|
</additionalBuildcommands>
|
|
<additionalProjectnatures>
|
|
<projectnature>org.eclipse.jdt.core.javanature</projectnature>
|
|
<projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
|
|
<projectnature>org.eclipse.m2e.core.maven2Nature</projectnature>
|
|
</additionalProjectnatures>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>cobertura-maven-plugin</artifactId>
|
|
<version>${cobertura.version}</version>
|
|
<configuration>
|
|
<check/>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<goals>
|
|
<goal>clean</goal>
|
|
<goal>check</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
<!-- Spring Boot Actuator displays build-related information if a git.properties file is present at the classpath -->
|
|
<plugin>
|
|
<groupId>pl.project13.maven</groupId>
|
|
<artifactId>git-commit-id-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<goals>
|
|
<goal>revision</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
<configuration>
|
|
<verbose>true</verbose>
|
|
<dateFormat>yyyy-MM-dd'T'HH:mm:ssZ</dateFormat>
|
|
<generateGitPropertiesFile>true</generateGitPropertiesFile>
|
|
<generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties
|
|
</generateGitPropertiesFilename>
|
|
</configuration>
|
|
</plugin>
|
|
|
|
<plugin>
|
|
<!--
|
|
right now lesscss maven plugin does NOT support @Import from classpath
|
|
https://github.com/marceloverdijk/lesscss-maven-plugin/issues/72
|
|
|
|
workaround here will be unpacking the bootstrap on-the-fly
|
|
|
|
remove this plugin config when the issue is resolved OR a better resolution is found
|
|
-->
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-dependency-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<id>unpack</id>
|
|
<phase>process-resources</phase>
|
|
<goals>
|
|
<goal>unpack</goal>
|
|
</goals>
|
|
<configuration>
|
|
<artifactItems>
|
|
<artifactItem>
|
|
<groupId>org.webjars</groupId>
|
|
<artifactId>bootstrap</artifactId>
|
|
<version>3.3.6</version>
|
|
<overWrite>false</overWrite>
|
|
<outputDirectory>${project.basedir}/src/main/webapp/resources/generated
|
|
</outputDirectory>
|
|
<includes>**/*.less</includes>
|
|
</artifactItem>
|
|
</artifactItems>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
<plugin>
|
|
<!-- refer to dependency plugin comments above -->
|
|
<artifactId>maven-clean-plugin</artifactId>
|
|
<configuration>
|
|
<filesets>
|
|
<fileset>
|
|
<directory>${project.basedir}/src/main/webapp/resources/generated</directory>
|
|
</fileset>
|
|
</filesets>
|
|
</configuration>
|
|
</plugin>
|
|
|
|
<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/generated</outputDirectory>
|
|
<compress>true</compress>
|
|
<includes>
|
|
<include>petclinic.less</include>
|
|
</includes>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<phase>process-resources</phase>
|
|
<goals>
|
|
<goal>compile</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>com.spotify</groupId>
|
|
<artifactId>docker-maven-plugin</artifactId>
|
|
<version>0.4.11</version>
|
|
<configuration>
|
|
<imageName>${docker.image.prefix}/${project.artifactId}</imageName>
|
|
<dockerDirectory>src/main/docker</dockerDirectory>
|
|
<resources>
|
|
<resource>
|
|
<targetPath>/</targetPath>
|
|
<directory>${project.build.directory}</directory>
|
|
<include>${project.build.finalName}.war</include>
|
|
</resource>
|
|
</resources>
|
|
<forceTags>true</forceTags>
|
|
<imageTags>
|
|
<imageTag>${project.version}</imageTag>
|
|
<imageTag>latest</imageTag>
|
|
</imageTags>
|
|
<useConfigFile>true</useConfigFile>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
<reporting>
|
|
<plugins>
|
|
<!-- integrate maven-cobertura-plugin to project site -->
|
|
<plugin>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>cobertura-maven-plugin</artifactId>
|
|
<version>${cobertura.version}</version>
|
|
<configuration>
|
|
<formats>
|
|
<format>html</format>
|
|
</formats>
|
|
<check/>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</reporting>
|
|
|
|
<url>demopetclinic</url>
|
|
</project>
|