Separate templates
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
<dependencies>
|
||||
{% for dep in dependencies %}
|
||||
<dependency>
|
||||
<groupId>{{ dep.groupId }}</groupId>
|
||||
<artifactId>{{ dep.artifactId }}</artifactId>
|
||||
<version>{{ dep.version }}</version>
|
||||
{% if dep.scope == "Test" %}
|
||||
<scope>test</scope>
|
||||
{% endif %}
|
||||
</dependency>
|
||||
{% endfor %}
|
||||
</dependencies>
|
||||
@@ -0,0 +1,14 @@
|
||||
<build>
|
||||
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
|
||||
<testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>
|
||||
|
||||
<plugins>
|
||||
|
||||
{% include "starter/pom/plugins/@default" %}
|
||||
|
||||
{% include "starter/pom/plugins/@kotlin" %}
|
||||
|
||||
{% include "starter/pom/plugins/@shade" %}
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
@@ -0,0 +1,7 @@
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>jcenter</id>
|
||||
<name>jcenter</name>
|
||||
<url>https://jcenter.bintray.com</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
@@ -0,0 +1,24 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>3.1.2</version>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>3.0.0-M4</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.surefire</groupId>
|
||||
<artifactId>surefire-junit-platform</artifactId>
|
||||
<version>3.0.0-M4</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
@@ -0,0 +1,24 @@
|
||||
<plugin>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-maven-plugin</artifactId>
|
||||
<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>
|
||||
<configuration>
|
||||
<jvmTarget>${java.version}</jvmTarget>
|
||||
</configuration>
|
||||
</plugin>
|
||||
@@ -0,0 +1,22 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.2.4</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<minimizeJar>true</minimizeJar>
|
||||
<transformers>
|
||||
<transformer
|
||||
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||||
<mainClass>${main.class}</mainClass>
|
||||
</transformer>
|
||||
</transformers>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
@@ -0,0 +1,23 @@
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>{{ basePackage }}</groupId>
|
||||
<artifactId>{{ name | lower }}</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<properties>
|
||||
<java.version>{{ javaVersion }}</java.version>
|
||||
<kotlin.version>{{ kotlinVersion }}</kotlin.version>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<main.class>{{ basePackage }}/{{ name | lower | capitalize }}Kt</main.class>
|
||||
</properties>
|
||||
|
||||
{% include "starter/pom/@dependencies" %}
|
||||
|
||||
{% include "starter/pom/@repositories" %}
|
||||
|
||||
{% include "starter/pom/@plugins" %}
|
||||
|
||||
</project>
|
||||
Reference in New Issue
Block a user