aboutsummaryrefslogtreecommitdiffstats
path: root/pom.xml
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2012-04-10 21:40:19 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2012-04-10 21:40:19 +0200
commit7b182dfb4bda383479e55427480cdf37f0be261d (patch)
tree482484c1c0526e2296e1e564315917d25ba8bcd2 /pom.xml
parentfc5ebaadb37ad52dba9aaa03ece813666413ff5a (diff)
downloadsonarqube-7b182dfb4bda383479e55427480cdf37f0be261d.tar.gz
sonarqube-7b182dfb4bda383479e55427480cdf37f0be261d.zip
Add the entries "Implementation-Build" (Git revision) and "Build-Time" to JAR/WAR manifests.
Note that plugins are not supported yet because of http://jira.codehaus.org/browse/SONAR-3405
Diffstat (limited to 'pom.xml')
-rw-r--r--pom.xml80
1 files changed, 62 insertions, 18 deletions
diff --git a/pom.xml b/pom.xml
index 39ed5ef6a62..74c0245285c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.codehaus.sonar</groupId>
@@ -91,6 +92,8 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.min.version>2.2.1</maven.min.version>
<jdk.min.version>1.5</jdk.min.version>
+ <timestamp>${maven.build.timestamp}</timestamp>
+ <maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ssZ</maven.build.timestamp.format>
<!-- To configure animal-sniffer to check API compat -->
<animal-sniffer.signature.groupId>org.codehaus.mojo.signature</animal-sniffer.signature.groupId>
@@ -101,7 +104,7 @@
<skipSanityChecks>false</skipSanityChecks>
<!-- default GWT configuration. It's overridden by the profile 'dev' to speed up compilation in dev environments-->
- <gwt.permutationSuffix />
+ <gwt.permutationSuffix/>
<gwt.extraJvmArgs>-Xmx512m -Xss1024k</gwt.extraJvmArgs>
<sonar.snapshotRepository.url>dav:https://dav.codehaus.org/snapshots.repository/sonar</sonar.snapshotRepository.url>
</properties>
@@ -152,6 +155,11 @@
</configuration>
</plugin>
<plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>buildnumber-maven-plugin</artifactId>
+ <version>1.0</version>
+ </plugin>
+ <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>2.4.1</version>
@@ -278,6 +286,25 @@
<plugins>
<plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>buildnumber-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>validate</phase>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <doCheck>false</doCheck>
+ <doUpdate>false</doUpdate>
+ <getRevisionOnlyOnce>true</getRevisionOnlyOnce>
+ <revisionOnScmFailure>0</revisionOnScmFailure>
+ </configuration>
+ </plugin>
+
+ <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
@@ -309,11 +336,13 @@
<onlyWhenRelease>true</onlyWhenRelease>
</requireReleaseDeps>
<requireJavaVersion>
- <message>To build this project JDK ${jdk.min.version} (or upper) is required. Please install it.</message>
+ <message>To build this project JDK ${jdk.min.version} (or upper) is required. Please install it.
+ </message>
<version>${jdk.min.version}</version>
</requireJavaVersion>
<requireMavenVersion>
- <message>To build this project Maven ${maven.min.version} (or upper) is required. Please install it.</message>
+ <message>To build this project Maven ${maven.min.version} (or upper) is required. Please install it.
+ </message>
<version>${maven.min.version}</version>
</requireMavenVersion>
<bannedDependencies>
@@ -345,7 +374,9 @@
<rules>
<requireNoRepositories>
<!-- Also see SONAR-2849 -->
- <message>The rules for repo1.maven.org are that pom.xml files should not include repository definitions.</message>
+ <message>The rules for repo1.maven.org are that pom.xml files should not include repository
+ definitions.
+ </message>
</requireNoRepositories>
</rules>
</configuration>
@@ -359,6 +390,9 @@
<archive>
<manifestEntries>
<Version>${project.version}</Version>
+ <!-- ${buildNumber} is the Git revision. It's generated by the buildnumber-maven-plugin -->
+ <Implementation-Build>${buildNumber}</Implementation-Build>
+ <Build-Time>${timestamp}</Build-Time>
</manifestEntries>
</archive>
</configuration>
@@ -467,12 +501,21 @@
<configuration>
<groupByLicense>true</groupByLicense>
<licenseMerges>
- <licenseMerge>The Apache Software License, Version 2.0|Apache License 2.0|Apache 2|Apache License Version 2|Apache License Version 2.0|Apache Public License 2.0|Apache Software License - Version 2.0|Apache Software Licenses</licenseMerge>
- <licenseMerge>GNU Lesser General Public License, Version 2.1|GNU Lesser General Public License Version 2.1|GNU Lesser General Public License (LGPL), Version 2.1</licenseMerge>
+ <licenseMerge>The Apache Software License, Version 2.0|Apache License 2.0|Apache 2|Apache License Version
+ 2|Apache License Version 2.0|Apache Public License 2.0|Apache Software License - Version 2.0|Apache
+ Software Licenses
+ </licenseMerge>
+ <licenseMerge>GNU Lesser General Public License, Version 2.1|GNU Lesser General Public License Version
+ 2.1|GNU Lesser General Public License (LGPL), Version 2.1
+ </licenseMerge>
<licenseMerge>BSD|BSD License|The BSD License</licenseMerge>
- <licenseMerge>Common Public License, Version 1.0|Common Public License - v 1.0|Common Public License Version 1.0</licenseMerge>
+ <licenseMerge>Common Public License, Version 1.0|Common Public License - v 1.0|Common Public License Version
+ 1.0
+ </licenseMerge>
<licenseMerge>Eclipse Public License, Version 1.0|Eclipse Public License - Version 1.0</licenseMerge>
- <licenseMerge>Common Development and Distribution License, Version 1.0|COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0|Common Development and Distribution License (CDDL) v1.0</licenseMerge>
+ <licenseMerge>Common Development and Distribution License, Version 1.0|COMMON DEVELOPMENT AND DISTRIBUTION
+ LICENSE (CDDL) Version 1.0|Common Development and Distribution License (CDDL) v1.0
+ </licenseMerge>
<licenseMerge>MIT License|The MIT License</licenseMerge>
</licenseMerges>
</configuration>
@@ -1096,13 +1139,14 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
- <configuration>
- <excludePackageNames>
- net.*:org.sonar.application:org.sonar.server:org.sonar.graph:org.sonar.batch:org.sonar.channel:org.sonar.java:org.sonar.maven*:org.sonar.plugins.*:org.sonar.colorizer:org.sonar.squid:org.sonar.core:org.sonar.jpa:org.sonar.duplications:org.sonar.markdown:com.*
+ <configuration>
+ <excludePackageNames>
+ net.*:org.sonar.application:org.sonar.server:org.sonar.graph:org.sonar.batch:org.sonar.channel:org.sonar.java:org.sonar.maven*:org.sonar.plugins.*:org.sonar.colorizer:org.sonar.squid:org.sonar.core:org.sonar.jpa:org.sonar.duplications:org.sonar.markdown:com.*
</excludePackageNames>
<author>false</author>
<linksource>true</linksource>
- <reportOutputDirectory>${project.reporting.outputDirectory}/${project.version}/apidocs</reportOutputDirectory>
+ <reportOutputDirectory>${project.reporting.outputDirectory}/${project.version}/apidocs
+ </reportOutputDirectory>
</configuration>
</plugin>
</plugins>
@@ -1137,7 +1181,7 @@
</goals>
</pluginExecutionFilter>
<action>
- <ignore />
+ <ignore/>
</action>
</pluginExecution>
<pluginExecution>
@@ -1150,7 +1194,7 @@
</goals>
</pluginExecutionFilter>
<action>
- <ignore />
+ <ignore/>
</action>
</pluginExecution>
<pluginExecution>
@@ -1163,7 +1207,7 @@
</goals>
</pluginExecutionFilter>
<action>
- <ignore />
+ <ignore/>
</action>
</pluginExecution>
<pluginExecution>
@@ -1177,7 +1221,7 @@
</goals>
</pluginExecutionFilter>
<action>
- <ignore />
+ <ignore/>
</action>
</pluginExecution>
<pluginExecution>
@@ -1190,7 +1234,7 @@
</goals>
</pluginExecutionFilter>
<action>
- <ignore />
+ <ignore/>
</action>
</pluginExecution>
</pluginExecutions>