Skip to content

Latest commit

 

History

History
46 lines (29 loc) · 1.82 KB

README.md

File metadata and controls

46 lines (29 loc) · 1.82 KB

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