Skip to content

Instantly share code, notes, and snippets.

@dwelch2344
Created April 19, 2016 17:13
Show Gist options
  • Save dwelch2344/667d568323680a2427c33306e09e3590 to your computer and use it in GitHub Desktop.
Save dwelch2344/667d568323680a2427c33306e09e3590 to your computer and use it in GitHub Desktop.
Example setup to include semver info in MANIFEST.MF
#!/bin/bash
mvn clean package -Dbuild.number=123
<build>
<!-- ... -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
<manifestEntries>
<Specification-Title>${project.name}</Specification-Title>
<Specification-Version>${project.version}</Specification-Version>
<Implementation-Version>${build.number}</Implementation-Version>
</manifestEntries>
</archive>
</configuration>
</plugin>
<!-- ... -->
</build>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment