Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE 13] add build number + clean sonar-packaging-maven-plugin #14

Merged
merged 1 commit into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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