Compare commits

...

63 Commits

Author SHA1 Message Date
Tamas Cservenak
74cdaf62b2 [release] Release 2.0.0-beta-1 2024-06-20 18:09:44 +02:00
Tamas Cservenak
9e7476e89f Lower CPU requirement (#1043)
Using "compatibility" march.

Fixes #1029
2024-06-20 17:56:19 +02:00
Tamas Cservenak
ef981d5f5b Client diag option, GraalVM updates (#1042)
Changes:
* add client --diag option
* update graalvm toolchain
* update GH actions
2024-06-20 17:54:54 +02:00
Nils Breunese
111b8a6bfa Document installation instructions for MacPorts (#1039)
Document how to install the [mvnd port](https://ports.macports.org/port/mvnd/) from MacPorts. (I'm the maintainer of the port.)
2024-06-20 10:08:20 +02:00
Tamas Cservenak
952a67450b mixup in case of DISPLAY messages type (#1038)
ProjectEvent message mixup fixed.

Fixes #1036
2024-06-20 09:01:29 +02:00
Albin Hasani
d2942ccbc1 Remove outdated note about oh-my-zsh (#1034) 2024-06-19 08:23:27 +02:00
Tamas Cservenak
50bcc9bac5 Fix release-candidate script 2024-06-18 09:41:30 +02:00
Tamas Cservenak
7caba4d555 Next is 2.0.0-beta-2-SNAPSHOT 2024-06-18 09:11:12 +02:00
Tamas Cservenak
3f5b472022 [release] Release 2.0.0-beta-1 2024-06-18 09:11:10 +02:00
dependabot[bot]
cdc9737ca0 Bump jline.version from 3.26.1 to 3.26.2 (#1030)
Bumps `jline.version` from 3.26.1 to 3.26.2.

Updates `org.jline:jline` from 3.26.1 to 3.26.2
- [Release notes](https://github.com/jline/jline3/releases)
- [Changelog](https://github.com/jline/jline3/blob/master/changelog.md)
- [Commits](https://github.com/jline/jline3/compare/jline-parent-3.26.1...jline-parent-3.26.2)

Updates `org.jline:jline-terminal` from 3.26.1 to 3.26.2
- [Release notes](https://github.com/jline/jline3/releases)
- [Changelog](https://github.com/jline/jline3/blob/master/changelog.md)
- [Commits](https://github.com/jline/jline3/compare/jline-parent-3.26.1...jline-parent-3.26.2)

Updates `org.jline:jline-terminal-jansi` from 3.26.1 to 3.26.2
- [Release notes](https://github.com/jline/jline3/releases)
- [Changelog](https://github.com/jline/jline3/blob/master/changelog.md)
- [Commits](https://github.com/jline/jline3/compare/jline-parent-3.26.1...jline-parent-3.26.2)

Updates `org.jline:jline-terminal-jni` from 3.26.1 to 3.26.2
- [Release notes](https://github.com/jline/jline3/releases)
- [Changelog](https://github.com/jline/jline3/blob/master/changelog.md)
- [Commits](https://github.com/jline/jline3/compare/jline-parent-3.26.1...jline-parent-3.26.2)

---
updated-dependencies:
- dependency-name: org.jline:jline
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jline:jline-terminal
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jline:jline-terminal-jansi
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jline:jline-terminal-jni
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-18 08:57:39 +02:00
Tamas Cservenak
446c292709 Port all the mvnd-1.x fixes for release to master (#1027)
Changes:
* Drop CHANGELOG.md and tool, it is confused by two branches (1.x and master).
* Update GH workflows, they now provide all 4 needed binaries
* Release scripts: do NOT push, user will (but remind user)
* native: Makefile and built binaries updated (cross checked with @gnodet )
2024-06-17 20:42:29 +02:00
Tamas Cservenak
bc61f6441e [2.x] Pre-release tidy-up (#1011)
Changes:
* no source change
* (build) expel all versions from child modules: they must be all top level depMgmt or pluginMgmt
* (build) Top POM contains GAVs while child modules GA+scope. This tremendously simplifies maintenance.
* (javadoc) fix Javadoc errors
* (build) remove obsolete profiles and mr-JARs, project is 17+

Updates:
* maven wrapper 3.3.2 w/ scripts
2024-06-13 10:05:16 +02:00
dependabot[bot]
d3cc476ae3 Bump org.assertj:assertj-core from 3.25.3 to 3.26.0 (#1003)
Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.25.3 to 3.26.0.
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.25.3...assertj-build-3.26.0)

---
updated-dependencies:
- dependency-name: org.assertj:assertj-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-28 11:21:11 +02:00
dependabot[bot]
d59cb3d121 Bump org.apache.maven.plugins:maven-wrapper-plugin from 3.3.1 to 3.3.2 (#1004)
* Bump org.apache.maven.plugins:maven-wrapper-plugin from 3.3.1 to 3.3.2

Bumps [org.apache.maven.plugins:maven-wrapper-plugin](https://github.com/apache/maven-wrapper) from 3.3.1 to 3.3.2.
- [Release notes](https://github.com/apache/maven-wrapper/releases)
- [Commits](https://github.com/apache/maven-wrapper/compare/maven-wrapper-3.3.1...maven-wrapper-3.3.2)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-wrapper-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Regenerate wrapper script

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
2024-05-28 11:20:55 +02:00
dependabot[bot]
17110132e4 Bump org.apache.commons:commons-compress from 1.26.1 to 1.26.2 (#1001)
Bumps org.apache.commons:commons-compress from 1.26.1 to 1.26.2.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-compress
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-28 09:24:25 +02:00
Guillaume Nodet
72696a53a9 Remove staging repository 2024-05-27 08:17:23 +02:00
Guillaume Nodet
58cb81b187 Switch to beta-3 2024-05-23 08:43:34 +02:00
Tamas Cservenak
6de743152c Default value must be manually handled (#953)
Default must be manually handled, i missed this.

Fixes #912
2024-05-22 16:33:29 +02:00
dependabot[bot]
80cd4bf3c5 Bump org.jboss.forge.roaster:roaster-jdt (#963)
Bumps org.jboss.forge.roaster:roaster-jdt from 2.28.0.Final to 2.29.0.Final.

---
updated-dependencies:
- dependency-name: org.jboss.forge.roaster:roaster-jdt
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-22 15:37:41 +02:00
dependabot[bot]
6659363a5f Bump org.javassist:javassist from 3.29.2-GA to 3.30.2-GA (#972)
Bumps [org.javassist:javassist](https://github.com/jboss-javassist/javassist) from 3.29.2-GA to 3.30.2-GA.
- [Release notes](https://github.com/jboss-javassist/javassist/releases)
- [Changelog](https://github.com/jboss-javassist/javassist/blob/master/Changes.md)
- [Commits](https://github.com/jboss-javassist/javassist/commits)

---
updated-dependencies:
- dependency-name: org.javassist:javassist
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-22 15:37:29 +02:00
dependabot[bot]
b6625b06d5 Bump com.google.guava:guava from 32.1.3-jre to 33.2.0-jre (#985)
Bumps [com.google.guava:guava](https://github.com/google/guava) from 32.1.3-jre to 33.2.0-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-22 15:37:18 +02:00
dependabot[bot]
f94464fe29 Bump info.picocli:picocli-codegen from 4.5.2 to 4.7.6 (#988)
Bumps [info.picocli:picocli-codegen](https://github.com/remkop/picocli) from 4.5.2 to 4.7.6.
- [Release notes](https://github.com/remkop/picocli/releases)
- [Changelog](https://github.com/remkop/picocli/blob/main/RELEASE-NOTES.md)
- [Commits](https://github.com/remkop/picocli/compare/v4.5.2...v4.7.6)

---
updated-dependencies:
- dependency-name: info.picocli:picocli-codegen
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-22 15:37:07 +02:00
dependabot[bot]
7b2ea436ea Bump testcontainers.version from 1.19.7 to 1.19.8 (#991)
Bumps `testcontainers.version` from 1.19.7 to 1.19.8.

Updates `org.testcontainers:testcontainers` from 1.19.7 to 1.19.8
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.19.7...1.19.8)

Updates `org.testcontainers:junit-jupiter` from 1.19.7 to 1.19.8
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.19.7...1.19.8)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.testcontainers:junit-jupiter
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-22 15:36:56 +02:00
Tamas Cservenak
1bf0839807 Fix workflow
CI Actions are now triggered two times for some PRs,
once due "pull request" and once due "push".

Limit "push" trigger to two notable branches only.
2024-05-22 15:13:41 +02:00
Tamas Cservenak
b6e469089b Maven 4 beta-2 (#998)
And fix the build w/ smaller cleanups, plugin updates and backport of `-itr`, `-sadp`.

Changes:
* Maven 4 beta-2 (staged, on vote)
* Maven Wrapper 3.3.1 + script updates
* maven-plugin-tools 3.13.0
* buildhelper-maven-plugin 3.6.0
* graalvm plugin 0.10.2
* provisio 1.0.25
* exec-maven-plugin 3.3.0
* backport `-itr` and `-sadp` (Maven CLI)
2024-05-22 14:45:33 +02:00
Sylwester Lachiewicz
8434b80fa8 Revert "Bump ca.vanzyl.provisio.maven.plugins:provisio-maven-plugin"
This reverts commit 224f6a56f3.
2024-05-15 06:31:37 +02:00
Sylwester Lachiewicz
f3e6cbf9b7 Revert "Bump org.apache.maven.plugins:maven-wrapper-plugin from 3.3.0 to 3.3.1"
This reverts commit 7939f99318.
2024-05-15 06:31:32 +02:00
dependabot[bot]
7939f99318 Bump org.apache.maven.plugins:maven-wrapper-plugin from 3.3.0 to 3.3.1
Bumps [org.apache.maven.plugins:maven-wrapper-plugin](https://github.com/apache/maven-wrapper) from 3.3.0 to 3.3.1.
- [Release notes](https://github.com/apache/maven-wrapper/releases)
- [Commits](https://github.com/apache/maven-wrapper/compare/maven-wrapper-3.3.0...maven-wrapper-3.3.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-wrapper-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-14 22:44:48 +02:00
dependabot[bot]
224f6a56f3 Bump ca.vanzyl.provisio.maven.plugins:provisio-maven-plugin
Bumps [ca.vanzyl.provisio.maven.plugins:provisio-maven-plugin](https://github.com/takari/provisio) from 1.0.24 to 1.0.25.
- [Release notes](https://github.com/takari/provisio/releases)
- [Commits](https://github.com/takari/provisio/compare/provisio-1.0.24...provisio-1.0.25)

---
updated-dependencies:
- dependency-name: ca.vanzyl.provisio.maven.plugins:provisio-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-14 20:58:21 +02:00
dependabot[bot]
6629526464 Bump maven.plugin-tools.version from 3.12.0 to 3.13.0 (#987)
Bumps `maven.plugin-tools.version` from 3.12.0 to 3.13.0.

Updates `org.apache.maven.plugin-tools:maven-plugin-annotations` from 3.12.0 to 3.13.0
- [Release notes](https://github.com/apache/maven-plugin-tools/releases)
- [Commits](https://github.com/apache/maven-plugin-tools/compare/maven-plugin-tools-3.12.0...maven-plugin-tools-3.13.0)

Updates `org.apache.maven.plugins:maven-plugin-plugin` from 3.12.0 to 3.13.0
- [Release notes](https://github.com/apache/maven-plugin-tools/releases)
- [Commits](https://github.com/apache/maven-plugin-tools/compare/maven-plugin-tools-3.12.0...maven-plugin-tools-3.13.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugin-tools:maven-plugin-annotations
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.maven.plugins:maven-plugin-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-07 23:13:18 +08:00
dependabot[bot]
907c9e76cd Bump io.takari.maven:takari-smart-builder from 0.6.5 to 0.6.6 (#986)
Bumps [io.takari.maven:takari-smart-builder](https://github.com/takari/takari-smart-builder) from 0.6.5 to 0.6.6.
- [Release notes](https://github.com/takari/takari-smart-builder/releases)
- [Commits](https://github.com/takari/takari-smart-builder/compare/takari-smart-builder-0.6.5...takari-smart-builder-0.6.6)

---
updated-dependencies:
- dependency-name: io.takari.maven:takari-smart-builder
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-07 23:12:09 +08:00
Guillaume Nodet
106adaad93 Align maven resolver to 2.0.0-alpha-11 (#984) 2024-05-03 21:41:41 +02:00
Guillaume Nodet
42b230c10c Upgrade to Maven 4.0.0-beta-1 (#974) 2024-05-03 21:10:04 +02:00
Tamas Cservenak
8d5d25006a Update provisio (#975)
To make it work with BF collector (that is default in mvn4)
Also, remove defunct extensions.
2024-04-26 11:10:19 +02:00
Guillaume Nodet
a6b275db59 Split Maven 3 and 4 support and switch to version 2.0-SNAPSHOT (fixes #973) (#970) 2024-04-26 10:38:39 +02:00
Peter Palaga
73bfecb19e Make TerminalOutput.pathToMaven() more robust to avoid #929 2024-04-25 16:49:35 +02:00
Tamas Cservenak
a6dbd07ec4 Daemons should not swallow any exception (#969)
The "happy path" should happen without anything thrown, unsure why here runtime ex is rethrown, others swallowed.

Change: just remove the try/catch and make method throw Exception (diff best seen with whitespace ignored).

Fixes #957
Fixes #966
2024-04-23 10:03:20 +02:00
Tamas Cservenak
9bafc4b97d More cleanup (#967)
Changes:
* update maven-wrapper to 3.3.0
* do not override parent versions
* use properties where appropriate
2024-04-23 09:30:57 +02:00
Tamas Cservenak
d41d6a2709 Updates to build (dependabot reported) and other stuff (#951)
Most of cumulative things dependabot reported, plus more.

Changes:
* use plugins from parent (instead to double-maintain them here as well)
* general cleanup, add property where there are 2+ uses for it
* update plugins not present in parent
* non-key dependencies (maven3, maven4, graalvm not touched) updates
2024-04-19 16:26:23 +02:00
Tamas Cservenak
1fc7a988b9 Align mvnd m39 with Maven 3.9.x re config interpolation (#933)
Port Maven 3.9.7 config and new properties (session.root/top)
into Daemon m39.

The IT got this property as it triggers exception (failure)
if mvn39 could not "discover" top directory.

Fixes #910
2024-04-19 16:25:49 +02:00
Tamas Cservenak
8bb26402c1 Cumulative update of GH flow (#950)
Changes:
* Cumulative update of GH flow
* Graal update
* Add concurrency
* Add -V to see what maven is used
* Use same Java version for def build
* Apply @gzm55 advice
2024-04-19 15:23:45 +02:00
Tamas Cservenak
d23e0e88f6 Update to parent POM 42 (#932)
Changes:
* parent POM 42
* unset release where needed (makes com.sun pkg unreachable)
* explicitly index as parent disables "implicit" AP
* remove redundtant stuff
* update dependabot to take care of workflow as well (as mvnd uses own)
2024-04-18 19:40:05 +02:00
Tamas Cservenak
a1ac6660ec Ignore smart-builder core extension, if present. (#916)
Add new daemon param to ignore some extensions, make default to ignore takari-smart-builder as it is used by mvnd itself as well.

Fixes #912
2024-04-17 22:04:35 +02:00
Tamas Cservenak
d5d697c75d Maven DaemonCLI for 3 and 4 were not aligned (#915)
As comments are supported for both 3 and 4 but mvnd did not
support them in 3.
2024-03-29 10:24:12 +01:00
Nathan Sit
90b505a9e7 Update README.adoc 2024-03-18 14:19:32 +01:00
Sylwester Lachiewicz
f6a6747b04 Update commons-compress to 1.26.1 2024-03-17 17:52:15 +01:00
dependabot[bot]
ea62ae3514 Bump org.apache.activemq:apache-activemq
Bumps org.apache.activemq:apache-activemq from 5.16.0 to 5.16.6.

---
updated-dependencies:
- dependency-name: org.apache.activemq:apache-activemq
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-17 16:36:38 +01:00
Nathan Sit
1d246800d4 Update to mvn 3.9.6
Changes:
* Update mvn from 3.9.5 to 3.9.6
* Update resolver from 1.9.16 to 1.9.18
* Update surefire from 3.1.2 to 3.2.2
2024-03-15 16:10:27 +01:00
Guillaume Nodet
9ee1cf5cad Remove non fully supported installers (not part of the automated release process) 2023-11-07 09:39:02 +01:00
Guillaume Nodet
7dbb194985 Generate sha512 checsums 2023-11-07 09:33:04 +01:00
Guillaume Nodet
f05de78d08 Next is 1.0-m9-SNAPSHOT 2023-10-26 07:45:20 +02:00
Guillaume Nodet
0f4bdb6df5 [release] Release 1.0-m8 2023-10-26 07:45:11 +02:00
Guillaume Nodet
8f7a56772b Upgrade JLine from 3.23.0 to 3.24.0 (#899) 2023-10-25 23:10:42 +02:00
Guillaume Nodet
dc4179fc3b Switch to Maven 4.0.0-alpha-8 (#895) 2023-10-25 17:03:53 +02:00
Guillaume Nodet
acf64a7fab Small improvements to DaemonPrompter (#898) 2023-10-25 17:03:24 +02:00
Guillaume Nodet
92dd3f5c81 Make sure the plugin works with maven 3 (#893) 2023-10-20 19:24:41 +02:00
Guillaume Nodet
8dc8675540 Support JDK 21 at build time (#894) 2023-10-18 07:56:11 +02:00
Karl Heinz Marbaise
accb99e910 Removed superfluous public for tests (#882) 2023-10-16 14:45:20 +02:00
Kas Notten
09168b30a8 update build instructions for windows (#890)
Co-authored-by: Kas Notten <kas.notten@infosupport.com>
2023-10-16 14:41:19 +02:00
Guillaume Nodet
18d0583304 Fix terminal width (fixes #870) (#891) 2023-10-16 14:40:52 +02:00
Tamas Cservenak
345e02b3c0 Update: Maven 3.9.5 + Resolver 1.9.16 (#887)
Changes:
* update to Maven 3.9,5
* update to Resolver 1.9.16
2023-10-05 09:51:51 +02:00
Tim te Beek
685ca13bff [MNG-6847] Use diamond operator
Use this link to re-run the recipe: https://app.moderne.io/recipes/builder/SEvWu02zw?organizationId=QXBhY2hlIE1hdmVu

Co-authored-by: Moderne <team@moderne.io>
2023-09-26 13:06:24 +02:00
Guillaume Nodet
15d622e185 Next is 1.0-m8-SNAPSHOT 2023-07-11 07:13:39 +02:00
155 changed files with 2206 additions and 5370 deletions

View File

@@ -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"

View File

@@ -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

View File

@@ -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

View File

@@ -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>

Binary file not shown.

View File

@@ -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

File diff suppressed because it is too large Load Diff

View File

@@ -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]

View File

@@ -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.

View File

@@ -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>

View File

@@ -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>

View File

@@ -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();
}

View File

@@ -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"

View File

@@ -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}"

View File

@@ -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 ""

View File

@@ -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}"

View File

@@ -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/.*

View File

@@ -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();

View File

@@ -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(

View File

@@ -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;
}
}

View File

@@ -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

View File

@@ -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>

View File

@@ -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>.

View File

@@ -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>${&lt;prop-name&gt;}</tt>, where <tt>&lt;prop-name&gt;</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

View File

@@ -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);
}

View File

@@ -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;

View File

@@ -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);
}
}

View File

@@ -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);
}
}

View File

@@ -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;
}

View File

@@ -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>

View File

@@ -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);
}
}

View File

@@ -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();
}
}

View File

@@ -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(":"));
}
}

View File

@@ -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>

View File

@@ -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;
}
}

View File

@@ -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) {}
}

View File

@@ -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);
}
}

View File

@@ -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>

View File

@@ -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

View File

@@ -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;
}
}

View File

@@ -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) {

View File

@@ -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);

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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}"

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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());
}
}

View File

@@ -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;

View File

@@ -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() {

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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 {}

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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 {}

View File

@@ -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.

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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 {}

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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 {}

View File

@@ -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;

View File

@@ -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 {}

View File

@@ -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 {}

View File

@@ -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;
}
}

View File

@@ -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 {}

View File

@@ -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");
}
}

View File

@@ -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 {}

View File

@@ -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 {

View File

@@ -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 {}

View File

@@ -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;

View File

@@ -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 {}

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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