Skip to content

Commit 3dabdcc

Browse files
authored
Merge pull request #213 from green-code-initiative/feature/ISSUE-208--better-build
Feature/issue 208 better build
2 parents 2919991 + a0264ec commit 3dabdcc

File tree

14 files changed

+557
-59
lines changed

14 files changed

+557
-59
lines changed

.gitattributes

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@
44

55
# Ensure BAT files will always be checked out with CRLFs (regardless of the
66
# OS they were checked out on).
7-
*.bat text eol=crlf
7+
*.bat text eol=crlf
8+
9+
# Ensure BAT files will always be checked out with CRLFs (regardless of the
10+
# OS they were checked out on).
11+
*.cmd text eol=crlf

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ jobs:
3838
restore-keys: ${{ runner.os }}-m2
3939

4040
- name: Verify
41-
run: mvn -e -B verify
41+
run: ./mvnw -e -B verify

.github/workflows/publish_to_maven_central.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
# The `OSSRH_USERNAME` environment variable will be set with the contents of your `OSSRH_USERNAME` secret,
5050
# and the `OSSRH_TOKEN` environment variable will be set with the contents of your `OSSRH_TOKEN` secret.
5151
- name: Publish package
52-
run: mvn --batch-mode deploy -Pmaven-central-publishing
52+
run: ./mvnw --batch-mode deploy -Pmaven-central-publishing
5353
env:
5454
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
5555
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
!.gitignore
44
!.gitattributes
55
!.github/
6+
!.mvn/
67

78
# Ignore generated files
89
target

.mvn/extensions.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 https://maven.apache.org/xsd/core-extensions-1.0.0.xsd">
2+
<extension>
3+
<groupId>me.qoomon</groupId>
4+
<artifactId>maven-git-versioning-extension</artifactId>
5+
<version>9.8.1</version>
6+
</extension>
7+
</extensions>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://github.com/qoomon/maven-git-versioning-extension" xsi:schemaLocation="https://github.com/qoomon/maven-git-versioning-extension https://qoomon.github.io/maven-git-versioning-extension/configuration-7.0.0.xsd">
2+
<refs>
3+
<ref type="branch">
4+
<pattern>.+</pattern>
5+
<version>${ref}-SNAPSHOT</version>
6+
</ref>
7+
8+
<ref type="tag">
9+
<pattern><![CDATA[^v?(?<version>\d+\.\d+\.\d+.*)$]]></pattern>
10+
<version>${ref.version}</version>
11+
</ref>
12+
</refs>
13+
14+
<!-- optional fallback configuration in case of no matching ref configuration-->
15+
<rev>
16+
<version>${commit}</version>
17+
</rev>
18+
</configuration>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
wrapperVersion=3.3.2
18+
distributionType=only-script
19+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
### Changed
1313

14+
- [#208](https://github.com/green-code-initiative/ecoCode/issues/208) Improves build process with [Maven Wrapper](https://maven.apache.org/wrapper/) and simplifies release management (now, just need to do a build on a tag checkout).
15+
16+
If you have difficulties on some IDEs (like IntelliJ IDEA), you can follow the procedure: [configuration for Multi Modules Project](https://github.com/qoomon/maven-git-versioning-extension?tab=readme-ov-file#intellij---multi-modules-projects)
17+
1418
### Deleted
1519

1620
## [1.6.4] - 2024-10-04

ecocode-rules-specifications/pom.xml

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
<parent>
66
<groupId>io.ecocode</groupId>
77
<artifactId>ecocode-parent</artifactId>
8-
<version>1.6.5-SNAPSHOT</version>
8+
<version>${revision}</version>
9+
<relativePath>../pom.xml</relativePath>
910
</parent>
1011

1112
<artifactId>ecocode-rules-specifications</artifactId>
@@ -22,15 +23,9 @@
2223
- syntax highlighting (see code blocks on ASCIIDOC rules)
2324
- inclusions (see: php/EC74.asciidoc)
2425
- table data generation from CSV (see: php/EC69.asciidoc)
25-
26-
NB: Current version has a bug which display following false positive warning :
27-
[WARNING] Duplicated destination found: overwriting file ...
28-
29-
This issue is fixed in 3.x release of asciidoctor-maven-plugin
3026
-->
3127
<groupId>org.asciidoctor</groupId>
3228
<artifactId>asciidoctor-maven-plugin</artifactId>
33-
<version>2.2.4</version>
3429
<executions>
3530
<execution>
3631
<id>convert-to-html</id>
@@ -47,7 +42,7 @@
4742
</attributes>
4843
<preserveDirectories>true</preserveDirectories>
4944
<embedAssets>true</embedAssets>
50-
<headerFooter>false</headerFooter>
45+
<standalone>false</standalone>
5146
<relativeBaseDir>true</relativeBaseDir>
5247
<logHandler>
5348
<failIf>
@@ -64,7 +59,6 @@
6459
-->
6560
<groupId>com.github.johnpoth</groupId>
6661
<artifactId>jshell-maven-plugin</artifactId>
67-
<version>1.4</version>
6862
<executions>
6963
<execution>
7064
<id>prepare-rules-resources</id>
@@ -83,21 +77,6 @@
8377
</configuration>
8478
</execution>
8579
</executions>
86-
87-
<dependencies>
88-
<dependency>
89-
<groupId>jakarta.json</groupId>
90-
<artifactId>jakarta.json-api</artifactId>
91-
<version>2.1.2</version>
92-
</dependency>
93-
94-
<dependency>
95-
<groupId>org.glassfish</groupId>
96-
<artifactId>jakarta.json</artifactId>
97-
<version>2.0.1</version>
98-
<classifier>module</classifier>
99-
</dependency>
100-
</dependencies>
10180
</plugin>
10281
<plugin><!--
10382
This module produce one artifact by language (with corresponding classifier)
@@ -112,7 +91,6 @@
11291
-->
11392
<groupId>org.apache.maven.plugins</groupId>
11493
<artifactId>maven-assembly-plugin</artifactId>
115-
<version>3.6.0</version>
11694
<executions>
11795
<execution>
11896
<id>assembly-java</id>

0 commit comments

Comments
 (0)