Maven

Maven

Assembly plugin

  1. POM file

    <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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.dan.sandbox</groupId>
    <artifactId>my-package</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <dependencies>
        <!-- Spring dependencies managed via BOM -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot</artifactId>
        </dependency>
    </dependencies>
    <build>
        <plugins>
              <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
            </plugin>
    
        </plugins>
    </build>
    </project>
    
  2. Assembly file (in src/main/assembly)

    <assembly>
    <id>package</id>
    <formats>
        <format>dir</format>
        <format>zip</format>
    </formats>
    <includeBaseDirectory>false</includeBaseDirectory>
    <dependencySets>
        <dependencySet>
            <outputDirectory>/lib</outputDirectory>
            <useProjectArtifact>true</useProjectArtifact>
        </dependencySet>
    </dependencySets>
    <fileSets>
        <fileSet>
            <directory>src/main/conf</directory>
            <outputDirectory>/config</outputDirectory>
            <lineEnding>unix</lineEnding>
        </fileSet>
        <fileSet>
            <directory>src/main/assembly/scripts</directory>
            <outputDirectory>/scripts</outputDirectory>
            <lineEnding>unix</lineEnding>
        </fileSet>
        <fileSet>
            <directory>target/generated-resources/appassembler/jsw/liquidbiopsies/</directory>
            <outputDirectory></outputDirectory>
            <fileMode>0770</fileMode>
            <directoryMode>0770</directoryMode>
        </fileSet>
    </fileSets>
    </assembly>
    

Super POM

<parent>
        <groupId>org.my.app</groupId>
        <artifactId>SuperPOM</artifactId>
        <version>2.3.0</version>
  </parent>

SLF4 logging

  <dependencies>
        
      <!-- Logging with SLF4J & LogBack -->
        <!-- SLF4J API -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>

        <!-- SLF4J Bridges -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jul-to-slf4j</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>log4j-over-slf4j</artifactId>
        </dependency>

        <!-- SLF4J Implementation -->
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
        </dependency>
      
      
  </dependencies>