fr.jcgay.maven.extension:maven-distinct-local-repository

This is the default Maven configuration I use to upload binaries on maven central.

License

License

Categories

Categories

Maven Build Tools
GroupId

GroupId

fr.jcgay.maven.extension
ArtifactId

ArtifactId

maven-distinct-local-repository
Last Version

Last Version

1.2
Release Date

Release Date

Type

Type

jar
Description

Description

This is the default Maven configuration I use to upload binaries on maven central.
Source Code Management

Source Code Management

https://github.com/jcgay/maven-distinct-local-repository

Download maven-distinct-local-repository

How to add to project

<!-- https://jarcasting.com/artifacts/fr.jcgay.maven.extension/maven-distinct-local-repository/ -->
<dependency>
    <groupId>fr.jcgay.maven.extension</groupId>
    <artifactId>maven-distinct-local-repository</artifactId>
    <version>1.2</version>
</dependency>
// https://jarcasting.com/artifacts/fr.jcgay.maven.extension/maven-distinct-local-repository/
implementation 'fr.jcgay.maven.extension:maven-distinct-local-repository:1.2'
// https://jarcasting.com/artifacts/fr.jcgay.maven.extension/maven-distinct-local-repository/
implementation ("fr.jcgay.maven.extension:maven-distinct-local-repository:1.2")
'fr.jcgay.maven.extension:maven-distinct-local-repository:jar:1.2'
<dependency org="fr.jcgay.maven.extension" name="maven-distinct-local-repository" rev="1.2">
  <artifact name="maven-distinct-local-repository" type="jar" />
</dependency>
@Grapes(
@Grab(group='fr.jcgay.maven.extension', module='maven-distinct-local-repository', version='1.2')
)
libraryDependencies += "fr.jcgay.maven.extension" % "maven-distinct-local-repository" % "1.2"
[fr.jcgay.maven.extension/maven-distinct-local-repository "1.2"]

Dependencies

provided (1)

Group / Artifact Type Version
org.apache.maven : maven-core jar 3.2.1

test (4)

Group / Artifact Type Version
org.junit.jupiter : junit-jupiter-api jar 5.0.3
org.junit.jupiter : junit-jupiter-engine jar 5.0.3
org.mockito : mockito-core jar 2.13.0
org.assertj : assertj-core jar 3.9.0

Project Modules

There are no modules declared in this project.

maven-distinct-local-repository

This Maven extension aims to separate SNAPSHOTs and RELEASEs artifacts and metadata in local repository.

For example, if your local Maven repository is located at ~/.m2/repository:

  • SNAPSHOTs will be written at ~/.m2/repository/snapshots,
  • RELEASEs will be written at ~/.m2/repository/releases

It is handy to manage a cache only for released artifacts (on your CI server...) or to just delete all your SNAPSHOTs at once.

Installation

Get maven-distinct-local-repository and copy it in %M2_HOME%/lib/ext folder (where %M2_HOME targets your local Maven installation).

or

Use the new core extensions configuration mechanism by creating a ${maven.multiModuleProjectDirectory}/.mvn/extensions.xml file with:

<?xml version="1.0" encoding="UTF-8"?>
<extensions>
    <extension>
      <groupId>fr.jcgay.maven.extension</groupId>
      <artifactId>maven-distinct-local-repository</artifactId>
      <version>1.2</version>
    </extension>
</extensions>

Usage

Run your build using property distinct.local.repository=true:

mvn install -Ddistinct.local.repository=true

Dependencies will be automatically resolved/stored in distinct folders from/in your local Maven repository.

Build status

Build Status Coverage Status

Release

mvn -B release:prepare release:perform

Versions

Version
1.2
1.1
1.0