Maven
◍ Convention over Configuration
◍ Declarative instead of Imperative (like Ant or Gradle)
◍ Minimal declaration to get started
◍ Dependency management
◍ Centralized artifact repository
Build Ecosystem Tenets
◍ Standard Directory Layout
◍ Standard Lifecycles: clean, default, site
◍ Standard Packages: pom, jar, ejb, maven-plugin, war, ear, rar
◍ Standard goal bindings - each package defines default bindings
◍ Defaults for most elements
◍ Archetypes
Conventions
Standard Directory Layout
src/main/java Application/Library sources
src/main/resources Application/Library resources
src/main/filters Resource filter files
src/main/webapp Web application sources
src/test/java Test sources
src/test/resources Test resources
src/test/filters Test resource filter files
src/it Integration Tests (primarily for plugins)
src/assembly Assembly descriptors
src/site Site
LICENSE.txt Project's license
NOTICE.txt Notices and attributions required by dependencies
README.txt Project's readme
◍ mvn <goal | phase | -D definition | -P profile>+
◍ Goal - A specific task provided by a plugin
• compiler:compile
• jar:jar
◍ Phase - A step of a lifecycle
• clean (step from the clean lifecycle)
• verify (step from the default lifecycle)
• site (step from the site lifecycle)
◍ Define - Declare a property
• -D skipTests
◍ Profile - Activate a profile
• -P report-updates
Command Line
Clean Lifecycle
Phase Description
pre-clean execute processes needed prior to the actual project cleaning
clean remove all files generated by the previous build
post-clean execute processes needed to finalize the project cleaning
Default Lifecycle
validate validate the project is correct and all necessary information is available.
initialize initialize build state, e.g. set properties or create directories.
generate-sources generate any source code for inclusion in compilation.
process-sources process the source code, for example to filter any values.
generate-resources generate resources for inclusion in the package.
process-resources copy and process the resources into the destination directory, ready for packaging.
compile compile the source code of the project.
process-classes post-process the generated files from compilation, for example to do bytecode enhancement on Java classes.
generate-test-sources generate any test source code for inclusion in compilation.
process-test-sources process the test source code, for example to filter any values.
generate-test-resources create resources for testing.
process-test-resources copy and process the resources into the test destination directory.
test-compile compile the test source code into the test destination directory
process-test-classes post-process the generated files from test compilation, for example to do bytecode enhancement on classes.
test run tests using a suitable unit testing framework. These tests should not require the code be deployed.
Default Lifecycle (continued)
Phase Description
prepare-package perform any operations necessary to prepare a package before the actual packaging.
package take the compiled code and package it in its distributable format, such as a JAR.
pre-integration-test perform actions required before integration tests are executed. This may involve things such as setting up the
required environment.
integration-test process and deploy the package if necessary into an environment where integration tests can be run.
post-integration-test perform actions required after integration tests have been executed.
verify run any checks to verify the package is valid and meets quality criteria.
install install the package into the local repository, for use as a dependency in other projects locally.
deploy done in an integration or release environment, copies the final package to the remote repository
Site Lifecycle
Phase Description
pre-site execute processes needed prior to the actual project site generation
site generate the project's site documentation
post-site execute processes needed to finalize the site generation, and to prepare for site deployment
site-deploy deploy the generated site documentation to the specified web server
<phases> <!-- Plugin bindings for jar packaging -->
<process-resources>
org.apache.maven.plugins:maven-resources-plugin:2.6:resources
</process-resources>
<compile>
org.apache.maven.plugins:maven-compiler-plugin:3.1:compile
</compile>
<process-test-resources>
org.apache.maven.plugins:maven-resources-plugin:2.6:testResources
</process-test-resources>
<test-compile>
org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile
</test-compile>
<test>
org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test
</test>
<package>
org.apache.maven.plugins:maven-jar-plugin:2.4:jar
</package>
<install>
org.apache.maven.plugins:maven-install-plugin:2.4:install
</install>
<deploy>
org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy
</deploy>
</phases>
Goal Bindings
<?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
https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
Xml Prologue
<?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
https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.example.mojo</groupId>
<artifactId>client-project</artifactId>
<version>2.0</version>
<!-- packaging>jar</packaging -->
Project Coordinates Declaration
<?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
https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.example.group</groupId>
<artifactId>enterprise</artifactId>
<version>1.22.0</version>
<relativePath></relativePath>
</parent>
<!-- groupId>inherit parent’s groupId</groupId -->
<artifactId>client-project</artifactId>
<!-- version>inherit parent’s version</version -->
Parent Pom
<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
https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<!-- parent>defaults to "super-pom"</parent -->
<groupId>org.example.group</groupId>
<artifactId>aggregator</artifactId>
<version>2.0</version>
<packaging>pom</packaging>
<modules>
<module>client-project</module>
<module>another-project</module>
<module>third-project</module>
</modules>
</project>
Aggregate (Multi-Module) Pom
<name>${project.groupId}:${project.artifactId}</name>
<description>An application used as an example</description>
<url>http://www.example.com/example-application</url>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
<comments>A business-friendly OSS license</comments>
</license>
</licenses>
<developers>
<developer>
<name>Manfred Moser</name>
<email>manfred@sonatype.com</email>
<organization>Sonatype</organization>
<organizationUrl>http://www.sonatype.com</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:git://github.com/example/ossrh-demo.git</connection>
<developerConnection>scm:git:ssh://github.com:example/ossrh-demo.git</developerConnection>
<url>http://github.com/example/ossrh-demo/tree/master</url>
</scm>
Pom Metadata(optional, but required for distribution by Central)
<contributors>
<!-- Similar to <developers/> -->
</contributors>
<organization>
<name>Example Corporation</name>
<url>http://example.com</url>
</organization>
<issueManagement>
<system>Bugzilla</system>
<url>http://127.0.0.1/bugzilla/</url>
</issueManagement>
<ciManagement>
<system>continuum</system>
<url>http://127.0.0.1:8080/continuum</url>
</ciManagement>
<mailingLists>
<mailingList>
<name>User Mailing List</name>
<subscribe>user-subscribe@127.0.0.1</subscribe>
<unsubscribe>user-unsubscribe@127.0.0.1</unsubscribe>
</mailingList>
</mailingLists>
Pom Metadata(optional)
<dependencies>
<dependency>
<groupId>com.proofpoint.mis.quarkus</groupId>
<artifactId>test-lib</artifactId>
<scope>test</scope>
<!-- version>determined by dependency mediation</version -->
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-security</artifactId>
<!-- scope>compile</scope -->
<version>${quarkus.version}</version>
<exclusions>
<exclusion>
<groupId>javax.interceptor</groupId>
<artifactId>javax.interceptor-api</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
Pom Dependencies
◍ Dependency unique coordinates: GroupId, ArtifactId, Version, Packaging
◍ Dependency scopes:
Dependencies
compile This is the default scope, used if none is specified. Compile dependencies are available in all classpaths of a project.
Furthermore, those dependencies are propagated to dependent projects.
provided This is much like compile, but indicates you expect the JDK or a container to provide the dependency at runtime. For
example, when building a web application for the Java Enterprise Edition, you would set the dependency on the Servlet
API and related Java EE APIs to scope provided because the web container provides those classes. This scope is only
available on the compilation and test classpath, and is not transitive.
runtime This scope indicates that the dependency is not required for compilation, but is for execution. It is in the runtime and test
classpaths, but not the compile classpath.
test This scope indicates that the dependency is not required for normal use of the application, and is only available for the
test compilation and execution phases. This scope is not transitive.
import This scope is only supported on a dependency of type pom in the <dependencyManagement> section. It indicates the
dependency to be replaced with the effective list of dependencies in the specified POM's <dependencyManagement>
section. Since they are replaced, dependencies with a scope of import do not actually participate in limiting the transitivity
of a dependency.
◍ Scope determines transitive closure
◍ Scope transitivity rules:
Transitive Dependencies
Dependency’s Dependency Scope ⇨
⇩Dependency Scope Transitive Scope⬂ compile provided runtime test
compile compile - runtime -
provided provided - provided -
runtime runtime - runtime -
test test - test -
◍ If versions not specified, use "nearest definition"
◍ If versions specified, it is possible to have
multiple versions of artifact:
Version Mediation
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-client</artifactId>
<version>${elasticsearch.version}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-high-level-client</artifactId>
<version>${elasticsearch.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
Pom DependencyManagement
<build>
<plugins>
<plugin>
<!-- groupId>org.apache.maven.plugins</groupId -->
<artifactId>maven-surefire-plugin</artifactId>
<!-- version> specified in "super" pom </version -->
<executions>
<execution>
<!-- id>default-test</id -->
<goals>
<goal>test</goal>
<!-- phase>test</phase -->
</goals>
<configuration> <!-- per-execution plugin configuration -->
<failIfNoTests>true</failIfNoTests>
</configuration>
</execution>
</executions>
<configuration> <!-- global plugin configuration -->
<environmentVariables>
<SERVICE_VAR_DIR>${project.build.directory}/service/var</SERVICE_VAR_DIR>
</environmentVariables>
</configuration>
</plugin>
</plugins>
</build>
Pom Build
<profiles>
<profile>
<id>updates</id>
<activation>
<property>
<name>update</name><value>true</value>
</property>
<file>
<exists>version-rules.xml</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<configuration>
<rulesUri>file://${project.basedir}/version-rules.xml</rulesUri>
</configuration>
<executions>
<execution>
<goals>
<goal>display-dependency-updates</goal>
</goals>
<phase>initialize</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
Profiles
◍ Inherit declarations from parent
◍ Plugins/jars shared through Central Repository
◍ Activated Profiles
Reuse
◍ Maven standard directory layout
https://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html
◍ Maven default lifecycle
https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
◍ Pom Reference
https://maven.apache.org/pom.html
◍ Central Repository Search
https://search.maven.org/
Links of Interest
◍ dependencyManagement - consistent set of dependencies
◍ pluginManagement - consistent set of plugin versions
◍ plugins
• com.coveo:fmt-maven-plugin - format java sources according to google styleguide
• com.github.ekryd.sortpom:sortpom-maven-plugin - sort poms according to maven conventions
• com.github.spotbugs:spotbugs-maven-plugin - check for java coding errors
• org.apache.maven.plugins:maven-dependency-plugin - check all dependencies are declared and
no extra dependencies are used
• org.apache.maven.plugins:maven-enforcer-plugin - enforce various banned dependencies
• org.apache.maven.plugins:maven-pmd-plugin - check for code violations and duplications
• org.jacoco:jacoco-maven-plugin - code coverage
• org.jboss.jandex:jandex-maven-plugin - index class annotations
• pl.project13.maven:git-commit-id-plugin - set maven properties based on the git commit
◍ profiles
• 00-build-quarkus - build the quarkus runner jar, set configuration for failsafe and jacoco
• 10-build-docker - build docker image
• test-mock - start/stop mockserver
• invoker-integration-tests - run integration tests in src/it
• docker-integration-tests - start docker image, run integration tests, stop docker, produce test report
org.honton.chas : java-base(https://github.com/chonton/maven-parent-example)
Questions?
Thank You

Maven

  • 1.
  • 2.
    ◍ Convention overConfiguration ◍ Declarative instead of Imperative (like Ant or Gradle) ◍ Minimal declaration to get started ◍ Dependency management ◍ Centralized artifact repository Build Ecosystem Tenets
  • 3.
    ◍ Standard DirectoryLayout ◍ Standard Lifecycles: clean, default, site ◍ Standard Packages: pom, jar, ejb, maven-plugin, war, ear, rar ◍ Standard goal bindings - each package defines default bindings ◍ Defaults for most elements ◍ Archetypes Conventions
  • 4.
    Standard Directory Layout src/main/javaApplication/Library sources src/main/resources Application/Library resources src/main/filters Resource filter files src/main/webapp Web application sources src/test/java Test sources src/test/resources Test resources src/test/filters Test resource filter files src/it Integration Tests (primarily for plugins) src/assembly Assembly descriptors src/site Site LICENSE.txt Project's license NOTICE.txt Notices and attributions required by dependencies README.txt Project's readme
  • 5.
    ◍ mvn <goal| phase | -D definition | -P profile>+ ◍ Goal - A specific task provided by a plugin • compiler:compile • jar:jar ◍ Phase - A step of a lifecycle • clean (step from the clean lifecycle) • verify (step from the default lifecycle) • site (step from the site lifecycle) ◍ Define - Declare a property • -D skipTests ◍ Profile - Activate a profile • -P report-updates Command Line
  • 6.
    Clean Lifecycle Phase Description pre-cleanexecute processes needed prior to the actual project cleaning clean remove all files generated by the previous build post-clean execute processes needed to finalize the project cleaning
  • 7.
    Default Lifecycle validate validatethe project is correct and all necessary information is available. initialize initialize build state, e.g. set properties or create directories. generate-sources generate any source code for inclusion in compilation. process-sources process the source code, for example to filter any values. generate-resources generate resources for inclusion in the package. process-resources copy and process the resources into the destination directory, ready for packaging. compile compile the source code of the project. process-classes post-process the generated files from compilation, for example to do bytecode enhancement on Java classes. generate-test-sources generate any test source code for inclusion in compilation. process-test-sources process the test source code, for example to filter any values. generate-test-resources create resources for testing. process-test-resources copy and process the resources into the test destination directory. test-compile compile the test source code into the test destination directory process-test-classes post-process the generated files from test compilation, for example to do bytecode enhancement on classes. test run tests using a suitable unit testing framework. These tests should not require the code be deployed.
  • 8.
    Default Lifecycle (continued) PhaseDescription prepare-package perform any operations necessary to prepare a package before the actual packaging. package take the compiled code and package it in its distributable format, such as a JAR. pre-integration-test perform actions required before integration tests are executed. This may involve things such as setting up the required environment. integration-test process and deploy the package if necessary into an environment where integration tests can be run. post-integration-test perform actions required after integration tests have been executed. verify run any checks to verify the package is valid and meets quality criteria. install install the package into the local repository, for use as a dependency in other projects locally. deploy done in an integration or release environment, copies the final package to the remote repository
  • 9.
    Site Lifecycle Phase Description pre-siteexecute processes needed prior to the actual project site generation site generate the project's site documentation post-site execute processes needed to finalize the site generation, and to prepare for site deployment site-deploy deploy the generated site documentation to the specified web server
  • 10.
    <phases> <!-- Pluginbindings for jar packaging --> <process-resources> org.apache.maven.plugins:maven-resources-plugin:2.6:resources </process-resources> <compile> org.apache.maven.plugins:maven-compiler-plugin:3.1:compile </compile> <process-test-resources> org.apache.maven.plugins:maven-resources-plugin:2.6:testResources </process-test-resources> <test-compile> org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile </test-compile> <test> org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test </test> <package> org.apache.maven.plugins:maven-jar-plugin:2.4:jar </package> <install> org.apache.maven.plugins:maven-install-plugin:2.4:install </install> <deploy> org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy </deploy> </phases> Goal Bindings
  • 11.
    <?xml version="1.0" encoding="UTF-8"?> <projectxmlns="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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> Xml Prologue
  • 12.
    <?xml version="1.0" encoding="UTF-8"?> <projectxmlns="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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org.example.mojo</groupId> <artifactId>client-project</artifactId> <version>2.0</version> <!-- packaging>jar</packaging --> Project Coordinates Declaration
  • 13.
    <?xml version="1.0" encoding="UTF-8"?> <projectxmlns="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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.example.group</groupId> <artifactId>enterprise</artifactId> <version>1.22.0</version> <relativePath></relativePath> </parent> <!-- groupId>inherit parent’s groupId</groupId --> <artifactId>client-project</artifactId> <!-- version>inherit parent’s version</version --> Parent Pom
  • 14.
    <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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <!-- parent>defaultsto "super-pom"</parent --> <groupId>org.example.group</groupId> <artifactId>aggregator</artifactId> <version>2.0</version> <packaging>pom</packaging> <modules> <module>client-project</module> <module>another-project</module> <module>third-project</module> </modules> </project> Aggregate (Multi-Module) Pom
  • 15.
    <name>${project.groupId}:${project.artifactId}</name> <description>An application usedas an example</description> <url>http://www.example.com/example-application</url> <licenses> <license> <name>Apache License, Version 2.0</name> <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url> <distribution>repo</distribution> <comments>A business-friendly OSS license</comments> </license> </licenses> <developers> <developer> <name>Manfred Moser</name> <email>manfred@sonatype.com</email> <organization>Sonatype</organization> <organizationUrl>http://www.sonatype.com</organizationUrl> </developer> </developers> <scm> <connection>scm:git:git://github.com/example/ossrh-demo.git</connection> <developerConnection>scm:git:ssh://github.com:example/ossrh-demo.git</developerConnection> <url>http://github.com/example/ossrh-demo/tree/master</url> </scm> Pom Metadata(optional, but required for distribution by Central)
  • 16.
    <contributors> <!-- Similar to<developers/> --> </contributors> <organization> <name>Example Corporation</name> <url>http://example.com</url> </organization> <issueManagement> <system>Bugzilla</system> <url>http://127.0.0.1/bugzilla/</url> </issueManagement> <ciManagement> <system>continuum</system> <url>http://127.0.0.1:8080/continuum</url> </ciManagement> <mailingLists> <mailingList> <name>User Mailing List</name> <subscribe>user-subscribe@127.0.0.1</subscribe> <unsubscribe>user-unsubscribe@127.0.0.1</unsubscribe> </mailingList> </mailingLists> Pom Metadata(optional)
  • 17.
    <dependencies> <dependency> <groupId>com.proofpoint.mis.quarkus</groupId> <artifactId>test-lib</artifactId> <scope>test</scope> <!-- version>determined bydependency mediation</version --> </dependency> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-security</artifactId> <!-- scope>compile</scope --> <version>${quarkus.version}</version> <exclusions> <exclusion> <groupId>javax.interceptor</groupId> <artifactId>javax.interceptor-api</artifactId> </exclusion> </exclusions> </dependency> </dependencies> Pom Dependencies
  • 18.
    ◍ Dependency uniquecoordinates: GroupId, ArtifactId, Version, Packaging ◍ Dependency scopes: Dependencies compile This is the default scope, used if none is specified. Compile dependencies are available in all classpaths of a project. Furthermore, those dependencies are propagated to dependent projects. provided This is much like compile, but indicates you expect the JDK or a container to provide the dependency at runtime. For example, when building a web application for the Java Enterprise Edition, you would set the dependency on the Servlet API and related Java EE APIs to scope provided because the web container provides those classes. This scope is only available on the compilation and test classpath, and is not transitive. runtime This scope indicates that the dependency is not required for compilation, but is for execution. It is in the runtime and test classpaths, but not the compile classpath. test This scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases. This scope is not transitive. import This scope is only supported on a dependency of type pom in the <dependencyManagement> section. It indicates the dependency to be replaced with the effective list of dependencies in the specified POM's <dependencyManagement> section. Since they are replaced, dependencies with a scope of import do not actually participate in limiting the transitivity of a dependency.
  • 19.
    ◍ Scope determinestransitive closure ◍ Scope transitivity rules: Transitive Dependencies Dependency’s Dependency Scope ⇨ ⇩Dependency Scope Transitive Scope⬂ compile provided runtime test compile compile - runtime - provided provided - provided - runtime runtime - runtime - test test - test -
  • 20.
    ◍ If versionsnot specified, use "nearest definition" ◍ If versions specified, it is possible to have multiple versions of artifact: Version Mediation
  • 21.
  • 22.
    <build> <plugins> <plugin> <!-- groupId>org.apache.maven.plugins</groupId --> <artifactId>maven-surefire-plugin</artifactId> <!--version> specified in "super" pom </version --> <executions> <execution> <!-- id>default-test</id --> <goals> <goal>test</goal> <!-- phase>test</phase --> </goals> <configuration> <!-- per-execution plugin configuration --> <failIfNoTests>true</failIfNoTests> </configuration> </execution> </executions> <configuration> <!-- global plugin configuration --> <environmentVariables> <SERVICE_VAR_DIR>${project.build.directory}/service/var</SERVICE_VAR_DIR> </environmentVariables> </configuration> </plugin> </plugins> </build> Pom Build
  • 23.
  • 24.
    ◍ Inherit declarationsfrom parent ◍ Plugins/jars shared through Central Repository ◍ Activated Profiles Reuse
  • 25.
    ◍ Maven standarddirectory layout https://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html ◍ Maven default lifecycle https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html ◍ Pom Reference https://maven.apache.org/pom.html ◍ Central Repository Search https://search.maven.org/ Links of Interest
  • 26.
    ◍ dependencyManagement -consistent set of dependencies ◍ pluginManagement - consistent set of plugin versions ◍ plugins • com.coveo:fmt-maven-plugin - format java sources according to google styleguide • com.github.ekryd.sortpom:sortpom-maven-plugin - sort poms according to maven conventions • com.github.spotbugs:spotbugs-maven-plugin - check for java coding errors • org.apache.maven.plugins:maven-dependency-plugin - check all dependencies are declared and no extra dependencies are used • org.apache.maven.plugins:maven-enforcer-plugin - enforce various banned dependencies • org.apache.maven.plugins:maven-pmd-plugin - check for code violations and duplications • org.jacoco:jacoco-maven-plugin - code coverage • org.jboss.jandex:jandex-maven-plugin - index class annotations • pl.project13.maven:git-commit-id-plugin - set maven properties based on the git commit ◍ profiles • 00-build-quarkus - build the quarkus runner jar, set configuration for failsafe and jacoco • 10-build-docker - build docker image • test-mock - start/stop mockserver • invoker-integration-tests - run integration tests in src/it • docker-integration-tests - start docker image, run integration tests, stop docker, produce test report org.honton.chas : java-base(https://github.com/chonton/maven-parent-example)
  • 27.