mirror of
https://github.com/apache/maven-mvnd.git
synced 2025-11-29 02:00:26 +08:00
Compare commits
63 Commits
1.0-m7
...
2.0.0-beta
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
74cdaf62b2 | ||
|
|
9e7476e89f | ||
|
|
ef981d5f5b | ||
|
|
111b8a6bfa | ||
|
|
952a67450b | ||
|
|
d2942ccbc1 | ||
|
|
50bcc9bac5 | ||
|
|
7caba4d555 | ||
|
|
3f5b472022 | ||
|
|
cdc9737ca0 | ||
|
|
446c292709 | ||
|
|
bc61f6441e | ||
|
|
d3cc476ae3 | ||
|
|
d59cb3d121 | ||
|
|
17110132e4 | ||
|
|
72696a53a9 | ||
|
|
58cb81b187 | ||
|
|
6de743152c | ||
|
|
80cd4bf3c5 | ||
|
|
6659363a5f | ||
|
|
b6625b06d5 | ||
|
|
f94464fe29 | ||
|
|
7b2ea436ea | ||
|
|
1bf0839807 | ||
|
|
b6e469089b | ||
|
|
8434b80fa8 | ||
|
|
f3e6cbf9b7 | ||
|
|
7939f99318 | ||
|
|
224f6a56f3 | ||
|
|
6629526464 | ||
|
|
907c9e76cd | ||
|
|
106adaad93 | ||
|
|
42b230c10c | ||
|
|
8d5d25006a | ||
|
|
a6b275db59 | ||
|
|
73bfecb19e | ||
|
|
a6dbd07ec4 | ||
|
|
9bafc4b97d | ||
|
|
d41d6a2709 | ||
|
|
1fc7a988b9 | ||
|
|
8bb26402c1 | ||
|
|
d23e0e88f6 | ||
|
|
a1ac6660ec | ||
|
|
d5d697c75d | ||
|
|
90b505a9e7 | ||
|
|
f6a6747b04 | ||
|
|
ea62ae3514 | ||
|
|
1d246800d4 | ||
|
|
9ee1cf5cad | ||
|
|
7dbb194985 | ||
|
|
f05de78d08 | ||
|
|
0f4bdb6df5 | ||
|
|
8f7a56772b | ||
|
|
dc4179fc3b | ||
|
|
acf64a7fab | ||
|
|
92dd3f5c81 | ||
|
|
8dc8675540 | ||
|
|
accb99e910 | ||
|
|
09168b30a8 | ||
|
|
18d0583304 | ||
|
|
345e02b3c0 | ||
|
|
685ca13bff | ||
|
|
15d622e185 |
37
.github/dependabot.yml
vendored
37
.github/dependabot.yml
vendored
@@ -1,25 +1,30 @@
|
||||
#
|
||||
# Copyright 2022 the original author or authors.
|
||||
# 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
|
||||
#
|
||||
# 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
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
|
||||
- package-ecosystem: maven
|
||||
directory: '/'
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
# see https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates#open-pull-requests-limit
|
||||
# open-pull-requests-limit: 10
|
||||
versioning-strategy: increase
|
||||
time: '04:00'
|
||||
open-pull-requests-limit: 10
|
||||
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
80
.github/workflows/early-access.yaml
vendored
80
.github/workflows/early-access.yaml
vendored
@@ -20,65 +20,89 @@ name: Early Access
|
||||
# trigger on push to branches and PR
|
||||
on:
|
||||
push:
|
||||
branch:
|
||||
branches:
|
||||
- master
|
||||
- mvnd-1.x
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
GRAALVM_VERSION: '22.3.1'
|
||||
JAVA_VERSION: '17'
|
||||
JAVA_VERSION: '22'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
default-build:
|
||||
name: 'Default build (without Graal)'
|
||||
name: 'Default build (without GraalVM)'
|
||||
if: startsWith(github.event.head_commit.message, '[release] Release ') != true
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 'Checkout'
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: ${{ env.JAVA_VERSION }}
|
||||
distribution: 'temurin'
|
||||
|
||||
- name: 'Run default (non-native) build'
|
||||
run: ./mvnw verify -Dmrm=false -B -ntp -e
|
||||
run: ./mvnw verify -Dmrm=false -V -B -ntp -e -s .mvn/release-settings.xml
|
||||
|
||||
- name: 'Upload daemon test logs'
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: daemon-test-logs-default-build
|
||||
path: integration-tests/target/mvnd-tests/**/daemon*.log
|
||||
|
||||
native-build:
|
||||
name: 'Build with Graal on ${{ matrix.os }}'
|
||||
name: 'Build with GraalVM on ${{ matrix.os }}'
|
||||
if: startsWith(github.event.head_commit.message, '[release] Release ') != true
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ ubuntu-22.04, macOS-11, windows-2019 ]
|
||||
# binaries wanted: linux amd64, mac intel, mac M1, windows x86
|
||||
os: [ ubuntu-latest, macos-13, macos-14, windows-latest ]
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- name: 'Checkout'
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 'Set vars'
|
||||
shell: bash
|
||||
run: |
|
||||
ARCH=$(echo '${{ runner.arch }}' | awk '{print tolower($0)}')
|
||||
if [[ $ARCH == 'x64' ]]
|
||||
then
|
||||
echo "ARCH=amd64" >> $GITHUB_ENV
|
||||
elif [[ $ARCH == 'arm64' ]]
|
||||
then
|
||||
echo "ARCH=aarch64" >> $GITHUB_ENV
|
||||
else
|
||||
echo "ARCH=$ARCH" >> $GITHUB_ENV
|
||||
fi
|
||||
OS=$(echo '${{ runner.os }}' | awk '{print tolower($0)}')
|
||||
[[ $OS == 'ubuntu' ]] && echo "OS=linux" >> $GITHUB_ENV || echo "OS=$OS" >> $GITHUB_ENV
|
||||
[[ $OS == 'macos' ]] && echo "OS=darwin" >> $GITHUB_ENV || echo "OS=$OS" >> $GITHUB_ENV
|
||||
if [[ $OS == 'macos' ]]
|
||||
then
|
||||
echo "OS=darwin" >> $GITHUB_ENV
|
||||
else
|
||||
echo "OS=$OS" >> $GITHUB_ENV
|
||||
fi
|
||||
echo "VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
|
||||
|
||||
- name: 'Set up Graal'
|
||||
- name: 'Set up GraalVM'
|
||||
uses: graalvm/setup-graalvm@v1
|
||||
with:
|
||||
version: ${{ env.GRAALVM_VERSION }}
|
||||
java-version: ${{ env.JAVA_VERSION }}
|
||||
components: 'native-image'
|
||||
distribution: 'graalvm'
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: 'Maven clean'
|
||||
run: ./mvnw clean -Dmrm=false -B -ntp -e
|
||||
run: ./mvnw clean -Dmrm=false -V -B -ntp -e
|
||||
|
||||
- name: 'Patch Graal libs for only requiring glibc 2.12'
|
||||
- name: 'Patch GraalVM libs for only requiring glibc 2.12'
|
||||
if: ${{ env.OS == 'linux' }}
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -100,7 +124,7 @@ jobs:
|
||||
objcopy --redefine-syms=client/src/main/resources/glibc/glibc.redef client/target/graalvm-libs-for-glibc-2.12/Scrt1.o 2>/dev/null
|
||||
|
||||
- name: 'Build native distribution'
|
||||
run: ./mvnw verify -Pnative -Dmrm=false -B -ntp -e
|
||||
run: ./mvnw verify -Pnative -Dmrm=false -V -B -ntp -e -s .mvn/release-settings.xml
|
||||
|
||||
- name: 'Verify native binary for only requiring glibc 2.12'
|
||||
if: ${{ env.OS == 'linux' }}
|
||||
@@ -113,19 +137,13 @@ jobs:
|
||||
|
||||
- name: 'Upload daemon test logs'
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: daemon-test-logs-${{ env.OS }}
|
||||
name: daemon-test-logs-${{ env.OS }}-${{ env.ARCH }}
|
||||
path: integration-tests/target/mvnd-tests/**/daemon*.log
|
||||
|
||||
- name: 'Upload m39 artifact'
|
||||
uses: actions/upload-artifact@v3
|
||||
- name: 'Upload artifact'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: mvnd-m39-${{ env.OS }}
|
||||
path: dist-m39/target/maven-mvnd-*.zip
|
||||
|
||||
- name: 'Upload m40 artifact'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: mvnd-m40-${{ env.OS }}
|
||||
path: dist-m40/target/maven-mvnd-*.zip
|
||||
name: mvnd-${{ env.OS }}-${{ env.ARCH }}
|
||||
path: dist/target/maven-mvnd-*.zip
|
||||
|
||||
182
.github/workflows/release.yaml
vendored
182
.github/workflows/release.yaml
vendored
@@ -26,42 +26,55 @@ on:
|
||||
- '*'
|
||||
|
||||
env:
|
||||
GRAALVM_VERSION: '22.3.1'
|
||||
JAVA_VERSION: '17'
|
||||
JAVA_VERSION: '22'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: 'Build with Graal on ${{ matrix.os }}'
|
||||
name: 'Build with GraalVM on ${{ matrix.os }}'
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
os: [ ubuntu-22.04, macOS-11, windows-2019 ]
|
||||
# binaries wanted: linux amd64, mac intel, mac M1, windows x86
|
||||
os: [ ubuntu-latest, macos-13, macos-14, windows-latest ]
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- name: 'Check out repository'
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 'Set vars'
|
||||
shell: bash
|
||||
run: |
|
||||
ARCH=$(echo '${{ runner.arch }}' | awk '{print tolower($0)}')
|
||||
if [[ $ARCH == 'x64' ]]
|
||||
then
|
||||
echo "ARCH=amd64" >> $GITHUB_ENV
|
||||
elif [[ $ARCH == 'arm64' ]]
|
||||
then
|
||||
echo "ARCH=aarch64" >> $GITHUB_ENV
|
||||
else
|
||||
echo "ARCH=$ARCH" >> $GITHUB_ENV
|
||||
fi
|
||||
OS=$(echo '${{ runner.os }}' | awk '{print tolower($0)}')
|
||||
[[ $OS == 'ubuntu' ]] && echo "OS=linux" >> $GITHUB_ENV || echo "OS=$OS" >> $GITHUB_ENV
|
||||
[[ $OS == 'macos' ]] && echo "OS=darwin" >> $GITHUB_ENV || echo "OS=$OS" >> $GITHUB_ENV
|
||||
if [[ $OS == 'macos' ]]
|
||||
then
|
||||
echo "OS=darwin" >> $GITHUB_ENV
|
||||
else
|
||||
echo "OS=$OS" >> $GITHUB_ENV
|
||||
fi
|
||||
echo "VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
|
||||
|
||||
- name: 'Set up Graal'
|
||||
- name: 'Set up GraalVM'
|
||||
uses: graalvm/setup-graalvm@v1
|
||||
with:
|
||||
version: ${{ env.GRAALVM_VERSION }}
|
||||
java-version: ${{ env.JAVA_VERSION }}
|
||||
components: 'native-image'
|
||||
distribution: 'graalvm'
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: 'Maven clean'
|
||||
run: ./mvnw clean -Dmrm=false -B -ntp -e
|
||||
|
||||
- name: 'Patch Graal libs for only requiring glibc 2.12'
|
||||
- name: 'Patch GraalVM libs for only requiring glibc 2.12'
|
||||
if: ${{ env.OS == 'linux' }}
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -95,74 +108,85 @@ jobs:
|
||||
(( err == 1 ))
|
||||
|
||||
- name: 'Upload artifact'
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: artifacts
|
||||
name: mvnd-${{ env.OS }}-${{ env.ARCH }}
|
||||
path: |
|
||||
dist-m39/target/maven-mvnd-*.zip
|
||||
dist-m39/target/maven-mvnd-*.tar.gz
|
||||
dist-m40/target/maven-mvnd-*.zip
|
||||
dist-m40/target/maven-mvnd-*.tar.gz
|
||||
dist/target/maven-mvnd-*.zip
|
||||
dist/target/maven-mvnd-*.tar.gz
|
||||
|
||||
source:
|
||||
name: 'Build source distributions'
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 'Check out repository'
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 'Set vars'
|
||||
shell: bash
|
||||
run: |
|
||||
ARCH=$(echo '${{ runner.arch }}' | awk '{print tolower($0)}')
|
||||
if [[ $ARCH == 'x64' ]]
|
||||
then
|
||||
echo "ARCH=amd64" >> $GITHUB_ENV
|
||||
elif [[ $ARCH == 'arm64' ]]
|
||||
then
|
||||
echo "ARCH=aarch64" >> $GITHUB_ENV
|
||||
else
|
||||
echo "ARCH=$ARCH" >> $GITHUB_ENV
|
||||
fi
|
||||
OS=$(echo '${{ runner.os }}' | awk '{print tolower($0)}')
|
||||
[[ $OS == 'ubuntu' ]] && echo "OS=linux" >> $GITHUB_ENV || echo "OS=$OS" >> $GITHUB_ENV
|
||||
[[ $OS == 'macos' ]] && echo "OS=darwin" >> $GITHUB_ENV || echo "OS=$OS" >> $GITHUB_ENV
|
||||
if [[ $OS == 'macos' ]]
|
||||
then
|
||||
echo "OS=darwin" >> $GITHUB_ENV
|
||||
else
|
||||
echo "OS=$OS" >> $GITHUB_ENV
|
||||
fi
|
||||
echo "VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
|
||||
|
||||
- name: 'Set up Graal'
|
||||
- name: 'Set up GraalVM'
|
||||
uses: graalvm/setup-graalvm@v1
|
||||
with:
|
||||
version: ${{ env.GRAALVM_VERSION }}
|
||||
java-version: ${{ env.JAVA_VERSION }}
|
||||
components: 'native-image'
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: 'Build source distribution'
|
||||
run: ./mvnw clean verify -Psource-distribution -N -B -ntp -e
|
||||
run: ./mvnw clean verify -Psource-distribution -N -B -ntp -e -s .mvn/release-settings.xml
|
||||
|
||||
- name: 'Upload artifact'
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: artifacts
|
||||
name: mvnd-sources
|
||||
path: |
|
||||
target/maven-mvnd-*.zip
|
||||
target/maven-mvnd-*.tar.gz
|
||||
|
||||
release:
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build, source]
|
||||
|
||||
steps:
|
||||
- name: 'Check out repository'
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: 'Download all build artifacts'
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
|
||||
- name: 'Set up Java'
|
||||
uses: actions/setup-java@v3
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: ${{ env.JAVA_VERSION }}
|
||||
distribution: 'zulu'
|
||||
|
||||
- name: 'Cache Maven packages'
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.m2
|
||||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: ${{ runner.os }}-m2
|
||||
key: ${{ runner.os }}-${{ runner.arch }}-m2-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: ${{ runner.os }}-${{ runner.arch }}-m2
|
||||
|
||||
- name: ls -R
|
||||
run: ls -R
|
||||
@@ -188,7 +212,7 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: artifacts/maven-mvnd-${{ env.VERSION }}-src.zip
|
||||
asset_path: mvnd-sources/maven-mvnd-${{ env.VERSION }}-src.zip
|
||||
asset_name: maven-mvnd-${{ env.VERSION }}-src.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
@@ -198,127 +222,87 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: artifacts/maven-mvnd-${{ env.VERSION }}-src.tar.gz
|
||||
asset_path: mvnd-sources/maven-mvnd-${{ env.VERSION }}-src.tar.gz
|
||||
asset_name: maven-mvnd-${{ env.VERSION }}-src.tar.gz
|
||||
asset_content_type: application/tar.gz
|
||||
|
||||
- name: Deploy maven-mvnd-m39-linux-amd64.zip
|
||||
- name: Deploy maven-mvnd-linux-amd64.zip
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: artifacts/dist-m39/target/maven-mvnd-${{ env.VERSION }}-m39-linux-amd64.zip
|
||||
asset_name: maven-mvnd-${{ env.VERSION }}-m39-linux-amd64.zip
|
||||
asset_path: mvnd-linux-amd64/maven-mvnd-${{ env.VERSION }}-linux-amd64.zip
|
||||
asset_name: maven-mvnd-${{ env.VERSION }}-linux-amd64.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
- name: Deploy maven-mvnd-m39-linux-amd64.tar.gz
|
||||
- name: Deploy maven-mvnd-linux-amd64.tar.gz
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: artifacts/dist-m39/target/maven-mvnd-${{ env.VERSION }}-m39-linux-amd64.tar.gz
|
||||
asset_name: maven-mvnd-${{ env.VERSION }}-m39-linux-amd64.tar.gz
|
||||
asset_path: mvnd-linux-amd64/maven-mvnd-${{ env.VERSION }}-linux-amd64.tar.gz
|
||||
asset_name: maven-mvnd-${{ env.VERSION }}-linux-amd64.tar.gz
|
||||
asset_content_type: application/x-gzip
|
||||
|
||||
- name: Deploy maven-mvnd-m39-darwin-amd64.zip
|
||||
- name: Deploy maven-mvnd-darwin-amd64.zip
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: artifacts/dist-m39/target/maven-mvnd-${{ env.VERSION }}-m39-darwin-amd64.zip
|
||||
asset_name: maven-mvnd-${{ env.VERSION }}-m39-darwin-amd64.zip
|
||||
asset_path: mvnd-darwin-amd64/maven-mvnd-${{ env.VERSION }}-darwin-amd64.zip
|
||||
asset_name: maven-mvnd-${{ env.VERSION }}-darwin-amd64.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
- name: Deploy maven-mvnd-m39-darwin-amd64.tar.gz
|
||||
- name: Deploy maven-mvnd-darwin-amd64.tar.gz
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: artifacts/dist-m39/target/maven-mvnd-${{ env.VERSION }}-m39-darwin-amd64.tar.gz
|
||||
asset_name: maven-mvnd-${{ env.VERSION }}-m39-darwin-amd64.tar.gz
|
||||
asset_path: mvnd-darwin-amd64/maven-mvnd-${{ env.VERSION }}-darwin-amd64.tar.gz
|
||||
asset_name: maven-mvnd-${{ env.VERSION }}-darwin-amd64.tar.gz
|
||||
asset_content_type: application/x-gzip
|
||||
|
||||
- name: Deploy maven-mvnd-m39-windows-amd64.zip
|
||||
- name: Deploy maven-mvnd-darwin-aarch64.zip
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: artifacts/dist-m39/target/maven-mvnd-${{ env.VERSION }}-m39-windows-amd64.zip
|
||||
asset_name: maven-mvnd-${{ env.VERSION }}-m39-windows-amd64.zip
|
||||
asset_path: mvnd-darwin-aarch64/maven-mvnd-${{ env.VERSION }}-darwin-aarch64.zip
|
||||
asset_name: maven-mvnd-${{ env.VERSION }}-darwin-aarch64.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
- name: Deploy maven-mvnd-m39-windows-amd64.tar.gz
|
||||
- name: Deploy maven-mvnd-darwin-aarch64.tar.gz
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: artifacts/dist-m39/target/maven-mvnd-${{ env.VERSION }}-m39-windows-amd64.tar.gz
|
||||
asset_name: maven-mvnd-${{ env.VERSION }}-m39-windows-amd64.tar.gz
|
||||
asset_path: mvnd-darwin-aarch64/maven-mvnd-${{ env.VERSION }}-darwin-aarch64.tar.gz
|
||||
asset_name: maven-mvnd-${{ env.VERSION }}-darwin-aarch64.tar.gz
|
||||
asset_content_type: application/x-gzip
|
||||
|
||||
- name: Deploy maven-mvnd-m40-linux-amd64.zip
|
||||
- name: Deploy maven-mvnd-windows-amd64.zip
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: artifacts/dist-m40/target/maven-mvnd-${{ env.VERSION }}-m40-linux-amd64.zip
|
||||
asset_name: maven-mvnd-${{ env.VERSION }}-m40-linux-amd64.zip
|
||||
asset_path: mvnd-windows-amd64/maven-mvnd-${{ env.VERSION }}-windows-amd64.zip
|
||||
asset_name: maven-mvnd-${{ env.VERSION }}-windows-amd64.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
- name: Deploy maven-mvnd-m40-linux-amd64.tar.gz
|
||||
- name: Deploy maven-mvnd-windows-amd64.tar.gz
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: artifacts/dist-m40/target/maven-mvnd-${{ env.VERSION }}-m40-linux-amd64.tar.gz
|
||||
asset_name: maven-mvnd-${{ env.VERSION }}-m40-linux-amd64.tar.gz
|
||||
asset_content_type: application/x-gzip
|
||||
|
||||
- name: Deploy maven-mvnd-m40-darwin-amd64.zip
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: artifacts/dist-m40/target/maven-mvnd-${{ env.VERSION }}-m40-darwin-amd64.zip
|
||||
asset_name: maven-mvnd-${{ env.VERSION }}-m40-darwin-amd64.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
- name: Deploy maven-mvnd-m40-darwin-amd64.tar.gz
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: artifacts/dist-m40/target/maven-mvnd-${{ env.VERSION }}-m40-darwin-amd64.tar.gz
|
||||
asset_name: maven-mvnd-${{ env.VERSION }}-m40-darwin-amd64.tar.gz
|
||||
asset_content_type: application/x-gzip
|
||||
|
||||
- name: Deploy maven-mvnd-m40-windows-amd64.zip
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: artifacts/dist-m40/target/maven-mvnd-${{ env.VERSION }}-m40-windows-amd64.zip
|
||||
asset_name: maven-mvnd-${{ env.VERSION }}-m40-windows-amd64.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
- name: Deploy maven-mvnd-m40-windows-amd64.tar.gz
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: artifacts/dist-m40/target/maven-mvnd-${{ env.VERSION }}-m40-windows-amd64.tar.gz
|
||||
asset_name: maven-mvnd-${{ env.VERSION }}-m40-windows-amd64.tar.gz
|
||||
asset_path: mvnd-windows-amd64/maven-mvnd-${{ env.VERSION }}-windows-amd64.tar.gz
|
||||
asset_name: maven-mvnd-${{ env.VERSION }}-windows-amd64.tar.gz
|
||||
asset_content_type: application/x-gzip
|
||||
|
||||
|
||||
@@ -1,14 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<extensions>
|
||||
<extension>
|
||||
<groupId>com.gradle</groupId>
|
||||
<artifactId>gradle-enterprise-maven-extension</artifactId>
|
||||
<version>1.17.3</version>
|
||||
</extension>
|
||||
<extension>
|
||||
<groupId>com.gradle</groupId>
|
||||
<artifactId>common-custom-user-data-maven-extension</artifactId>
|
||||
<version>1.12</version>
|
||||
</extension>
|
||||
</extensions>
|
||||
|
||||
BIN
.mvn/wrapper/maven-wrapper.jar
vendored
BIN
.mvn/wrapper/maven-wrapper.jar
vendored
Binary file not shown.
7
.mvn/wrapper/maven-wrapper.properties
vendored
7
.mvn/wrapper/maven-wrapper.properties
vendored
@@ -6,7 +6,7 @@
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
# 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
|
||||
@@ -14,5 +14,6 @@
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.7/apache-maven-3.8.7-bin.zip
|
||||
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar
|
||||
wrapperVersion=3.3.2
|
||||
distributionType=only-script
|
||||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.7/apache-maven-3.9.7-bin.zip
|
||||
|
||||
1075
CHANGELOG.md
1075
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
39
README.adoc
39
README.adoc
@@ -35,8 +35,8 @@ This architecture brings the following advantages:
|
||||
|
||||
* By default, `mvnd` is building your modules in parallel using multiple CPU cores. The number of utilized cores is
|
||||
given by the formula `Math.max(Runtime.getRuntime().availableProcessors() - 1, 1)`. If your source tree does not
|
||||
support parallel builds, pass `-T1` on the command line to make your build serial.
|
||||
* Improved console output: we believe that the output of a parallel build on a stock Maven is hard to follow. Therefore,
|
||||
support parallel builds, pass `-T1` into the command line to make your build serial.
|
||||
* Improved console output: we believe that the output of a parallel build on stock Maven is hard to follow. Therefore,
|
||||
we implemented a simplified non-rolling view showing the status of each build thread on a separate line. This is
|
||||
what it looks like on a machine with 24 cores:
|
||||
+
|
||||
@@ -73,6 +73,19 @@ $ brew install mvndaemon/homebrew-mvnd/mvnd
|
||||
$ sudo port install mvnd
|
||||
----
|
||||
|
||||
=== Other installers
|
||||
|
||||
We're looking for contribution to support https://community.chocolatey.org/packages/mvndaemon/[Chocolatey], https://scoop.sh/[Scoop] or
|
||||
https://github.com/joschi/asdf-mvnd#install[asdf]. If you fancy helping us...
|
||||
|
||||
////
|
||||
=== Install using https://www.macports.org[MacPorts]
|
||||
|
||||
[source,shell]
|
||||
----
|
||||
$ sudo port install mvnd
|
||||
----
|
||||
|
||||
=== Install using https://community.chocolatey.org/packages/mvndaemon/[Chocolatey]
|
||||
|
||||
[source,shell]
|
||||
@@ -94,34 +107,25 @@ $ scoop install mvndaemon
|
||||
$ asdf plugin-add mvnd
|
||||
$ asdf install mvnd latest
|
||||
----
|
||||
|
||||
////
|
||||
|
||||
=== Set up completion
|
||||
|
||||
Optionally, you can set up completion as follows:
|
||||
[source,shell]
|
||||
----
|
||||
# ensure to set MVND_HOME to point to your mvnd distribution, note that sdkman does it for you
|
||||
# ensure that MVND_HOME points to your mvnd distribution, note that sdkman does it for you
|
||||
$ echo 'source $MVND_HOME/bin/mvnd-bash-completion.bash' >> ~/.bashrc
|
||||
----
|
||||
`bash` is the only shell supported at this time.
|
||||
|
||||
=== Note for oh-my-zsh users ===
|
||||
|
||||
Users that use `oh-my-zsh` often use completion for maven. The default maven completion plugin defines `mvnd` as an alias to `mvn deploy`. So before being able to use `mvnd`, you need to unalias using the following command:
|
||||
[source,shell]
|
||||
----
|
||||
$ unalias mvnd
|
||||
----
|
||||
|
||||
|
||||
=== Install manually
|
||||
|
||||
* Download the latest ZIP suitable for your platform from https://downloads.apache.org/maven/mvnd/
|
||||
* Unzip to a directory of your choice
|
||||
* Add the `bin` directory to `PATH`
|
||||
* Optionally, you can create `~/.m2/mvnd.properties` and set the `java.home` property in case you do not want to bother
|
||||
with setting `JAVA_HOME` environment variable.
|
||||
with setting the `JAVA_HOME` environment variable.
|
||||
* Test whether `mvnd` works:
|
||||
+
|
||||
[source,shell]
|
||||
@@ -161,11 +165,11 @@ mvnd verify
|
||||
|
||||
`--stop` kills all running daemons
|
||||
|
||||
The complete list of options is printed when executing `mvnd --help`.
|
||||
`mvnd --help` prints the complete list of options
|
||||
|
||||
|
||||
== Configuration
|
||||
Configuration can be provided through properties file. Mvnd read properties file from the following locations:
|
||||
Configuration can be provided through the properties file. Mvnd reads the properties file from the following locations:
|
||||
|
||||
* the properties path supplied using `MVND_PROPERTIES_PATH` environment variable or `mvnd.propertiesPath` system variable
|
||||
* the local properties path located at `[PROJECT_HOME]/.mvn/mvnd.properties`
|
||||
@@ -227,6 +231,9 @@ $ ls -lh target/mvnd
|
||||
-rwxrwxr-x. 1 ppalaga ppalaga 25M Jun 2 13:23 target/mvnd
|
||||
----
|
||||
|
||||
Please note that if you are using Windows as your operating system you will need the following prerequisites for building `maven-mvnd`:
|
||||
a version of Visual Studio with the workload "Desktop development with C++" and the individual component "Windows Universal CRT SDK".
|
||||
|
||||
=== Install `mvnd`
|
||||
|
||||
[source, shell]
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
= How to release `mvnd`
|
||||
|
||||
* Run the https://raw.githubusercontent.com/apache/maven-mvnd/master/build/release-build.sh[release script] which will update the versions, the changelog, the native binaries and will tag the new git commit. This new tag will trigger the https://raw.githubusercontent.com/apache/maven-mvnd/master/.github/workflows/release.yaml[release workflow] on this newly created tag.
|
||||
* Run the https://raw.githubusercontent.com/apache/maven-mvnd/master/build/release-build.sh[release script] which will update the versions, the native binaries and will tag the new git commit. This new tag will trigger the https://raw.githubusercontent.com/apache/maven-mvnd/master/.github/workflows/release.yaml[release workflow] on this newly created tag.
|
||||
[source,shell]
|
||||
----
|
||||
./build/release-build.sh <released-version> <next-SNAPSHOT>
|
||||
----
|
||||
|
||||
* While the `darwin-aarch64` is not supported by github, you need to perform a clean build on the tagged branch on a Apple M1 computer and upload the two binary distributions as additional assets to the draft release that has been generated at github.
|
||||
Warning for Fedora users: The RedHat `podman` is usually preinstalled and happily coexisting with `Docker`. Make sure Docker is being used, usually by setting `OCI_EXE=docker` env variable.
|
||||
|
||||
* Once the workflow completes, run the https://raw.githubusercontent.com/apache/maven-mvnd/master/build/release-candidate.sh[release-candidate script] which will download the built assemblies, compute the checksums and signatures, commit them to the https://dist.apache.org/repos/dist/dev/maven/mvnd/[dev distribution repository]
|
||||
https://github.com/apache/maven-mvnd/releases[releases] and also upload them as assets to the staging area for the github draft release.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.maven.daemon</groupId>
|
||||
<artifactId>mvnd</artifactId>
|
||||
<version>1.0-m7</version>
|
||||
<version>2.0.0-beta-1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mvnd-agent</artifactId>
|
||||
@@ -31,12 +31,10 @@
|
||||
<name>Maven Daemon - Agent</name>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.javassist</groupId>
|
||||
<artifactId>javassist</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.maven.daemon</groupId>
|
||||
<artifactId>mvnd</artifactId>
|
||||
<version>1.0-m7</version>
|
||||
<version>2.0.0-beta-1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mvnd-build-maven-plugin</artifactId>
|
||||
@@ -30,31 +30,6 @@
|
||||
<packaging>maven-plugin</packaging>
|
||||
<name>Maven Daemon - Documentation Maven Plugin</name>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
<maven.compiler.source>11</maven.compiler.source>
|
||||
|
||||
<roaster.version>2.28.0.Final</roaster.version>
|
||||
<maven.plugin-tools.version>3.9.0</maven.plugin-tools.version>
|
||||
<maven-plugin-plugin.version>3.9.0</maven-plugin-plugin.version>
|
||||
</properties>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-plugin-api</artifactId>
|
||||
<version>${maven.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.plugin-tools</groupId>
|
||||
<artifactId>maven-plugin-annotations</artifactId>
|
||||
<version>${maven.plugin-tools.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
@@ -70,22 +45,10 @@
|
||||
<dependency>
|
||||
<groupId>org.jboss.forge.roaster</groupId>
|
||||
<artifactId>roaster-jdt</artifactId>
|
||||
<version>${roaster.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-plugin-plugin</artifactId>
|
||||
<version>${maven-plugin-plugin.version}</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
|
||||
@@ -125,7 +125,7 @@ public class DocMojo extends AbstractMojo {
|
||||
@Override
|
||||
public synchronized Enumeration<Object> keys() {
|
||||
final Iterator<Object> it = new TreeSet<>(keySet()).iterator();
|
||||
return new Enumeration<Object>() {
|
||||
return new Enumeration<>() {
|
||||
public boolean hasMoreElements() {
|
||||
return it.hasNext();
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
|
||||
set -e
|
||||
export VERSION=$1
|
||||
export QUALIFIER=m39
|
||||
|
||||
if [ "${VERSION}x" = "x" ]
|
||||
then
|
||||
@@ -29,15 +28,15 @@ rm -Rf target/releases/${VERSION}
|
||||
mkdir -p target/releases/${VERSION}
|
||||
pushd target/releases
|
||||
|
||||
darwinAmdZipUrl="https://downloads.apache.org/maven/mvnd/${VERSION}/maven-mvnd-${VERSION}-${QUALIFIER}-darwin-amd64.zip"
|
||||
darwinAmdZipUrl="https://downloads.apache.org/maven/mvnd/${VERSION}/maven-mvnd-${VERSION}-darwin-amd64.zip"
|
||||
darwinAmdSha256="$(curl -L --silent "${darwinAmdZipUrl}.sha256")"
|
||||
darwinArmZipUrl="https://downloads.apache.org/maven/mvnd/${VERSION}/maven-mvnd-${VERSION}-${QUALIFIER}-darwin-aarch64.zip"
|
||||
darwinArmZipUrl="https://downloads.apache.org/maven/mvnd/${VERSION}/maven-mvnd-${VERSION}-darwin-aarch64.zip"
|
||||
darwinArmSha256="$(curl -L --silent "${darwinArmZipUrl}.sha256")"
|
||||
linuxZipUrl="https://downloads.apache.org/maven/mvnd/${VERSION}/maven-mvnd-${VERSION}-${QUALIFIER}-linux-amd64.zip"
|
||||
linuxZipUrl="https://downloads.apache.org/maven/mvnd/${VERSION}/maven-mvnd-${VERSION}-linux-amd64.zip"
|
||||
linuxSha256="$(curl -L --silent "${linuxZipUrl}.sha256")"
|
||||
|
||||
echo "Updating Formula/mvnd.rb with"
|
||||
echo "version: ${VERSION}-${QUALIFIER}"
|
||||
echo "version: ${VERSION}"
|
||||
echo "darwin-amd-url: ${darwinAmdZipUrl}"
|
||||
echo "darwin-amd-sha256: ${darwinAmdSha256}"
|
||||
echo "darwin-arm-url: ${darwinArmZipUrl}"
|
||||
@@ -52,14 +51,14 @@ cd homebrew-mvnd
|
||||
perl -i -0pe 's|(on_macos do[\s\S\n]+on_intel do\n\s+url )\"([^\"]+)\"(\n\s+sha256 )\"([^\"]+)\"|$1\"'${darwinAmdZipUrl}'\"$3\"'${darwinAmdSha256}'\"|g' Formula/mvnd.rb
|
||||
perl -i -0pe 's|(on_macos do[\s\S\n]+on_arm do\n\s+url )\"([^\"]+)\"(\n\s+sha256 )\"([^\"]+)\"|$1\"'${darwinArmZipUrl}'\"$3\"'${darwinArmSha256}'\"|g' Formula/mvnd.rb
|
||||
perl -i -0pe 's|(on_linux do\n\s+url )\"([^\"]+)\"(\n\s+sha256 )\"([^\"]+)\"|$1\"'${linuxZipUrl}'\"$3\"'${linuxSha256}'\"|g' Formula/mvnd.rb
|
||||
perl -i -0pe 's|(version )"([^\"]+)"|$1\"'${VERSION}-${QUALIFIER}'\"|g' Formula/mvnd.rb
|
||||
perl -i -0pe 's|(version )"([^\"]+)"|$1\"'${VERSION}'\"|g' Formula/mvnd.rb
|
||||
|
||||
if [ -n "$(git status --porcelain)" ]; then
|
||||
echo "Committing release ${VERSION}-${QUALIFIER}"
|
||||
echo "Committing release ${VERSION}"
|
||||
git config --global user.email "gnodet@gmail.com"
|
||||
git config --global user.name "Guillaume Nodet"
|
||||
git add -A
|
||||
git commit -m "Release ${VERSION}-${QUALIFIER}"
|
||||
git commit -m "Release ${VERSION}"
|
||||
#git push origin master
|
||||
else
|
||||
echo "Nothing to commit"
|
||||
|
||||
@@ -36,16 +36,15 @@ function publishRelease() {
|
||||
VERSION=$1
|
||||
SDKMAN_PLATFORM=$2
|
||||
MVND_PLATFORM=$3
|
||||
QUALIFIER=$4
|
||||
|
||||
FILE="maven-mvnd-${VERSION}-${QUALIFIER}-${MVND_PLATFORM}.zip"
|
||||
FILE="maven-mvnd-${VERSION}-${MVND_PLATFORM}.zip"
|
||||
URL="https://downloads.apache.org/maven/mvnd/${VERSION}/${FILE}"
|
||||
RESPONSE="$(curl -s -X POST \
|
||||
-H "Consumer-Key: ${SDKMAN_CONSUMER_KEY}" \
|
||||
-H "Consumer-Token: ${SDKMAN_CONSUMER_TOKEN}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Accept: application/json" \
|
||||
-d '{"candidate": "mvnd", "version": "'${VERSION}-${QUALIFIER}'", "platform" : "'${SDKMAN_PLATFORM}'", "url": "'${URL}'"}' \
|
||||
-d '{"candidate": "mvnd", "version": "'${VERSION}'", "platform" : "'${SDKMAN_PLATFORM}'", "url": "'${URL}'"}' \
|
||||
https://vendors.sdkman.io/release)"
|
||||
|
||||
node -pe "
|
||||
@@ -59,14 +58,10 @@ function publishRelease() {
|
||||
" "${RESPONSE}"
|
||||
}
|
||||
|
||||
publishRelease ${VERSION} LINUX_64 linux-amd64 m39
|
||||
publishRelease ${VERSION} MAC_OSX darwin-amd64 m39
|
||||
publishRelease ${VERSION} MAC_ARM64 darwin-aarch64 m39
|
||||
publishRelease ${VERSION} WINDOWS_64 windows-amd64 m39
|
||||
publishRelease ${VERSION} LINUX_64 linux-amd64 m40
|
||||
publishRelease ${VERSION} MAC_OSX darwin-amd64 m40
|
||||
publishRelease ${VERSION} MAC_ARM64 darwin-aarch64 m40
|
||||
publishRelease ${VERSION} WINDOWS_64 windows-amd64 m40
|
||||
publishRelease ${VERSION} LINUX_64 linux-amd64
|
||||
publishRelease ${VERSION} MAC_OSX darwin-amd64
|
||||
publishRelease ${VERSION} MAC_ARM64 darwin-aarch64
|
||||
publishRelease ${VERSION} WINDOWS_64 windows-amd64
|
||||
|
||||
echo "Setting ${VERSION} as a default"
|
||||
RESPONSE="$(curl -s -X PUT \
|
||||
@@ -74,7 +69,7 @@ RESPONSE="$(curl -s -X PUT \
|
||||
-H "Consumer-Token: ${SDKMAN_CONSUMER_TOKEN}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Accept: application/json" \
|
||||
-d '{"candidate": "mvnd", "version": "'${VERSION}-m39'"}' \
|
||||
-d '{"candidate": "mvnd", "version": "'${VERSION}'"}' \
|
||||
https://vendors.sdkman.io/default)"
|
||||
|
||||
node -pe "
|
||||
@@ -95,7 +90,7 @@ RESPONSE="$(curl -s -X POST \
|
||||
-H "Consumer-Token: ${SDKMAN_CONSUMER_TOKEN}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Accept: application/json" \
|
||||
-d '{"candidate": "mvnd", "version": "'${VERSION}-m39'", "url": "'${RELEASE_URL}'"}' \
|
||||
-d '{"candidate": "mvnd", "version": "'${VERSION}'", "url": "'${RELEASE_URL}'"}' \
|
||||
https://vendors.sdkman.io/announce/struct)"
|
||||
|
||||
node -pe "
|
||||
@@ -108,20 +103,3 @@ node -pe "
|
||||
}
|
||||
" "${RESPONSE}"
|
||||
|
||||
RESPONSE="$(curl -s -X POST \
|
||||
-H "Consumer-Key: ${SDKMAN_CONSUMER_KEY}" \
|
||||
-H "Consumer-Token: ${SDKMAN_CONSUMER_TOKEN}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Accept: application/json" \
|
||||
-d '{"candidate": "mvnd", "version": "'${VERSION}-m40'", "url": "'${RELEASE_URL}'"}' \
|
||||
https://vendors.sdkman.io/announce/struct)"
|
||||
|
||||
node -pe "
|
||||
var json = JSON.parse(process.argv[1]);
|
||||
if (json.status == 200 || json.status == 201) {
|
||||
json.status + ' as expected from /announce/freeform';
|
||||
} else {
|
||||
console.log('Unexpected status from /announce/freeform: ' + process.argv[1]);
|
||||
process.exit(1);
|
||||
}
|
||||
" "${RESPONSE}"
|
||||
|
||||
@@ -113,11 +113,6 @@ startup_check
|
||||
# update version
|
||||
mvn versions:set -DnewVersion=$VERSION
|
||||
|
||||
# udpate changelog
|
||||
docker run -it --rm -v "$(pwd)":/usr/local/src/your-app githubchangeloggenerator/github-changelog-generator \
|
||||
--user apache --project maven-mvnd --token $GITHUB_TOKEN --future-release $VERSION \
|
||||
--exclude-tags early-access,0.9.0,1.0.0-m2,build-1.0.0-m2,1.0.0-m3
|
||||
|
||||
# rebuild native libraries
|
||||
pushd native
|
||||
make native-all
|
||||
@@ -129,7 +124,7 @@ git commit -m "[release] Release $VERSION"
|
||||
|
||||
# Create and push tag
|
||||
git tag $VERSION
|
||||
git push origin $VERSION
|
||||
# git push origin $VERSION
|
||||
# Pushing a tag will trigger the CI to build the release and publish
|
||||
# the artifacts on https://github.com/apache/maven-mvnd/releases
|
||||
|
||||
@@ -139,4 +134,10 @@ mvn versions:set -DnewVersion=$NEXT_VERSION
|
||||
# commit
|
||||
git add -A
|
||||
git commit -m "Next is $NEXT_VERSION"
|
||||
git push origin master
|
||||
# git push origin master
|
||||
|
||||
# NOTE: Manually push once done: git push origin master --tags
|
||||
echo "=============================================================================="
|
||||
echo "Release done, nothing got pushed (yet); please push changes with command below"
|
||||
echo "$ git push origin master --tags"
|
||||
echo ""
|
||||
|
||||
@@ -36,29 +36,23 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm -Rf target/releases/${VERSION}
|
||||
mkdir -p target/releases/${VERSION}
|
||||
pushd target/releases
|
||||
rm -Rf target/releases/mvnd/${VERSION}
|
||||
mkdir -p target/releases/mvnd/${VERSION}
|
||||
pushd target/releases/mvnd/${VERSION}
|
||||
|
||||
runsUrl=$(echo "https://api.github.com/repos/apache/maven-mvnd/actions/runs" | sed -e 's?https://api.github.com??g')
|
||||
artifactsUrl=$(gh api -H "Accept: application/vnd.github.v3+json" $runsUrl --jq '.workflow_runs[] | select(.name=="Release" and .head_branch=="'${VERSION}'") | .artifacts_url' | sed -e 's?https://api.github.com??g')
|
||||
downloadUrl=$(gh api -H "Accept: application/vnd.github.v3+json" $artifactsUrl --jq '.artifacts[] | select(.name = "artifacts") | .archive_download_url' | sed -e 's?https://api.github.com??g')
|
||||
echo "Downloading artifacts from $downloadUrl"
|
||||
gh api $downloadUrl > artifacts-${VERSION}.zip
|
||||
unzip artifacts-${VERSION}.zip -d ${VERSION}
|
||||
cd ${VERSION}
|
||||
gh release download ${VERSION}
|
||||
|
||||
for dist in m39-darwin-amd64.zip m39-darwin-amd64.tar.gz m39-darwin-aarch64.zip m39-darwin-aarch64.tar.gz m39-linux-amd64.zip m39-linux-amd64.tar.gz m39-windows-amd64.zip m39-windows-amd64.tar.gz m40-darwin-amd64.zip m40-darwin-amd64.tar.gz m40-darwin-aarch64.zip m40-darwin-aarch64.tar.gz m40-linux-amd64.zip m40-linux-amd64.tar.gz m40-windows-amd64.zip m40-windows-amd64.tar.gz src.zip src.tar.gz
|
||||
for dist in maven-mvnd*.*
|
||||
do
|
||||
FILE=maven-mvnd-${VERSION}-${dist}
|
||||
shasum -a 256 -b ${FILE} | cut -d ' ' -f 1 > ${FILE}.sha256
|
||||
gpg --detach-sign --armor ${FILE}
|
||||
echo "Processing ${dist}"
|
||||
# sha256 are used by homebrew which does not support sha512 atm
|
||||
shasum -a 256 -b ${dist} | cut -d ' ' -f 1 > ${dist}.sha256
|
||||
shasum -a 512 -b ${dist} | cut -d ' ' -f 1 > ${dist}.sha512
|
||||
gpg --detach-sign --armor ${dist}
|
||||
done
|
||||
|
||||
cd ..
|
||||
svn co https://dist.apache.org/repos/dist/dev/maven/mvnd
|
||||
mv ${VERSION} mvnd
|
||||
cd mvnd
|
||||
svn co https://dist.apache.org/repos/dist/dev/maven/mvnd .
|
||||
svn add ${VERSION}
|
||||
svn commit -m "Release Apache Maven Daemon ${VERSION}"
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.maven.daemon</groupId>
|
||||
<artifactId>mvnd</artifactId>
|
||||
<version>1.0-m7</version>
|
||||
<version>2.0.0-beta-1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mvnd-client</artifactId>
|
||||
@@ -31,7 +31,6 @@
|
||||
<name>Maven Daemon - Client</name>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.release>11</maven.compiler.release>
|
||||
<graalvm-native-static-opt />
|
||||
<graalvm-native-glibc-opt />
|
||||
<patchelf.skip>true</patchelf.skip>
|
||||
@@ -80,28 +79,6 @@
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-enforcer-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>enforce-bytecode-version</id>
|
||||
<goals>
|
||||
<goal>enforce</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<rules>
|
||||
<enforceBytecodeVersion>
|
||||
<maxJdkVersion>${maven.compiler.release}</maxJdkVersion>
|
||||
<excludes>
|
||||
<exclude>org.graalvm.nativeimage:svm</exclude>
|
||||
</excludes>
|
||||
</enforceBytecodeVersion>
|
||||
</rules>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>buildnumber-maven-plugin</artifactId>
|
||||
@@ -218,9 +195,9 @@
|
||||
<skip>false</skip>
|
||||
<mainClass>org.mvndaemon.mvnd.client.DefaultClient</mainClass>
|
||||
<imageName>mvnd</imageName>
|
||||
<buildArgs>--no-server
|
||||
--no-fallback
|
||||
--allow-incomplete-classpath
|
||||
<buildArgs>--no-fallback
|
||||
-march=compatibility
|
||||
-H:+UnlockExperimentalVMOptions
|
||||
${graalvm-native-static-opt}
|
||||
${graalvm-native-glibc-opt}
|
||||
-H:IncludeResources=org/mvndaemon/mvnd/.*
|
||||
|
||||
@@ -41,9 +41,10 @@ import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.fusesource.jansi.Ansi;
|
||||
import org.fusesource.jansi.internal.CLibrary;
|
||||
import org.jline.terminal.spi.SystemStream;
|
||||
import org.jline.terminal.spi.TerminalExt;
|
||||
import org.jline.utils.AttributedString;
|
||||
import org.jline.utils.AttributedStringBuilder;
|
||||
import org.jline.utils.AttributedStyle;
|
||||
import org.mvndaemon.mvnd.common.DaemonException;
|
||||
import org.mvndaemon.mvnd.common.DaemonInfo;
|
||||
@@ -57,11 +58,10 @@ import org.mvndaemon.mvnd.common.OsUtils;
|
||||
import org.mvndaemon.mvnd.common.TimeUtils;
|
||||
import org.mvndaemon.mvnd.common.logging.ClientOutput;
|
||||
import org.mvndaemon.mvnd.common.logging.TerminalOutput;
|
||||
import org.mvndaemon.mvnd.logging.slf4j.MvndLoggerFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.slf4j.bridge.SLF4JBridgeHandler;
|
||||
import org.slf4j.impl.MvndLoggerFactory;
|
||||
import org.slf4j.impl.StaticLoggerBinder;
|
||||
|
||||
import static org.mvndaemon.mvnd.client.DaemonParameters.LOG_EXTENSION;
|
||||
|
||||
@@ -85,6 +85,12 @@ public class DefaultClient implements Client {
|
||||
}
|
||||
}
|
||||
|
||||
// Diag
|
||||
if (Environment.DIAG.removeCommandLineOption(args) != null) {
|
||||
org.jline.terminal.impl.Diag.diag(System.out);
|
||||
return;
|
||||
}
|
||||
|
||||
// Serial
|
||||
if (Environment.SERIAL.removeCommandLineOption(args) != null) {
|
||||
System.setProperty(Environment.SERIAL.getProperty(), Boolean.toString(true));
|
||||
@@ -94,19 +100,6 @@ public class DefaultClient implements Client {
|
||||
final boolean batchMode = Environment.MAVEN_BATCH_MODE.hasCommandLineOption(args)
|
||||
|| Environment.COMPLETION.hasCommandLineOption(args);
|
||||
|
||||
// Color
|
||||
Color styleColor =
|
||||
Color.of(Environment.MAVEN_COLOR.removeCommandLineOption(args)).orElse(Color.auto);
|
||||
if (styleColor == Color.auto) {
|
||||
/* Translate from auto to either always or never */
|
||||
/* stdout is not a terminal e.g. when stdout is redirected to a file */
|
||||
final boolean stdoutIsTerminal = CLibrary.isatty(1) != 0;
|
||||
styleColor = (batchMode || logFile != null || !stdoutIsTerminal) ? Color.never : Color.always;
|
||||
}
|
||||
/* We cannot use Environment.addCommandLineOption() because that one would pass --color to the daemon
|
||||
* and --color is not supported there yet. */
|
||||
args.add("-D" + Environment.MAVEN_COLOR.getProperty() + "=" + styleColor.name());
|
||||
|
||||
String userJdkJavaOpts = System.getenv(Environment.JDK_JAVA_OPTIONS.getEnvironmentVariable());
|
||||
if (userJdkJavaOpts != null) {
|
||||
Environment.JDK_JAVA_OPTIONS.addCommandLineOption(args, userJdkJavaOpts);
|
||||
@@ -115,8 +108,8 @@ public class DefaultClient implements Client {
|
||||
// System properties
|
||||
setSystemPropertiesFromCommandLine(args);
|
||||
|
||||
if (StaticLoggerBinder.getSingleton().getLoggerFactory() instanceof MvndLoggerFactory) {
|
||||
((MvndLoggerFactory) StaticLoggerBinder.getSingleton().getLoggerFactory()).reconfigure();
|
||||
if (LoggerFactory.getILoggerFactory() instanceof MvndLoggerFactory) {
|
||||
((MvndLoggerFactory) LoggerFactory.getILoggerFactory()).reconfigure();
|
||||
}
|
||||
|
||||
DaemonParameters parameters = new DaemonParameters();
|
||||
@@ -158,12 +151,27 @@ public class DefaultClient implements Client {
|
||||
boolean noBuffering = batchMode || parameters.noBuffering();
|
||||
try (TerminalOutput output = new TerminalOutput(noBuffering, parameters.rollingWindowSize(), logFile)) {
|
||||
try {
|
||||
// Color
|
||||
// We need to defer this part until the terminal is created
|
||||
Color styleColor = Color.of(Environment.MAVEN_COLOR.removeCommandLineOption(args))
|
||||
.orElse(Color.auto);
|
||||
if (styleColor == Color.auto) {
|
||||
/* Translate from auto to either always or never */
|
||||
/* stdout is not a terminal e.g. when stdout is redirected to a file */
|
||||
final boolean stdoutIsTerminal =
|
||||
((TerminalExt) output.getTerminal()).getProvider().isSystemStream(SystemStream.Output);
|
||||
styleColor = (batchMode || logFile != null || !stdoutIsTerminal) ? Color.never : Color.always;
|
||||
}
|
||||
/* We cannot use Environment.addCommandLineOption() because that one would pass --color to the daemon
|
||||
* and --color is not supported there yet. */
|
||||
args.add("-D" + Environment.MAVEN_COLOR.getProperty() + "=" + styleColor.name());
|
||||
|
||||
final ExecutionResult result = new DefaultClient(parameters).execute(output, args);
|
||||
exitCode = result.getExitCode();
|
||||
} catch (DaemonException.InterruptedException e) {
|
||||
final AttributedStyle s = new AttributedStyle().bold().foreground(AttributedStyle.RED);
|
||||
String str = new AttributedString(System.lineSeparator() + "Canceled by user", s).toAnsi();
|
||||
output.accept(Message.display(str));
|
||||
output.accept(Message.err(str));
|
||||
exitCode = 130;
|
||||
}
|
||||
}
|
||||
@@ -251,8 +259,12 @@ public class DefaultClient implements Client {
|
||||
+ " (" + buildProperties.getRevision() + ")";
|
||||
|
||||
boolean isColored = !"never".equals(Environment.MAVEN_COLOR.getCommandLineOption(args));
|
||||
final String v =
|
||||
isColored ? Ansi.ansi().bold().a(mvndVersionString).reset().toString() : mvndVersionString;
|
||||
final String v = isColored
|
||||
? new AttributedStringBuilder()
|
||||
.style(AttributedStyle.BOLD)
|
||||
.append(mvndVersionString)
|
||||
.toAnsi()
|
||||
: mvndVersionString;
|
||||
output.accept(Message.log(v));
|
||||
// Print terminal information
|
||||
output.describeTerminal();
|
||||
|
||||
@@ -55,9 +55,9 @@ import org.mvndaemon.mvnd.common.Message;
|
||||
import org.mvndaemon.mvnd.common.Os;
|
||||
import org.mvndaemon.mvnd.common.SocketFamily;
|
||||
import org.mvndaemon.mvnd.common.logging.ClientOutput;
|
||||
import org.mvndaemon.mvnd.logging.slf4j.MvndBaseLogger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.slf4j.impl.SimpleLogger;
|
||||
|
||||
import static java.lang.Thread.sleep;
|
||||
import static org.mvndaemon.mvnd.common.DaemonState.Canceled;
|
||||
@@ -434,7 +434,7 @@ public class DaemonConnector {
|
||||
args.add("-Dmaven.conf=" + mvndHome.resolve("mvn").resolve("conf"));
|
||||
args.add("-Dclassworlds.conf=" + mvndHome.resolve("bin").resolve("mvnd-daemon.conf"));
|
||||
|
||||
args.add("-D" + SimpleLogger.LOG_FILE_KEY + "="
|
||||
args.add("-D" + MvndBaseLogger.LOG_FILE_KEY + "="
|
||||
+ parameters.daemonStorage().resolve("daemon-" + daemonId + ".log"));
|
||||
|
||||
Environment.MVND_JAVA_HOME.addSystemProperty(
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
*/
|
||||
package org.mvndaemon.mvnd.client;
|
||||
|
||||
import javax.xml.stream.XMLStreamException;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@@ -28,11 +30,13 @@ import java.time.Duration;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Function;
|
||||
@@ -41,9 +45,8 @@ import java.util.function.Supplier;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.apache.maven.cli.internal.extension.io.CoreExtensionsStaxReader;
|
||||
import org.apache.maven.cli.internal.extension.model.CoreExtension;
|
||||
import org.apache.maven.cli.internal.extension.model.io.xpp3.CoreExtensionsXpp3Reader;
|
||||
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
|
||||
import org.mvndaemon.mvnd.common.Environment;
|
||||
import org.mvndaemon.mvnd.common.InterpolationHelper;
|
||||
import org.mvndaemon.mvnd.common.Os;
|
||||
@@ -449,7 +452,7 @@ public class DaemonParameters {
|
||||
.map(e -> e.getGroupId() + ":" + e.getArtifactId() + ":" + e.getVersion())
|
||||
.collect(Collectors.toList());
|
||||
return String.join(";", extensions);
|
||||
} catch (IOException | XmlPullParserException e) {
|
||||
} catch (IOException | XMLStreamException e) {
|
||||
throw new RuntimeException("Unable to parse core extensions", e);
|
||||
}
|
||||
} else {
|
||||
@@ -470,7 +473,7 @@ public class DaemonParameters {
|
||||
}
|
||||
|
||||
private static List<CoreExtension> readCoreExtensionsDescriptor(Path multiModuleProjectDirectory)
|
||||
throws IOException, XmlPullParserException {
|
||||
throws IOException, XMLStreamException {
|
||||
if (multiModuleProjectDirectory == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
@@ -478,9 +481,30 @@ public class DaemonParameters {
|
||||
if (!Files.exists(extensionsFile)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
CoreExtensionsXpp3Reader parser = new CoreExtensionsXpp3Reader();
|
||||
CoreExtensionsStaxReader parser = new CoreExtensionsStaxReader();
|
||||
List<CoreExtension> extensions;
|
||||
try (InputStream is = Files.newInputStream(extensionsFile)) {
|
||||
return parser.read(is).getExtensions();
|
||||
extensions = parser.read(is).getExtensions();
|
||||
}
|
||||
return filterCoreExtensions(extensions);
|
||||
}
|
||||
|
||||
private static List<CoreExtension> filterCoreExtensions(List<CoreExtension> coreExtensions) {
|
||||
Set<String> exclusions = new HashSet<>();
|
||||
String exclusionsString = systemProperty(Environment.MVND_CORE_EXTENSIONS_EXCLUDE)
|
||||
.orDefault()
|
||||
.asString();
|
||||
if (exclusionsString != null) {
|
||||
exclusions.addAll(Arrays.stream(exclusionsString.split(","))
|
||||
.filter(e -> e != null && !e.trim().isEmpty())
|
||||
.collect(Collectors.toList()));
|
||||
}
|
||||
if (!exclusions.isEmpty()) {
|
||||
return coreExtensions.stream()
|
||||
.filter(e -> !exclusions.contains(e.getGroupId() + ":" + e.getArtifactId()))
|
||||
.collect(Collectors.toList());
|
||||
} else {
|
||||
return coreExtensions;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ pthread_create pthread_create@GLIBC_2.2.5
|
||||
pthread_getattr_np pthread_getattr_np@GLIBC_2.2.5
|
||||
pthread_join pthread_join@GLIBC_2.2.5
|
||||
pthread_kill pthread_kill@GLIBC_2.2.5
|
||||
pthread_mutex_trylock pthread_mutex_trylock@GLIBC_2.2.5
|
||||
pthread_setname_np pthread_setname_np@GLIBC_2.12
|
||||
sem_destroy sem_destroy@GLIBC_2.2.5
|
||||
sem_init sem_init@GLIBC_2.2.5
|
||||
|
||||
129
common/pom.xml
129
common/pom.xml
@@ -22,7 +22,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.maven.daemon</groupId>
|
||||
<artifactId>mvnd</artifactId>
|
||||
<version>1.0-m7</version>
|
||||
<version>2.0.0-beta-1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mvnd-common</artifactId>
|
||||
@@ -30,15 +30,19 @@
|
||||
<packaging>jar</packaging>
|
||||
<name>Maven Daemon - Common</name>
|
||||
|
||||
<dependencies>
|
||||
<properties>
|
||||
<!-- If using release, sun.misc is not reachable (see SignalHelper) -->
|
||||
<maven.compiler.release />
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.jline</groupId>
|
||||
<artifactId>jline-terminal</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jline</groupId>
|
||||
<artifactId>jline-terminal-jansi</artifactId>
|
||||
<artifactId>jline-terminal-jni</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -63,7 +67,6 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.daemon</groupId>
|
||||
<artifactId>mvnd-build-maven-plugin</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
@@ -73,6 +76,16 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<fork>true</fork>
|
||||
<compilerArgs>
|
||||
<arg>-XDignore.symbol.file</arg>
|
||||
</compilerArgs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
@@ -87,112 +100,4 @@
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>jdk11-15</id>
|
||||
<activation>
|
||||
<jdk>[11,15)</jdk>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>default-compile</id>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<fork>true</fork>
|
||||
<compilerArgs>
|
||||
<arg>-XDignore.symbol.file</arg>
|
||||
</compilerArgs>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>jdk11</id>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<fork>true</fork>
|
||||
<compilerArgs>
|
||||
<arg>-XDignore.symbol.file</arg>
|
||||
</compilerArgs>
|
||||
<release>11</release>
|
||||
<multiReleaseOutput>true</multiReleaseOutput>
|
||||
<compileSourceRoots>
|
||||
<root>${project.basedir}/src/main/java11</root>
|
||||
</compileSourceRoots>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>jdk16+</id>
|
||||
<activation>
|
||||
<jdk>[16,)</jdk>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>default-compile</id>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<fork>true</fork>
|
||||
<compilerArgs>
|
||||
<arg>-XDignore.symbol.file</arg>
|
||||
</compilerArgs>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>jdk11</id>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<fork>true</fork>
|
||||
<compilerArgs>
|
||||
<arg>-XDignore.symbol.file</arg>
|
||||
</compilerArgs>
|
||||
<release>11</release>
|
||||
<multiReleaseOutput>true</multiReleaseOutput>
|
||||
<compileSourceRoots>
|
||||
<root>${project.basedir}/src/main/java11</root>
|
||||
</compileSourceRoots>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>jdk16</id>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<fork>true</fork>
|
||||
<compilerArgs>
|
||||
<arg>-XDignore.symbol.file</arg>
|
||||
</compilerArgs>
|
||||
<release>16</release>
|
||||
<multiReleaseOutput>true</multiReleaseOutput>
|
||||
<compileSourceRoots>
|
||||
<root>${project.basedir}/src/main/java16</root>
|
||||
</compileSourceRoots>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -59,6 +59,8 @@ public enum Environment {
|
||||
STATUS(null, null, null, OptionType.VOID, Flags.OPTIONAL, "mvnd:--status"),
|
||||
/** Stop all daemon instances registered in the registry specified by <code>mvnd.registry</code> */
|
||||
STOP(null, null, null, OptionType.VOID, Flags.OPTIONAL, "mvnd:--stop"),
|
||||
/** Terminal diagnosis */
|
||||
DIAG(null, null, null, OptionType.VOID, Flags.OPTIONAL, "mvnd:--diag"),
|
||||
/** Use one thread, no log buffering and the default project builder to behave like a standard maven */
|
||||
SERIAL("mvnd.serial", null, Boolean.FALSE, OptionType.VOID, Flags.OPTIONAL, "mvnd:-1", "mvnd:--serial"),
|
||||
|
||||
@@ -213,6 +215,18 @@ public enum Environment {
|
||||
* Internal option to specify the list of maven extension to register.
|
||||
*/
|
||||
MVND_CORE_EXTENSIONS("mvnd.coreExtensions", null, null, OptionType.STRING, Flags.DISCRIMINATING | Flags.INTERNAL),
|
||||
/**
|
||||
* Internal option to specify comma separated list of maven extension G:As to exclude (to not load them from
|
||||
* .mvn/extensions.xml). This option makes possible for example that a project that with vanilla Maven would
|
||||
* use takari-smart-builder extension, remain buildable with mvnd (where use of this extension would cause issues).
|
||||
* Value is expected as comma separated {@code g1:a1,g2:a2} pairs.
|
||||
*/
|
||||
MVND_CORE_EXTENSIONS_EXCLUDE(
|
||||
"mvnd.coreExtensionsExclude",
|
||||
null,
|
||||
"io.takari.maven:takari-smart-builder",
|
||||
OptionType.STRING,
|
||||
Flags.OPTIONAL),
|
||||
/**
|
||||
* The <code>-Xms</code> value to pass to the daemon.
|
||||
* This option takes precedence over options specified in <code>-Dmvnd.jvmArgs</code>.
|
||||
|
||||
@@ -75,7 +75,7 @@ public class InterpolationHelper {
|
||||
* <p>
|
||||
* This method performs property variable substitution on the
|
||||
* specified value. If the specified value contains the syntax
|
||||
* <tt>${<prop-name>}</tt>, where <tt><prop-name></tt>
|
||||
* {@code ${prop-name}}, where {@code prop-name}
|
||||
* refers to either a configuration property or a system property,
|
||||
* then the corresponding property value is substituted for the variable
|
||||
* placeholder. Multiple variable placeholders may exist in the
|
||||
|
||||
@@ -499,6 +499,8 @@ public abstract class Message {
|
||||
|
||||
private String mnemonic() {
|
||||
switch (type) {
|
||||
case DISPLAY:
|
||||
return "Display";
|
||||
case PROJECT_LOG_MESSAGE:
|
||||
return "ProjectLogMessage";
|
||||
default:
|
||||
@@ -730,8 +732,6 @@ public abstract class Message {
|
||||
return "KeyboardInput";
|
||||
case BUILD_LOG_MESSAGE:
|
||||
return "BuildLogMessage";
|
||||
case DISPLAY:
|
||||
return "Display";
|
||||
case PRINT_OUT:
|
||||
return "PrintOut";
|
||||
case PRINT_ERR:
|
||||
@@ -1112,10 +1112,6 @@ public abstract class Message {
|
||||
return new StringMessage(BUILD_STATUS, payload);
|
||||
}
|
||||
|
||||
public static StringMessage display(String message) {
|
||||
return new StringMessage(DISPLAY, message);
|
||||
}
|
||||
|
||||
public static RequestInput requestInput(String projectId) {
|
||||
return new RequestInput(projectId);
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ public class OsUtils {
|
||||
|
||||
/**
|
||||
* A simple wrapper over {@link Process} that manages its destroying and offers Java 8-like
|
||||
* {@link #waitFor(long, TimeUnit, String[])} with timeout.
|
||||
* {@link #waitFor(long)} with timeout.
|
||||
*/
|
||||
public static class CommandProcess implements AutoCloseable {
|
||||
public static final int TIMEOUT_EXIT_CODE = Integer.MIN_VALUE + 42;
|
||||
|
||||
@@ -20,5 +20,7 @@ package org.mvndaemon.mvnd.common;
|
||||
|
||||
public class ProcessHelper {
|
||||
|
||||
public static void killChildrenProcesses() {}
|
||||
public static void killChildrenProcesses() {
|
||||
ProcessHandle.current().descendants().forEach(ProcessHandle::destroy);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,20 +20,22 @@ package org.mvndaemon.mvnd.common;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.SocketAddress;
|
||||
import java.net.StandardProtocolFamily;
|
||||
import java.net.UnixDomainSocketAddress;
|
||||
import java.nio.channels.ServerSocketChannel;
|
||||
import java.nio.channels.SocketChannel;
|
||||
|
||||
public class SocketHelper {
|
||||
|
||||
public static SocketChannel openUnixSocket() throws IOException {
|
||||
throw new UnsupportedOperationException("Unix sockets are supported only on JDK >= 16");
|
||||
return SocketChannel.open(StandardProtocolFamily.UNIX);
|
||||
}
|
||||
|
||||
public static ServerSocketChannel openUnixServerSocket() throws IOException {
|
||||
throw new UnsupportedOperationException("Unix sockets are supported only on JDK >= 16");
|
||||
return ServerSocketChannel.open(StandardProtocolFamily.UNIX).bind(null, 0);
|
||||
}
|
||||
|
||||
public static SocketAddress unixSocketAddressOf(String s) {
|
||||
throw new UnsupportedOperationException("Unix sockets are supported only on JDK >= 16");
|
||||
return UnixDomainSocketAddress.of(s);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -312,9 +312,9 @@ public class TerminalOutput implements ClientOutput {
|
||||
break;
|
||||
}
|
||||
case Message.DISPLAY: {
|
||||
Message.StringMessage d = (Message.StringMessage) entry;
|
||||
clearDisplay();
|
||||
terminal.writer().printf("%s%n", d.getMessage());
|
||||
Message.ProjectEvent d = (Message.ProjectEvent) entry;
|
||||
terminal.writer().printf("[%s] %s%n", d.getProjectId(), d.getMessage());
|
||||
break;
|
||||
}
|
||||
case Message.PRINT_OUT: {
|
||||
@@ -346,10 +346,12 @@ public class TerminalOutput implements ClientOutput {
|
||||
readInput.writeLock().lock();
|
||||
try {
|
||||
clearDisplay();
|
||||
String msg = (maxThreads > 1)
|
||||
? String.format("[%s] %s", prompt.getProjectId(), prompt.getMessage())
|
||||
: prompt.getMessage();
|
||||
terminal.writer().print(msg);
|
||||
if (prompt.getMessage() != null) {
|
||||
String msg = (maxThreads > 1)
|
||||
? String.format("[%s] %s", prompt.getProjectId(), prompt.getMessage())
|
||||
: prompt.getMessage();
|
||||
terminal.writer().print(msg);
|
||||
}
|
||||
terminal.flush();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
while (true) {
|
||||
@@ -496,6 +498,10 @@ public class TerminalOutput implements ClientOutput {
|
||||
return terminal.getWidth();
|
||||
}
|
||||
|
||||
public Terminal getTerminal() {
|
||||
return terminal;
|
||||
}
|
||||
|
||||
void readInputLoop() {
|
||||
try {
|
||||
while (!closing) {
|
||||
@@ -712,37 +718,45 @@ public class TerminalOutput implements ClientOutput {
|
||||
|
||||
public static String pathToMaven(String location) {
|
||||
String[] p = location.split("/");
|
||||
if (p.length >= 4 && p[p.length - 1].startsWith(p[p.length - 3] + "-" + p[p.length - 2])) {
|
||||
String artifactId = p[p.length - 3];
|
||||
String version = p[p.length - 2];
|
||||
String classifier;
|
||||
String type;
|
||||
String artifactIdVersion = artifactId + "-" + version;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (p[p.length - 1].charAt(artifactIdVersion.length()) == '-') {
|
||||
classifier =
|
||||
p[p.length - 1].substring(artifactIdVersion.length() + 1, p[p.length - 1].lastIndexOf('.'));
|
||||
} else {
|
||||
classifier = null;
|
||||
}
|
||||
type = p[p.length - 1].substring(p[p.length - 1].lastIndexOf('.') + 1);
|
||||
for (int j = 0; j < p.length - 3; j++) {
|
||||
if (j > 0) {
|
||||
sb.append('.');
|
||||
}
|
||||
sb.append(p[j]);
|
||||
}
|
||||
sb.append(':').append(artifactId).append(':').append(version);
|
||||
if (!"jar".equals(type) || classifier != null) {
|
||||
sb.append(':');
|
||||
if (!"jar".equals(type)) {
|
||||
sb.append(type);
|
||||
}
|
||||
if (classifier != null) {
|
||||
sb.append(':').append(classifier);
|
||||
if (p.length >= 4) {
|
||||
final String artifactId = p[p.length - 3];
|
||||
final String version = p[p.length - 2];
|
||||
final String fileName = p[p.length - 1];
|
||||
final int artifactIdVersionLength = artifactId.length() + 1 /* the dash */ + version.length();
|
||||
if (fileName.length() > artifactIdVersionLength) {
|
||||
/* We use fileName.length() > to avoid https://github.com/apache/maven-mvnd/issues/929
|
||||
* In the code below, we assume that the fileName ends either with `.<extension>`
|
||||
* or `-<classifier>.<extension>` */
|
||||
final int lastPeriodPos = fileName.lastIndexOf('.');
|
||||
if (lastPeriodPos >= 0) {
|
||||
final String classifier;
|
||||
final String type;
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
if (fileName.charAt(artifactIdVersionLength) == '-') {
|
||||
classifier = fileName.substring(artifactIdVersionLength + 1, lastPeriodPos);
|
||||
} else {
|
||||
classifier = null;
|
||||
}
|
||||
type = fileName.substring(lastPeriodPos + 1);
|
||||
for (int j = 0; j < p.length - 3; j++) {
|
||||
if (j > 0) {
|
||||
sb.append('.');
|
||||
}
|
||||
sb.append(p[j]);
|
||||
}
|
||||
sb.append(':').append(artifactId).append(':').append(version);
|
||||
if (!"jar".equals(type) || classifier != null) {
|
||||
sb.append(':');
|
||||
if (!"jar".equals(type)) {
|
||||
sb.append(type);
|
||||
}
|
||||
if (classifier != null) {
|
||||
sb.append(':').append(classifier);
|
||||
}
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
return location;
|
||||
}
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright 2019 the original author or authors.
|
||||
|
||||
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.
|
||||
|
||||
-->
|
||||
<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/maven-v4_0_0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.apache.maven.daemon</groupId>
|
||||
<artifactId>mvnd</artifactId>
|
||||
<version>1.0-m7</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mvnd-daemon-m39</artifactId>
|
||||
|
||||
<packaging>jar</packaging>
|
||||
<name>Maven Daemon - Daemon 3.9.x specifics</name>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
<version>${maven3.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-embedder</artifactId>
|
||||
<version>${maven3.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.daemon</groupId>
|
||||
<artifactId>mvnd-daemon</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,59 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
package org.apache.maven.project;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import org.apache.maven.model.building.ModelCache;
|
||||
import org.apache.maven.repository.internal.DefaultModelCacheFactory;
|
||||
import org.apache.maven.repository.internal.ModelCacheFactory;
|
||||
import org.eclipse.aether.DefaultRepositoryCache;
|
||||
import org.eclipse.aether.DefaultRepositorySystemSession;
|
||||
import org.eclipse.aether.RepositorySystemSession;
|
||||
import org.eclipse.sisu.Priority;
|
||||
|
||||
import static org.mvndaemon.mvnd.common.Environment.MVND_NO_MODEL_CACHE;
|
||||
|
||||
@Singleton
|
||||
@Named
|
||||
@Priority(10)
|
||||
public class SnapshotModelCacheFactory implements ModelCacheFactory {
|
||||
|
||||
private final ModelCacheFactory factory;
|
||||
private final ModelCache globalCache;
|
||||
|
||||
@Inject
|
||||
public SnapshotModelCacheFactory(DefaultModelCacheFactory factory) {
|
||||
this.factory = factory;
|
||||
DefaultRepositorySystemSession session = new DefaultRepositorySystemSession();
|
||||
session.setCache(new DefaultRepositoryCache());
|
||||
this.globalCache = factory.createCache(session);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelCache createCache(RepositorySystemSession session) {
|
||||
boolean noModelCache =
|
||||
Boolean.parseBoolean(MVND_NO_MODEL_CACHE.asOptional().orElse(MVND_NO_MODEL_CACHE.getDefault()));
|
||||
ModelCache reactorCache = factory.createCache(session);
|
||||
ModelCache globalCache = noModelCache ? reactorCache : this.globalCache;
|
||||
return new SnapshotModelCache(globalCache, reactorCache);
|
||||
}
|
||||
}
|
||||
@@ -1,134 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
package org.mvndaemon.mvnd.cache.invalidating;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.apache.maven.model.Plugin;
|
||||
import org.apache.maven.plugin.DefaultPluginDescriptorCache;
|
||||
import org.apache.maven.plugin.InvalidPluginDescriptorException;
|
||||
import org.apache.maven.plugin.PluginDescriptorParsingException;
|
||||
import org.apache.maven.plugin.PluginResolutionException;
|
||||
import org.apache.maven.plugin.descriptor.PluginDescriptor;
|
||||
import org.codehaus.plexus.classworlds.realm.ClassRealm;
|
||||
import org.codehaus.plexus.classworlds.realm.NoSuchRealmException;
|
||||
import org.eclipse.aether.RepositorySystemSession;
|
||||
import org.eclipse.aether.repository.RemoteRepository;
|
||||
import org.eclipse.sisu.Priority;
|
||||
import org.mvndaemon.mvnd.cache.Cache;
|
||||
import org.mvndaemon.mvnd.cache.CacheFactory;
|
||||
import org.mvndaemon.mvnd.cache.CacheRecord;
|
||||
|
||||
@Singleton
|
||||
@Named
|
||||
@Priority(10)
|
||||
public class InvalidatingPluginDescriptorCache extends DefaultPluginDescriptorCache {
|
||||
|
||||
protected static class Record implements CacheRecord {
|
||||
|
||||
private final PluginDescriptor descriptor;
|
||||
|
||||
public Record(PluginDescriptor descriptor) {
|
||||
this.descriptor = descriptor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<Path> getDependencyPaths() {
|
||||
return Optional.ofNullable(descriptor.getArtifacts()).orElse(Collections.emptyList()).stream()
|
||||
.map(artifact -> artifact.getFile().toPath());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invalidate() {
|
||||
ClassRealm realm = descriptor.getClassRealm();
|
||||
if (realm == null) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
realm.getWorld().disposeRealm(realm.getId());
|
||||
} catch (NoSuchRealmException e) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
final Cache<Key, Record> cache;
|
||||
|
||||
@Inject
|
||||
public InvalidatingPluginDescriptorCache(CacheFactory cacheFactory) {
|
||||
this.cache = cacheFactory.newCache();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Key createKey(Plugin plugin, List<RemoteRepository> repositories, RepositorySystemSession session) {
|
||||
return super.createKey(plugin, repositories, session);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PluginDescriptor get(Key key) {
|
||||
Record r = cache.get(key);
|
||||
return r != null ? clone(r.descriptor) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PluginDescriptor get(Key key, PluginDescriptorSupplier supplier)
|
||||
throws PluginDescriptorParsingException, PluginResolutionException, InvalidPluginDescriptorException {
|
||||
try {
|
||||
Record r = cache.computeIfAbsent(key, k -> {
|
||||
try {
|
||||
return new Record(clone(supplier.load()));
|
||||
} catch (PluginDescriptorParsingException
|
||||
| PluginResolutionException
|
||||
| InvalidPluginDescriptorException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
});
|
||||
return clone(r.descriptor);
|
||||
} catch (RuntimeException e) {
|
||||
if (e.getCause() instanceof PluginDescriptorParsingException) {
|
||||
throw (PluginDescriptorParsingException) e.getCause();
|
||||
}
|
||||
if (e.getCause() instanceof PluginResolutionException) {
|
||||
throw (PluginResolutionException) e.getCause();
|
||||
}
|
||||
if (e.getCause() instanceof InvalidPluginDescriptorException) {
|
||||
throw (InvalidPluginDescriptorException) e.getCause();
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void put(Key key, PluginDescriptor descriptor) {
|
||||
cache.put(key, new Record(clone(descriptor)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void flush() {
|
||||
cache.clear();
|
||||
}
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
package org.mvndaemon.mvnd.plugin;
|
||||
|
||||
import javax.inject.Named;
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.apache.maven.plugin.version.PluginVersionRequest;
|
||||
import org.apache.maven.plugin.version.PluginVersionResolutionException;
|
||||
import org.apache.maven.plugin.version.PluginVersionResolver;
|
||||
import org.apache.maven.plugin.version.PluginVersionResult;
|
||||
import org.apache.maven.plugin.version.internal.DefaultPluginVersionResolver;
|
||||
import org.eclipse.aether.SessionData;
|
||||
import org.eclipse.aether.repository.RemoteRepository;
|
||||
import org.eclipse.sisu.Priority;
|
||||
import org.eclipse.sisu.Typed;
|
||||
|
||||
@Named
|
||||
@Singleton
|
||||
@Priority(10)
|
||||
@Typed(PluginVersionResolver.class)
|
||||
public class CachingPluginVersionResolver extends DefaultPluginVersionResolver {
|
||||
|
||||
private static final Object CACHE_KEY = new Object();
|
||||
|
||||
@Override
|
||||
public PluginVersionResult resolve(PluginVersionRequest request) throws PluginVersionResolutionException {
|
||||
Map<String, PluginVersionResult> cache =
|
||||
getCache(request.getRepositorySession().getData());
|
||||
String key = getKey(request);
|
||||
PluginVersionResult result = cache.get(key);
|
||||
if (result == null) {
|
||||
result = super.resolve(request);
|
||||
cache.putIfAbsent(key, result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private Map<String, PluginVersionResult> getCache(SessionData data) {
|
||||
Map<String, PluginVersionResult> cache = (Map<String, PluginVersionResult>) data.get(CACHE_KEY);
|
||||
while (cache == null) {
|
||||
cache = new ConcurrentHashMap<>(256);
|
||||
if (data.set(CACHE_KEY, null, cache)) {
|
||||
break;
|
||||
}
|
||||
cache = (Map<String, PluginVersionResult>) data.get(CACHE_KEY);
|
||||
}
|
||||
return cache;
|
||||
}
|
||||
|
||||
private static String getKey(PluginVersionRequest request) {
|
||||
return Stream.concat(
|
||||
Stream.of(request.getGroupId(), request.getArtifactId()),
|
||||
request.getRepositories().stream().map(RemoteRepository::getId))
|
||||
.collect(Collectors.joining(":"));
|
||||
}
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright 2019 the original author or authors.
|
||||
|
||||
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.
|
||||
|
||||
-->
|
||||
<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/maven-v4_0_0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.apache.maven.daemon</groupId>
|
||||
<artifactId>mvnd</artifactId>
|
||||
<version>1.0-m7</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mvnd-daemon-m40</artifactId>
|
||||
|
||||
<packaging>jar</packaging>
|
||||
<name>Maven Daemon - Daemon 4.0.x specifics</name>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
<version>${maven4.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-embedder</artifactId>
|
||||
<version>${maven4.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.daemon</groupId>
|
||||
<artifactId>mvnd-daemon</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -1,57 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
package org.apache.maven.project;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import org.apache.maven.building.Source;
|
||||
import org.apache.maven.model.building.ModelCache;
|
||||
|
||||
public class SnapshotModelCache implements ModelCache {
|
||||
|
||||
private final ModelCache globalCache;
|
||||
private final ModelCache reactorCache;
|
||||
|
||||
public SnapshotModelCache(ModelCache globalCache, ModelCache reactorCache) {
|
||||
this.globalCache = Objects.requireNonNull(globalCache);
|
||||
this.reactorCache = Objects.requireNonNull(reactorCache);
|
||||
}
|
||||
|
||||
public Object get(Source path, String tag) {
|
||||
return reactorCache.get(path, tag);
|
||||
}
|
||||
|
||||
public void put(Source path, String tag, Object data) {
|
||||
reactorCache.put(path, tag, data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void put(String groupId, String artifactId, String version, String tag, Object data) {
|
||||
getDelegate(version).put(groupId, artifactId, version, tag, data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object get(String groupId, String artifactId, String version, String tag) {
|
||||
return getDelegate(version).get(groupId, artifactId, version, tag);
|
||||
}
|
||||
|
||||
private ModelCache getDelegate(String version) {
|
||||
return version.contains("SNAPSHOT") || version.contains("${") ? reactorCache : globalCache;
|
||||
}
|
||||
}
|
||||
@@ -1,121 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
package org.mvndaemon.mvnd.cache.invalidating;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.List;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.apache.maven.artifact.Artifact;
|
||||
import org.apache.maven.plugin.DefaultPluginRealmCache;
|
||||
import org.apache.maven.plugin.PluginContainerException;
|
||||
import org.apache.maven.plugin.PluginResolutionException;
|
||||
import org.apache.maven.project.MavenProject;
|
||||
import org.codehaus.plexus.classworlds.realm.ClassRealm;
|
||||
import org.codehaus.plexus.classworlds.realm.NoSuchRealmException;
|
||||
import org.eclipse.sisu.Priority;
|
||||
import org.mvndaemon.mvnd.cache.Cache;
|
||||
import org.mvndaemon.mvnd.cache.CacheFactory;
|
||||
|
||||
@Singleton
|
||||
@Named
|
||||
@Priority(10)
|
||||
public class InvalidatingPluginRealmCache extends DefaultPluginRealmCache {
|
||||
|
||||
protected static class Record implements org.mvndaemon.mvnd.cache.CacheRecord {
|
||||
|
||||
final CacheRecord record;
|
||||
|
||||
public Record(CacheRecord record) {
|
||||
this.record = record;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<Path> getDependencyPaths() {
|
||||
return record.getArtifacts().stream()
|
||||
.map(artifact -> artifact.getFile().toPath());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invalidate() {
|
||||
ClassRealm realm = record.getRealm();
|
||||
try {
|
||||
realm.getWorld().disposeRealm(realm.getId());
|
||||
} catch (NoSuchRealmException e) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
final Cache<Key, Record> cache;
|
||||
|
||||
@Inject
|
||||
public InvalidatingPluginRealmCache(CacheFactory cacheFactory) {
|
||||
cache = cacheFactory.newCache();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CacheRecord get(Key key) {
|
||||
Record r = cache.get(key);
|
||||
return r != null ? r.record : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CacheRecord get(Key key, PluginRealmSupplier supplier)
|
||||
throws PluginResolutionException, PluginContainerException {
|
||||
try {
|
||||
Record r = cache.computeIfAbsent(key, k -> {
|
||||
try {
|
||||
return new Record(supplier.load());
|
||||
} catch (PluginResolutionException | PluginContainerException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
});
|
||||
return r.record;
|
||||
} catch (RuntimeException e) {
|
||||
if (e.getCause() instanceof PluginResolutionException) {
|
||||
throw (PluginResolutionException) e.getCause();
|
||||
}
|
||||
if (e.getCause() instanceof PluginContainerException) {
|
||||
throw (PluginContainerException) e.getCause();
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public CacheRecord put(Key key, ClassRealm pluginRealm, List<Artifact> pluginArtifacts) {
|
||||
CacheRecord record = super.put(key, pluginRealm, pluginArtifacts);
|
||||
super.cache.remove(key);
|
||||
cache.put(key, new Record(record));
|
||||
return record;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void flush() {
|
||||
cache.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void register(MavenProject project, Key key, CacheRecord record) {}
|
||||
}
|
||||
@@ -1,190 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
package org.mvndaemon.mvnd.cache.invalidating;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
import java.nio.file.FileSystems;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.PathMatcher;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.maven.eventspy.AbstractEventSpy;
|
||||
import org.apache.maven.eventspy.EventSpy;
|
||||
import org.apache.maven.execution.MavenExecutionRequest;
|
||||
import org.apache.maven.execution.MavenExecutionResult;
|
||||
import org.apache.maven.project.MavenProject;
|
||||
import org.eclipse.sisu.Typed;
|
||||
import org.mvndaemon.mvnd.common.Environment;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@Named
|
||||
@Singleton
|
||||
@Typed(EventSpy.class)
|
||||
public class InvalidatingRealmCacheEventSpy extends AbstractEventSpy {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(InvalidatingRealmCacheEventSpy.class);
|
||||
|
||||
private final InvalidatingPluginRealmCache pluginCache;
|
||||
private final InvalidatingExtensionRealmCache extensionCache;
|
||||
private final InvalidatingProjectArtifactsCache projectArtifactsCache;
|
||||
private Path multiModuleProjectDirectory;
|
||||
private String pattern;
|
||||
private PathMatcher matcher;
|
||||
|
||||
@Inject
|
||||
public InvalidatingRealmCacheEventSpy(
|
||||
InvalidatingPluginRealmCache cache,
|
||||
InvalidatingExtensionRealmCache extensionCache,
|
||||
InvalidatingProjectArtifactsCache projectArtifactsCache) {
|
||||
this.pluginCache = cache;
|
||||
this.extensionCache = extensionCache;
|
||||
this.projectArtifactsCache = projectArtifactsCache;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEvent(Object event) throws Exception {
|
||||
try {
|
||||
if (event instanceof MavenExecutionRequest) {
|
||||
/* Store the multiModuleProjectDirectory path */
|
||||
multiModuleProjectDirectory = ((MavenExecutionRequest) event)
|
||||
.getMultiModuleProjectDirectory()
|
||||
.toPath();
|
||||
pattern = Environment.MVND_PLUGIN_REALM_EVICT_PATTERN
|
||||
.asOptional()
|
||||
.orElse(Environment.MVND_PLUGIN_REALM_EVICT_PATTERN.getDefault());
|
||||
if (!pattern.isEmpty()) {
|
||||
String[] patterns = pattern.split(",");
|
||||
List<PathMatcher> matchers = new ArrayList<>();
|
||||
for (String pattern : patterns) {
|
||||
if (pattern.startsWith("mvn:")) {
|
||||
String[] parts = pattern.substring("mvn:".length()).split(":");
|
||||
String groupId, artifactId, version;
|
||||
if (parts.length >= 3) {
|
||||
version = parts[2];
|
||||
} else {
|
||||
version = "*";
|
||||
}
|
||||
if (parts.length >= 2) {
|
||||
groupId = parts[0];
|
||||
artifactId = parts[1];
|
||||
} else {
|
||||
groupId = "*";
|
||||
artifactId = parts[0];
|
||||
}
|
||||
pattern = "glob:**/" + ("*".equals(groupId) ? "" : groupId.replace('.', '/') + "/")
|
||||
+ artifactId + "/" + ("*".equals(version) ? "**" : version + "/**");
|
||||
}
|
||||
matchers.add(getPathMatcher(pattern));
|
||||
}
|
||||
if (matchers.size() == 1) {
|
||||
matcher = matchers.iterator().next();
|
||||
} else {
|
||||
matcher = path -> matchers.stream().anyMatch(f -> f.matches(path));
|
||||
}
|
||||
}
|
||||
} else if (event instanceof MavenExecutionResult) {
|
||||
/* Evict the entries referring to jars under multiModuleProjectDirectory */
|
||||
pluginCache.cache.removeIf(this::shouldEvict);
|
||||
extensionCache.cache.removeIf(this::shouldEvict);
|
||||
MavenExecutionResult mer = (MavenExecutionResult) event;
|
||||
List<MavenProject> projects = mer.getTopologicallySortedProjects();
|
||||
projectArtifactsCache.cache.removeIf(
|
||||
(k, r) -> shouldEvict(projects, (InvalidatingProjectArtifactsCache.CacheKey) k, r));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LOG.warn("Could not notify CliPluginRealmCache", e);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean shouldEvict(
|
||||
List<MavenProject> projects,
|
||||
InvalidatingProjectArtifactsCache.CacheKey k,
|
||||
InvalidatingProjectArtifactsCache.Record v) {
|
||||
return projects.stream().anyMatch(p -> k.matches(p.getGroupId(), p.getArtifactId(), p.getVersion()));
|
||||
}
|
||||
|
||||
private boolean shouldEvict(InvalidatingPluginRealmCache.Key k, InvalidatingPluginRealmCache.Record v) {
|
||||
try {
|
||||
for (URL url : v.record.getRealm().getURLs()) {
|
||||
if (url.getProtocol().equals("file")) {
|
||||
final Path path = Paths.get(url.toURI());
|
||||
if (path.startsWith(multiModuleProjectDirectory)) {
|
||||
LOG.debug(
|
||||
"Removing PluginRealmCache entry {} because it refers to an artifact in the build tree {}",
|
||||
k,
|
||||
path);
|
||||
return true;
|
||||
} else if (matcher != null && matcher.matches(path)) {
|
||||
LOG.debug(
|
||||
"Removing PluginRealmCache entry {} because its components {} matches the eviction pattern '{}'",
|
||||
k,
|
||||
path,
|
||||
pattern);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
} catch (URISyntaxException e) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private boolean shouldEvict(InvalidatingExtensionRealmCache.Key k, InvalidatingExtensionRealmCache.Record v) {
|
||||
try {
|
||||
for (URL url : v.record.getRealm().getURLs()) {
|
||||
if (url.getProtocol().equals("file")) {
|
||||
final Path path = Paths.get(url.toURI());
|
||||
if (path.startsWith(multiModuleProjectDirectory)) {
|
||||
LOG.debug(
|
||||
"Removing ExtensionRealmCache entry {} because it refers to an artifact in the build tree {}",
|
||||
k,
|
||||
path);
|
||||
return true;
|
||||
} else if (matcher != null && matcher.matches(path)) {
|
||||
LOG.debug(
|
||||
"Removing ExtensionRealmCache entry {} because its components {} matches the eviction pattern '{}'",
|
||||
k,
|
||||
path,
|
||||
pattern);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
} catch (URISyntaxException e) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private static PathMatcher getPathMatcher(String pattern) {
|
||||
if (!pattern.startsWith("glob:") && !pattern.startsWith("regex:")) {
|
||||
pattern = "glob:" + pattern;
|
||||
}
|
||||
return FileSystems.getDefault().getPathMatcher(pattern);
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.maven.daemon</groupId>
|
||||
<artifactId>mvnd</artifactId>
|
||||
<version>1.0-m7</version>
|
||||
<version>2.0.0-beta-1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mvnd-daemon</artifactId>
|
||||
@@ -30,6 +30,11 @@
|
||||
<packaging>jar</packaging>
|
||||
<name>Maven Daemon - Daemon</name>
|
||||
|
||||
<properties>
|
||||
<!-- If using release, sun.misc is not reachable (see SignalHelper) -->
|
||||
<!-- <maven.compiler.release />-->
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.daemon</groupId>
|
||||
@@ -49,6 +54,10 @@
|
||||
<groupId>org.apache.maven.daemon</groupId>
|
||||
<artifactId>mvnd-logging</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-embedder</artifactId>
|
||||
@@ -85,8 +94,11 @@
|
||||
<dependency>
|
||||
<groupId>org.eclipse.sisu</groupId>
|
||||
<artifactId>org.eclipse.sisu.inject</artifactId>
|
||||
<version>${sisu.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.google.inject</groupId>
|
||||
<artifactId>guice</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -104,6 +116,10 @@
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.eclipse.sisu</groupId>
|
||||
<artifactId>sisu-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
|
||||
@@ -18,12 +18,15 @@
|
||||
*/
|
||||
package org.apache.maven.cli;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintStream;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
@@ -52,8 +55,6 @@ import org.apache.maven.cli.configuration.SettingsXmlConfigurationProcessor;
|
||||
import org.apache.maven.cli.event.ExecutionEventLogger;
|
||||
import org.apache.maven.cli.internal.BootstrapCoreExtensionManager;
|
||||
import org.apache.maven.cli.internal.extension.model.CoreExtension;
|
||||
import org.apache.maven.cli.jansi.JansiMessageBuilderFactory;
|
||||
import org.apache.maven.cli.jansi.MessageUtils;
|
||||
import org.apache.maven.cli.logging.Slf4jConfiguration;
|
||||
import org.apache.maven.cli.logging.Slf4jConfigurationFactory;
|
||||
import org.apache.maven.cli.transfer.QuietMavenTransferListener;
|
||||
@@ -63,10 +64,12 @@ import org.apache.maven.exception.DefaultExceptionHandler;
|
||||
import org.apache.maven.exception.ExceptionHandler;
|
||||
import org.apache.maven.exception.ExceptionSummary;
|
||||
import org.apache.maven.execution.*;
|
||||
import org.apache.maven.execution.scope.internal.MojoExecutionScope;
|
||||
import org.apache.maven.execution.scope.internal.MojoExecutionScopeModule;
|
||||
import org.apache.maven.extension.internal.CoreExports;
|
||||
import org.apache.maven.extension.internal.CoreExportsProvider;
|
||||
import org.apache.maven.extension.internal.CoreExtensionEntry;
|
||||
import org.apache.maven.jline.MessageUtils;
|
||||
import org.apache.maven.lifecycle.LifecycleExecutionException;
|
||||
import org.apache.maven.model.building.ModelProcessor;
|
||||
import org.apache.maven.model.root.RootLocator;
|
||||
@@ -75,6 +78,7 @@ import org.apache.maven.plugin.PluginArtifactsCache;
|
||||
import org.apache.maven.project.MavenProject;
|
||||
import org.apache.maven.project.artifact.ProjectArtifactsCache;
|
||||
import org.apache.maven.properties.internal.SystemProperties;
|
||||
import org.apache.maven.session.scope.internal.SessionScope;
|
||||
import org.apache.maven.session.scope.internal.SessionScopeModule;
|
||||
import org.apache.maven.toolchain.building.DefaultToolchainsBuildingRequest;
|
||||
import org.apache.maven.toolchain.building.ToolchainsBuilder;
|
||||
@@ -91,6 +95,8 @@ import org.codehaus.plexus.interpolation.AbstractValueSource;
|
||||
import org.codehaus.plexus.interpolation.BasicInterpolator;
|
||||
import org.codehaus.plexus.interpolation.StringSearchInterpolator;
|
||||
import org.eclipse.aether.transfer.TransferListener;
|
||||
import org.jline.terminal.Terminal;
|
||||
import org.jline.terminal.impl.ExternalTerminal;
|
||||
import org.mvndaemon.mvnd.cache.invalidating.InvalidatingExtensionRealmCache;
|
||||
import org.mvndaemon.mvnd.cache.invalidating.InvalidatingPluginArtifactsCache;
|
||||
import org.mvndaemon.mvnd.cache.invalidating.InvalidatingProjectArtifactsCache;
|
||||
@@ -98,6 +104,7 @@ import org.mvndaemon.mvnd.cli.EnvHelper;
|
||||
import org.mvndaemon.mvnd.common.Environment;
|
||||
import org.mvndaemon.mvnd.common.Os;
|
||||
import org.mvndaemon.mvnd.logging.internal.Slf4jLoggerManager;
|
||||
import org.mvndaemon.mvnd.logging.slf4j.MvndSimpleLogger;
|
||||
import org.mvndaemon.mvnd.logging.smart.BuildEventListener;
|
||||
import org.mvndaemon.mvnd.logging.smart.LoggingExecutionListener;
|
||||
import org.mvndaemon.mvnd.logging.smart.LoggingOutputStream;
|
||||
@@ -105,7 +112,6 @@ import org.mvndaemon.mvnd.transfer.DaemonMavenTransferListener;
|
||||
import org.slf4j.ILoggerFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.slf4j.impl.MvndSimpleLogger;
|
||||
import org.slf4j.spi.LocationAwareLogger;
|
||||
import org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher;
|
||||
import org.sonatype.plexus.components.sec.dispatcher.SecDispatcher;
|
||||
@@ -184,7 +190,7 @@ public class DaemonMavenCli implements DaemonCli {
|
||||
plexusLoggerManager = new Slf4jLoggerManager();
|
||||
|
||||
this.classWorld = ((ClassRealm) Thread.currentThread().getContextClassLoader()).getWorld();
|
||||
this.messageBuilderFactory = new JansiMessageBuilderFactory();
|
||||
this.messageBuilderFactory = new DaemonMessageBuilderFactory();
|
||||
|
||||
container = container();
|
||||
|
||||
@@ -205,6 +211,13 @@ public class DaemonMavenCli implements DaemonCli {
|
||||
Map<String, String> clientEnv,
|
||||
BuildEventListener buildEventListener)
|
||||
throws Exception {
|
||||
Terminal terminal = new ExternalTerminal(
|
||||
"Maven",
|
||||
"ansi",
|
||||
new ByteArrayInputStream(new byte[0]),
|
||||
new ByteArrayOutputStream(),
|
||||
StandardCharsets.UTF_8);
|
||||
MessageUtils.systemInstall(terminal);
|
||||
this.buildEventListener = buildEventListener;
|
||||
try {
|
||||
CliRequest req = new CliRequest(null, null);
|
||||
@@ -288,10 +301,10 @@ public class DaemonMavenCli implements DaemonCli {
|
||||
}
|
||||
topDirectory = getCanonicalPath(topDirectory);
|
||||
cliRequest.topDirectory = topDirectory;
|
||||
// We're very early in the process and we don't have the container set up yet,
|
||||
// so we rely on the JDK services to eventually lookup a custom RootLocator.
|
||||
// We're very early in the process, and we don't have the container set up yet,
|
||||
// so we rely on the JDK services to eventually look up a custom RootLocator.
|
||||
// This is used to compute {@code session.rootDirectory} but all {@code project.rootDirectory}
|
||||
// properties will be compute through the RootLocator found in the container.
|
||||
// properties will be computed through the RootLocator found in the container.
|
||||
RootLocator rootLocator =
|
||||
ServiceLoader.load(RootLocator.class).iterator().next();
|
||||
Path rootDirectory = rootLocator.findRoot(topDirectory);
|
||||
@@ -496,6 +509,7 @@ public class DaemonMavenCli implements DaemonCli {
|
||||
if (MessageUtils.isColorEnabled()) {
|
||||
MessageBuilder buff = MessageUtils.builder();
|
||||
buff.a("Message styles: ");
|
||||
buff.trace("trace").a(' ');
|
||||
buff.debug("debug").a(' ');
|
||||
buff.info("info").a(' ');
|
||||
buff.warning("warning").a(' ');
|
||||
@@ -572,10 +586,11 @@ public class DaemonMavenCli implements DaemonCli {
|
||||
.filter(s -> s != null && !s.isEmpty())
|
||||
.map(s -> {
|
||||
String[] parts = s.split(":");
|
||||
CoreExtension ce = new CoreExtension();
|
||||
ce.setGroupId(parts[0]);
|
||||
ce.setArtifactId(parts[1]);
|
||||
ce.setVersion(parts[2]);
|
||||
CoreExtension ce = CoreExtension.newBuilder()
|
||||
.groupId(parts[0])
|
||||
.artifactId(parts[1])
|
||||
.version(parts[2])
|
||||
.build();
|
||||
return ce;
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
@@ -624,73 +639,72 @@ public class DaemonMavenCli implements DaemonCli {
|
||||
|
||||
container.setLoggerManager(plexusLoggerManager);
|
||||
|
||||
AbstractValueSource extensionSource = new AbstractValueSource(false) {
|
||||
@Override
|
||||
public Object getValue(String expression) {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
for (CoreExtensionEntry extension : extensionsEntries) {
|
||||
container.discoverComponents(
|
||||
extension.getClassRealm(),
|
||||
new SessionScopeModule(container),
|
||||
new MojoExecutionScopeModule(container));
|
||||
new SessionScopeModule(container.lookup(SessionScope.class)),
|
||||
new MojoExecutionScopeModule(container.lookup(MojoExecutionScope.class)),
|
||||
new ExtensionConfigurationModule(extension, extensionSource));
|
||||
}
|
||||
return container;
|
||||
}
|
||||
|
||||
private List<CoreExtensionEntry> loadCoreExtensions(
|
||||
List<CoreExtension> extensions, ClassRealm containerRealm, Set<String> providedArtifacts) {
|
||||
try {
|
||||
if (extensions.isEmpty()) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
ContainerConfiguration cc = new DefaultContainerConfiguration() //
|
||||
.setClassWorld(classWorld) //
|
||||
.setRealm(containerRealm) //
|
||||
.setClassPathScanning(PlexusConstants.SCANNING_INDEX) //
|
||||
.setAutoWiring(true) //
|
||||
.setJSR250Lifecycle(true) //
|
||||
.setName("maven");
|
||||
|
||||
DefaultPlexusContainer container = new DefaultPlexusContainer(cc, new AbstractModule() {
|
||||
@Override
|
||||
protected void configure() {
|
||||
bind(ILoggerFactory.class).toInstance(slf4jLoggerFactory);
|
||||
}
|
||||
});
|
||||
MavenExecutionRequestPopulator executionRequestPopulator = null;
|
||||
try {
|
||||
CliRequest cliRequest = new CliRequest(new String[0], classWorld);
|
||||
cliRequest.commandLine = new CommandLine.Builder().build();
|
||||
container.setLookupRealm(null);
|
||||
container.setLoggerManager(plexusLoggerManager);
|
||||
container.getLoggerManager().setThresholds(cliRequest.request.getLoggingLevel());
|
||||
Thread.currentThread().setContextClassLoader(container.getContainerRealm());
|
||||
executionRequestPopulator = container.lookup(MavenExecutionRequestPopulator.class);
|
||||
final Map<String, ConfigurationProcessor> configurationProcessors =
|
||||
container.lookupMap(ConfigurationProcessor.class);
|
||||
final EventSpyDispatcher eventSpyDispatcher = container.lookup(EventSpyDispatcher.class);
|
||||
properties(cliRequest);
|
||||
configure(cliRequest, eventSpyDispatcher, configurationProcessors);
|
||||
LoggingExecutionListener executionListener = container.lookup(LoggingExecutionListener.class);
|
||||
populateRequest(
|
||||
cliRequest,
|
||||
cliRequest.request,
|
||||
eventSpyDispatcher,
|
||||
container.lookup(ModelProcessor.class),
|
||||
createTransferListener(cliRequest),
|
||||
buildEventListener,
|
||||
executionListener);
|
||||
executionRequestPopulator.populateDefaults(cliRequest.request);
|
||||
BootstrapCoreExtensionManager resolver = container.lookup(BootstrapCoreExtensionManager.class);
|
||||
return Collections.unmodifiableList(
|
||||
resolver.loadCoreExtensions(cliRequest.request, providedArtifacts, extensions));
|
||||
} finally {
|
||||
executionRequestPopulator = null;
|
||||
container.dispose();
|
||||
}
|
||||
} catch (RuntimeException e) {
|
||||
// runtime exceptions are most likely bugs in maven, let them bubble up to the user
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
slf4jLogger.warn("Failed to load extensions descriptor {}: {}", extensions, e.getMessage());
|
||||
List<CoreExtension> extensions, ClassRealm containerRealm, Set<String> providedArtifacts) throws Exception {
|
||||
if (extensions.isEmpty()) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
ContainerConfiguration cc = new DefaultContainerConfiguration() //
|
||||
.setClassWorld(classWorld) //
|
||||
.setRealm(containerRealm) //
|
||||
.setClassPathScanning(PlexusConstants.SCANNING_INDEX) //
|
||||
.setAutoWiring(true) //
|
||||
.setJSR250Lifecycle(true) //
|
||||
.setName("maven");
|
||||
|
||||
DefaultPlexusContainer container = new DefaultPlexusContainer(cc, new AbstractModule() {
|
||||
@Override
|
||||
protected void configure() {
|
||||
bind(ILoggerFactory.class).toInstance(slf4jLoggerFactory);
|
||||
}
|
||||
});
|
||||
MavenExecutionRequestPopulator executionRequestPopulator = null;
|
||||
try {
|
||||
CliRequest cliRequest = new CliRequest(new String[0], classWorld);
|
||||
cliRequest.commandLine = new CommandLine.Builder().build();
|
||||
container.setLookupRealm(null);
|
||||
container.setLoggerManager(plexusLoggerManager);
|
||||
container.getLoggerManager().setThresholds(cliRequest.request.getLoggingLevel());
|
||||
Thread.currentThread().setContextClassLoader(container.getContainerRealm());
|
||||
executionRequestPopulator = container.lookup(MavenExecutionRequestPopulator.class);
|
||||
final Map<String, ConfigurationProcessor> configurationProcessors =
|
||||
container.lookupMap(ConfigurationProcessor.class);
|
||||
final EventSpyDispatcher eventSpyDispatcher = container.lookup(EventSpyDispatcher.class);
|
||||
properties(cliRequest);
|
||||
configure(cliRequest, eventSpyDispatcher, configurationProcessors);
|
||||
LoggingExecutionListener executionListener = container.lookup(LoggingExecutionListener.class);
|
||||
populateRequest(
|
||||
cliRequest,
|
||||
cliRequest.request,
|
||||
eventSpyDispatcher,
|
||||
container.lookup(ModelProcessor.class),
|
||||
createTransferListener(cliRequest),
|
||||
buildEventListener,
|
||||
executionListener);
|
||||
executionRequestPopulator.populateDefaults(cliRequest.request);
|
||||
BootstrapCoreExtensionManager resolver = container.lookup(BootstrapCoreExtensionManager.class);
|
||||
return Collections.unmodifiableList(
|
||||
resolver.loadCoreExtensions(cliRequest.request, providedArtifacts, extensions));
|
||||
} finally {
|
||||
executionRequestPopulator = null;
|
||||
container.dispose();
|
||||
}
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
private ClassRealm setupContainerRealm(
|
||||
@@ -1127,6 +1141,16 @@ public class DaemonMavenCli implements DaemonCli {
|
||||
request.setMakeBehavior(determineMakeBehavior(commandLine));
|
||||
request.setCacheNotFound(true);
|
||||
request.setCacheTransferError(false);
|
||||
boolean strictArtifactDescriptorPolicy = commandLine.hasOption(CLIManager.STRICT_ARTIFACT_DESCRIPTOR_POLICY)
|
||||
&& Boolean.parseBoolean(commandLine.getOptionValue(CLIManager.STRICT_ARTIFACT_DESCRIPTOR_POLICY));
|
||||
if (strictArtifactDescriptorPolicy) {
|
||||
request.setIgnoreMissingArtifactDescriptor(false);
|
||||
request.setIgnoreInvalidArtifactDescriptor(false);
|
||||
} else {
|
||||
request.setIgnoreMissingArtifactDescriptor(true);
|
||||
request.setIgnoreInvalidArtifactDescriptor(true);
|
||||
}
|
||||
request.setIgnoreTransitiveRepositories(commandLine.hasOption(CLIManager.IGNORE_TRANSITIVE_REPOSITORIES));
|
||||
|
||||
performProjectActivation(commandLine, request.getProjectActivation());
|
||||
performProfileActivation(commandLine, request.getProfileActivation());
|
||||
@@ -1182,12 +1206,12 @@ public class DaemonMavenCli implements DaemonCli {
|
||||
}
|
||||
|
||||
private String determineLocalRepositoryPath(final MavenExecutionRequest request) {
|
||||
String userDefinedLocalRepo = request.getUserProperties().getProperty(MavenCli.LOCAL_REPO_PROPERTY);
|
||||
String userDefinedLocalRepo = request.getUserProperties().getProperty(DaemonMavenCli.LOCAL_REPO_PROPERTY);
|
||||
if (userDefinedLocalRepo != null) {
|
||||
return userDefinedLocalRepo;
|
||||
}
|
||||
|
||||
return request.getSystemProperties().getProperty(MavenCli.LOCAL_REPO_PROPERTY);
|
||||
return request.getSystemProperties().getProperty(DaemonMavenCli.LOCAL_REPO_PROPERTY);
|
||||
}
|
||||
|
||||
private File determinePom(
|
||||
@@ -1200,22 +1224,16 @@ public class DaemonMavenCli implements DaemonCli {
|
||||
alternatePomFile = commandLine.getOptionValue(CLIManager.ALTERNATE_POM_FILE);
|
||||
}
|
||||
|
||||
File current = baseDirectory;
|
||||
if (alternatePomFile != null) {
|
||||
File pom = resolveFile(new File(alternatePomFile), workingDirectory);
|
||||
if (pom.isDirectory()) {
|
||||
pom = new File(pom, "pom.xml");
|
||||
}
|
||||
|
||||
return pom;
|
||||
} else if (modelProcessor != null) {
|
||||
File pom = modelProcessor.locatePom(baseDirectory);
|
||||
|
||||
if (pom.isFile()) {
|
||||
return pom;
|
||||
}
|
||||
current = resolveFile(new File(alternatePomFile), workingDirectory);
|
||||
}
|
||||
|
||||
return null;
|
||||
if (modelProcessor != null) {
|
||||
return modelProcessor.locateExistingPom(current);
|
||||
} else {
|
||||
return current.isFile() ? current : null;
|
||||
}
|
||||
}
|
||||
|
||||
// Visible for testing
|
||||
@@ -16,26 +16,30 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.mvndaemon.mvnd.common;
|
||||
package org.apache.maven.cli;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.SocketAddress;
|
||||
import java.net.StandardProtocolFamily;
|
||||
import java.net.UnixDomainSocketAddress;
|
||||
import java.nio.channels.ServerSocketChannel;
|
||||
import java.nio.channels.SocketChannel;
|
||||
import javax.annotation.Priority;
|
||||
import javax.inject.Named;
|
||||
import javax.inject.Singleton;
|
||||
|
||||
public class SocketHelper {
|
||||
import org.apache.maven.api.annotations.Experimental;
|
||||
import org.apache.maven.jline.JLineMessageBuilderFactory;
|
||||
import org.mvndaemon.mvnd.common.Environment;
|
||||
|
||||
public static SocketChannel openUnixSocket() throws IOException {
|
||||
return SocketChannel.open(StandardProtocolFamily.UNIX);
|
||||
}
|
||||
@Named
|
||||
@Singleton
|
||||
@Priority(10)
|
||||
@Experimental
|
||||
public class DaemonMessageBuilderFactory extends JLineMessageBuilderFactory {
|
||||
|
||||
public static ServerSocketChannel openUnixServerSocket() throws IOException {
|
||||
return ServerSocketChannel.open(StandardProtocolFamily.UNIX).bind(null, 0);
|
||||
}
|
||||
|
||||
public static SocketAddress unixSocketAddressOf(String s) {
|
||||
return UnixDomainSocketAddress.of(s);
|
||||
@Override
|
||||
public int getTerminalWidth() {
|
||||
int terminalWidth;
|
||||
try {
|
||||
terminalWidth = Environment.MVND_TERMINAL_WIDTH.asInt();
|
||||
} catch (Exception e) {
|
||||
terminalWidth = 80;
|
||||
}
|
||||
return terminalWidth;
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,9 @@
|
||||
package org.apache.maven.project;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import org.apache.maven.building.Source;
|
||||
import org.apache.maven.model.building.ModelCache;
|
||||
|
||||
public class SnapshotModelCache implements ModelCache {
|
||||
@@ -33,13 +35,13 @@ public class SnapshotModelCache implements ModelCache {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void put(String groupId, String artifactId, String version, String tag, Object data) {
|
||||
getDelegate(version).put(groupId, artifactId, version, tag, data);
|
||||
public <T> T computeIfAbsent(String groupId, String artifactId, String version, String tag, Supplier<T> data) {
|
||||
return getDelegate(version).computeIfAbsent(groupId, artifactId, version, tag, data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object get(String groupId, String artifactId, String version, String tag) {
|
||||
return getDelegate(version).get(groupId, artifactId, version, tag);
|
||||
public <T> T computeIfAbsent(Source path, String tag, Supplier<T> data) {
|
||||
return reactorCache.computeIfAbsent(path, tag, data);
|
||||
}
|
||||
|
||||
private ModelCache getDelegate(String version) {
|
||||
@@ -153,7 +153,7 @@ public class DaemonPrompter extends AbstractInputHandler implements Prompter, In
|
||||
Connection con = Objects.requireNonNull(Connection.getCurrent());
|
||||
String projectId = ProjectBuildLogAppender.getProjectId();
|
||||
Message.ProjectEvent msg = Message.display(projectId, message);
|
||||
LOGGER.info("Sending display request: {}", msg);
|
||||
LOGGER.debug("Sending display request: {}", msg);
|
||||
con.dispatch(msg);
|
||||
} catch (Exception e) {
|
||||
throw new IOException("Unable to display message", e);
|
||||
@@ -166,9 +166,9 @@ public class DaemonPrompter extends AbstractInputHandler implements Prompter, In
|
||||
String projectId = ProjectBuildLogAppender.getProjectId();
|
||||
String uid = UUID.randomUUID().toString();
|
||||
Message.Prompt msg = new Message.Prompt(projectId, uid, message, password);
|
||||
LOGGER.info("Requesting prompt: {}", msg);
|
||||
LOGGER.debug("Requesting prompt: {}", msg);
|
||||
Message.PromptResponse res = con.request(msg, Message.PromptResponse.class, r -> uid.equals(r.getUid()));
|
||||
LOGGER.info("Received response: {}", res.getMessage());
|
||||
LOGGER.debug("Received response: {}", res.getMessage());
|
||||
return res.getMessage();
|
||||
} catch (Exception e) {
|
||||
throw new IOException("Unable to prompt user", e);
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<extension>
|
||||
<exportedPackages>
|
||||
<exportedPackage>org.apache.commons.logging.*</exportedPackage>
|
||||
<exportedPackage>org.codehaus.plexus.components.interactivity.*</exportedPackage>
|
||||
</exportedPackages>
|
||||
|
||||
<exportedArtifacts>
|
||||
<exportedArtifact>org.codehaus.plexus:plexus-interactivity-api</exportedArtifact>
|
||||
</exportedArtifacts>
|
||||
</extension>
|
||||
@@ -1,82 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright 2019-2021 the original author or authors.
|
||||
|
||||
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.
|
||||
|
||||
-->
|
||||
<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/maven-v4_0_0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.apache.maven.daemon</groupId>
|
||||
<artifactId>mvnd</artifactId>
|
||||
<version>1.0-m7</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mvnd-dist-m39</artifactId>
|
||||
|
||||
<packaging>pom</packaging>
|
||||
<name>Maven Daemon - Distribution for 3.9.x</name>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
<maven.compiler.source>11</maven.compiler.source>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.daemon</groupId>
|
||||
<artifactId>mvnd-agent</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.daemon</groupId>
|
||||
<artifactId>mvnd-helper-agent</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.daemon</groupId>
|
||||
<artifactId>mvnd-client</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.daemon</groupId>
|
||||
<artifactId>mvnd-daemon</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.daemon</groupId>
|
||||
<artifactId>mvnd-daemon-m39</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>ca.vanzyl.provisio.maven.plugins</groupId>
|
||||
<artifactId>provisio-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>maven-distro</id>
|
||||
<goals>
|
||||
<goal>provision</goal>
|
||||
</goals>
|
||||
<phase>package</phase>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.directory}/maven-mvnd-${project.version}-m39-${os.detected.name}-${os.detected.arch}</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -1,96 +0,0 @@
|
||||
<!--
|
||||
|
||||
Copyright 2019-2021 the original author or authors.
|
||||
|
||||
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.
|
||||
|
||||
-->
|
||||
<assembly>
|
||||
|
||||
<artifactSet to="/mvn">
|
||||
<artifact id="org.apache.maven:apache-maven:tar.gz:bin:${maven3.version}">
|
||||
<unpack useRoot="false"
|
||||
excludes="lib/maven-slf4j-*" />
|
||||
</artifact>
|
||||
</artifactSet>
|
||||
|
||||
<artifactSet to="/mvn/lib">
|
||||
<artifact id="org.apache.maven.daemon:mvnd-logging:${project.version}">
|
||||
<exclusion id="*:*"/>
|
||||
</artifact>
|
||||
<artifact id="org.slf4j:jul-to-slf4j">
|
||||
<exclusion id="*:*"/>
|
||||
</artifact>
|
||||
</artifactSet>
|
||||
|
||||
<artifactSet to="/mvn/lib/mvnd">
|
||||
<artifact id="io.takari.maven:takari-smart-builder:${takari-smart-builder.version}">
|
||||
<exclusion id="*:*"/>
|
||||
</artifact>
|
||||
<artifact id="org.apache.maven.daemon:mvnd-daemon:${project.version}">
|
||||
<exclusion id="*:*"/>
|
||||
</artifact>
|
||||
<artifact id="org.apache.maven.daemon:mvnd-daemon-m39:${project.version}">
|
||||
<exclusion id="*:*"/>
|
||||
</artifact>
|
||||
<artifact id="org.apache.maven.daemon:mvnd-client:${project.version}">
|
||||
<exclusion id="*:*"/>
|
||||
</artifact>
|
||||
<artifact id="org.apache.maven.daemon:mvnd-common:${project.version}">
|
||||
<exclusion id="*:*"/>
|
||||
</artifact>
|
||||
<artifact id="org.apache.maven.daemon:mvnd-agent:${project.version}">
|
||||
<exclusion id="*:*"/>
|
||||
</artifact>
|
||||
<artifact id="org.apache.maven.daemon:mvnd-helper-agent:${project.version}">
|
||||
<exclusion id="*:*"/>
|
||||
</artifact>
|
||||
<artifact id="org.apache.maven.daemon:mvnd-native:${project.version}">
|
||||
<exclusion id="*:*"/>
|
||||
</artifact>
|
||||
<artifact id="org.codehaus.plexus:plexus-interactivity-api">
|
||||
<exclusion id="*:*"/>
|
||||
</artifact>
|
||||
<artifact id="org.jline:jline-terminal">
|
||||
<exclusion id="*:*"/>
|
||||
</artifact>
|
||||
<artifact id="org.jline:jline-terminal-jansi">
|
||||
<exclusion id="*:*"/>
|
||||
</artifact>
|
||||
</artifactSet>
|
||||
|
||||
<fileSet to="/">
|
||||
<directory path="${basedir}/../dist/src/main/distro"/>
|
||||
<directory path="${basedir}/..">
|
||||
<include>NOTICE.txt</include>
|
||||
<include>LICENSE.txt</include>
|
||||
<include>README.adoc</include>
|
||||
</directory>
|
||||
</fileSet>
|
||||
<fileSet to="/bin">
|
||||
<directory path="${basedir}/../client/target">
|
||||
<include>mvnd</include>
|
||||
<include>mvnd.exe</include>
|
||||
</directory>
|
||||
<directory path="${basedir}/../dist/src/main/resources">
|
||||
<include>platform-${os.detected.name}-${os.detected.arch}</include>
|
||||
</directory>
|
||||
</fileSet>
|
||||
|
||||
<archive name="maven-mvnd-${project.version}-m39-${os.detected.name}-${os.detected.arch}.zip"
|
||||
executable="**/bin/mvnd"/>
|
||||
|
||||
<archive name="maven-mvnd-${project.version}-m39-${os.detected.name}-${os.detected.arch}.tar.gz"
|
||||
executable="**/bin/mvnd"/>
|
||||
|
||||
</assembly>
|
||||
19
dist-m40/pom.xml → dist/pom.xml
vendored
19
dist-m40/pom.xml → dist/pom.xml
vendored
@@ -22,17 +22,17 @@
|
||||
<parent>
|
||||
<groupId>org.apache.maven.daemon</groupId>
|
||||
<artifactId>mvnd</artifactId>
|
||||
<version>1.0-m7</version>
|
||||
<version>2.0.0-beta-1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mvnd-dist-m40</artifactId>
|
||||
<artifactId>mvnd-dist</artifactId>
|
||||
|
||||
<packaging>pom</packaging>
|
||||
<name>Maven Daemon - Distribution for 4.0.x</name>
|
||||
<name>Maven Daemon - Distribution</name>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
<maven.compiler.source>11</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@@ -54,7 +54,12 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.daemon</groupId>
|
||||
<artifactId>mvnd-daemon-m40</artifactId>
|
||||
<artifactId>mvnd-logging</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.inject</groupId>
|
||||
<artifactId>guice</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
@@ -71,7 +76,7 @@
|
||||
</goals>
|
||||
<phase>package</phase>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.directory}/maven-mvnd-${project.version}-m40-${os.detected.name}-${os.detected.arch}</outputDirectory>
|
||||
<outputDirectory>${project.build.directory}/maven-mvnd-${project.version}-${os.detected.name}-${os.detected.arch}</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
@@ -217,8 +217,8 @@ _mvnd()
|
||||
_get_comp_words_by_ref -n : cur prev
|
||||
|
||||
local mvnd_opts="-1"
|
||||
local mvnd_long_opts="--color|--completion|--purge|--raw-streams|--serial|--status|--stop"
|
||||
local mvnd_properties="-Djava.home|-Djdk.java.options|-Dmaven.multiModuleProjectDirectory|-Dmaven.repo.local|-Dmaven.settings|-Dmvnd.buildTime|-Dmvnd.builder|-Dmvnd.cancelConnectTimeout|-Dmvnd.connectTimeout|-Dmvnd.daemonStorage|-Dmvnd.debug|-Dmvnd.debug.address|-Dmvnd.duplicateDaemonGracePeriod|-Dmvnd.enableAssertions|-Dmvnd.expirationCheckDelay|-Dmvnd.home|-Dmvnd.idleTimeout|-Dmvnd.jvmArgs|-Dmvnd.keepAlive|-Dmvnd.logPurgePeriod|-Dmvnd.maxHeapSize|-Dmvnd.maxLostKeepAlive|-Dmvnd.minHeapSize|-Dmvnd.minThreads|-Dmvnd.noBuffering|-Dmvnd.noDaemon|-Dmvnd.noModelCache|-Dmvnd.pluginRealmEvictPattern|-Dmvnd.propertiesPath|-Dmvnd.rawStreams|-Dmvnd.registry|-Dmvnd.rollingWindowSize|-Dmvnd.serial|-Dmvnd.socketConnectTimeout|-Dmvnd.socketFamily|-Dmvnd.threadStackSize|-Dmvnd.threads|-Dstyle.color|-Duser.dir|-Duser.home"
|
||||
local mvnd_long_opts="--color|--completion|--diag|--purge|--raw-streams|--serial|--status|--stop"
|
||||
local mvnd_properties="-Djava.home|-Djdk.java.options|-Dmaven.multiModuleProjectDirectory|-Dmaven.repo.local|-Dmaven.settings|-Dmvnd.buildTime|-Dmvnd.builder|-Dmvnd.cancelConnectTimeout|-Dmvnd.connectTimeout|-Dmvnd.coreExtensionsExclude|-Dmvnd.daemonStorage|-Dmvnd.debug|-Dmvnd.debug.address|-Dmvnd.duplicateDaemonGracePeriod|-Dmvnd.enableAssertions|-Dmvnd.expirationCheckDelay|-Dmvnd.home|-Dmvnd.idleTimeout|-Dmvnd.jvmArgs|-Dmvnd.keepAlive|-Dmvnd.logPurgePeriod|-Dmvnd.maxHeapSize|-Dmvnd.maxLostKeepAlive|-Dmvnd.minHeapSize|-Dmvnd.minThreads|-Dmvnd.noBuffering|-Dmvnd.noDaemon|-Dmvnd.noModelCache|-Dmvnd.pluginRealmEvictPattern|-Dmvnd.propertiesPath|-Dmvnd.rawStreams|-Dmvnd.registry|-Dmvnd.rollingWindowSize|-Dmvnd.serial|-Dmvnd.socketConnectTimeout|-Dmvnd.socketFamily|-Dmvnd.threadStackSize|-Dmvnd.threads|-Dstyle.color|-Duser.dir|-Duser.home"
|
||||
local opts="-am|-amd|-B|-C|-c|-cpu|-D|-e|-emp|-ep|-f|-fae|-ff|-fn|-gs|-h|-l|-N|-npr|-npu|-nsu|-o|-P|-pl|-q|-rf|-s|-T|-t|-U|-up|-V|-v|-X|${mvnd_opts}"
|
||||
local long_opts="--also-make|--also-make-dependents|--batch-mode|--strict-checksums|--lax-checksums|--check-plugin-updates|--define|--errors|--encrypt-master-password|--encrypt-password|--file|--fail-at-end|--fail-fast|--fail-never|--global-settings|--help|--log-file|--non-recursive|--no-plugin-registry|--no-plugin-updates|--no-snapshot-updates|--offline|--activate-profiles|--projects|--quiet|--resume-from|--settings|--threads|--toolchains|--update-snapshots|--update-plugins|--show-version|--version|--debug|${mvnd_long_opts}"
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<assembly>
|
||||
|
||||
<artifactSet to="/mvn">
|
||||
<artifact id="org.apache.maven:apache-maven:tar.gz:bin:${maven4.version}">
|
||||
<artifact id="org.apache.maven:apache-maven:tar.gz:bin:${maven.version}">
|
||||
<unpack useRoot="false"
|
||||
excludes="lib/maven-slf4j-*,lib/plexus-utils-3.*" />
|
||||
</artifact>
|
||||
@@ -43,9 +43,6 @@
|
||||
<artifact id="org.apache.maven.daemon:mvnd-daemon:${project.version}">
|
||||
<exclusion id="*:*"/>
|
||||
</artifact>
|
||||
<artifact id="org.apache.maven.daemon:mvnd-daemon-m40:${project.version}">
|
||||
<exclusion id="*:*"/>
|
||||
</artifact>
|
||||
<artifact id="org.apache.maven.daemon:mvnd-client:${project.version}">
|
||||
<exclusion id="*:*"/>
|
||||
</artifact>
|
||||
@@ -61,15 +58,6 @@
|
||||
<artifact id="org.apache.maven.daemon:mvnd-native:${project.version}">
|
||||
<exclusion id="*:*"/>
|
||||
</artifact>
|
||||
<artifact id="org.codehaus.plexus:plexus-interactivity-api">
|
||||
<exclusion id="*:*"/>
|
||||
</artifact>
|
||||
<artifact id="org.jline:jline-terminal">
|
||||
<exclusion id="*:*"/>
|
||||
</artifact>
|
||||
<artifact id="org.jline:jline-terminal-jansi">
|
||||
<exclusion id="*:*"/>
|
||||
</artifact>
|
||||
</artifactSet>
|
||||
|
||||
<fileSet to="/">
|
||||
@@ -90,10 +78,10 @@
|
||||
</directory>
|
||||
</fileSet>
|
||||
|
||||
<archive name="maven-mvnd-${project.version}-m40-${os.detected.name}-${os.detected.arch}.zip"
|
||||
<archive name="maven-mvnd-${project.version}-${os.detected.name}-${os.detected.arch}.zip"
|
||||
executable="**/bin/mvnd"/>
|
||||
|
||||
<archive name="maven-mvnd-${project.version}-m40-${os.detected.name}-${os.detected.arch}.tar.gz"
|
||||
<archive name="maven-mvnd-${project.version}-${os.detected.name}-${os.detected.arch}.tar.gz"
|
||||
executable="**/bin/mvnd"/>
|
||||
|
||||
</assembly>
|
||||
@@ -22,7 +22,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.maven.daemon</groupId>
|
||||
<artifactId>mvnd</artifactId>
|
||||
<version>1.0-m7</version>
|
||||
<version>2.0.0-beta-1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mvnd-helper-agent</artifactId>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.maven.daemon</groupId>
|
||||
<artifactId>mvnd</artifactId>
|
||||
<version>1.0-m7</version>
|
||||
<version>2.0.0-beta-1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mvnd-integration-tests</artifactId>
|
||||
@@ -30,10 +30,9 @@
|
||||
<name>Maven Daemon - Integration Tests</name>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
<maven.compiler.source>11</maven.compiler.source>
|
||||
<mvnd.m39.home>${project.basedir}/../dist-m39/target/maven-mvnd-${project.version}-m39-${os.detected.name}-${os.detected.arch}</mvnd.m39.home>
|
||||
<mvnd.m40.home>${project.basedir}/../dist-m40/target/maven-mvnd-${project.version}-m40-${os.detected.name}-${os.detected.arch}</mvnd.m40.home>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<mvnd.home>${project.basedir}/../dist/target/maven-mvnd-${project.version}-${os.detected.name}-${os.detected.arch}</mvnd.home>
|
||||
<preinstall.artifacts>org/apache/maven/surefire/surefire-providers/${surefire.version}
|
||||
org/apache/maven/surefire/surefire-junit-platform/${surefire.version}
|
||||
org/junit/platform/junit-platform-launcher/${junit-platform-launcher.version}
|
||||
@@ -41,7 +40,6 @@
|
||||
org/junit/platform/junit-platform-commons/${junit-platform-launcher.version}
|
||||
org/junit/jupiter/junit-jupiter/${junit.jupiter.version}
|
||||
org/junit/jupiter/junit-jupiter-api/${junit.jupiter.version}</preinstall.artifacts>
|
||||
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@@ -57,19 +55,7 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.daemon</groupId>
|
||||
<artifactId>mvnd-dist-m39</artifactId>
|
||||
<type>pom</type>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-simple</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.daemon</groupId>
|
||||
<artifactId>mvnd-dist-m40</artifactId>
|
||||
<artifactId>mvnd-dist</artifactId>
|
||||
<type>pom</type>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
@@ -97,13 +83,11 @@
|
||||
<dependency>
|
||||
<groupId>org.testcontainers</groupId>
|
||||
<artifactId>testcontainers</artifactId>
|
||||
<version>1.18.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.testcontainers</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<version>1.18.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
@@ -115,49 +99,16 @@
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<rerunFailingTestsCount>4</rerunFailingTestsCount>
|
||||
<systemPropertyVariables>
|
||||
<mvnd.home>${mvnd.home}</mvnd.home>
|
||||
<project.version>${project.version}</project.version>
|
||||
<mrm.repository.url>${mrm.repository.url}</mrm.repository.url>
|
||||
<os.detected.name>${os.detected.name}</os.detected.name>
|
||||
<os.detected.arch>${os.detected.arch}</os.detected.arch>
|
||||
<mvnd.test.hostLocalMavenRepo>${settings.localRepository}</mvnd.test.hostLocalMavenRepo>
|
||||
<preinstall.artifacts>${preinstall.artifacts}</preinstall.artifacts>
|
||||
</systemPropertyVariables>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>default-test</id>
|
||||
<phase>none</phase>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>mvn-39</id>
|
||||
<goals>
|
||||
<goal>test</goal>
|
||||
</goals>
|
||||
<phase>test</phase>
|
||||
<configuration>
|
||||
<systemPropertyVariables>
|
||||
<mvnd.home>${mvnd.m39.home}</mvnd.home>
|
||||
<project.version>${project.version}</project.version>
|
||||
<mrm.repository.url>${mrm.repository.url}</mrm.repository.url>
|
||||
<os.detected.name>${os.detected.name}</os.detected.name>
|
||||
<os.detected.arch>${os.detected.arch}</os.detected.arch>
|
||||
<mvnd.test.hostLocalMavenRepo>${settings.localRepository}</mvnd.test.hostLocalMavenRepo>
|
||||
<preinstall.artifacts>${preinstall.artifacts}</preinstall.artifacts>
|
||||
</systemPropertyVariables>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>mvn-40</id>
|
||||
<goals>
|
||||
<goal>test</goal>
|
||||
</goals>
|
||||
<phase>test</phase>
|
||||
<configuration>
|
||||
<systemPropertyVariables>
|
||||
<mvnd.home>${mvnd.m40.home}</mvnd.home>
|
||||
<project.version>${project.version}</project.version>
|
||||
<mrm.repository.url>${mrm.repository.url}</mrm.repository.url>
|
||||
<os.detected.name>${os.detected.name}</os.detected.name>
|
||||
<os.detected.arch>${os.detected.arch}</os.detected.arch>
|
||||
<mvnd.test.hostLocalMavenRepo>${settings.localRepository}</mvnd.test.hostLocalMavenRepo>
|
||||
<preinstall.artifacts>${preinstall.artifacts}</preinstall.artifacts>
|
||||
</systemPropertyVariables>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
@@ -234,25 +185,7 @@
|
||||
<configuration>
|
||||
<systemPropertyVariables>
|
||||
<project.version>${project.version}</project.version>
|
||||
<mvnd.home>${mvnd.m39.home}</mvnd.home>
|
||||
<mrm.repository.url>${mrm.repository.url}</mrm.repository.url>
|
||||
<os.detected.name>${os.detected.name}</os.detected.name>
|
||||
<os.detected.arch>${os.detected.arch}</os.detected.arch>
|
||||
<mvnd.test.hostLocalMavenRepo>${settings.localRepository}</mvnd.test.hostLocalMavenRepo>
|
||||
<preinstall.artifacts>${preinstall.artifacts}</preinstall.artifacts>
|
||||
</systemPropertyVariables>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>native-40</id>
|
||||
<goals>
|
||||
<goal>integration-test</goal>
|
||||
<goal>verify</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<systemPropertyVariables>
|
||||
<project.version>${project.version}</project.version>
|
||||
<mvnd.home>${mvnd.m40.home}</mvnd.home>
|
||||
<mvnd.home>${mvnd.home}</mvnd.home>
|
||||
<mrm.repository.url>${mrm.repository.url}</mrm.repository.url>
|
||||
<os.detected.name>${os.detected.name}</os.detected.name>
|
||||
<os.detected.arch>${os.detected.arch}</os.detected.arch>
|
||||
|
||||
@@ -59,7 +59,7 @@ public class TestClientOutput implements ClientOutput {
|
||||
|
||||
@Override
|
||||
public void describeTerminal() {
|
||||
accept(Message.display("Test terminal"));
|
||||
accept(Message.display("test", "Test terminal"));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -76,6 +76,6 @@ public class TestClientOutput implements ClientOutput {
|
||||
}
|
||||
|
||||
public List<String> messagesToString() {
|
||||
return messages.stream().map(m -> m.toString()).collect(Collectors.toList());
|
||||
return messages.stream().map(Object::toString).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
|
||||
@Testcontainers(disabledWithoutDocker = true)
|
||||
public class AlpineLinuxNativeIT {
|
||||
class AlpineLinuxNativeIT {
|
||||
|
||||
private ImageFromDockerfile image;
|
||||
private String mvndHome;
|
||||
|
||||
@@ -23,7 +23,7 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
|
||||
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
|
||||
@Testcontainers(disabledWithoutDocker = true)
|
||||
public class AlpineLinuxTest extends AlpineLinuxNativeIT {
|
||||
class AlpineLinuxTest extends AlpineLinuxNativeIT {
|
||||
|
||||
@Override
|
||||
protected boolean isNative() {
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.mvndaemon.mvnd.client.Client;
|
||||
import org.mvndaemon.mvnd.junit.MvndTest;
|
||||
|
||||
@MvndTest(projectDir = "src/test/projects/attached-artifact-resolution")
|
||||
public class AttachedArtifactResolutionTest {
|
||||
class AttachedArtifactResolutionTest {
|
||||
|
||||
@Inject
|
||||
Client client;
|
||||
|
||||
@@ -37,7 +37,7 @@ import static org.junit.jupiter.api.Assertions.fail;
|
||||
|
||||
@MvndTest(projectDir = "src/test/projects/bootstrap-plugin")
|
||||
@DisabledOnOs(OS.WINDOWS)
|
||||
public class BootstrapPluginTest {
|
||||
class BootstrapPluginTest {
|
||||
|
||||
@Inject
|
||||
Client client;
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.mvndaemon.mvnd.junit.MvndNativeTest;
|
||||
import org.mvndaemon.mvnd.junit.MvndTestExtension;
|
||||
|
||||
@MvndNativeTest(projectDir = MvndTestExtension.TEMP_EXTERNAL)
|
||||
public class CompletionNativeIT {
|
||||
class CompletionNativeIT {
|
||||
|
||||
@Inject
|
||||
Client client;
|
||||
|
||||
@@ -22,4 +22,4 @@ import org.mvndaemon.mvnd.junit.MvndTest;
|
||||
import org.mvndaemon.mvnd.junit.MvndTestExtension;
|
||||
|
||||
@MvndTest(projectDir = MvndTestExtension.TEMP_EXTERNAL)
|
||||
public class CompletionTest extends CompletionNativeIT {}
|
||||
class CompletionTest extends CompletionNativeIT {}
|
||||
|
||||
@@ -33,7 +33,7 @@ import org.mvndaemon.mvnd.junit.TestParameters;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
@MvndTest(projectDir = "src/test/projects/concurrent-downloads")
|
||||
public class ConcurrentDownloadsTest {
|
||||
class ConcurrentDownloadsTest {
|
||||
|
||||
@Inject
|
||||
ClientFactory clientFactory;
|
||||
|
||||
@@ -38,7 +38,7 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
@MvndTest(projectDir = "src/test/projects/daemon-crash", keepAlive = "100ms", maxLostKeepAlive = "30")
|
||||
@Timeout(60)
|
||||
public class DaemonCrashTest {
|
||||
class DaemonCrashTest {
|
||||
|
||||
@Inject
|
||||
Client client;
|
||||
|
||||
@@ -33,7 +33,7 @@ import org.mvndaemon.mvnd.junit.MvndNativeTest;
|
||||
import org.mvndaemon.mvnd.junit.TestUtils;
|
||||
|
||||
@MvndNativeTest(projectDir = "src/test/projects/delete-repo")
|
||||
public class DeleteRepoNativeIT {
|
||||
class DeleteRepoNativeIT {
|
||||
|
||||
@Inject
|
||||
Client client;
|
||||
|
||||
@@ -21,4 +21,4 @@ package org.mvndaemon.mvnd.it;
|
||||
import org.mvndaemon.mvnd.junit.MvndTest;
|
||||
|
||||
@MvndTest(projectDir = "src/test/projects/delete-repo")
|
||||
public class DeleteRepoTest extends DeleteRepoNativeIT {}
|
||||
class DeleteRepoTest extends DeleteRepoNativeIT {}
|
||||
|
||||
@@ -33,7 +33,7 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
|
||||
public class DistroIT {
|
||||
class DistroIT {
|
||||
|
||||
/**
|
||||
* Asserts that we do not have the same libs in lib/ext and in lib or boot directories.
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.mvndaemon.mvnd.client.DaemonParameters;
|
||||
import org.mvndaemon.mvnd.junit.MvndTest;
|
||||
|
||||
@MvndTest(projectDir = "src/test/projects/dup-ga")
|
||||
public class DupGATest {
|
||||
class DupGATest {
|
||||
|
||||
@Inject
|
||||
Client client;
|
||||
|
||||
@@ -36,7 +36,7 @@ import org.mvndaemon.mvnd.junit.TestRegistry;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
@MvndTest(projectDir = "src/test/projects/environment")
|
||||
public class EnvironmentTest {
|
||||
class EnvironmentTest {
|
||||
|
||||
@Inject
|
||||
TestRegistry registry;
|
||||
|
||||
@@ -31,7 +31,7 @@ import org.mvndaemon.mvnd.junit.MvndTest;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
@MvndTest(projectDir = "src/test/projects/exec-output")
|
||||
public class ExecOutputTest {
|
||||
class ExecOutputTest {
|
||||
|
||||
@Inject
|
||||
Client client;
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.mvndaemon.mvnd.client.DaemonParameters;
|
||||
import org.mvndaemon.mvnd.junit.MvndNativeTest;
|
||||
|
||||
@MvndNativeTest(projectDir = "src/test/projects/extension-with-api")
|
||||
public class ExtensionWithApiNativeIT {
|
||||
class ExtensionWithApiNativeIT {
|
||||
|
||||
@Inject
|
||||
Client client;
|
||||
|
||||
@@ -34,7 +34,7 @@ import org.mvndaemon.mvnd.junit.TestRegistry;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
@MvndNativeTest(projectDir = "src/test/projects/extensions")
|
||||
public class ExtensionsNativeIT {
|
||||
class ExtensionsNativeIT {
|
||||
|
||||
@Inject
|
||||
Client client;
|
||||
|
||||
@@ -21,4 +21,4 @@ package org.mvndaemon.mvnd.it;
|
||||
import org.mvndaemon.mvnd.junit.MvndTest;
|
||||
|
||||
@MvndTest(projectDir = "src/test/projects/extensions")
|
||||
public class ExtensionsTest extends ExtensionsNativeIT {}
|
||||
class ExtensionsTest extends ExtensionsNativeIT {}
|
||||
|
||||
@@ -31,7 +31,7 @@ import org.mvndaemon.mvnd.junit.MvndTest;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
@MvndTest(projectDir = "src/test/projects/forked")
|
||||
public class ForkedTest {
|
||||
class ForkedTest {
|
||||
|
||||
@Inject
|
||||
Client client;
|
||||
|
||||
@@ -34,7 +34,7 @@ import org.mvndaemon.mvnd.junit.MvndTest;
|
||||
|
||||
@MvndTest(projectDir = "src/test/projects/single-module")
|
||||
@Timeout(300)
|
||||
public class InteractiveTest {
|
||||
class InteractiveTest {
|
||||
|
||||
@Inject
|
||||
Client client;
|
||||
|
||||
@@ -35,7 +35,7 @@ import org.mvndaemon.mvnd.client.DaemonParameters;
|
||||
import org.mvndaemon.mvnd.junit.MvndNativeTest;
|
||||
|
||||
@MvndNativeTest(projectDir = "src/test/projects/invoker")
|
||||
public class InvokerNativeIT {
|
||||
class InvokerNativeIT {
|
||||
|
||||
@Inject
|
||||
Client client;
|
||||
|
||||
@@ -21,4 +21,4 @@ package org.mvndaemon.mvnd.it;
|
||||
import org.mvndaemon.mvnd.junit.MvndTest;
|
||||
|
||||
@MvndTest(projectDir = "src/test/projects/invoker")
|
||||
public class InvokerTest extends InvokerNativeIT {}
|
||||
class InvokerTest extends InvokerNativeIT {}
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.mvndaemon.mvnd.junit.MvndTest;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
@MvndTest(projectDir = "src/test/projects/junit-platform")
|
||||
public class JUnitPlatformTest {
|
||||
class JUnitPlatformTest {
|
||||
|
||||
@Inject
|
||||
Client client;
|
||||
|
||||
@@ -16,18 +16,9 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.mvndaemon.mvnd.client.svm;
|
||||
package org.mvndaemon.mvnd.it;
|
||||
|
||||
import com.oracle.svm.core.annotate.AutomaticFeature;
|
||||
import org.graalvm.nativeimage.hosted.Feature;
|
||||
import org.mvndaemon.mvnd.junit.MvndNativeTest;
|
||||
|
||||
@AutomaticFeature
|
||||
public class ReflectionRegistration implements Feature {
|
||||
public void beforeAnalysis(BeforeAnalysisAccess access) {
|
||||
// try {
|
||||
// RuntimeReflection.register(AsiExtraField.class.getConstructors());
|
||||
// } catch (SecurityException e) {
|
||||
// throw new RuntimeException(e);
|
||||
// }
|
||||
}
|
||||
}
|
||||
@MvndNativeTest(projectDir = "src/test/projects/maven-conf-ignore-ext-def")
|
||||
class MavenConfIgnoreExtDefNativeIT extends MavenConfNativeIT {}
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
package org.mvndaemon.mvnd.it;
|
||||
|
||||
import org.junit.jupiter.api.condition.DisabledOnOs;
|
||||
import org.junit.jupiter.api.condition.OS;
|
||||
import org.mvndaemon.mvnd.junit.MvndTest;
|
||||
|
||||
@DisabledOnOs(OS.LINUX)
|
||||
@MvndTest(projectDir = "src/test/projects/maven-conf-ignore-ext-def")
|
||||
class MavenConfIgnoreExtDefTest extends MavenConfIgnoreExtDefNativeIT {}
|
||||
@@ -16,19 +16,19 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.mvndaemon.mvnd.client.svm;
|
||||
package org.mvndaemon.mvnd.it;
|
||||
|
||||
import com.oracle.svm.core.annotate.Substitute;
|
||||
import com.oracle.svm.core.annotate.TargetClass;
|
||||
import org.slf4j.MDC;
|
||||
import org.slf4j.impl.StaticMDCBinder;
|
||||
import org.slf4j.spi.MDCAdapter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@TargetClass(MDC.class)
|
||||
final class StaticMDCBinderSubstitution {
|
||||
import org.mvndaemon.mvnd.junit.MvndNativeTest;
|
||||
|
||||
@Substitute
|
||||
private static MDCAdapter bwCompatibleGetMDCAdapterFromBinder() throws NoClassDefFoundError {
|
||||
return StaticMDCBinder.SINGLETON.getMDCA();
|
||||
@MvndNativeTest(projectDir = "src/test/projects/maven-conf-ignore-ext")
|
||||
class MavenConfIgnoreExtNativeIT extends MavenConfNativeIT {
|
||||
@Override
|
||||
protected List<String> mvndParams() {
|
||||
ArrayList<String> result = new ArrayList<>(super.mvndParams());
|
||||
result.add("-Dmvnd.coreExtensionsExclude=foo:bar");
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -16,11 +16,9 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.mvndaemon.mvnd.common;
|
||||
package org.mvndaemon.mvnd.it;
|
||||
|
||||
public class ProcessHelper {
|
||||
import org.mvndaemon.mvnd.junit.MvndTest;
|
||||
|
||||
public static void killChildrenProcesses() {
|
||||
ProcessHandle.current().descendants().forEach(ProcessHandle::destroy);
|
||||
}
|
||||
}
|
||||
@MvndTest(projectDir = "src/test/projects/maven-conf-ignore-ext")
|
||||
class MavenConfIgnoreExtTest extends MavenConfIgnoreExtNativeIT {}
|
||||
@@ -21,6 +21,8 @@ package org.mvndaemon.mvnd.it;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.mvndaemon.mvnd.assertj.TestClientOutput;
|
||||
@@ -31,7 +33,7 @@ import org.mvndaemon.mvnd.junit.MvndNativeTest;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
@MvndNativeTest(projectDir = "src/test/projects/maven-conf")
|
||||
public class MavenConfNativeIT {
|
||||
class MavenConfNativeIT {
|
||||
|
||||
@Inject
|
||||
Client client;
|
||||
@@ -43,17 +45,20 @@ public class MavenConfNativeIT {
|
||||
void version() throws IOException, InterruptedException {
|
||||
final TestClientOutput o = new TestClientOutput();
|
||||
// this test also exercise the "-D foo=bar" syntax for defining properties
|
||||
client.execute(
|
||||
o,
|
||||
"org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate",
|
||||
"-D",
|
||||
"expression=maven.conf",
|
||||
"-q",
|
||||
"-DforceStdout",
|
||||
"--raw-streams")
|
||||
.assertSuccess();
|
||||
client.execute(o, mvndParams().toArray(new String[0])).assertSuccess();
|
||||
String conf = parameters.mvndHome().resolve("mvn").resolve("conf").toString();
|
||||
assertTrue(
|
||||
o.getMessages().stream().anyMatch(m -> m.toString().contains(conf)), "Output should contain " + conf);
|
||||
}
|
||||
|
||||
protected List<String> mvndParams() {
|
||||
return Arrays.asList(
|
||||
"org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate",
|
||||
"-D",
|
||||
"expression=maven.conf",
|
||||
"-q",
|
||||
"-DforceStdout",
|
||||
"--raw-streams",
|
||||
"-X");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,4 +21,4 @@ package org.mvndaemon.mvnd.it;
|
||||
import org.mvndaemon.mvnd.junit.MvndTest;
|
||||
|
||||
@MvndTest(projectDir = "src/test/projects/maven-conf")
|
||||
public class MavenConfTest extends MavenConfNativeIT {}
|
||||
class MavenConfTest extends MavenConfNativeIT {}
|
||||
|
||||
@@ -30,13 +30,13 @@ import org.junit.jupiter.api.Test;
|
||||
import org.mvndaemon.mvnd.assertj.TestClientOutput;
|
||||
import org.mvndaemon.mvnd.client.Client;
|
||||
import org.mvndaemon.mvnd.junit.MvndNativeTest;
|
||||
import org.mvndaemon.mvnd.logging.slf4j.MvndSimpleLogger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.slf4j.impl.MvndSimpleLogger;
|
||||
import org.slf4j.spi.LocationAwareLogger;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
public class MaxHeapNativeIT {
|
||||
class MaxHeapNativeIT {
|
||||
|
||||
static class BaseTest {
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ package org.mvndaemon.mvnd.it;
|
||||
|
||||
import org.mvndaemon.mvnd.junit.MvndTest;
|
||||
|
||||
public class MaxHeapTest extends MaxHeapNativeIT {
|
||||
class MaxHeapTest extends MaxHeapNativeIT {
|
||||
|
||||
@MvndTest(projectDir = "src/test/projects/max-heap/default-heap")
|
||||
static class DefaultConfig extends MaxHeapNativeIT.DefaultConfig {}
|
||||
|
||||
@@ -35,7 +35,7 @@ import org.mvndaemon.mvnd.junit.MvndNativeTest;
|
||||
import org.mvndaemon.mvnd.junit.TestUtils;
|
||||
|
||||
@MvndNativeTest(projectDir = "src/test/projects/module-and-plugin")
|
||||
public class ModuleAndPluginNativeIT {
|
||||
class ModuleAndPluginNativeIT {
|
||||
|
||||
@Inject
|
||||
Client client;
|
||||
|
||||
@@ -21,4 +21,4 @@ package org.mvndaemon.mvnd.it;
|
||||
import org.mvndaemon.mvnd.junit.MvndTest;
|
||||
|
||||
@MvndTest(projectDir = "src/test/projects/module-and-plugin")
|
||||
public class ModuleAndPluginTest extends ModuleAndPluginNativeIT {}
|
||||
class ModuleAndPluginTest extends ModuleAndPluginNativeIT {}
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.mvndaemon.mvnd.junit.MvndTest;
|
||||
import org.mvndaemon.mvnd.junit.TestParameters;
|
||||
|
||||
@MvndTest(projectDir = "src/test/projects/multi-lookup")
|
||||
public class MultiLookupTest {
|
||||
class MultiLookupTest {
|
||||
|
||||
@Inject
|
||||
ClientFactory clientFactory;
|
||||
|
||||
@@ -40,7 +40,7 @@ import org.mvndaemon.mvnd.common.Message.StringMessage;
|
||||
import org.mvndaemon.mvnd.junit.MvndTest;
|
||||
|
||||
@MvndTest(projectDir = "src/test/projects/multi-module")
|
||||
public class MultiModuleTest {
|
||||
class MultiModuleTest {
|
||||
|
||||
@Inject
|
||||
Client client;
|
||||
|
||||
@@ -37,7 +37,7 @@ import org.mvndaemon.mvnd.junit.TestParameters;
|
||||
import org.mvndaemon.mvnd.junit.TestRegistry;
|
||||
|
||||
@MvndNativeTest(projectDir = "src/test/projects/new-managed-module")
|
||||
public class NewManagedModuleNativeIT {
|
||||
class NewManagedModuleNativeIT {
|
||||
|
||||
@Inject
|
||||
TestParameters parameters;
|
||||
|
||||
@@ -21,4 +21,4 @@ package org.mvndaemon.mvnd.it;
|
||||
import org.mvndaemon.mvnd.junit.MvndTest;
|
||||
|
||||
@MvndTest(projectDir = "src/test/projects/new-managed-module")
|
||||
public class NewManagedModuleTest extends NewManagedModuleNativeIT {}
|
||||
class NewManagedModuleTest extends NewManagedModuleNativeIT {}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user