Single module configuration for servlet microservice
This is minimal configuration for native microservice without multi module support.
Project structure:
+ example-servlet
|
+--- additional-files
|
+--- pom.xml
Project pom.xml
file.
<?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>
<parent>
<artifactId>jlupin-platform-parent</artifactId>
<groupId>com.jlupin</groupId>
<version>1.6.0.2</version>
</parent>
<name>example-servlet</name>
<groupId>com.example</groupId>
<artifactId>example-servlet-implementation</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<repositories>
<!-- Repository is also accessible using https connection: -->
<!-- https://support.jlupin.com/maven2/ -->
<repository>
<id>jlupin-central</id>
<name>jlupin</name>
<url>http://support.jlupin.com/maven2/</url>
</repository>
</repositories>
<pluginRepositories>
<!-- Repository is also accessible using https connection: -->
<!-- https://support.jlupin.com/maven2/ -->
<pluginRepository>
<id>jlupin-central</id>
<name>jlupin</name>
<url>http://support.jlupin.com/maven2/</url>
</pluginRepository>
</pluginRepositories>
<properties>
<spring.boot.version>2.1.2.RELEASE</spring.boot.version>
<maven.war.plugin.version>3.2.2</maven.war.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>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.jlupin</groupId>
<artifactId>jlupin-platform-servlet</artifactId>
</dependency>
<dependency>
<groupId>com.jlupin</groupId>
<artifactId>jlupin-spring-boot-2-servlet-monitor</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j2</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>${maven.war.plugin.version}</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.jlupin</groupId>
<artifactId>jlupin-platform-maven-plugin</artifactId>
<executions>
<execution>
<id>jlupin-zip</id>
<goals>
<goal>zip</goal>
</goals>
<configuration>
<additionalFilesDirectories>
<param>additional-files</param>
</additionalFilesDirectories>
</configuration>
</execution>
<execution>
<id>jlupin-deploy</id>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>