Skip to content

Commit 4cdeb92

Browse files
authored
Merge pull request #8 from green-code-initiative/ISSUE_7
[ISSUE 7] add build number + clean sonar-packaging-maven-plugin
2 parents 39996e7 + e0a17a8 commit 4cdeb92

File tree

2 files changed

+27
-4
lines changed

2 files changed

+27
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
- [#5](https://github.com/green-code-initiative/ecoCode-python/pull/5) Upgrade licence system and licence headers of Java files
1515
- [#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)
16+
- [#7](https://github.com/green-code-initiative/ecoCode-python/issues/7) Add build number to manifest
1617

1718
### Deleted
1819

pom.xml

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@
5353
<!-- max version with SonarQube 10.0 : check lib/extension directory -->
5454
<sonarpython.version>4.1.0.11333</sonarpython.version>
5555

56-
<sonar-packaging.version>1.21.0.505</sonar-packaging.version>
56+
<sonar-packaging.version>1.23.0.740</sonar-packaging.version>
5757
<sonar.skipDependenciesPackaging>true</sonar.skipDependenciesPackaging>
5858

5959
<mockito.version>5.3.1</mockito.version>
6060

6161
<!-- temporary version waiting for real automatic release in ecocode repository -->
62-
<ecocode-rules-specifications.version>0.0.6</ecocode-rules-specifications.version>
62+
<ecocode-rules-specifications.version>0.0.7</ecocode-rules-specifications.version>
6363

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

@@ -181,11 +181,15 @@
181181
<extensions>true</extensions>
182182
<configuration>
183183
<pluginKey>ecocodepython</pluginKey>
184-
<pluginName>${project.name}</pluginName>
185184
<pluginClass>fr.greencodeinitiative.python.PythonPlugin</pluginClass>
186185
<sonarLintSupported>true</sonarLintSupported>
187-
<sonarQubeMinVersion>${sonarqube.version}</sonarQubeMinVersion>
186+
<pluginApiMinVersion>${sonarqube.version}</pluginApiMinVersion>
188187
<jreMinVersion>${java.version}</jreMinVersion>
188+
<archive>
189+
<manifestEntries>
190+
<Implementation-Build>${buildNumber}</Implementation-Build>
191+
</manifestEntries>
192+
</archive>
189193
</configuration>
190194
</plugin>
191195
<!-- To keep because of dependency sonar-analyzer-commons -->
@@ -232,6 +236,24 @@
232236
</execution>
233237
</executions>
234238
</plugin>
239+
<plugin>
240+
<!-- plugin to generate a unique build number for sonar-packaging-maven-plugin : usage of buildNumber variable -->
241+
<groupId>org.codehaus.mojo</groupId>
242+
<artifactId>buildnumber-maven-plugin</artifactId>
243+
<version>3.1.0</version>
244+
<executions>
245+
<execution>
246+
<phase>validate</phase>
247+
<goals>
248+
<goal>create</goal>
249+
</goals>
250+
</execution>
251+
</executions>
252+
<configuration>
253+
<getRevisionOnlyOnce>true</getRevisionOnlyOnce>
254+
<revisionOnScmFailure>0</revisionOnScmFailure>
255+
</configuration>
256+
</plugin>
235257
<plugin>
236258
<groupId>com.mycila</groupId>
237259
<artifactId>license-maven-plugin</artifactId>

0 commit comments

Comments
 (0)