Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jschwarz-eitco-de authored Jul 18, 2024
0 parents commit ec5c6fa
Show file tree
Hide file tree
Showing 9 changed files with 308 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: deploy commits
on:
push: { }
pull_request: { }

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: eitco/[email protected]
with:
gpg-private-key: ${{ secrets.ARTIFACT_SIGNING_GPG_PRIVATE_KEY }}
gpg-key-name: ${{ secrets.ARTIFACT_SIGNING_GPG_KEY_NAME }}
gpg-passphrase: ${{ secrets.ARTIFACT_SIGNING_GPG_PRIVATE_KEY_PASSWORD }}
deploy-user: ${{ secrets.DEPLOY_USER_GITHUB_PACKAGES }}
deploy-password: ${{ secrets.DEPLOY_TOKEN_GITHUB_PACKAGES }}
16 changes: 16 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: release

on:
workflow_dispatch

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: eitco/[email protected]
with:
gpg-private-key: ${{ secrets.ARTIFACT_SIGNING_GPG_PRIVATE_KEY }}
gpg-key-name: ${{ secrets.ARTIFACT_SIGNING_GPG_KEY_NAME }}
gpg-passphrase: ${{ secrets.ARTIFACT_SIGNING_GPG_PRIVATE_KEY_PASSWORD }}
deploy-user: ${{ secrets.OSSRH_JIRA_USERNAME }}
deploy-password: ${{ secrets.OSSRH_JIRA_PASSWORD }}
32 changes: 32 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties

# Avoid ignoring Maven wrapper jar file (.jar files are usually ignored)
!/.mvn/wrapper/maven-wrapper.jar

# IntelliJ project files
!/.idea
/.idea/*
!/.idea/runConfigurations
*.iml

# eclipse
*.project
*.classpath

.angular
node/
node_modules/
package.json
package-lock.json
tsconfig.json
tsconfig.spec.json

test/system-test/keycloak/
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 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd">

<extension>
<groupId>me.qoomon</groupId>
<artifactId>maven-git-versioning-extension</artifactId>
<version>9.8.0</version>
</extension>

</extensions>
115 changes: 115 additions & 0 deletions .mvn/maven-git-versioning-extension.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
<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-9.4.0.xsd">

<refs considerTagsOnBranches="true">
<ref type="tag">
<pattern><![CDATA[(?<tag>[0-9]+\.[0-9]+\.[0-9]+)]]></pattern>
<version>${ref.tag}</version>
<properties>
<version.original>${version}</version.original>
<version.numeric>${ref.tag}</version.numeric>
<version.symbolic>latest</version.symbolic>
<version.semantic>${ref.tag}</version.semantic>
<scm.branch>${ref.slug}</scm.branch>
<version.unique>${ref.tag}</version.unique>
</properties>
</ref>
<ref type="branch">
<pattern><![CDATA[lts-(?<lts>(.*))-development]]></pattern>
<version>lts-${ref.lts}-development-SNAPSHOT</version>
<properties>
<version.original>${version}</version.original>
<version.numeric>${version.release}</version.numeric>
<version.symbolic>${ref.lts}-development-SNAPSHOT</version.symbolic>
<version.semantic>${version.release}-${ref.lts}-development-SNAPSHOT</version.semantic>
<scm.branch>${ref.slug}</scm.branch>
<version.unique>${version.release}-${ref.lts}-development-build.${build.number}</version.unique>
</properties>
</ref>
<ref type="branch">
<pattern>main</pattern>
<version>${version}</version>
<properties>
<version.original>${version}</version.original>
<version.numeric>${version.release}</version.numeric>
<version.symbolic>main-SNAPSHOT</version.symbolic>
<version.semantic>${version}</version.semantic>
<scm.branch>${ref.slug}</scm.branch>
<version.unique>${version}-build.${build.number}</version.unique>
</properties>
</ref>
<ref type="branch">
<pattern><![CDATA[lts-(?<ltsName>(.*))]]></pattern>
<version>${version}</version>
<properties>
<version.original>${version}</version.original>
<version.numeric>${version.release}</version.numeric>
<version.symbolic>${ref.ltsName}-SNAPSHOT</version.symbolic>
<version.semantic>${version}</version.semantic>
<scm.branch>${ref.slug}</scm.branch>
<version.unique>${version.release}-build.${build.number}</version.unique>
</properties>
</ref>
<ref type="branch">
<pattern><![CDATA[((feature|bugfix)/)?(?<feature>[a-zA-Z][a-zA-Z][a-zA-Z]*-[0-9]+).*]]></pattern>
<version>${ref.feature}-SNAPSHOT</version>
<properties>
<version.original>${version}</version.original>
<version.numeric>${version.release}</version.numeric>
<version.symbolic>${ref.feature}-SNAPSHOT</version.symbolic>
<version.semantic>${version.release}-${ref.feature}-SNAPSHOT</version.semantic>
<scm.branch>${ref.slug}</scm.branch>
<version.unique>${version.release}-${ref.feature}-build.${build.number}</version.unique>
</properties>
</ref>
<ref type="branch">
<pattern><![CDATA[(feature|bugfix)/(?<feature>.+)]]></pattern>
<version>${ref.feature}-SNAPSHOT</version>
<properties>
<version.original>${version}</version.original>
<version.numeric>${version.release}</version.numeric>
<version.symbolic>${ref.feature}-SNAPSHOT</version.symbolic>
<version.semantic>${version.release}-${ref.feature}-SNAPSHOT</version.semantic>
<scm.branch>${ref.slug}</scm.branch>
<version.unique>${version.release}-${ref.feature}-build.${build.number}</version.unique>
</properties>
</ref>
<ref type="branch">
<pattern><![CDATA[(?<branch>.+)]]></pattern>
<version>${ref.branch}-SNAPSHOT</version>
<properties>
<version.original>${version}</version.original>
<version.numeric>${version.release}</version.numeric>
<version.symbolic>${ref.branch}-SNAPSHOT</version.symbolic>
<version.semantic>${version.release}-${ref.branch}-SNAPSHOT</version.semantic>
<scm.branch>${ref.slug}</scm.branch>
<version.unique>${version.release}-${ref.branch}-build.${build.number}</version.unique>
</properties>
</ref>
<ref type="tag">
<pattern><![CDATA[(?<tag>.+)]]></pattern>
<version>${ref.tag}</version>
<properties>
<version.original>${version}</version.original>
<version.numeric>${version.release}</version.numeric>
<version.symbolic>${ref.tag}-SNAPSHOT</version.symbolic>
<version.semantic>${version.release}-${ref.tag}-SNAPSHOT</version.semantic>
<scm.branch>${ref.slug}</scm.branch>
<version.unique>${version.release}-${ref.tag}-build.${build.number}</version.unique>
</properties>
</ref>
</refs>
<rev>
<version>${version.release}-${commit}-SNAPSHOT</version>
<properties>
<version.original>${version}</version.original>
<version.numeric>${version.release}</version.numeric>
<version.symbolic>${commit}-SNAPSHOT</version.symbolic>
<version.semantic>${version.release}-${commit}-SNAPSHOT</version.semantic>
<scm.branch>${commit}</scm.branch>
<version.unique>${version.release}-${commit}-build.${build.number}</version.unique>
</properties>
</rev>

</configuration>
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 European IT Consultancy EITCO GmbH

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@

[![License](https://img.shields.io/github/license/eitco/bom-maven-plugin.svg?style=for-the-badge)](https://opensource.org/license/mit)


<!-- TODO: this is the documentation for the eitco github maven project template - it will however be generated with
a project if used. In your project simply replace the content of this file with the documentation of your project.
consider the following additional badges (and adapt them for your project):
[![Build status](https://img.shields.io/github/actions/workflow/status/eitco/<your github project name>/deploy.yaml?branch=main&style=for-the-badge&logo=github)](https://github.com/eitco/<your github project name>/actions/workflows/deploy.yaml)
[![Maven Central Version](https://img.shields.io/maven-central/v/<groupId>/<artifactId>?style=for-the-badge&logo=apachemaven)](https://central.sonatype.com/artifact/<groupId>/<artifactId>)
also check whether the license badge link points to the correct license.
-->

# eitco maven project template

This [github template repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template)
contains a basic maven project ready for the eitco open source ci. It contains:

# README.md

This readme, you are currently viewing. In a generated project it needs to be replaced. See the TODO-commentary for
some ideas.

# LICENSE

By default, eitco open source software is licensed under the [MIT license](https://opensource.org/license/mit).
To change this, simply replace this file

# continuous integration

The directories `.github` and `deployment` contain the CI. While the directory `.github` contains actions that build
each commit and release the project on demand, the directory `deployment` contains configuration for the release.
A lot of the build however is configured by the project object model (pom.xml).

# pom.xml

This file specifies the build for your project. Make sure to adapt it according to the TODOs. A lot of the
CI is inherited from the [`eitco-oss-parent`](https://github.com/eitco/eitco-oss-parent) pom.

# .mvn

The `.mvn` directory activates and configures the `maven-git-versioning-extension`. This extension changes the
projects version depending on the current branch. This way every branch can be deployed without their artifacts
overriding each other.
13 changes: 13 additions & 0 deletions deployment/global-settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

<servers>
<server>
<id>ossrh</id>
<username>${env.OSSRH_JIRA_USERNAME}</username>
<password>${env.OSSRH_JIRA_PASSWORD}</password>
</server>
</servers>

</settings>
40 changes: 40 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>de.eitco</groupId>
<artifactId>eitco-oss-parent</artifactId>
<version>0.0.7</version>
</parent>


<!-- TODO: replace with your coordinates -->
<groupId>de.eitco</groupId>
<artifactId>eitco-maven-template</artifactId>
<version>0.0.1-SNAPSHOT</version>

<developers>
<!-- TODO: add developers concerned -->
</developers>

<scm>
<!-- TODO: replace with your repository url -->
<url>https://github.com/eitco/maven-template.git</url>
<connection>scm:git:https://github.com/eitco/maven-template.git</connection>
<developerConnection>scm:git:https://github.com/eitco/maven-template.git</developerConnection>
</scm>

<build>
<plugins>
<plugin>
<artifactId>maven-release-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
</plugin>
</plugins>
</build>

</project>

0 comments on commit ec5c6fa

Please sign in to comment.