Skip to content

Commit

Permalink
[ISSUE 7] add build number + clean sonar-packaging-maven-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
dedece35 committed Dec 4, 2023
1 parent 39996e7 commit 7aa6570
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- [#5](https://github.com/green-code-initiative/ecoCode-python/pull/5) Upgrade licence system and licence headers of Java files
- [#6](https://github.com/green-code-initiative/ecoCode-python/pull/6) Adding EC35 rule : EC35 rule replaces EC34 with a specific use case ("file not found" sepcific)
- [#7](https://github.com/green-code-initiative/ecoCode-python/issues/7) Add build number to manifest

### Deleted

Expand Down
29 changes: 26 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@
<!-- max version with SonarQube 10.0 : check lib/extension directory -->
<sonarpython.version>4.1.0.11333</sonarpython.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>

<mockito.version>5.3.1</mockito.version>

<!-- temporary version waiting for real automatic release in ecocode repository -->
<ecocode-rules-specifications.version>0.0.6</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 @@ -184,8 +184,13 @@
<pluginName>${project.name}</pluginName>
<pluginClass>fr.greencodeinitiative.python.PythonPlugin</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>
<!-- To keep because of dependency sonar-analyzer-commons -->
Expand Down Expand Up @@ -232,6 +237,24 @@
</execution>
</executions>
</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>
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
Expand Down

0 comments on commit 7aa6570

Please sign in to comment.