How to do remove a projects artifacts from the local maven repo?

后端 未结 3 508
终归单人心
终归单人心 2020-12-15 06:32

When running mvn install on a local multi module project it builds and install the projects artifacts into the local repo. mvn clean seems to clean

相关标签:
3条回答
  • 2020-12-15 06:40

    Best is to implement a release strategy, i.e. as long as the artifacts under development appending the version with SNAPSHOT. Maven then automatically updates the artifacts in the local repository when you run install. Once you have completed the development you remove the SNAPSHOT and release the version (i.e. via deploy). If further development is required you could increase the version number and append it again with SNAPSHOT.

    0 讨论(0)
  • 2020-12-15 06:53
    mvn build-helper:remove-project-artifact
    
    0 讨论(0)
  • 2020-12-15 06:59

    You can purge artifacts from your local repository, but why do you like to do this? Apart from that you can do that via maven-dependency-plugin:

    This will purge all project- and dependency artifacts

    mvn dependency:purge-local-repository -DreResolve=false
    

    This can be influenced by supplemental command line arguments (see the documentation) for further details.

    0 讨论(0)
提交回复
热议问题