test with maven project

This commit is contained in:
Slawomir Jaranowski 2021-08-28 15:16:42 +02:00
parent c6625954e0
commit 5208ed3d35
No known key found for this signature in database
GPG Key ID: F8484389379ACEAC
4 changed files with 103 additions and 2 deletions

View File

@ -28,6 +28,8 @@ jobs:
- uses: ./
with:
java-version: ${{ matrix.java }}
java-cache: maven
maven-version: ${{ matrix.maven }}
- run: mvn -v
- run: mvn -v validate -Drequire.java=${{ matrix.java }} -Drequire.maven=${{ matrix.maven }}

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
.idea
target

View File

@ -1,7 +1,7 @@
The MIT License (MIT)
Copyright (c) 2019 Slawomir Jaranowski and contributors
Copyright (c) 2021 Simplify4U and contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

97
pom.xml Normal file
View File

@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ The MIT License (MIT)
~
~ Copyright (c) 2021 Simplify4U and contributors
~
~ 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.
~
-->
<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>
<groupId>test</groupId>
<artifactId>test</artifactId>
<version>1.0.0</version>
<properties>
<require.maven/>
<require.java/>
<_require.java/>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M3</version>
<executions>
<execution>
<goals>
<goal>display-info</goal>
<goal>enforce</goal>
</goals>
<phase>validate</phase>
</execution>
</executions>
<configuration>
<rules>
<requireJavaVersion>
<version>${_require.java}</version>
</requireJavaVersion>
<requireMavenVersion>
<version>[${require.maven}]</version>
</requireMavenVersion>
</rules>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>java8-version-label</id>
<activation>
<property>
<name>require.java</name>
<value>8</value>
</property>
</activation>
<properties>
<_require.java>1.8</_require.java>
</properties>
</profile>
<profile>
<id>non-java8-version-label</id>
<activation>
<property>
<name>require.java</name>
<value>!8</value>
</property>
</activation>
<properties>
<_require.java>${require.java}</_require.java>
</properties>
</profile>
</profiles>
</project>