archetype-resources.pom.xml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kotlin-application-maven-archetype
Show all versions of kotlin-application-maven-archetype
Maven archetype for building Kotlin applications
<?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>${dollar}{groupId}</groupId> <artifactId>${dollar}{artifactId}</artifactId> <version>${dollar}{version}</version> <properties> <docker.imageName>${dollar}{dockerImageName}</docker.imageName> <kotlin.version>${kotlin.version}</kotlin.version> <maven-compiler-plugin.version>${maven-compiler-plugin.version}</maven-compiler-plugin.version> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <slf4j.version>${slf4j.version}</slf4j.version> </properties> <dependencyManagement> <dependencies> <dependency> <groupId>io.github.microutils</groupId> <artifactId>kotlin-logging</artifactId> <version>${kotlin-logging.version}</version> </dependency> <dependency> <groupId>org.jetbrains</groupId> <artifactId>annotations</artifactId> <version>@annotations.version@</version> </dependency> <dependency> <groupId>org.jetbrains.kotlin</groupId> <artifactId>kotlin-stdlib</artifactId> <version>${dollar}{kotlin.version}</version> </dependency> <dependency> <groupId>org.jetbrains.kotlin</groupId> <artifactId>kotlin-stdlib-common</artifactId> <version>${dollar}{kotlin.version}</version> </dependency> <dependency> <groupId>org.jetbrains.kotlin</groupId> <artifactId>kotlin-stdlib-jdk8</artifactId> <version>${dollar}{kotlin.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl-over-slf4j</artifactId> <version>${dollar}{slf4j.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>jul-to-slf4j</artifactId> <version>${dollar}{slf4j.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>log4j-over-slf4j</artifactId> <version>${dollar}{slf4j.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>${dollar}{slf4j.version}</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>${logback-classic.version}</version> <scope>runtime</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>${junit.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.assertj</groupId> <artifactId>assertj-core</artifactId> <version>${assertj-core.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.jetbrains.kotlin</groupId> <artifactId>kotlin-test</artifactId> <version>${dollar}{kotlin.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.jetbrains.kotlin</groupId> <artifactId>kotlin-test-common</artifactId> <version>${dollar}{kotlin.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.jetbrains.kotlin</groupId> <artifactId>kotlin-test-junit</artifactId> <version>${dollar}{kotlin.version}</version> <scope>test</scope> </dependency> </dependencies> </dependencyManagement> <dependencies> <dependency> <groupId>io.github.microutils</groupId> <artifactId>kotlin-logging</artifactId> </dependency> <dependency> <groupId>org.jetbrains</groupId> <artifactId>annotations</artifactId> </dependency> <dependency> <groupId>org.jetbrains.kotlin</groupId> <artifactId>kotlin-stdlib</artifactId> </dependency> <dependency> <groupId>org.jetbrains.kotlin</groupId> <artifactId>kotlin-stdlib-jdk8</artifactId> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <scope>runtime</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.assertj</groupId> <artifactId>assertj-core</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.jetbrains.kotlin</groupId> <artifactId>kotlin-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.jetbrains.kotlin</groupId> <artifactId>kotlin-test-junit</artifactId> <scope>test</scope> </dependency> </dependencies> <build> <sourceDirectory>${dollar}{project.basedir}/src/main/kotlin</sourceDirectory> <testSourceDirectory>${dollar}{project.basedir}/src/test/kotlin</testSourceDirectory> <pluginManagement> <plugins> <plugin> <groupId>com.google.cloud.tools</groupId> <artifactId>jib-maven-plugin</artifactId> <version>${jib-maven-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-clean-plugin</artifactId> <version>${maven-clean-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>${dollar}{maven-compiler-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>${maven-dependency-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-deploy-plugin</artifactId> <version>${maven-deploy-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <version>${maven-failsafe-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-install-plugin</artifactId> <version>${maven-install-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>${maven-jar-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <version>${maven-javadoc-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> <version>${maven-release-plugin.version}</version> <configuration> <autoVersionSubmodules>true</autoVersionSubmodules> <tagNameFormat>@{project.version}</tagNameFormat> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>${maven-resources-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-site-plugin</artifactId> <version>${maven-site-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <version>${maven-source-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>${maven-surefire-plugin.version}</version> </plugin> <plugin> <groupId>org.jacoco</groupId> <artifactId>jacoco-maven-plugin</artifactId> <version>${jacoco-maven-plugin.version}</version> </plugin> </plugins> </pluginManagement> <plugins> <plugin> <groupId>com.github.ekryd.sortpom</groupId> <artifactId>sortpom-maven-plugin</artifactId> <version>${sortpom-maven-plugin.version}</version> <configuration> <predefinedSortOrder>custom_1</predefinedSortOrder> <encoding>${dollar}{project.build.sourceEncoding}</encoding> <lineSeparator>\n</lineSeparator> <keepBlankLines>true</keepBlankLines> <nrOfIndentSpace>2</nrOfIndentSpace> <sortProperties>true</sortProperties> <sortDependencies>scope,groupId,artifactId</sortDependencies> <sortPlugins>groupId,artifactId</sortPlugins> <expandEmptyElements>false</expandEmptyElements> </configuration> <executions> <execution> <goals> <goal>sort</goal> </goals> <phase>verify</phase> </execution> </executions> </plugin> <plugin> <groupId>com.github.gantsign.maven</groupId> <artifactId>ktlint-maven-plugin</artifactId> <version>${ktlint-maven-plugin.version}</version> <executions> <execution> <id>format-and-check</id> <goals> <goal>format</goal> <goal>check</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>io.github.zlika</groupId> <artifactId>reproducible-build-maven-plugin</artifactId> <version>${reproducible-build-maven-plugin.version}</version> <executions> <execution> <goals> <goal>strip-jar</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <id>analyze-dependencies</id> <goals> <goal>analyze-only</goal> </goals> <configuration> <failOnWarning>true</failOnWarning> <ignoredUnusedDeclaredDependencies> <dependency>ch.qos.logback:logback-classic</dependency> <dependency>io.github.microutils:kotlin-logging</dependency> <dependency>junit:junit</dependency> <dependency>org.assertj:assertj-core</dependency> <dependency>org.jetbrains:annotations</dependency> <dependency>org.jetbrains.kotlin:kotlin-stdlib-jdk8</dependency> <dependency>org.jetbrains.kotlin:kotlin-stdlib</dependency> <dependency>org.jetbrains.kotlin:kotlin-test-junit</dependency> <dependency>org.jetbrains.kotlin:kotlin-test</dependency> </ignoredUnusedDeclaredDependencies> <outputXML>true</outputXML> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> <version>${maven-enforcer-plugin.version}</version> <dependencies> <dependency> <groupId>org.codehaus.mojo</groupId> <artifactId>extra-enforcer-rules</artifactId> <version>${extra-enforcer-rules.version}</version> </dependency> </dependencies> <executions> <execution> <id>enforce-versions</id> <goals> <goal>enforce</goal> </goals> <configuration> <rules> <requireMavenVersion> <version>[3.5,3.6)</version> </requireMavenVersion> <requireJavaVersion> <version>[1.8,1.9)</version> </requireJavaVersion> <!-- When there are multiple versions of a dependency you have to choose which one to use. --> <dependencyConvergence /> <requireReleaseDeps> <message>No Snapshots Allowed!</message> </requireReleaseDeps> <!-- When there are multiple versions of a dependency you have to choose the maximum version. --> <requireUpperBoundDeps /> <requirePluginVersions> <message>Best Practice is to always define plugin versions!</message> <banLatest>true</banLatest> <banRelease>true</banRelease> <banSnapshots>true</banSnapshots> <phases>clean,deploy,site</phases> <additionalPlugins> <additionalPlugin>org.apache.maven.plugins:maven-javadoc-plugin</additionalPlugin> <additionalPlugin>org.apache.maven.plugins:maven-release-plugin</additionalPlugin> <additionalPlugin>org.apache.maven.plugins:maven-source-plugin</additionalPlugin> </additionalPlugins> </requirePluginVersions> <bannedPlugins> <excludes> <exclude>org.apache.maven.plugins:maven-verifier-plugin</exclude> </excludes> <message>Please consider using the maven-invoker-plugin (http://maven.apache.org/plugins/maven-invoker-plugin/)!</message> </bannedPlugins> <requireNoRepositories> <message>Best Practice is to never define repositories in pom.xml (use a repository manager instead)</message> </requireNoRepositories> <banDuplicateClasses> <findAllDuplicates>true</findAllDuplicates> </banDuplicateClasses> </rules> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <configuration> <systemPropertyVariables> <docker.image>${dollar}{docker.imageName}:${dollar}{project.version}</docker.image> </systemPropertyVariables> </configuration> <executions> <execution> <goals> <goal>integration-test</goal> <goal>verify</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <configuration> <archive> <manifest> <addClasspath>true</addClasspath> <mainClass>${dollar}{package}.MainKt</mainClass> </manifest> </archive> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jdeps-plugin</artifactId> <version>${maven-jdeps-plugin.version}</version> <configuration> <failOnWarning>true</failOnWarning> </configuration> <executions> <execution> <goals> <goal>jdkinternals</goal> <goal>test-jdkinternals</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>license-maven-plugin</artifactId> <version>${license-maven-plugin.version}</version> <configuration> <projectName>${dollar}{projectName}</projectName> <licenseName>${dollar}{licenseName}</licenseName> <extraExtensions> <kt>java</kt> </extraExtensions> </configuration> <executions> <execution> <id>config</id> <goals> <goal>update-file-header</goal> </goals> <phase>process-sources</phase> <configuration> <roots>${dollar}{basedir}</roots> <includes>.editorconfig,.gitattributes,.travis.yml,pom.xml</includes> <extraExtensions> <editorconfig>properties</editorconfig> <gitattributes>properties</gitattributes> <yml>properties</yml> </extraExtensions> </configuration> </execution> <execution> <id>sources</id> <goals> <goal>update-file-header</goal> </goals> <phase>process-sources</phase> </execution> </executions> </plugin> <plugin> <groupId>org.jacoco</groupId> <artifactId>jacoco-maven-plugin</artifactId> <executions> <execution> <id>default-prepare-agent</id> <goals> <goal>prepare-agent</goal> </goals> </execution> <execution> <id>default-report</id> <goals> <goal>report</goal> </goals> <phase>prepare-package</phase> </execution> <execution> <id>default-check</id> <goals> <goal>check</goal> </goals> <configuration> <rules> <rule> <element>CLASS</element> <excludes> <exclude>*Test</exclude> </excludes> <limits> <limit> <counter>INSTRUCTION</counter> <value>COVEREDRATIO</value> <minimum>0.85</minimum> </limit> </limits> </rule> </rules> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.jetbrains.kotlin</groupId> <artifactId>kotlin-maven-plugin</artifactId> <version>${dollar}{kotlin.version}</version> <configuration> <jvmTarget>${dollar}{maven.compiler.target}</jvmTarget> </configuration> <executions> <execution> <id>compile</id> <goals> <goal>compile</goal> </goals> <phase>compile</phase> </execution> <execution> <id>test-compile</id> <goals> <goal>test-compile</goal> </goals> <phase>test-compile</phase> </execution> </executions> </plugin> </plugins> </build> <reporting> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <!-- Suppress test Javadocs --> <reportSets> <reportSet> <id>default</id> <reports> <report>javadoc</report> </reports> </reportSet> </reportSets> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-project-info-reports-plugin</artifactId> <version>${maven-project-info-reports-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-report-plugin</artifactId> <version>${maven-surefire-report-plugin.version}</version> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jdepend-maven-plugin</artifactId> <version>${jdepend-maven-plugin.version}</version> </plugin> <plugin> <groupId>org.jacoco</groupId> <artifactId>jacoco-maven-plugin</artifactId> <reportSets> <reportSet> <reports> <!-- select non-aggregate reports --> <report>report</report> </reports> </reportSet> </reportSets> </plugin> </plugins> </reporting> <inceptionYear>${dollar}{copyrightStartYear}</inceptionYear> <organization> <name>${dollar}{organizationName}</name> </organization> <profiles> <profile> <id>docker</id> <activation> <activeByDefault>true</activeByDefault> </activation> <build> <plugins> <plugin> <groupId>com.google.cloud.tools</groupId> <artifactId>jib-maven-plugin</artifactId> <executions> <execution> <id>docker-versioned-image</id> <goals> <goal>dockerBuild</goal> </goals> <phase>package</phase> <configuration> <to> <image>${dollar}{docker.imageName}:${dollar}{project.version}</image> </to> </configuration> </execution> <execution> <id>docker-latest-image</id> <goals> <goal>dockerBuild</goal> </goals> <phase>package</phase> <configuration> <to> <image>${dollar}{docker.imageName}:latest</image> </to> </configuration> </execution> </executions> </plugin> </plugins> </build> </profile> </profiles> </project>