Uploaded image for project: 'Maven Dependency Plugin'
  1. Maven Dependency Plugin
  2. MDEP-675

Add an option to clean the outputDirectory before unpack

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.1.1
    • None
    • unpack
    • None

    Description

      I have a project that needs to extract a very big maven zip artifact.

      I use the maven dependency plugin (unpack goal) with the marker to avoid the extraction at each compilation.

      This very big artifact is currently in development, so I use its SNAPSHOT version.

      Sometimes a new version of this SNAPSHOT is pushed to Nexus, so when I compile my project (using mvn install), the maven dependency plugin unzips the new SNAPSHOT version but the problem is that the outputDirectory contains a mix between the old version and new version of the artifact.

      For example, the first version of the SNAPSHOT contains two files:

      Foo1.bin, Foo2.bin

      The second version of the SNAPSHOT contains two files:

      Foo1.bin, Bar1.bin

      The outputDirectory contains:

      Foo1.bin, Foo2.bin, Bar1.bin

      Whereas I would need to have only Foo1.bin and Bar1.bin.

      Because it's a very big file, it's not possible to always compile using "mvn clean install" instead of "mvn install" because extraction takes too much time. I need a way to process the extraction only when the big artifact has been modified.

      That is why it would be nice to have an option to clean the outputDirectory before the extraction.

      I have a pull request that I can submit if you agree to add this new feature.

      Attachments

        Activity

          People

            Unassigned Unassigned
            olivier_becker Olivier Becker
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: