388 Commits

Author SHA1 Message Date
Stefan Oehme
b6bddf2ceb Make prompting work in the daemon (#1303)
Some checks failed
Early Access / Default build (without GraalVM) (push) Has been cancelled
Early Access / Build with GraalVM on macos-13 (push) Has been cancelled
Early Access / Build with GraalVM on macos-latest (push) Has been cancelled
Early Access / Build with GraalVM on ubuntu-latest (push) Has been cancelled
Early Access / Build with GraalVM on windows-latest (push) Has been cancelled
Early Access / Site build (push) Has been cancelled
Stale / stale (push) Has been cancelled
The daemon was implementing the legacy plexus.interactivity Prompter interface, which Maven 4 no longer
calls. Instead, it needs to implement the new maven.api Prompter interface. This also simplifies the code,
since the legacy prompter handling is now done by Maven core and it delegates to the new interface if an
old plugin uses it.

Also, prompting was skipped on dumb terminals for some reason. This meant that prompting could not be
tested with automated tests using ProcessBuilder. It also meant that piping input into mvnd on the terminal
wouldn't work. This made it inconsistent with regular Maven, which supports promting on a dumb terminal.
I've reactivated it, which makes the prompting integration tests for our Maven extension pass again.

There was also a missing console flush before sending the response to the daemon, which could lead to
inconsistent output, where the newline was sometimes printed before and sometimes after the next line from
the daemon.

Fixes #1292
2025-09-12 13:04:52 +02:00
Tamas Cservenak
f0a22cb367 Upgrade to Maven 4.0.0-rc-4 (#1347)
Some checks failed
Stale / stale (push) Has been cancelled
Early Access / Default build (without GraalVM) (push) Has been cancelled
Early Access / Build with GraalVM on macos-13 (push) Has been cancelled
Early Access / Build with GraalVM on macos-latest (push) Has been cancelled
Early Access / Build with GraalVM on ubuntu-latest (push) Has been cancelled
Early Access / Build with GraalVM on windows-latest (push) Has been cancelled
Early Access / Site build (push) Has been cancelled
2025-07-19 00:59:54 +02:00
Guillaume Nodet
6c5dd056fa Next is 2.0.0-rc-4-SNAPSHOT 2025-03-10 16:56:59 +01:00
Guillaume Nodet
f912362c18 [release] Release 2.0.0-rc-3 2025-03-10 16:56:55 +01:00
Tamas Cservenak
c4b5656d19 Bug: extension handling (#1282)
mvnd still had mvn3 like code, just drop it and let base parser
do the work. All the mvnd needs is filtering.

Discriminating based on XML file hashes.

Fixes #1280
2025-03-07 19:02:57 +01:00
Guillaume Nodet
eee5c0ca9b Remove build resumption which was ported from master to support resumption with 3.x (#1275) 2025-03-03 08:36:10 +01:00
Tamas Cservenak
0bdeee9dcb [MMG-8600] Adopt to Maven changes (#1277)
Adopt to https://github.com/apache/maven/pull/2134

Goal is to be able to perform required customizations to Terminal, but also "raw streams" (as Maven acts on false, while mvnd on true).
2025-02-28 14:51:59 +01:00
Guillaume Nodet
dac81c7011 Support MAVEN_ARGS env var (fixes #1219) (#1269) 2025-02-17 23:12:32 +01:00
Guillaume Nodet
9e32662401 Refactor input stream support (fixes #1257) (#1268) 2025-02-17 23:12:16 +01:00
Guillaume Nodet
4f4e05f973 Cleanup BufferHelper for JDK 17+ (fixes #1261) (#1267) 2025-02-17 23:11:40 +01:00
Tamas Cservenak
af431d9d54 Move override components back to Sisu (#1263)
As these component are overriding Sisu components.
2025-02-08 21:32:22 +01:00
Tamas Cservenak
d4d4f23d7d Fixes (#1253)
Seems MSC fork does not allow pushes from users who have commit rights on forked maven-mvnd, so am incorporating @ascheman changes here as well.

This PR is:
* fixes from PR https://github.com/apache/maven-mvnd/pull/1252
* plus fix SO isse (self injected cache)
* plus migrated whole daemon to Maven DI (from javax.inject) except those that override Sisu components
* ported latest Maven changes
2025-02-08 20:55:53 +01:00
Tamas Cservenak
2606a78f46 Align to 2.0.0-rc-3-SNAPSHOT
Same as Maven master
2024-12-17 14:34:46 +01:00
Tamas Cservenak
7820fcc20c Port mvnsh changes (#1228)
Basically get rid of ResidentContext, is gone.
Also, port some other minor mvn RC-3 changes as well.
2024-12-17 13:54:57 +01:00
Jermaine Hua
7b309de9ab Support core extension more configuration (#1216)
Fixes #1163

Signed-off-by: crazyhzm <crazyhzm@apache.org>
2024-12-17 13:50:43 +01:00
Guillaume Nodet
c8fc604504 Next is 2.0.0-rc-2-SNAPSHOT 2024-11-26 10:14:09 +01:00
Guillaume Nodet
39127a4669 [release] Release 2.0.0-rc-1 2024-11-26 10:14:05 +01:00
Guillaume Nodet
dade78541c Upgrade to 4.0.0-rc-1 (fixes #1203 and #1204)
# Conflicts:
#	pom.xml
2024-11-26 10:02:05 +01:00
Guillaume Nodet
9f0537a681 Do not display client environment unless specifically asked for 2024-11-26 10:02:05 +01:00
Guillaume Nodet
f191c652f5 Restore ModelCacheFactory 2024-11-08 19:24:50 +01:00
Tamas Cservenak
7726c16bc8 fix: Daemon invoker lifespan must be shared with daemon process lifespan (#1196)
* fix: Daemon lifecycle must be shared with daemon invoker

As long daemon is alive, the daemon invoker must be kept
alive as it holds the "resident" object graph of Maven.

* Add hack

This is a bug in resident invoker
2024-11-08 16:48:53 +01:00
Guillaume Nodet
72b7365e21 Upgrade to Maven 4.0.0-beta-5 (#1187) 2024-11-07 19:11:26 +01:00
Tamas Cservenak
0cdc32a36c Drop unused excludes (#1173) 2024-10-17 21:14:13 +02:00
Tamas Cservenak
9734734140 Fix exports and move help in place (#1166)
Depends on https://github.com/apache/maven/pull/1799
Help output https://gist.github.com/cstamas/b53333945eb2d7721e0aa5f03329c4a6
2024-10-17 09:24:29 +02:00
Guillaume Nodet
a032544164 Improve log and leverage the new infrastructure in Maven (#1164) 2024-10-15 18:15:15 +02:00
Tamas Cservenak
27258c0e54 Maven Daemon CLIng (#1158)
Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
2024-10-15 13:05:56 +02:00
Guillaume Nodet
6189475f1b Fix daemon connection race condition (#1078)
The Server was using a SynchrnousQueue to coordinate the main thread
and the background thread that receives the request from the client.
A SynchronousQueue only allows insertions when a corresponding call
to `get` is in progress. However, since the receiver thread is started
before the call to `get`, there was a short time window, where the call
to `queue.offer` could fail and simply return `false`. This return code
was ignored.

A possible solution would have been to call `put` instead of `offer`,
but I decided to replace the queue with a Future, since we only wait
for a single element.

Co-authored-by: Stefan Oehme <st.oehme@gmail.com>
2024-07-19 13:42:11 +02:00
Tamas Cservenak
69e7232ae7 Next is 2.0.0-beta-2-SNAPSHOT 2024-06-20 18:09:45 +02:00
Tamas Cservenak
74cdaf62b2 [release] Release 2.0.0-beta-1 2024-06-20 18:09:44 +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
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
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
Guillaume Nodet
42b230c10c Upgrade to Maven 4.0.0-beta-1 (#974) 2024-05-03 21:10:04 +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
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
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
acf64a7fab Small improvements to DaemonPrompter (#898) 2023-10-25 17:03:24 +02:00
Guillaume Nodet
18d0583304 Fix terminal width (fixes #870) (#891) 2023-10-16 14:40:52 +02:00
Guillaume Nodet
15d622e185 Next is 1.0-m8-SNAPSHOT 2023-07-11 07:13:39 +02:00
Guillaume Nodet
b2ef5d8199 [release] Release 1.0-m7 2023-07-11 06:59:21 +02:00
Guillaume Nodet
f8adf1b770 Switch to slf4j simple logger (fixes #835) (#868) 2023-07-10 15:16:32 +02:00
Guillaume Nodet
bf981d6ce0 Upgrade to takari-smart-builder 0.6.3 (fixes #841) (#844) 2023-07-03 08:35:00 +02:00
Peter Palaga
7d9a39be1a JAVA_HOME should be documented as discriminating #852 2023-05-23 17:30:31 +02:00
Peter Palaga
82e42e6e64 Show which options are discriminating in the output of mvnd --help 2023-05-23 17:30:31 +02:00
Guillaume Nodet
6a3448d9c4 NPE during expiration check (fixes #842) (#843) 2023-05-17 12:57:25 +02:00
Guillaume Nodet
5093ced94b Remove plexus-utils and commons-xxx references (#833) 2023-04-06 10:52:45 +02:00
Guillaume Nodet
eef6c2f16f Sort build times for the whole reactor by decreasing total time (#829) 2023-04-06 10:48:16 +02:00
Guillaume Nodet
538a5c1369 Next is 1.0-m7-SNAPSHOT 2023-03-23 10:16:45 +01:00