Skip to content

Commit

Permalink
Add build number to manifest (ecoCode#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
utarwyn committed Nov 16, 2023
1 parent e3adbe5 commit 3d14679
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 17 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- [ecoCode#185](https://github.com/green-code-initiative/ecoCode/issues/185) Add build number to manifest

### Fixed

- [#30](https://github.com/green-code-initiative/ecoCode-javascript/issues/30) Fix typo in EC12 rule
Expand Down
59 changes: 42 additions & 17 deletions sonar-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,15 @@
<project.build.sourceEncoding>${encoding}</project.build.sourceEncoding>
<project.reporting.outputEncoding>${encoding}</project.reporting.outputEncoding>

<ecocode-rules-specifications.version>0.0.6</ecocode-rules-specifications.version>
<sonarqube.version>9.4.0.54424</sonarqube.version>
<sonar-javascript.version>9.13.0.20537</sonar-javascript.version>
<sonar-packaging.version>1.21.0.505</sonar-packaging.version>
<sonar-analyzer-commons.version>2.5.0.1358</sonar-analyzer-commons.version>
<maven-exec.version>3.1.0</maven-exec.version>
<maven-shade.version>3.4.1</maven-shade.version>
<license-maven-plugin.version>4.1</license-maven-plugin.version>
<version.ecocode-rules-specifications>0.0.6</version.ecocode-rules-specifications>
<version.sonarqube>9.4.0.54424</version.sonarqube>
<version.sonar-javascript>9.13.0.20537</version.sonar-javascript>
<version.sonar-packaging>1.23.0.740</version.sonar-packaging>
<version.sonar-analyzer-commons>2.5.0.1358</version.sonar-analyzer-commons>
<version.buildnumber>3.1.0</version.buildnumber>
<version.maven-exec>3.1.0</version.maven-exec>
<version.maven-shade>3.4.1</version.maven-shade>
<version.license-maven-plugin>4.1</version.license-maven-plugin>

<junit.version>5.9.3</junit.version>
<mockito.version>5.3.1</mockito.version>
Expand All @@ -69,29 +70,29 @@
<dependency>
<groupId>io.ecocode</groupId>
<artifactId>ecocode-rules-specifications</artifactId>
<version>${ecocode-rules-specifications.version}</version>
<version>${version.ecocode-rules-specifications}</version>
<classifier>javascript</classifier>
</dependency>

<dependency>
<groupId>org.sonarsource.sonarqube</groupId>
<artifactId>sonar-plugin-api</artifactId>
<version>${sonarqube.version}</version>
<version>${version.sonarqube}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.sonarsource.javascript</groupId>
<artifactId>sonar-javascript-plugin</artifactId>
<version>${sonar-javascript.version}</version>
<version>${version.sonar-javascript}</version>
<type>sonar-plugin</type>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.sonarsource.analyzer-commons</groupId>
<artifactId>sonar-analyzer-commons</artifactId>
<version>${sonar-analyzer-commons.version}</version>
<version>${version.sonar-analyzer-commons}</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -131,22 +132,27 @@
<plugin>
<groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
<artifactId>sonar-packaging-maven-plugin</artifactId>
<version>${sonar-packaging.version}</version>
<version>${version.sonar-packaging}</version>
<extensions>true</extensions>
<configuration>
<pluginKey>ecocodejavascript</pluginKey>
<pluginName>${project.name}</pluginName>
<pluginClass>io.ecocode.javascript.JavaScriptPlugin</pluginClass>
<sonarLintSupported>false</sonarLintSupported>
<sonarQubeMinVersion>${sonarqube.version}</sonarQubeMinVersion>
<pluginApiMinVersion>${version.sonarqube}</pluginApiMinVersion>
<skipDependenciesPackaging>true</skipDependenciesPackaging>
<jreMinVersion>${java.version}</jreMinVersion>
<archive>
<manifestEntries>
<Implementation-Build>${buildNumber}</Implementation-Build>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>${maven-shade.version}</version>
<version>${version.maven-shade}</version>
<executions>
<execution>
<phase>package</phase>
Expand Down Expand Up @@ -176,10 +182,29 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>${version.buildnumber}</version>
<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.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${maven-exec.version}</version>
<version>${version.maven-exec}</version>
<executions>
<execution>
<id>eslint-plugin-clean</id>
Expand Down Expand Up @@ -234,7 +259,7 @@
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>${license-maven-plugin.version}</version>
<version>${version.license-maven-plugin}</version>
<configuration>
<properties>
<owner>Green Code Initiative</owner>
Expand Down

0 comments on commit 3d14679

Please sign in to comment.