Skip to content

Commit

Permalink
Fixed #165 - Added some information to the MANIFEST.MF files : commit…
Browse files Browse the repository at this point in the history
…, buid timestamp
  • Loading branch information
dzc34 committed Jun 22, 2018
1 parent fa8dd8d commit 8e56675
Show file tree
Hide file tree
Showing 3 changed files with 153 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ none
none

### Improvement
none
- [#165 - Added some information to the MANIFEST.MF files : commit, buid timestamp](https://github.com/Asqatasun/Contrast-Finder/issues/165)

### Refactoring
none
Expand Down
150 changes: 150 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@
<module>webapp</module>
</modules>
<properties>
<!-- Used in MANIFEST.MF files-->
<commitUrlPrefix>https://github.com/Asqatasun/Contrast-Finder/commit/</commitUrlPrefix>

<!-- File Encoding -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
Expand All @@ -79,11 +82,15 @@

<!-- Plugin Versions -->
<maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
<maven-jar-plugin.version>3.1.0</maven-jar-plugin.version>
<maven-war-plugin.version>3.2.2</maven-war-plugin.version>
<maven-surefire-plugin.version>2.21.0</maven-surefire-plugin.version>
<maven-project-info-reports-plugin.version>2.9</maven-project-info-reports-plugin.version>
<maven-javadoc-plugin.version>3.0.0</maven-javadoc-plugin.version>
<maven-jxr-plugin.version>2.5</maven-jxr-plugin.version>
<maven-checkstyle-plugin.version>3.0.0</maven-checkstyle-plugin.version>
<build-helper-maven-plugin.version>3.0.0</build-helper-maven-plugin.version>
<buildnumber-maven-plugin.version>1.4</buildnumber-maven-plugin.version>
<dependency-check-maven.version>3.1.2</dependency-check-maven.version>
<jacoco-maven-plugin.version>0.8.1</jacoco-maven-plugin.version>
</properties>
Expand Down Expand Up @@ -116,6 +123,149 @@
<artifactId>maven-assembly-plugin</artifactId>
<!-- <version>3.1</version> -->
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven-jar-plugin.version}</version>
<configuration>
<archive> <!-- - adds some information to the MANIFEST.MF files
- uses build-helper-maven-plugin + buildnumber-maven-plugin
- same as maven-war-plugin -->
<!--<manifest>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest> -->
<manifestEntries>
<Project>${project.name}</Project>
<Built-By>${project.organization.name}</Built-By>
<!-- overwritting default value (user name) -->
</manifestEntries>
<manifestSections>
<manifestSection>
<name>Build</name>
<manifestEntries>
<Build-Release>${project.version}</Build-Release>
<Build-Timestamp>${timestamp}</Build-Timestamp>
<Build-Date>${current.date}</Build-Date>
<Build-Id>${project.version}.${buildNumber}.${timestamp}</Build-Id>
</manifestEntries>
</manifestSection>
<manifestSection>
<name>Git</name>
<manifestEntries>
<git-branch>${scmBranch}</git-branch>
<git-url>${commitUrlPrefix}${buildNumber}</git-url>
<git-commit>${buildNumber}</git-commit>
</manifestEntries>
</manifestSection>
<manifestSection>
<name>Build-Information</name>
<manifestEntries>
<Maven-Version>${maven.version}</Maven-Version>
<Java-Version>${java.version}</Java-Version>
<Os-Name>${os.name}</Os-Name>
<Os-Arch>${os.arch}</Os-Arch>
</manifestEntries>
</manifestSection>
</manifestSections>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>${maven-war-plugin.version}</version>
<configuration>
<archive> <!-- - adds some information to the MANIFEST.MF files
- uses build-helper-maven-plugin + buildnumber-maven-plugin
- same as maven-jar-plugin -->
<!--<manifest>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest> -->
<manifestEntries>
<Project>${project.name}</Project>
<Built-By>${project.organization.name}</Built-By>
<!-- overwritting default value (user name) -->
</manifestEntries>
<manifestSections>
<manifestSection>
<name>Build</name>
<manifestEntries>
<Build-Release>${project.version}</Build-Release>
<Build-Timestamp>${timestamp}</Build-Timestamp>
<Build-Date>${current.date}</Build-Date>
<Build-Id>${project.version}.${buildNumber}.${timestamp}</Build-Id>
</manifestEntries>
</manifestSection>
<manifestSection>
<name>Git</name>
<manifestEntries>
<git-branch>${scmBranch}</git-branch>
<git-url>${commitUrlPrefix}${buildNumber}</git-url>
<git-commit>${buildNumber}</git-commit>
</manifestEntries>
</manifestSection>
<manifestSection>
<name>Build-Information</name>
<manifestEntries>
<Maven-Version>${maven.version}</Maven-Version>
<Java-Version>${java.version}</Java-Version>
<Os-Name>${os.name}</Os-Name>
<Os-Arch>${os.arch}</Os-Arch>
</manifestEntries>
</manifestSection>
</manifestSections>
</archive>
</configuration>
</plugin>
<plugin><!-- used by maven-jar-plugin
maven-war-plugin
https://www.mojohaus.org/build-helper-maven-plugin
https://github.com/mojohaus/build-helper-maven-plugin -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>${build-helper-maven-plugin.version}</version>
<executions>
<execution>
<id>timestamp-property</id>
<goals>
<goal>timestamp-property</goal>
</goals>
<phase>validate</phase>
<configuration>
<name>current.date</name>
<pattern>yyyy-MM-dd'T'HH:mm:ssZ</pattern>
<timeZone>UTC</timeZone>
<locale>en,US</locale>
</configuration>
</execution>
</executions>
</plugin>
<plugin><!-- used by maven-jar-plugin
maven-war-plugin
https://www.mojohaus.org/buildnumber-maven-plugin
https://github.com/mojohaus/buildnumber-maven-plugin -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>${buildnumber-maven-plugin.version}</version>
<configuration>
<!-- <timestampFormat>{0,date,yyyy-MM-dd-HH-mm-ss}</timestampFormat> -->
<shortRevisionLength>7</shortRevisionLength>
<revisionOnScmFailure>no-commit-ID</revisionOnScmFailure>
<!-- Provide this ${buildNumber} value if .git directory is missing-->
</configuration>
<executions>
<execution>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
</plugin>


<!-- Generate standalone Javadocs
https://maven.apache.org/plugins/maven-javadoc-plugin/
Expand Down
9 changes: 2 additions & 7 deletions webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@
<spring.version>4.3.18.RELEASE</spring.version>
<spring-security.version>4.2.7.RELEASE</spring-security.version>
<htmlcompressor.version>1.5.2</htmlcompressor.version>
<urlrewritefilter.version>4.0.4</urlrewritefilter.version>
<taglibs-standard-jstlel.version>1.2.5</taglibs-standard-jstlel.version>
<javaee-web-api.version>8.0</javaee-web-api.version> <!-- need Maven with Jdk-8 -->
<validation-api.version>1.1.0.Final</validation-api.version>
<!-- <validation-api.version>2.0.0.Final</validation-api.version>
not valid for Tomcat-7 with Jdk-7 -->

<!-- Plugin Versions -->
<maven-war-plugin.version>3.2.0</maven-war-plugin.version>
<maven-dependency-plugin.version>3.1.0</maven-dependency-plugin.version>
<native2ascii-maven-plugin.version>2.0.1</native2ascii-maven-plugin.version>
<yuicompressor-maven-plugin.version>1.5.1</yuicompressor-maven-plugin.version>
Expand All @@ -58,11 +58,6 @@
</compilerArguments>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>${maven-war-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
Expand Down Expand Up @@ -400,7 +395,7 @@
<dependency>
<groupId>org.tuckey</groupId>
<artifactId>urlrewritefilter</artifactId>
<version>4.0.4</version>
<version>${urlrewritefilter.version}</version>
</dependency>
</dependencies>
</project>

0 comments on commit 8e56675

Please sign in to comment.