Maven plugin to download assets from GitHub releases.
In your pom.xml
the following plugin configuration will download the asset Dist.zip
from the latest release (in time
of plugin execution)
of the repository lukashornych/evitalab
and saves it and extracts it to the directory src/main/resources/META-INF/lab/gui
<build>
<plugins>
<plugin>
<groupId>one.edee.oss</groupId>
<artifactId>github-release-asset-downloader-maven-plugin</artifactId>
<version>1.0</version>
<configuration>
<owner>lukashornych</owner>
<repo>evitalab</repo>
<assetName>Dist.zip</assetName>
<targetDir>${project.basedir}/src/main/resources/META-INF/lab/gui</targetDir>
</configuration>
</plugin>
</plugins>
</build>
then you can manually run it using:
mvn one.edee:github-release-asset-downloader-maven-plugin:1.0-SNAPSHOT:download-asset
Note: currently only zip files are supported.
owner
- GitHub repository owner namerepo
- GitHub repository nameassetName
- entire name of the asset to downloadtargetDir
- directory where the content of the asset file will be extracted, all old files in the directory will be deleted before every extraction
Any contributions are welcome and appreciated.