Commit Graph

174 Commits

Author SHA1 Message Date
Stefan Oehme
0b55c8f3e6 Add property to disable model caching
This is mostly for the integration tests of the Gradle Enterprise Maven extension,
which heavily test dependency resolution and reuse the same GAVs in many test,
e.g. a:b:1.0. It would be a lot of effort to rewrite all those tests and a shame
to restart the daemon every time. So I wanted to ask if you'd consider this flag
to disable the caching altogether.
2023-03-02 22:42:36 +01:00
Stefan Oehme
1bcfc29d45 Make Classworld setup more alike to vanilla Maven (#784)
Use the plexus Launcher to start the daemon server, just like we would
launch a normal Maven process.

This improves compatibility with any extensions or plugins that assume that
their ClassLoader is a ClassRealm.
2023-02-14 17:06:34 +01:00
Guillaume Nodet
4f90d558b2 Attempt at moving mvn as first class citizen in mvnd distribution, #392 (#769) 2023-01-24 10:50:40 +01:00
Guillaume Nodet
b2bd0aaae5 Fix system out / err streams when redirecting to file (#779) 2023-01-24 08:19:05 +01:00
Guillaume Nodet
19cc6c42b7 Make connection timeouts configurable, fixes #772 (#778) 2023-01-23 19:56:49 +01:00
Guillaume Nodet
f3c336adb9 Fix spotless config to include all java files (#768) 2023-01-10 18:39:29 +01:00
Guillaume Nodet
89841adbcb Upgrade to maven parent 39 and reformat accordingly 2022-12-16 11:38:47 +01:00
Guillaume Nodet
55236739f8 Add a mvnd.rawStreams property (#719) 2022-12-16 11:33:59 +01:00
Guillaume Nodet
39ee2b6014 Move signal handling into its own class (#754)
This opens some room to per-jdk implementation
2022-12-16 11:11:04 +01:00
Guillaume Nodet
7a788bb86f Add an option to specify the debug address and display info when starting (fixes #737) (#753) 2022-12-16 08:39:39 +01:00
Guillaume Nodet
cc2181ebdb Revert "Always display failed and main project at the end (fixes #723) (#724)"
This reverts commit fd3f20ef96.

After using it a bit, the output is rather worse, so let's revert until a better solution is found.
2022-12-15 21:45:54 +01:00
Guillaume Nodet
fd3f20ef96 Always display failed and main project at the end (fixes #723) (#724) 2022-12-14 09:34:24 +01:00
Peter Palaga
031c263232 Fixup #716 Calculate java home from java command (#721)
* Add a test
* Simplify the stream processing

Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
2022-12-14 00:35:10 +01:00
Guillaume Nodet
2b8076d1ed Support redirecting input from client to daemon, #541 (#581)
The implementation currently switches on the redirection when the daemon actually starts reading the System.in stream using InputStream.read() or InputStream.available().
2022-12-13 23:59:35 +01:00
Guillaume Nodet
2a8d18d119 Display plugin's goal prefix and version instead of artifactId (#748)
* Display plugin's goal prefix and version instead of artifactId
* Default to groupId:artifactId if goalPrefix is not present
2022-12-13 23:58:58 +01:00
Guillaume Nodet
25b5117749 Clean up some warnings during the build (#750) 2022-12-13 23:00:11 +01:00
Guillaume Nodet
bc021d0577 Fix daemon JVM start options (follow-up to #749) (#751) 2022-12-09 23:58:13 +01:00
Stefan Oehme
866a7c6f3f Add more discriminating properties to the daemon
The local repo and maven settings are both used while resolving core extensions,
which happens during daemon startup. Thus these two also need to be discriminating
properties, as the core extensions themselves are discriminating.
2022-12-08 23:02:02 +01:00
Guillaume Nodet
a14a1eb80f Reformat 2022-11-22 15:44:53 +01:00
James Z.M. Gao
c94ee72a30 Calculate java home from java command (#716) 2022-10-16 20:26:35 +02:00
Nicolas Filotto
e1e5c088af Release the read lock in a finally block (#703) 2022-10-16 20:14:54 +02:00
Thorsten Heit
a8e72a1b25 Fix for JUnit test failing on Windows (fixes #695) 2022-10-03 08:08:32 +02:00
Tamas Cservenak
641ad93da3 Fixes module id coloring on Maven transfer. (#686)
* Fixes module id coloring on Maven transfer.

The module id coloring was not consistent during transfer
and it caused "vibrating" effect.

* PR comments
2022-09-20 10:09:49 +02:00
Guillaume Nodet
0299a38264 Simplify the InterpolationHelper, use 'env.' to align with maven #676 2022-08-30 11:30:15 +02:00
Guillaume Nodet
5e59c40453 Ability to configure the daemon storage location, fixes #673 (#678) 2022-08-29 23:15:15 +02:00
Guillaume Nodet
dc69f258be Use interpolation when loading properties, fixes #676 (#677) 2022-08-29 22:12:15 +02:00
Guillaume Nodet
1ec11ab348 Make mvnd coloring more consistent with maven, fixes #653 (#654) 2022-06-20 11:28:11 +02:00
Guillaume Nodet
1327fe2af4 Cleanup (#650)
* Improve reproducibility of builds by using digest on docker images
* Inline the manifest Multi-Release entry
* Remove unused files
* Switch the groupId to org.apache.maven.daemon and use maven parent pom
* Fix distribution
* Fix ITs
* Fix native build for windows
2022-06-15 08:09:12 +02:00
Guillaume Nodet
e51416f7f2 Allow to the registry to be resized to avoid registry corruption (#645) (#646) 2022-06-15 08:06:33 +02:00
Guillaume Nodet
ff7bbbe458 Move BuildProperties to the client (#630) 2022-05-02 13:13:07 +02:00
Guillaume Nodet
73f4d50bcb Remove default values for heap options (#610)
* Set default max heap size to null

Let the JVM decide the max heap size instead of using hardcoded defaults
to match the behaviour of vanilla Maven.

* Add ITs for verifying max heap behaviour

- By default no max heap should be set
- If configured via jvm.config then max heap should be set but not mvnd.maxHeapSize
- If configured via mvnd.maxHeapSize then max heap should be set

* Remove defaults memory options

* Add missing test project

* Fix too small heap size

* Fix tests

Co-authored-by: Ashhar Hasan <hashhar_dev@outlook.com>
2022-04-26 13:22:37 +02:00
Tamas Cservenak
d2365ee166 Mvnd with file locking (#508)
* Update mvnd to include Maven Resolver 1.7

As mvnd itself is Java8 lang level, it is completely
okay to up resolver to 1.7 (that is java8 as well).
The only reason why Maven 3.8.x CANNOT use resolver
1.7 is that it is still Java7 level.

* Move missing piece to SPI

* Add global exclusions

* Example of mvnd using file locking (of resolver)

* Drop irrelevant

* Upgrade to released 1.7.3

Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
2022-04-11 13:29:42 +02:00
Guillaume Nodet
4cea5d3078 Handle BufferUnderflowException as a possible registry corruption (#614) 2022-04-11 13:18:42 +02:00
Jesse Glick
2ab4cd8083 Only check /proc/self if apparently on Linux (always fall back to VM name) 2022-03-22 23:34:42 +01:00
Jesse Glick
86d1c3661b Make DaemonRegistry.getProcessId0 more robust 2022-03-22 23:34:42 +01:00
Guillaume Nodet
62d580b930 Daemon reuse ignores differences in .mvn/jvm.config, fixes #576 (#580) 2022-01-13 10:01:33 +01:00
Guillaume Nodet
1de326c59e Remove unused subclass in the Environment enum value (#582) 2022-01-12 13:17:54 +01:00
Guillaume Nodet
4c99b52e03 Make sure the maven.home and maven.conf properties are correctly set when the JVM is started, fixes #553 2022-01-11 08:12:18 +01:00
Guillaume Nodet
09cb99fd48 Improve the doc text of mvnd.pluginRealmEvictPattern option, fixes #533 (#534) 2022-01-03 08:31:32 +01:00
Guillaume Nodet
06fa4fd227 Fix url cache (fixes #532 and #527) 2022-01-03 08:30:41 +01:00
Guillaume Nodet
47c99e8b0e Do not print a warning if mvnd is launched outside of a terminal, see #513 2021-12-07 08:59:19 +01:00
Guillaume Nodet
ad703938ac Fix client not responding when using help with an output redirection, fixes #519 (#521) 2021-12-06 16:40:21 +01:00
Guillaume Nodet
69c975fcd0 Provide a local (semaphore based) sync context and use it as the default (#480)
* Provide a local (semaphore based) sync context and use it as the default
* Use a ReentrantLock
* Update daemon/src/main/java/org/mvndaemon/mvnd/sync/MvndSyncContextFactory.java
Co-authored-by: Peter Palaga <ppalaga@redhat.com>
* Improve lock acquisition
Co-authored-by: Peter Palaga <ppalaga@redhat.com>
2021-10-20 10:23:13 +02:00
Jeff Smits
adbe953463 Add thread stack size (-Xss) option (#489) 2021-10-19 11:44:22 +02:00
Guillaume Nodet
30e1747d84 The maven.multiModuleProjectDirectory is badly set when using -f [path-to-pom], fixes #484 2021-10-06 15:18:00 +02:00
Guillaume Nodet
8697cd6151 Add missing value in message ordering, fixes #486 2021-10-04 15:22:38 +02:00
Guillaume Nodet
db30a78841 Disable the IPC sync context factory by default (can be enabled using the new environment option) 2021-09-06 13:04:39 +02:00
Guillaume Nodet
ee49cb3414 Provide a way to remove decoration on the standard out/err streams, fixes #356 2021-09-02 14:37:19 +02:00
Guillaume Nodet
230edac5ae Provide an early display of build failures (fixes #361)
Also fix ordering of messages when projects are skipped at the end
2021-09-01 15:55:38 +02:00
Guillaume Nodet
c95ae1d012 Provide an eviction pattern to get rid of classloaders for bad behaving plugins, #440 (#448) 2021-08-31 11:27:18 +02:00