Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Versioning, release on push to main branch, build caches #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2
updates:

- package-ecosystem: github-actions
directory: "/"
target-branch: develop
schedule:
interval: "daily"

- package-ecosystem: maven
directory: "/"
target-branch: develop
schedule:
interval: "daily"
21 changes: 17 additions & 4 deletions .github/workflows/maven-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
name: Release

on:
release:
types:
- released
push:
branches:
- main

jobs:
release:
Expand All @@ -15,10 +15,23 @@ jobs:
- uses: actions/checkout@v2

- name: Set up JDK
uses: actions/setup-java@v1
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: 7

- name: Cache Maven Packages
uses: actions/cache@v2
with:
# be careful not to include ~/.m2/settings.xml which contains credentials
path: |
~/.m2/repository
~/.m2/wrapper
key: m2-release-${{ hashFiles('**/pom.xml', '.mvn/*.xml') }}
restore-keys: |
m2-release
m2

- name: Set up Maven settings.xml to access Sonatype Nexus
run: |
echo '
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/maven-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,23 @@ jobs:
- uses: actions/checkout@v2

- name: Set up JDK
uses: actions/setup-java@v1
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: ${{ matrix.java-version }}

- name: Cache Maven Packages
uses: actions/cache@v2
with:
# be careful not to include ~/.m2/settings.xml which contains credentials
path: |
~/.m2/repository
~/.m2/wrapper
key: m2-tests-${{ hashFiles('**/pom.xml', '.mvn/*.xml') }}
restore-keys: |
m2-tests
m2

- name: Initialize
run: bash mvnw initialize -B

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
*.iml
target
.mvn/wrapper/maven-wrapper.jar
10 changes: 10 additions & 0 deletions .mvn/extensions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<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>6.4.4</version>
</extension>

</extensions>
15 changes: 15 additions & 0 deletions .mvn/maven-git-versioning-extension.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<configuration xmlns="https://github.com/qoomon/maven-git-versioning-extension" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://github.com/qoomon/maven-git-versioning-extension https://qoomon.github.io/maven-git-versioning-extension/configuration-6.4.0.xsd">
<updatePom>false</updatePom>
<branch>
<pattern>main</pattern>
<versionFormat>${commit.timestamp.year}.${commit.timestamp.month}.${commit.timestamp.day}</versionFormat>
</branch>
<branch>
<pattern>.*</pattern>
<versionFormat>${commit.timestamp.year}.${commit.timestamp.month}.${commit.timestamp.day}-${branch.slug}-SNAPSHOT</versionFormat>
</branch>
<commit>
<versionFormat>${commit.timestamp.year}.${commit.timestamp.month}.${commit.timestamp.day}-${commit.short}-SNAPSHOT</versionFormat>
</commit>
</configuration>
107 changes: 0 additions & 107 deletions .mvn/wrapper/MavenWrapperDownloader.java

This file was deleted.

Binary file removed .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,8 @@ Then build:

`mvn clean install`

## IntelliJ IDEA

This project uses [maven-git-versioning-extension](https://github.com/qoomon/maven-git-versioning-extension)
to set project version automatically.
Check its [intellij-setup](https://github.com/qoomon/maven-git-versioning-extension#intellij-setup) documentation.
2 changes: 1 addition & 1 deletion lombok-presence-checker-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<groupId>com.github.kokorin.lombok</groupId>
<artifactId>lombok-presence-checker-example</artifactId>
<version>0.0.1</version>
<version>0</version>

<description>Lombok Presence Checker example</description>

Expand Down
2 changes: 1 addition & 1 deletion lombok-presence-checker-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>lombok-presence-checker-parent</artifactId>
<groupId>com.github.kokorin.lombok</groupId>
<version>0.0.1</version>
<version>0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion lombok-presence-checker/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>lombok-presence-checker-parent</artifactId>
<groupId>com.github.kokorin.lombok</groupId>
<version>0.0.1</version>
<version>0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
6 changes: 5 additions & 1 deletion lombok-unshaded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@
<parent>
<artifactId>lombok-presence-checker-parent</artifactId>
<groupId>com.github.kokorin.lombok</groupId>
<version>0.0.1</version>
<version>0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<groupId>org.projectlombok</groupId>
<artifactId>lombok-unshaded</artifactId>
<version>${lombok.version}</version>

<properties>
<versioning.disable>true</versioning.disable>
</properties>

<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
Expand Down
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
<groupId>com.github.kokorin.lombok</groupId>
<artifactId>lombok-presence-checker-parent</artifactId>
<packaging>pom</packaging>
<version>0.0.1</version>
<!--Version is controlled by maven-git-versioning-extension -->
<version>0</version>

<name>lombok-presence-checker</name>
<description>Lombok extension which generates Presence Checker methods</description>
Expand Down