This Apache Maven plugin informs Bugsnag of a new release of your application, requiring only minimum configuration.
To use this third-party Maven plugin you'll need to add com.kinbiko
as a pluginGroup
in your ~/.m2/settings.xml
.
At a bare minimum, your settings.xml
should look like:
<settings>
<pluginGroups>
<pluginGroup>com.kinbiko</pluginGroup>
</pluginGroups>
</settings>
Under your build>plugins
tag in the pom.xml
of your project add the following.
Please see The official docs for information around what each property means.
<plugin>
<groupId>com.kinbiko</groupId>
<artifactId>bugsnag-maven-plugin</artifactId>
<version>{See the GitHub releases tab for versions}</version>
<configuration>
<!-- Required: -->
<apiKey>{Your API key here}</apiKey>
<!-- Optional: -->
<appVersion>{E.g. 4.1.5}</appVersion> <!-- default: ${project.version} -->
<builderName>{E.g. Malcolm Reynolds}</builderName> <!-- default: ${user.name} -->
<metadata> <!-- no default value -->
<!-- Add any metadata you want here. E.g. -->
<myProp>my value</myProp>
</metadata>
<sourceControl> <!-- no default value -->
<provider>{E.g. github}</provider> <!-- one of: 'github', 'github-enterprise', 'bitbucket', 'bitbucket-server', 'gitlab', 'gitlab-onpremise' -->
<!-- Required when sourceControl is defined: -->
<repository>{E.g. https://github.com/kinbiko/bugsnag-maven-plugin}</repository>
<revision>{E.g. d2a7b36}</revision> <!-- Short or long SHA-1 hash both supported -->
</sourceControl>
<releaseStage>{E.g. staging}</releaseStage> <!-- default: 'production' -->
<autoAssignRelease>true</autoAssignRelease> <!-- no default value -->
</configuration>
</plugin>
You can notify Bugsnag about a new release of your application through:
mvn bugsnag:release
NOTE: The first time you run this command, you may have to force an update with -U.
mvn -U bugsnag:release
You may also optionally drop the default releaseStage
with -Drelease.skipReleaseStage=true
mvn bugsnag:release -Drelease.skipReleaseStage=true
Alternatively, this can be configured similar to the above config properties with <skipReleaseStage>true</skipReleaseStage>
.
MIT