Skip to content

Finaxys/clean-local-repository-maven-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clean-local-repository-maven-plugin

The « clean local repository plugin » provides the capability to delete and parametrized deletion of artifacts from the local maven repository.

About

It's well known that in a continuous integration environnement, the local maven repository is the theatre of a growing file system consumption generated by the continus and incremental build of « snapshot » and « released » libraries.

This behavior is not really known during personnal development and compilation of individuals projets, but it's especially prejudicial in industrial context with build of many large and parallelized projets. In such cases, this plugins allowed selection and auto deletion of unecessary artifacts to moderate your file system consumption.

Default behaviour is to keep only the lastest version of a project librairies and metadata but to fit your needs, you can refer to the documentation to found more on this plugin goals, usages and options.

Build

Currently, you need Maven 2.x / 3.x to build the plugin.

  • Install and tests :
mvn clean install
  • Javadoc generation :
mvn javadoc:javadoc

Runtime

Brief example on how to use the clean local repository plugin goals. Refer to the documentation options section to feet this given configuration to your need.

Configure the plugin something like this if you intend to bind it to execute along with your build:

<project>
  [...]
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>clean-local-repository-plugin</artifactId>
        <version>1.0</version>
        <executions>
          <execution>
            <id>cleanlocalrepository </id>
            <phase>process-sources</phase>
            <goals>
              <goal>clean</goal>
            </goals>
            <configuration>
              <!-- Some sample configurations -->
              <deleteCurrentRelease>false</deleteCurrentRelease>
              <snapshotRetentionDelay>3</snapshotRetentionDelay>
              <!-- other configurations here -->
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  [...]
</project>

If you intend to configure this mojo for execution on a command line (with option examples) :

mvn clean-local-repository:clean -Dclean-local-repository.deleteCurrentRelease=false -Dclean-local-
repository.snapshotRetentionDelay=3

Contributions

We welcome your feature enhancements and bug fixes in pull requests!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages