Project native-pom.xml
This is project native-pom.xml file. It is used as parent for all native microservices.
Content
<?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>example-project</artifactId>
<groupId>com.example</groupId>
<version>1.0-SNAPSHOT</version>
<relativePath>./pom.xml</relativePath>
</parent>
<artifactId>native-example-project</artifactId>
<packaging>pom</packaging>
<properties>
<main.dir>${project.basedir}/</main.dir>
<jlupin.deploy.skip>false</jlupin.deploy.skip>
<jlupin.repackage.output.fileName>${project.artifactId}-${project.version}.${project.packaging}</jlupin.repackage.output.fileName>
<jlupin.zip.input.fileName>${jlupin.repackage.output.fileName}</jlupin.zip.input.fileName>
</properties>
<dependencies>
<dependency>
<groupId>com.jlupin</groupId>
<artifactId>jlupin-platform-native</artifactId>
</dependency>
<dependency>
<groupId>com.example</groupId>
<artifactId>common-util</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.example</groupId>
<artifactId>common-pojo</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}-app-${project.version}</finalName>
<plugins>
<plugin>
<groupId>com.jlupin</groupId>
<artifactId>jlupin-platform-maven-plugin</artifactId>
<executions>
<execution>
<id>jlupin-repackage</id>
<goals>
<goal>repackage</goal>
</goals>
</execution>
<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>
Description
What can be found in this file?
- Parent of this project is set to project pom.xml file for global configuration to be inherited.
- Useful property
main.dir
is set for accessing your main project directory. - Property
jlupin.deploy.skip
is overwritten to true so modules with this pom set as parent will be taken for deploying to platform. - Added dependency to
jlupin-platform-native
which contains all required dependencies for native microservice. - Added dependency to
common-pojo
for access to it's classes. - Added dependency to
common-util
for access to it's classes. - Fat-jar names is set to build final name, while standard jar file generated with this module's classes has additional infix
app
. - Added execution of goal
repackage
for creating JLupin Platform fat jar. - Added execution of goal
zip
for creating JLupin Platform deplyable unit configured to include additional-files directory, where for example microservice configuration is placed. - Added execution of goal
deploy
for deploying microservice. By default it is not executed with any phase.