GitHub Maven Plugins
Today marks the initial release of two GitHub plugins for the popular Maven build system. Downloads Plugin The download plugin allows you to upload build artifacts as GitHub downloads when…
Today marks the initial release of two GitHub plugins for the popular Maven build system.
Downloads Plugin
The download plugin allows you to upload build artifacts as GitHub downloads when your build successfully completes.
You can bind this plugin to run as part of the install phase and you will see output like this as the build artifacts are uploaded:
[INFO] --- downloads-maven-plugin:0.1:upload (default) @ github-maven-example ---
[INFO] Adding 3 downloads to repository kevinsawicki/github-maven-example
[INFO] Deleting existing download: github-maven-example-0.1-SNAPSHOT.jar (id=133116)
[INFO] Adding download: github-maven-example-0.1-SNAPSHOT.jar (3,448 bytes)
[INFO] Deleting existing download: github-maven-example-0.1-SNAPSHOT-javadoc.jar (id=133117)
[INFO] Adding download: github-maven-example-0.1-SNAPSHOT-javadoc.jar (22,323 bytes)
[INFO] Deleting existing download: github-maven-example-0.1-SNAPSHOT-sources.jar (id=133118)
[INFO] Adding download: github-maven-example-0.1-SNAPSHOT-sources.jar (1,169 bytes)
Site Plugin
The site plugin uploads a generated Maven site to your project’s gh-pages
branch so that is can be served as your repository’s project page.
The site plugin uses the powerful GitHub Data API to upload blobs, create commits, and update the gh-pages
branch reference.
You can bind this plugin to run as part of the site phase and you will see output like this as the site files are committed and the branch reference is updated:
[INFO] --- site-maven-plugin:0.1:site (default) @ github-maven-example ---
[INFO] Creating 71 blobs
[INFO] Creating tree with 71 blob entries
[INFO] Creating commit with SHA-1: 3a1a9b2c44ebb5c2c9ab90a7480f4111ba80e055
[INFO] Updating reference refs/heads/gh-pages from 8fb1cb1967f8364602d29084d025f2298203ad69 to 3a1a9b2c44ebb5c2c9ab90a7480f4111ba80e055
Both plugins are built on top API v3 through integration with the recently released GitHub Java API 1.1.0 library.
Make sure to check out the README to see all the options that are supported and how the plugins can be configured.
Looking to get started using these plugins? Just fork this example project that has a pom.xml file configured to use both plugins.
Written by
Related posts
![](https://github.blog/wp-content/uploads/2023/10/Collaboration-DarkMode-2.png?resize=400%2C212)
2024 is the biggest global election year in history. What’s at stake for developers?
GitHub is considering what is at stake for our users and platform, how we can take responsible action to support free and fair elections, and how developers contribute to resilient democratic processes.
![](https://github.blog/wp-content/uploads/2023/10/AI-DarkMode-2.png?resize=400%2C212)
GitHub named a Leader in the Gartner first-ever Magic Quadrant for AI Code Assistants
This year, as part of its annual Magic Quadrant series, Gartner published a first-of-its-kind report analyzing the state of play in the AI Code Assistants market–and named GitHub a Leader.
![AI in software development 2024 survey results with colorful graphics and percentages.](https://github.blog/wp-content/uploads/2024/08/ai-survey-header.png?resize=400%2C212)
Survey: The AI wave continues to grow on software development teams
We surveyed 2,000 people on software development teams at enterprises in the U.S., Brazil, India, and Germany about the use, experience, and expectations around generative AI tools in software development.