Files
initializr/initializr-generator/src/main/resources/templates/starter-pom.xml
Stephane Nicoll f45228376f Polish contribution
Closes gh-223
2016-07-08 17:09:21 +02:00

166 lines
5.3 KiB
XML

<?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>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${version}</version>
<packaging>${packaging}</packaging>
<name>${name}</name>
<description>${description}</description>
<parent>
<groupId>${mavenParentGroupId}</groupId>
<artifactId>${mavenParentArtifactId}</artifactId>
<version>${mavenParentVersion}</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>${javaVersion}</java.version><% if (language=='kotlin') { %>
<kotlin.version>${kotlinVersion}</kotlin.version><% } %><% if (includeSpringBootBom) { %>
<spring-boot.version>${bootVersion}</spring-boot.version><%}%>
</properties>
<dependencies><% compileDependencies.each { %>
<dependency>
<groupId>${it.groupId}</groupId>
<artifactId>${it.artifactId}</artifactId><% if (it.version != null) { %>
<version>${it.version}</version><% } %><% if (it.type != null) { %>
<type>${it.type}</type><% } %>
</dependency><% } %><% if (language=='groovy') { %>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
</dependency><% } %><% if (language=='kotlin') { %>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>\${kotlin.version}</version>
</dependency><% } %>
<% runtimeDependencies.each { %>
<dependency>
<groupId>${it.groupId}</groupId>
<artifactId>${it.artifactId}</artifactId><% if (it.version != null) { %>
<version>${it.version}</version><% } %>
<scope>runtime</scope><% if (it.type != null) { %>
<type>${it.type}</type><% } %>
</dependency><% } %><% providedDependencies.each { %>
<dependency>
<groupId>${it.groupId}</groupId>
<artifactId>${it.artifactId}</artifactId><% if (it.version != null) { %>
<version>${it.version}</version><% } %>
<scope>provided</scope><% if (it.type != null) { %>
<type>${it.type}</type><% } %>
</dependency><% } %>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency><% testDependencies.each { %>
<dependency>
<groupId>${it.groupId}</groupId>
<artifactId>${it.artifactId}</artifactId><% if (it.version != null) { %>
<version>${it.version}</version><% } %>
<scope>test</scope><% if (it.type != null) { %>
<type>${it.type}</type><% } %>
</dependency><% } %>
</dependencies>
<% if (boms) { %>
<dependencyManagement>
<dependencies><% boms.values().each { %>
<dependency>
<groupId>${it.groupId}</groupId>
<artifactId>${it.artifactId}</artifactId>
<version>${it.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency><% } %>
</dependencies>
</dependencyManagement>
<% } %>
<build><% if (language=='kotlin') { %>
<sourceDirectory>\${project.basedir}/src/main/kotlin</sourceDirectory>
<testSourceDirectory>\${project.basedir}/src/test/kotlin</testSourceDirectory><% } %>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin><% if (language=='groovy') { %>
<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<goals>
<goal>addSources</goal>
<goal>addTestSources</goal>
<goal>generateStubs</goal>
<goal>compile</goal>
<goal>testGenerateStubs</goal>
<goal>testCompile</goal>
<goal>removeStubs</goal>
<goal>removeTestStubs</goal>
</goals>
</execution>
</executions>
</plugin><% } %><% if (language=='kotlin') { %>
<plugin>
<artifactId>kotlin-maven-plugin</artifactId>
<groupId>org.jetbrains.kotlin</groupId>
<version>\${kotlin.version}</version>
<executions>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>test-compile</id>
<phase>test-compile</phase>
<goals>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
</plugin><% } %>
</plugins>
</build>
<% if (repositories) { %>
<repositories><% repositories.each { key, repo -> %>
<repository>
<id>${key}</id>
<name>${repo.name}</name>
<url>${repo.url}</url>
<snapshots>
<enabled>${repo.snapshotsEnabled}</enabled>
</snapshots>
</repository><% } %>
</repositories><% } %><% if (!bootVersion.contains("RELEASE")) { %>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories><% } %>
</project>