Commit Graph

329 Commits

Author SHA1 Message Date
Guillaume Nodet
6255394ecc Fix mvnd.java.home not set in noDaemon mode (#1410)
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
Fixes #1248

When running with mvnd.noDaemon=true, the connectNoDaemon() method was
setting up various system properties but missing the crucial
MVND_JAVA_HOME property. This caused the Server constructor to fail
with 'The system property mvnd.java.home is missing'.

The fix adds the missing MVND_JAVA_HOME property in connectNoDaemon()
using the same value as JAVA_HOME from parameters.javaHome().

Changes:
- Add MVND_JAVA_HOME property setup in DaemonConnector.connectNoDaemon()
- Add NoDaemonTest to verify the fix works correctly

The solution follows the existing pattern used for other properties
in the same method and ensures noDaemon mode works as expected.
2025-09-08 17:13:51 +02:00
Tamas Cservenak
d3c15a75b0 Fix test framework side effects (java props) (#1359)
Some checks are pending
Early Access / Default build (without GraalVM) (push) Waiting to run
Early Access / Build with GraalVM on ${{ matrix.os }} (macos-13) (push) Waiting to run
Early Access / Build with GraalVM on ${{ matrix.os }} (macos-latest) (push) Waiting to run
Early Access / Build with GraalVM on ${{ matrix.os }} (ubuntu-latest) (push) Waiting to run
Early Access / Build with GraalVM on ${{ matrix.os }} (windows-latest) (push) Waiting to run
Early Access / Site build (push) Waiting to run
The JvmTestClient pushed things to system properties and then did not clean up them. This went invisible, as long as user did not have user-wide extensions like smart-builder that suddenly was not filtered out anymore from tested mvnd daemon and caused havoc.

Changes:
* def client helper method emits "prev state" for properties it altered
* JvmTestClient uses this map to restore properties
* MavenConfIgnore ITs modified to still ignore takari smart builder as well...

Fixes #1357
2025-06-18 21:31:58 +02:00
Tamas Cservenak
c8ca1c0b75 Drop buildnumber plugin, Nisse is in place (#1319)
Just use Nisse, as it is already in place, plus it does not require git checkout either.

Fixes #1306 

Nota bene: this does not solve "rebuilding from tarball", as output will still not contain revision (will be empty). Just like Maven, MavenDaemon also relies on git to provide SCM hash shown in version.

But the build will not fail at least, and Maarten will be able to rebuild from tarball, but the build output will be different from that built from git checkout.
2025-05-10 14:54:42 +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
4f4e05f973 Cleanup BufferHelper for JDK 17+ (fixes #1261) (#1267) 2025-02-17 23:11:40 +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
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
083a28b7af Fixes --verbose/--debug options (fixes #1208) 2024-11-26 10:02: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
514cf3de02 Debug mode should provide better defaults for keepAlive and connectTimeout (fixes #1209) 2024-11-26 10:02:05 +01:00
Guillaume Nodet
72b7365e21 Upgrade to Maven 4.0.0-beta-5 (#1187) 2024-11-07 19:11:26 +01: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
Tamas Cservenak
06eb5fd2a9 Bump native-maven-plugin from 0.10.2 to 0.10.3 (#1143)
The plugin introduced some "windows fix"[1] that causes current arg parsing to fail. Solution seems to be to split each arg in own line, but that introduced another set of challenges.

[1] https://github.com/graalvm/native-build-tools/pull/609

Supersedes https://github.com/apache/maven-mvnd/pull/1133
2024-10-09 11:12:26 +02:00
Guillaume Nodet
9644e46617 Fix maven.multiModuleProjectDirectory (fixes #1031) (#1057) 2024-07-16 17:17:04 +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
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
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
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
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
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
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
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
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
dc4179fc3b Switch to Maven 4.0.0-alpha-8 (#895) 2023-10-25 17:03:53 +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
c4aaed6909 Fix interpolation of environment variables in config properties (fixes #693) (#866) 2023-07-03 17:36:32 +02:00
Florian LOPES
5d5fb2fc62 fix(log-typo): Fix minor typo in javaHomeFromPath warn log (#856) 2023-06-16 11:18:13 +02:00
Guillaume Nodet
b00e7978a8 Fix broken detection of mvnd home on alpine linux (fixes #849) (#848)
* Fix for musl dynamic loader
* Add caching for mvnd.home and java.home
* Add IT for alpine linux
2023-05-18 07:37:14 +02:00
James Z.M. Gao
99a5cfba7f native image: hardening csu for old glibc (#827)
Workround of return-to-csu problem for old glibc, use non-initialized
static variables instead of the stack ones. See workround 2 of
https://i.blackhat.com/briefings/asia/2018/asia-18-Marco-return-to-csu-a-new-method-to-bypass-the-64-bit-Linux-ASLR-wp.pdf
2023-04-06 10:57:51 +02:00
Guillaume Nodet
5093ced94b Remove plexus-utils and commons-xxx references (#833) 2023-04-06 10:52:45 +02:00
Guillaume Nodet
538a5c1369 Next is 1.0-m7-SNAPSHOT 2023-03-23 10:16:45 +01:00
Guillaume Nodet
47d4c6b9c3 [release] Release 1.0-m6 2023-03-23 09:59:27 +01:00
James Z.M. Gao
da20df03cd Make native mvnd only require glibc 2.12 on ubuntu 22.04 (#825, fixes #823)
The modern glibc from 2.34 had two breaking changes: move all api in lib{pthread,dl,rt}.so into libc.so, new static start up code breaking the runtime compatibility for old glibc (<2.34). See https://developers.redhat.com/articles/2021/12/17/why-glibc-234-removed-libpthread for more info.

This commit has 3 changes to overcome these changes:
- override gcc path to redefine glibc symbols on the fly in the generated .o by graalvm when linking
- provide a dynamic startup code to support both old and modern runtime glibc
- add needed dynamic libraries: lib{pthread,rt,dl}.so.
2023-03-23 09:02:38 +01:00
Guillaume Nodet
34b7ee35cf Next is 1.0-m6-SNAPSHOT 2023-03-22 08:58:41 +01:00
Guillaume Nodet
71146dab82 [release] Release 1.0-m5 2023-03-22 08:58:28 +01:00
Guillaume Nodet
eba51d2d7e Fix mvnd home detection based on executable path 2023-03-15 12:43:39 +01:00
Guillaume Nodet
0e057cb12b Make sure mvnd's plexus-interactivity is not in the maven classloader, fixes #807
* the logging framework is extracted into its own jar and moved in the mvn/lib/ directory
* the other daemon jars are moved into the mvn/lib/mvnd directory and not used by maven at all
This makes maven class loader almost identical to the stock maven classloader, but for the logging framework
2023-03-14 13:53:24 +01:00