Skip to content

Commit

Permalink
Merge pull request #14 from green-code-initiative/ISSUE_13
Browse files Browse the repository at this point in the history
[ISSUE 13] add build number + clean sonar-packaging-maven-plugin
  • Loading branch information
dedece35 authored Dec 5, 2023
2 parents a034513 + 97b7010 commit a3e6748
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- [#9](https://github.com/green-code-initiative/ecoCode-php/pull/9) Upgrade licence system and licence headers of Java files
- [#13](https://github.com/green-code-initiative/ecoCode-php/issues/13) Add build number to manifest

### Deleted

Expand Down
30 changes: 26 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@
<!-- max version with SonarQube 10.0 : check lib/extension directory -->
<sonarjava.version>7.17.0.31219</sonarjava.version>

<sonar-packaging.version>1.21.0.505</sonar-packaging.version>
<sonar-packaging.version>1.23.0.740</sonar-packaging.version>
<sonar.skipDependenciesPackaging>true</sonar.skipDependenciesPackaging>

<junit.jupiter.version>5.9.1</junit.jupiter.version>
<assertJ.version>3.23.1</assertJ.version>
<mockito.version>5.3.1</mockito.version>

<!-- temporary version waiting for real automatic release in ecocode repository -->
<ecocode-rules-specifications.version>0.0.2</ecocode-rules-specifications.version>
<ecocode-rules-specifications.version>0.0.7</ecocode-rules-specifications.version>

<sonar-analyzer-commons.version>2.5.0.1358</sonar-analyzer-commons.version>

Expand Down Expand Up @@ -200,11 +200,33 @@
<extensions>true</extensions>
<configuration>
<pluginKey>ecocodephp</pluginKey>
<pluginName>${project.name}</pluginName>
<pluginClass>fr.greencodeinitiative.php.PHPPlugin</pluginClass>
<sonarLintSupported>true</sonarLintSupported>
<sonarQubeMinVersion>${sonarqube.version}</sonarQubeMinVersion>
<pluginApiMinVersion>${sonarqube.version}</pluginApiMinVersion>
<jreMinVersion>${java.version}</jreMinVersion>
<archive>
<manifestEntries>
<Implementation-Build>${buildNumber}</Implementation-Build>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<!-- plugin to generate a unique build number for sonar-packaging-maven-plugin : usage of buildNumber variable -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<getRevisionOnlyOnce>true</getRevisionOnlyOnce>
<revisionOnScmFailure>0</revisionOnScmFailure>
</configuration>
</plugin>
<!-- To keep because of dependency sonar-analyzer-commons -->
Expand Down

0 comments on commit a3e6748

Please sign in to comment.