This repository collects odds and ends for Dropwizard services that have proven consistently useful.
The BuildNumber
command requires the following additions to the Maven project that is used to build the Dropwizard service in question.
First, the <scm>...</scm>
section of the POM should be filled in, e.g.:
<scm>
<developerConnection>scm:git:git@github.com:Multifarious/dw-goodies.git</developerConnection>
</scm>
Second, the maven-scm-plugin
(provides Git integration), buildnumber-maven-plugin
(populates Git SHA into ${buildNumber}
), and maven-jar-plugin
(puts ${buildNumber}
in the JAR manifest) need to all be set up to work together:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-plugin</artifactId>
<version>1.8.1</version>
<configuration>
<connectionType>developerConnection</connectionType>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
...
<manifestEntries>
<Implementation-Build>${buildNumber}</Implementation-Build>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.2</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<!-- alter these to inlfluence how build numbers are applied/enforced w.r.t. local changes and upstream -->
<configuration>
<doCheck>false</doCheck>
<doUpdate>false</doUpdate>
</configuration>
</plugin>
Include the following in your pom.xml
:
<dependency> <groupId>io.ifar</groupId> <artifactId>dw-goodies</artifactId> <version>0-SNAPSHOT</version> </dependency>
Snapshots are available from the following Maven repository:
<repository> <id>multifarious-snapshots</id> <name>Multifarious, Inc. Snapshot Repository</name> <url>http://repository-multifarious.forge.cloudbees.com/snapshot/</url> <snapshots> <enabled>true</enabled> </snapshots> <releases> <enabled>false</enabled> </releases> </repository>
None as yet, but when there are, they will be published via Maven Central.
The license is BSD 2-clause. This information is also present in the LICENSE
file and in the pom.xml
.