MCPcopy Index your code
hub / github.com/download-maven-plugin/download-maven-plugin

github.com/download-maven-plugin/download-maven-plugin @2.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 2.1.0 ↗ · + Follow
177 symbols 651 edges 24 files 121 documented · 68%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Maven Central Donate

Donate

Download Plugin for Maven

This is a plugin meant to help maven user to download different files on different protocol in part of maven build. The plugin caches downloaded files in maven cache directory, which saves network traffic and speedup build.

IMPORTANT! Group ID relocation

Starting from 2.0.0 the plugin has new group ID io.github.download-maven-plugin

Project Status

Functional but not under active development. We accept pull requests, and generally get them merged within a week or 2 depending on the complexity.

Basic Usage

"Artifact" goal

Meant to be used from anywhere on the system to download an artifact at a specific location. Does not need a pom file to be run and can be used directly from the command line. Can be an alternative to maven-dependency-plugin:get or maven-dependency-plugin:unpack mojoes.

mvn io.github.download-maven-plugin:download-maven-plugin:<LATEST_VERSION>:artifact -DgroupId=io.github.download-maven-plugin -DartifactId=download-maven-plugin -Dversion=2.0.0 -DoutputDirectory=temp

"WGet" goal

This is meant to provide the necessary tooling for downloading anything in your Maven build without having to use Ant scripts. It provides caching and checksum verification.

<plugin>
    <groupId>io.github.download-maven-plugin</groupId>
    <artifactId>download-maven-plugin</artifactId>
    <version>LATEST_VERSION</version>
    <executions>
        <execution>
            <id>install-jbpm</id>
            <phase>pre-integration-test</phase>
            <goals>
                <goal>wget</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <url>http://downloads.sourceforge.net/project/jbpm/jBPM%203/jbpm-3.1.4/jbpm-3.1.4.zip</url>
        <unpack>true</unpack>
        <outputDirectory>${project.build.directory}/jbpm-3.1.4</outputDirectory>
        <md5>df65b5642f33676313ebe4d5b69a3fff</md5>
    </configuration>
</plugin>

You can also run it without a pom.xml i.e.

mvn -Ddownload.url=https://example.com -Ddownload.outputDirectory=. -Ddownload.outputFileName=example.html io.github.download-maven-plugin:download-maven-plugin:<LATEST_VERSION>:wget

Requirements

Java 8 or greater

Maven - 3.6.3 or greater for plugin versions >= 1.11.0 - 3.2.5 or greater for plugin version >= 1.6.9 & < 1.11.0

Known issues and workarounds

IO Error: No such archiver

Happens when the plugin is instructed to unarchive file but the file has unsupported extension

Solution: Specify outputFilename parameter with proper file extension

Help

Maven help

To get basic plugin help, type in the command :

mvn io.github.download-maven-plugin:download-maven-plugin:help

To get a more detailed help, type command :

mvn io.github.download-maven-plugin:download-maven-plugin:help -Ddetail

Issue Tracker and wikis...

Are maintained at GitHub (links above).

Contribute

This project support GitHub PR, but enforce some rules for decent tracking: 1 Change Request == 1 PR == 1 commit, if a change can be made by iterations, then use a specific PR for each iteration. Ideally, every bugfix should be supplied with a unit or integration test.

Build requirements are specified in .tools-versions.

Extension points exported contracts — how you extend this code

ProgressReport (Interface)
Progress report of a file download operation. [4 implementers]
src/main/java/io/github/download/maven/plugin/internal/ProgressReport.java

Core symbols most depended-on inside this repo

get
called by 51
src/main/java/io/github/download/maven/plugin/internal/cache/FileIndex.java
create
called by 33
src/main/java/io/github/download/maven/plugin/internal/checksum/Checksums.java
execute
called by 31
src/main/java/io/github/download/maven/plugin/internal/WGetMojo.java
put
called by 21
src/main/java/io/github/download/maven/plugin/internal/cache/FileIndex.java
build
called by 16
src/main/java/io/github/download/maven/plugin/internal/HttpFileRequester.java
getMessage
called by 11
src/main/java/io/github/download/maven/plugin/internal/DownloadFailureException.java
download
called by 7
src/main/java/io/github/download/maven/plugin/internal/HttpFileRequester.java
getOutputFileName
called by 4
src/main/java/io/github/download/maven/plugin/internal/FileNameUtils.java

Shape

Method 153
Class 20
Enum 2
Interface 2

Languages

Java100%

Modules by API surface

src/test/java/io/github/download/maven/plugin/internal/WGetMojoTest.java45 symbols
src/main/java/io/github/download/maven/plugin/internal/HttpFileRequester.java27 symbols
src/main/java/io/github/download/maven/plugin/internal/WGetMojo.java13 symbols
src/test/java/io/github/download/maven/plugin/internal/HttpFileRequesterTest.java11 symbols
src/main/java/io/github/download/maven/plugin/internal/ArtifactMojo.java9 symbols
src/main/java/io/github/download/maven/plugin/internal/checksum/Checksums.java7 symbols
src/main/java/io/github/download/maven/plugin/internal/cache/FileBackedIndex.java7 symbols
src/main/java/io/github/download/maven/plugin/internal/LoggingProgressReport.java7 symbols
src/main/java/io/github/download/maven/plugin/internal/SilentProgressReport.java6 symbols
src/main/java/io/github/download/maven/plugin/internal/cache/DownloadCache.java5 symbols
src/main/java/io/github/download/maven/plugin/internal/ProgressReport.java5 symbols
src/test/java/io/github/download/maven/plugin/internal/FilePermissionsTest.java4 symbols

For agents

$ claude mcp add download-maven-plugin \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page