Project pom.xml

This is main pom.xml file for whole project.

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>jlupin-platform-parent</artifactId>
        <groupId>com.jlupin</groupId>
        <version>1.6.0.2</version>
    </parent>

    <groupId>com.example</groupId>
    <artifactId>example-project</artifactId>
    <packaging>pom</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>

    <modules>
        <module>common-pojo</module>
        <module>common-util</module>
        <module>example-native/interfaces</module>
        <module>example-native/implementation</module>
        <module>example-servlet/implementation</module>
        <module>integration-test</module>
    </modules>

    <properties>
        <main.dir>${project.basedir}/</main.dir>
        <jlupin.deploy.skip>true</jlupin.deploy.skip>

        <spring.boot.version>2.1.2.RELEASE</spring.boot.version>

        <maven.war.plugin.version>3.2.2</maven.war.plugin.version>
        <maven.failsafe.plugin.version>2.20</maven.failsafe.plugin.version>
        <maven.surefire.plugin.version>2.20</maven.surefire.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>

</project>

Description

What can be found in this file?

  • Parent of this project is set to jlupin-platform-parent which contains definion of versions of dependencies and plugins used for platform.
  • Added repository with jlupin's dependencies.
  • List of modules which are included in project.
  • Properties common for all children (versions defined as properties for all dependencies/plugins not defined in jlupin-plaform-parent). This is a good place to add your project global properties.
  • For convinence jlupin.deploy.skip is set to false and then enabled only for modules which are microservices. This way you can use command mvn jlupin-platform:deploy without a problem of using plugin for all modules.
  • Useful property main.dir is set (it is also overwritten in child modules) for accessing your main project directory.