diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml new file mode 100644 index 0000000..868ecef --- /dev/null +++ b/.github/workflows/maven-build.yml @@ -0,0 +1,36 @@ +# Build validation + +name: Build + +on: + push: + branches-ignore: + - master + - experimental/** + pull_request: + types: [opened, synchronize, reopened] + branches-ignore: + - master + - experimental/** + workflow_dispatch: + +jobs: + build: + + runs-on: ${{ matrix.os }} + strategy: + matrix: + java: [11, 17, 21] + os: [ubuntu-latest] + distribution: [temurin] + + steps: + - name: Maven Build with SonarCloud + uses: wcm-io-devops/github-action-maven-build-sonar@v1 + with: + os: ${{ matrix.os }} + java-version: ${{ matrix.java }} + sonar-run-on-os: ubuntu-latest + sonar-run-on-java-version: 17 + sonar-token: ${{ secrets.SONAR_TOKEN }} + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/maven-deploy.yml b/.github/workflows/maven-deploy.yml new file mode 100644 index 0000000..0f2ea2d --- /dev/null +++ b/.github/workflows/maven-deploy.yml @@ -0,0 +1,36 @@ +# Deploy snapshots to Sonatype OSS repository and deploy site to GitHub Pages + +name: Deploy + +on: + push: + branches: + - develop + workflow_dispatch: + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Configure GIT + run: | + git config --global user.email "${{ secrets.GH_SITE_DEPLOY_EMAIL }}" + git config --global user.name "${{ secrets.GH_SITE_DEPLOY_NAME }}" + + - name: Setup JDK + uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 11 + cache: maven + + - name: Build, verify, deploy + env: + SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + run: mvn -s ./.maven-settings.xml -Pcontinuous-integration -B -U clean deploy diff --git a/.github/workflows/release-from-tag.yml b/.github/workflows/release-from-tag.yml new file mode 100644 index 0000000..105be5e --- /dev/null +++ b/.github/workflows/release-from-tag.yml @@ -0,0 +1,18 @@ +name: Release from Tag + +on: + push: + tags: + - '*' + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + - uses: ncipollo/release-action@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 956ee98..cb0de5f 100644 --- a/.gitignore +++ b/.gitignore @@ -16,14 +16,19 @@ npm-debug.log .settings .externalToolBuilders .pmd +.eclipse-pmd .checkstyle .idea .vagrant *.iml .DS_Store +*.retry .rubygems .sass-cache .rubygems-gem-maven-plugin *.sublime-* *nbactions*.xml .temp/ +.vlt +.vlt-sync* +.brackets.json diff --git a/.travis.maven-settings.xml b/.maven-settings.xml similarity index 75% rename from .travis.maven-settings.xml rename to .maven-settings.xml index d071cfd..fb12e79 100644 --- a/.travis.maven-settings.xml +++ b/.maven-settings.xml @@ -31,20 +31,7 @@ central - http://repo1.maven.org/maven2/ - default - - true - never - - - false - - - - - wcm-io-apache-intermediate-release - http://wcm.io/maven/repositories/apache-intermediate-release + https://repo1.maven.org/maven2/ default true @@ -70,7 +57,7 @@ apache-snapshots - http://repository.apache.org/snapshots + https://repository.apache.org/snapshots default false @@ -87,20 +74,7 @@ central - http://repo1.maven.org/maven2/ - default - - true - never - - - false - - - - - wcm-io-apache-intermediate-release - http://wcm.io/maven/repositories/apache-intermediate-release + https://repo1.maven.org/maven2/ default true @@ -126,7 +100,7 @@ apache-snapshots - http://repository.apache.org/snapshots + https://repository.apache.org/snapshots default false @@ -147,4 +121,12 @@ default + + + ossrh + ${env.SONATYPE_USERNAME} + ${env.SONATYPE_PASSWORD} + + + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 27a3a2c..0000000 --- a/.travis.yml +++ /dev/null @@ -1,52 +0,0 @@ -# #%L -# wcm.io -# %% -# Copyright (C) 2015 wcm.io -# %% -# Licensed 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. -# #L% -# - -language: java - -jdk: -- oraclejdk8 -- openjdk11 - -# Make sure travis can use container-based infrastructure -sudo: false - -install: "mvn -s ./.travis.maven-settings.xml clean" - -script: -- "mvn -s ./.travis.maven-settings.xml -Pcontinuous-integration -U install" -# Remove wcm.io artefacts from repository before cache -- rm -rf $HOME/.m2/repository/io/wcm - -# exlude release tags like 1.0.0 -branches: - except: - - /^\d+(\.\d+\.\d+)?(\..*|\-.*)?$/ - -# Cache Maven Repository -cache: - directories: - - '$HOME/.m2/repository' - -# this will not work yet with a google groups mailing list - see https://github.com/travis-ci/travis-ci/issues/2513 -#notifications: -# email: -# recipients: -# - wcm-io-dev@googlegroups.com -# on_success: change -# on_failure: always diff --git a/README.md b/README.md index ece233f..469fcd1 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ - Maven NodeJS Proxy + Maven NodeJS Proxy ====== -[![Build Status](https://travis-ci.com/wcm-io-devops/maven-nodejs-proxy.png?branch=develop)](https://travis-ci.com/wcm-io-devops/maven-nodejs-proxy) -[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.wcm.devops.maven/io.wcm.devops.maven.nodejs-proxy/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.wcm.devops.maven/io.wcm.devops.maven.nodejs-proxy) +[![Build](https://github.com/wcm-io-devops/maven-nodejs-proxy/workflows/Build/badge.svg?branch=develop)](https://github.com/wcm-io-devops/maven-nodejs-proxy/actions?query=workflow%3ABuild+branch%3Adevelop) +[![Maven Central](https://img.shields.io/maven-central/v/io.wcm.devops.maven/io.wcm.devops.maven.nodejs-proxy)](https://repo1.maven.org/maven2/io/wcm/devops/maven/io.wcm.devops.maven.nodejs-proxy) +[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=wcm-io-devops_maven-nodejs-proxy&metric=coverage)](https://sonarcloud.io/summary/new_code?id=wcm-io-devops_maven-nodejs-proxy) Maven proxy to download NodeJS binaries as Maven artifacts. diff --git a/changes.xml b/changes.xml index be05b66..9a2782c 100644 --- a/changes.xml +++ b/changes.xml @@ -23,6 +23,12 @@ xsi:schemaLocation="http://maven.apache.org/changes/1.0.0 http://maven.apache.org/plugins/maven-changes-plugin/xsd/changes-1.0.0.xsd"> + + + Update dependencies. + + + Add support for downloading Windows NodeJS binaries as ZIP including NPM which is available since Node 6.3.0. diff --git a/maven-nodejs-proxy/pom.xml b/maven-nodejs-proxy/pom.xml index a45ac04..dd9c58b 100644 --- a/maven-nodejs-proxy/pom.xml +++ b/maven-nodejs-proxy/pom.xml @@ -19,19 +19,19 @@ #L% --> - + 4.0.0 io.wcm.devops io.wcm.devops.parent_toplevel - 1.1.2 + 1.4.4 io.wcm.devops.maven io.wcm.devops.maven.nodejs-proxy - 1.2.0 + 1.2.2 jar Maven NodeJS Proxy @@ -65,21 +65,21 @@ commons-io commons-io - 2.6 + 2.15.1 compile commons-codec commons-codec - 1.12 + 1.16.1 compile org.apache.maven maven-artifact - 3.3.9 + 3.9.6 compile diff --git a/pom.xml b/pom.xml index a8ce129..e5fa9ae 100644 --- a/pom.xml +++ b/pom.xml @@ -19,19 +19,19 @@ #L% --> - + 4.0.0 io.wcm.devops io.wcm.devops.parent_toplevel - 1.1.2 + 1.4.4 io.wcm.devops.maven io.wcm.devops.maven.nodejs-proxy.root - 1.2.0 + 1.2.2 pom Maven NodeJS Proxy Root @@ -44,6 +44,11 @@ HEAD + + GitHub Actions + https://github.com/wcm-io-devops/maven-nodejs-proxy/actions + + maven-nodejs-proxy