Commit Graph

292 Commits

Author SHA1 Message Date
Tamas Cservenak
9d9da1910a Improve Windows RSS memory retrieval with multiple fallback strategies (#1414) (#1415)
This commit enhances the Windows RSS memory retrieval functionality in OsUtils
to provide better compatibility and reliability across different Windows versions.

Key improvements:
- Added multiple fallback strategies for Windows RSS retrieval:
  1. PowerShell approach (modern, Windows 7+ with PowerShell 2.0+)
  2. WMIC approach (fallback for older systems)
  3. Tasklist approach (final fallback, most compatible from XP to Win11)

- Enhanced error handling with debug-level logging for memory queries
  to avoid log spam while maintaining visibility for debugging

- Added robust CSV parsing for tasklist output with proper handling
  of quoted fields and comma-separated numbers (e.g., '1,234 K')

- Improved regex pattern matching for memory values that handles
  various formats returned by Windows commands

- Refactored code structure by separating Unix and Windows logic
  into dedicated methods for better maintainability

These changes ensure reliable RSS memory retrieval across all supported
Windows versions while maintaining backward compatibility and improving
error handling.

Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
2025-09-08 16:14:38 +02:00
Guillaume Nodet
8fa060e7a7 Fix color option 2024-11-26 10:02:15 +01:00
Tamas Cservenak
e4828fdf98 Fix log ordering
nano time is not enough, rather use a "sequence"
2024-11-26 10:02:15 +01:00
Guillaume Nodet
a8d90d5dcb Do not display client environment unless specifically asked for 2024-11-26 10:02:15 +01:00
Tamas Cservenak
c0ec895c6c Next is 1.0.3-SNAPSHOT 2024-08-20 23:52:07 +02:00
Tamas Cservenak
cccc1ec8a5 [release] Release 1.0.2 2024-08-20 23:52:04 +02:00
Tamas Cservenak
e12915de84 Next is 1.0.2-SNAPSHOT 2024-06-20 14:55:16 +02:00
Tamas Cservenak
621c13a190 [release] Release 1.0.1 2024-06-20 14:55:15 +02:00
Tamas Cservenak
0d11bf8730 [1.x] Fix win terminal (#1040)
Fixing terminal on Windows.

changes:
* added missing jline-native to dist
* up GraalVM to 22
* introduce `--diag` on client
* up SVM version, cleanup of GraalVM params

Fixes #1032
2024-06-20 14:18:09 +02:00
Tamas Cservenak
0e27c24acf [1.x] mixup in case of DISPLAY messages type (#1037)
ProjectEvent message mixup fixed.

Fixes #1036
2024-06-20 09:01:20 +02:00
Tamas Cservenak
0d2c63ad0e Next is 1.0.1-SNAPSHOT 2024-06-14 14:43:38 +02:00
Tamas Cservenak
0cb7cbcbed [release] Release 1.0.0 2024-06-14 14:43:37 +02:00
Tamas Cservenak
f32d00003a Fix deprecation warning about JAnsi Terminal (#1017)
And use JNI (and FFM) instead.

Changes:
* use DefaultClient from master (thanks @gnodet !)
* drop jansi (as DefaultClient should not depend on it)
* introduce two new jline3 terminal backends: jni and ffm (used on Java 22+)
* tested/verified (thanks @wendigo )
2024-06-13 21:48:27 +02:00
Tamas Cservenak
ab47c660da [1.x] Pre-release tidy-up (#1010)
Changes:
* no source changes
* (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

Updates:
* use latest Maven 3.9.8-SNAPSHOT (TS locked version, controlled deploy by me)
* AssertJ 3.26.0
* Takari Smart Builder 0.6.6
* Sisu 0.9.0.M3
* maven wrapper 3.3.2 w/ scripts

This brings mvnd-1.x in "releasable" state (once Maven 3.9.8 is out).
2024-06-13 10:04:50 +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
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
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
Peter Palaga
7d9a39be1a JAVA_HOME should be documented as discriminating #852 2023-05-23 17:30:31 +02:00
Peter Palaga
c177fe220e {@link } JavaDoc refs missing in the output of mvnd --help 2023-05-22 13:35:32 +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
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
89e41a23ec Use system out for build log and sys err for in progress display, fixes #822 (#824) 2023-03-21 14:33:51 +01:00
Guillaume Nodet
4d24010f55 Prompter prompt should not prepend the projectId when there's only one project, fixes #816
Also make sure the daemon prompter log only goes to the daemon log
2023-03-14 13:52:47 +01:00
Petr Široký
e1815e52a3 Minor clean-up in OsUtils
* fix typo in method names
 * add a test for the other *toHumanReadable method
 * replace StringBuilder usage with simple concatenation
   where applicable (for fixed length strings)
2023-03-12 23:08:32 +01:00
Petr Široký
3657375e97 Use String.join() instead of Collectors.joining() where applicable
* the String.join() is more readable and there should not be any
   downsides (like performance or so)
2023-03-12 23:08:32 +01:00
Petr Široký
50653ae7d9 logging: use format specifiers instead of string concatenation 2023-03-12 23:08:32 +01:00
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🅱️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
11c6567bdd Next is 1.0.0-m5-SNAPSHOT 2023-01-28 14:41:03 +01:00
Guillaume Nodet
f01c3ff97a [release] Release 1.0.0-m4 2023-01-28 14:35:11 +01:00
Guillaume Nodet
8e92805e30 Next is 1.0.0-m4-SNAPSHOT 2023-01-28 14:27:02 +01:00
Guillaume Nodet
35d3e842af [release] Release 1.0.0-m3 2023-01-28 14:26:51 +01:00
Guillaume Nodet
44ea9d84ff Next is 1.0.0-m3-SNAPSHOT 2023-01-28 10:16:22 +01:00
Guillaume Nodet
cef086fb3d [release] Release 1.0.0-m2 2023-01-28 10:16:08 +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
554e82a6a1 Next is 1.0.0-SNAPSHOT 2022-12-16 12:57:35 +01:00
Guillaume Nodet
7586cf2b0c [release] Release 1.0.0-m1 2022-12-16 12:08:31 +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