mirror of
https://github.com/SonarSource/sonarqube.git
synced 2024-08-08 03:05:57 +02:00
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
This commit is contained in:
parent
fc5ebaadb3
commit
7b182dfb4b
80
pom.xml
80
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>
|
||||
@ -151,6 +154,11 @@
|
||||
</archiverConfig>
|
||||
</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>
|
||||
@ -277,6 +285,25 @@
|
||||
</pluginManagement>
|
||||
|
||||
<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>
|
||||
@ -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>
|
||||
|
@ -308,7 +308,10 @@
|
||||
</warSourceExcludes>
|
||||
<archive>
|
||||
<manifestEntries>
|
||||
<version>${project.version}</version>
|
||||
<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>
|
||||
|
Loading…
Reference in New Issue
Block a user