Maven POM agent

Instrumentation agent for detection of POMs in Maven builds

License

License

Categories

Categories

Maven Build Tools
GroupId

GroupId

org.entur.maven.orb.agent
ArtifactId

ArtifactId

agent
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

Maven POM agent
Instrumentation agent for detection of POMs in Maven builds
Project URL

Project URL

https://github.com/entur/maven-orb
Project Organization

Project Organization

Entur AS
Source Code Management

Source Code Management

https://github.com/entur/maven-orb/tree/master

Download agent

How to add to project

<!-- https://jarcasting.com/artifacts/org.entur.maven.orb.agent/agent/ -->
<dependency>
    <groupId>org.entur.maven.orb.agent</groupId>
    <artifactId>agent</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.entur.maven.orb.agent/agent/
implementation 'org.entur.maven.orb.agent:agent:1.0.0'
// https://jarcasting.com/artifacts/org.entur.maven.orb.agent/agent/
implementation ("org.entur.maven.orb.agent:agent:1.0.0")
'org.entur.maven.orb.agent:agent:jar:1.0.0'
<dependency org="org.entur.maven.orb.agent" name="agent" rev="1.0.0">
  <artifact name="agent" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.entur.maven.orb.agent', module='agent', version='1.0.0')
)
libraryDependencies += "org.entur.maven.orb.agent" % "agent" % "1.0.0"
[org.entur.maven.orb.agent/agent "1.0.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

maven-orb

This orb clones the official CircleCI Maven orb interface, but applies a different caching strategy.

In a nutshell, it detects previous build file changes via the git history, so that it can restore the previous Maven cache regardless of what changed in the latest commit.

In contrast, the official CircleCI orb restores the previous Maven cache via a hash of the build files, so all changes to the build files (even whitespace changes) result in a cache miss.

Typical use-case:

  • projects with frequent tweaks to the Maven build, i.e.
    • functional changes in the build files themselves
    • dependency bumping

Advantages:

  • Improves build time when the Maven build files themselves are updated, as (most) dependencies are already in the cache
  • Less traffic for artifact repositories (i.e. Maven central, JCenter, your own private Artifactory etc.)

Disadvantages:

  • Instruments Maven itself to record POM files in use
    • The cache job might break on a future version of Maven or the JVM. If so, it is trivial to (temporarily) revert to the official Maven orb.

Bugs, feature suggestions and help requests can be filed with the issue-tracker.

Usage

Import the orb

orbs:
  owasp: entur/[email protected]

where x is the latest version from the orb registry.

Note that the official orb goes offline before running the build. This does noes work well for multi-module builds, and so this orb detects whether the root pom.xml has any <modules> tag and if so skips going offline.

Default executor

To use the default executor, Docker Hub credentials must be set as the environment variables $DOCKERHUB_LOGIN and $DOCKERHUB_PASSWORD.

Caching strategy

For a detailed caching strategy walkthrough, see our Gradle orb.

Troubleshooting

If the cache is corrupted, update the cache key, so that the previous state is not restored - as in the official Maven orb.

org.entur.maven.orb.agent

Entur AS

Together for easy, sustainable journeys. We supply digital services to the public transport in Norway.

Versions

Version
1.0.0