Skip to content

Commit

Permalink
Merge pull request #213 from green-code-initiative/feature/ISSUE-208-…
Browse files Browse the repository at this point in the history
…-better-build

Feature/issue 208  better build
  • Loading branch information
jycr authored Oct 18, 2024
2 parents 2919991 + a0264ec commit 3dabdcc
Show file tree
Hide file tree
Showing 14 changed files with 557 additions and 59 deletions.
6 changes: 5 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@

# Ensure BAT files will always be checked out with CRLFs (regardless of the
# OS they were checked out on).
*.bat text eol=crlf
*.bat text eol=crlf

# Ensure BAT files will always be checked out with CRLFs (regardless of the
# OS they were checked out on).
*.cmd text eol=crlf
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ jobs:
restore-keys: ${{ runner.os }}-m2

- name: Verify
run: mvn -e -B verify
run: ./mvnw -e -B verify
2 changes: 1 addition & 1 deletion .github/workflows/publish_to_maven_central.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
# The `OSSRH_USERNAME` environment variable will be set with the contents of your `OSSRH_USERNAME` secret,
# and the `OSSRH_TOKEN` environment variable will be set with the contents of your `OSSRH_TOKEN` secret.
- name: Publish package
run: mvn --batch-mode deploy -Pmaven-central-publishing
run: ./mvnw --batch-mode deploy -Pmaven-central-publishing
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
!.gitignore
!.gitattributes
!.github/
!.mvn/

# Ignore generated files
target
Expand Down
7 changes: 7 additions & 0 deletions .mvn/extensions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<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">
<extension>
<groupId>me.qoomon</groupId>
<artifactId>maven-git-versioning-extension</artifactId>
<version>9.8.1</version>
</extension>
</extensions>
18 changes: 18 additions & 0 deletions .mvn/maven-git-versioning-extension.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<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">
<refs>
<ref type="branch">
<pattern>.+</pattern>
<version>${ref}-SNAPSHOT</version>
</ref>

<ref type="tag">
<pattern><![CDATA[^v?(?<version>\d+\.\d+\.\d+.*)$]]></pattern>
<version>${ref.version}</version>
</ref>
</refs>

<!-- optional fallback configuration in case of no matching ref configuration-->
<rev>
<version>${commit}</version>
</rev>
</configuration>
19 changes: 19 additions & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
wrapperVersion=3.3.2
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- [#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).

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)

### Deleted

## [1.6.4] - 2024-10-04
Expand Down
28 changes: 3 additions & 25 deletions ecocode-rules-specifications/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
<parent>
<groupId>io.ecocode</groupId>
<artifactId>ecocode-parent</artifactId>
<version>1.6.5-SNAPSHOT</version>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>ecocode-rules-specifications</artifactId>
Expand All @@ -22,15 +23,9 @@
- syntax highlighting (see code blocks on ASCIIDOC rules)
- inclusions (see: php/EC74.asciidoc)
- table data generation from CSV (see: php/EC69.asciidoc)
NB: Current version has a bug which display following false positive warning :
[WARNING] Duplicated destination found: overwriting file ...
This issue is fixed in 3.x release of asciidoctor-maven-plugin
-->
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<version>2.2.4</version>
<executions>
<execution>
<id>convert-to-html</id>
Expand All @@ -47,7 +42,7 @@
</attributes>
<preserveDirectories>true</preserveDirectories>
<embedAssets>true</embedAssets>
<headerFooter>false</headerFooter>
<standalone>false</standalone>
<relativeBaseDir>true</relativeBaseDir>
<logHandler>
<failIf>
Expand All @@ -64,7 +59,6 @@
-->
<groupId>com.github.johnpoth</groupId>
<artifactId>jshell-maven-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<id>prepare-rules-resources</id>
Expand All @@ -83,21 +77,6 @@
</configuration>
</execution>
</executions>

<dependencies>
<dependency>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-api</artifactId>
<version>2.1.2</version>
</dependency>

<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.json</artifactId>
<version>2.0.1</version>
<classifier>module</classifier>
</dependency>
</dependencies>
</plugin>
<plugin><!--
This module produce one artifact by language (with corresponding classifier)
Expand All @@ -112,7 +91,6 @@
-->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<id>assembly-java</id>
Expand Down
Loading

0 comments on commit 3dabdcc

Please sign in to comment.