This is an automated email from the ASF dual-hosted git repository. kdoran pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/nifi-maven.git
The following commit(s) were added to refs/heads/main by this push: new c33e500 NIFI-11283 Add GitHub Actions build workflow (#32) c33e500 is described below commit c33e5003f22e238328021822a3819fac830f02f5 Author: exceptionfactory <exceptionfact...@apache.org> AuthorDate: Wed Mar 15 11:27:12 2023 -0500 NIFI-11283 Add GitHub Actions build workflow (#32) * NIFI-11283 Added GitHub Actions build workflow - Set minimum Java version to 1.8.0-251 - Set minimum Maven version to 3.6.3 - Updated Apache Parent POM to 29 - Removed unnecessary plugin version overrides - Upgraded Mockito to 4.11.0 - Moved Checkstyle and Apache RAT plugins to standard build * NIFI-11283 Added push to branches for initial workflow Signed-off-by: Kevin Doran <kdo...@apache.org> --- .github/workflows/build.yml | 43 +++++++++++ README.md | 9 ++- pom.xml | 184 ++++++++++---------------------------------- 3 files changed, 90 insertions(+), 146 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..ed3de84 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,43 @@ +# 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. +name: build + +on: + push: + branches: + - main + - NIFI-11283 + pull_request: + branches: + - main + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout Sources + uses: actions/checkout@v3 + - name: Setup Java JDK + uses: actions/setup-java@v3 + with: + java-version: '8' + distribution: 'zulu' + cache: 'maven' + - name: Build + run: mvn --batch-mode --update-snapshots verify diff --git a/README.md b/README.md index e939cc9..295a696 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,8 @@ --> # Apache NiFi NAR Maven Plugin +[![build](https://github.com/apache/nifi-maven/actions/workflows/build.yml/badge.svg)](https://github.com/apache/nifi-maven/actions/workflows/build.yml) + Apache NiFi NAR Maven Plugin helps to build NiFi Archive bundles to support the classloader isolation model of NiFi. ## Table of Contents @@ -23,9 +25,10 @@ Apache NiFi NAR Maven Plugin helps to build NiFi Archive bundles to support the - [Getting Help](#getting-help) - [License](#license) -## Requirements -* JDK 1.8 or higher -* Apache Maven 3.1.0 or higher +## Minimum Requirements + +* JDK 1.8.0-251 +* Apache Maven 3.6.3 ## Getting Started diff --git a/pom.xml b/pom.xml index 873330e..25f85a7 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ <parent> <groupId>org.apache</groupId> <artifactId>apache</artifactId> - <version>25</version> + <version>29</version> <relativePath /> </parent> <groupId>org.apache.nifi</groupId> @@ -60,9 +60,6 @@ <archive>http://mail-archives.apache.org/mod_mbox/nifi-commits</archive> </mailingList> </mailingLists> - <prerequisites> - <maven>${maven.min-version}</maven> - </prerequisites> <scm> <connection>scm:git:git://git.apache.org/nifi-maven.git</connection> <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/nifi-maven.git</developerConnection> @@ -74,75 +71,32 @@ <url>https://issues.apache.org/jira/browse/NIFI</url> </issueManagement> <properties> + <!-- Set minimum Java version for maven-enforcer-plugin from parent POM --> + <minimalJavaBuildVersion>1.8.0-251</minimalJavaBuildVersion> + <!-- Set minimum Maven version for maven-enforcer-plugin from parent POM --> + <minimalMavenBuildVersion>3.6.3</minimalMavenBuildVersion> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> - <maven.min-version>3.6.3</maven.min-version> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.build.outputTimestamp>2023-03-08T15:05:37Z</project.build.outputTimestamp> <inceptionYear>2014</inceptionYear> + <mockito.version>4.11.0</mockito.version> + <junit.version>5.9.2</junit.version> + <slf4j.version>2.0.6</slf4j.version> </properties> <build> <pluginManagement> <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>3.2</version> - <configuration> - <fork>true</fork> - <optimize>true</optimize> - <showDeprecation>true</showDeprecation> - <showWarnings>true</showWarnings> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <version>2.9</version> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-resources-plugin</artifactId> - <version>2.7</version> - </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>3.0.0-M8</version> - <configuration> - <redirectTestOutputToFile>true</redirectTestOutputToFile> - <argLine>-Xmx1G</argLine> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-source-plugin</artifactId> - <version>3.2.1</version> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <version>3.2.2</version> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-javadoc-plugin</artifactId> - <version>2.10.1</version> - <configuration> - <failOnError>false</failOnError> - <quiet>true</quiet> - <show>private</show> - <encoding>UTF-8</encoding> - <quiet>true</quiet> - <javadocVersion>1.7</javadocVersion> - <additionalJOption>-J-Xmx512m</additionalJOption> - </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> - <version>3.0.0-M5</version> + <version>3.0.0-M7</version> <configuration> <useReleaseProfile>false</useReleaseProfile> <releaseProfiles>apache-release</releaseProfiles> @@ -167,7 +121,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> - <version>3.2.0</version> + <version>3.2.1</version> <dependencies> <dependency> <groupId>com.puppycrawl.tools</groupId> @@ -189,41 +143,22 @@ <nexusUrl>https://repository.apache.org/</nexusUrl> </configuration> </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-enforcer-plugin</artifactId> - <executions> - <execution> - <id>enforce-maven</id> - <goals> - <goal>enforce</goal> - </goals> - <configuration> - <rules> - <requireSameVersions> - <plugins> - <plugin>org.apache.maven.plugins:maven-surefire-plugin</plugin> - <plugin>org.apache.maven.plugins:maven-failsafe-plugin</plugin> - <plugin>org.apache.maven.plugins:maven-surefire-report-plugin</plugin> - </plugins> - </requireSameVersions> - <requireMavenVersion> - <version>${maven.min-version}</version> - </requireMavenVersion> - </rules> - </configuration> - </execution> - </executions> - </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> <configuration> <configLocation>checkstyle.xml</configLocation> - <violationSeverity>warning</violationSeverity> <includeTestSourceDirectory>true</includeTestSourceDirectory> <excludes>**/HelpMojo.java</excludes> </configuration> + <executions> + <execution> + <id>check</id> + <goals> + <goal>check</goal> + </goals> + </execution> + </executions> </plugin> <plugin> <groupId>org.apache.rat</groupId> @@ -235,20 +170,14 @@ <exclude>DEPENDENCIES</exclude> <!-- auto generated file by apache's maven config while building sources.zip --> </excludes> </configuration> - <dependencies> - <!-- workaround for RAT-158 --> - <dependency> - <groupId>org.apache.maven.doxia</groupId> - <artifactId>doxia-core</artifactId> - <version>1.6</version> - <exclusions> - <exclusion> - <groupId>xerces</groupId> - <artifactId>xercesImpl</artifactId> - </exclusion> - </exclusions> - </dependency> - </dependencies> + <executions> + <execution> + <goals> + <goal>check</goal> + </goals> + <phase>verify</phase> + </execution> + </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -328,8 +257,6 @@ <version>3.2.1</version> </dependency> <dependency> - <!-- No code from maven-jar-plugin is actually used; it's included - just to simplify the dependencies list. --> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>3.3.0</version> @@ -344,61 +271,32 @@ <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter</artifactId> - <version>5.9.2</version> + <version>${junit.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> - <version>3.12.4</version> + <version>${mockito.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-junit-jupiter</artifactId> - <version>3.12.4</version> + <version>${mockito.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>${slf4j.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-nop</artifactId> + <version>${slf4j.version}</version> <scope>test</scope> </dependency> </dependencies> - <profiles> - <profile> - <!-- - Checks style and licensing requirements. This is a good idea to - run for contributions and for the release process. While it - would be nice to run always these plugins can considerably slow - the build and have proven to create unstable builds in our - multi-module project and when building using multiple threads. - The stability issues seen with Checkstyle in multi-module builds - include false-positives and false negatives.--> - <id>contrib-check</id> - <build> - <plugins> - <plugin> - <groupId>org.apache.rat</groupId> - <artifactId>apache-rat-plugin</artifactId> - <executions> - <execution> - <goals> - <goal>check</goal> - </goals> - <phase>verify</phase> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-checkstyle-plugin</artifactId> - <executions> - <execution> - <id>check-style</id> - <goals> - <goal>check</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> - </profiles> </project>