Commit Graph

12180 Commits

Author SHA1 Message Date
Guillaume Nodet 34685bbc2d
[MNG-7587] Upgrade to sisu 0.9.0.M2 (#1119) 2023-05-31 09:38:28 +02:00
Tamas Cservenak 46807790f6 [MNG-7791] Split validation issues by "locality" aspect (#1122)
Changes:
* introduce "internal" (to project) and "external" aspect
* make "inline" default as it was in 3.9.0 and 3.9.1
* remove "default" report level
* summary and verbose reports "internal only" or ALL issues

Example of outputs while building maven-3.8.x:
https://gist.github.com/cstamas/defd6a52939f5a277bf5fc669c01aedb

---

https://issues.apache.org/jira/browse/MNG-7791
2023-05-26 18:22:12 +02:00
Tamas Cservenak 6f136ef4d2 [MNG-7789] Cleanup
PR had a leftover (unused but injected member). Removed.

---

https://issues.apache.org/jira/browse/MNG-7789
2023-05-24 12:50:23 +02:00
Tamas Cservenak 12ccaacf63 [MNG-7789] Dependency validation rules used wrong data (#1115)
Refactored and now dropped the unused pluginDescriptor/dependencies validation. Now we have "plugin dependency" (using POM) components to perform dependency validation.

Also, two "inlined" validation from plugin dependencies resolver factored out to components, along with 3 existing moved to newly added (they were wrongly validating descriptor dependencies while intent was to validate "real" dependencies) validators.

Ported from
6c562a46ee

---

https://issues.apache.org/jira/browse/MNG-7789
2023-05-24 08:50:28 +02:00
Guillaume Nodet a27086a6f5 Fix bad javadoc 2023-05-23 16:36:23 +02:00
huazhongming 8f19d9ae28
[MNG-7639] Add unit test for DefaultRepositorySystemSessionFactory#newRepositorySession (#1096)
Signed-off-by: crazyhzm <crazyhzm@apache.org>
2023-05-23 10:50:16 +02:00
huazhongming 29c0a95b0b
[MNG-7780] DefaultArtifact.equals throws NullPointerException if o.version is null (#1108)
Signed-off-by: crazyhzm <crazyhzm@apache.org>
2023-05-22 21:19:33 +02:00
Tamas Cservenak 3f0f165242 [MNG-7786] Fix plugin validation misleading message
Bugfix post merge: all scopes EXCEPT provided and test...

---

https://issues.apache.org/jira/browse/MNG-7786
2023-05-19 18:08:37 +02:00
Tamas Cservenak 099a3f346c [MNG-7788] Plugin Validation Report logged before summary (#1114)
This change uses different technique to hook into "session end", and thus is invoked before ExecutionEventLogger is.

---

https://issues.apache.org/jira/browse/MNG-7788
2023-05-19 17:49:31 +02:00
Tamas Cservenak 11d97e64e7 [MNG-7787] Introduce new options for plugin validation report (#1113)
Added NONE and INLINE modes.

---

https://issues.apache.org/jira/browse/MNG-7787
2023-05-19 17:49:21 +02:00
Tamas Cservenak a90950155c [MNG-7786] Fix plugin validation misleading message (#1112)
Reword the validation warning and add new check for real plugin dependencies in wrong scopes (do not rely on build-time derived descriptor, but on real data instead).

---

https://issues.apache.org/jira/browse/MNG-7786
2023-05-19 17:49:05 +02:00
Guillaume Nodet d826b575ac
[MNG-7784] Fix compatibility for SuperPomProvider (#1109) 2023-05-17 07:19:19 +02:00
Guillaume Nodet 7fe9499361
[MNG-7783] Profile source point to file instead of to module (#1110) 2023-05-17 07:15:44 +02:00
Elliotte Rusty Harold 2bbdd9788e
Prefer Java standard library to Plexus util (#1015)
Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
2023-05-16 11:10:39 +02:00
Petr Široký 59342ce249
[MNG-7743] Make the build work on JDK 20 (#1065)
* [MNG-7743] Make the build work on JDK 20

 * the behaviour before the fix was already pretty confusing. JDK 19 and
   older do not check the presense of '{' in the constructor, so the
   URL object got created, but when converting to file the result would
   be e.g. '/../../src/test/remote-repo' which is completely wrong.
   But it seems the affected tests did not really care, as all of them
   were passing

* Remove forgotten println

Co-authored-by: Yeikel <email@yeikel.com>

* Test with latest JDK

* Do not run ITs with jdk 20, but just the "build itself"

---------

Co-authored-by: Yeikel <email@yeikel.com>
Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
2023-05-16 11:06:05 +02:00
Guillaume Nodet b76e78072a
[MNG-7785] Clean usage of SessionData (#1094) 2023-05-16 10:56:44 +02:00
Hervé Boutemy 97a565e313
MNG for Jira auto-link 2023-05-15 15:24:09 +02:00
Tamas Cservenak a56f201991 Update DOAP 2023-05-11 09:33:14 +02:00
Tim te Beek a8319821a9
[MNG-6829] Replace any StringUtils#isEmpty(String) and #isNotEmpty(String) (#1104)
* [MNG-6829] Replace any StringUtils#isEmpty(String) and #isNotEmpty(String)

Use this link to re-run the recipe: https://public.moderne.io/recipes/org.openrewrite.java.migrate.apache.commons.lang.IsNotEmptyToJdk?organizationId=QXBhY2hlIE1hdmVu

Co-authored-by: Moderne <team@moderne.io>

* Apply Spotless

---------

Co-authored-by: Moderne <team@moderne.io>
2023-05-09 19:46:02 -04:00
Marc Philipp 56674cdc90
[MNG-7778] - Include suppressed exceptions when logging failures (#1103)
Instead of only including causes, suppressed exceptions are now included
as well. A similar indentation strategy as in
`Throwable.printStackTrace` is used.

---

https://issues.apache.org/jira/browse/MNG-7778
2023-05-05 17:21:16 +02:00
Guillaume Nodet a1fa3eb534
[MNG-6303] Interpolate all arguments using system and user supplied properties (#1062) 2023-05-05 15:12:12 +02:00
Tamas Cservenak 9b6d263bdb
[MNG-7769] Update Resolver to 1.9.10 (#1102)
From 1.9.8

---

https://issues.apache.org/jira/browse/MNG-7769
2023-05-05 10:00:34 +02:00
Tamas Cservenak bec53b34e3
[MNG-7038] Fixes for topDirectory (#1100)
Changes:
* resolve file argument against workingDirectory explicitly
* the check Files.isRegularFile should happen against path
2023-05-02 20:37:56 +02:00
Tamas Cservenak 8b8f2c3ddd [MNG-7767] Tone down plugin validator (#1092)
This change reduces default output making it more compact, and also renames the "levels" to brief, default and verbose.

---

https://issues.apache.org/jira/browse/MNG-7767
2023-04-26 15:53:21 +02:00
Giovanni van der Schelde 81231b8865 [MNG-7707] Skip consumer pom artifact transformation when no pom is available (fixes #1060) 2023-04-21 21:27:03 +02:00
Guillaume Nodet 2db7c85b64
[MNG-7038] Introduce public properties to point to the root and top directories of (multi-module) project (#1061)
This commit introduces three properties:

 * project.rootDirectory: the project's directory or parent directory containing a .mvn subdirectory or a pom.xml flagged with the root="true" attribute. If no such directory can be found, accessing the rootDirectory property will throw an IllegalStateException.

 * session.topDirectory : the directory of the topmost project being built, usually the current directory or the directory pointed at by the -f/--file command line argument. The topDirectory is similar to the executionRootDirectory property available on the session, but renamed to make it coherent with the new rootDirectory and to avoid using root in its name. The topDirectory property is computed by the CLI as the directory pointed at by the -f/--file command line argument, or the current directory if there's no such argument.

 * session.rootDirectory : the rootDirectory for the topDirectory project.

The topDirectory and rootDirectory properties are made available on the MavenSession / Session and deprecate the executionRootDirectory and multiModuleProjectDirectory properties. The rootDirectory should never change for a given project and is thus made available for profile activation and model interpolation (without the project. prefix, similar to basedir). The goal is also to make the rootDirectory property also available during command line arguments interpolation.

A root boolean attribute is also added to the model to indicate that the project is the root project. This attribute is only supported if the buildconsumer feature is active and removed before the pom is installed or deployed. It can be used as an alternative mechanism to the .mvn directory.
2023-04-20 12:58:12 +02:00
Guillaume Nodet 9e51a8fe95
[MNG-7763] Provide UTF-8 as a default value for project.build.sourceEncoding and project.reporting.outputEncoding (#1085) 2023-04-17 15:20:54 +02:00
Tamas Cservenak 0a67219271 [MNG-7753] Upgrade resolver to 1.9.8 (was 1.9.7).
---

https://issues.apache.org/jira/browse/MNG-7753
2023-04-17 14:23:50 +02:00
Karl Heinz Marbaise 5c750eacb4
[MNG-7766] - Migrate to use mockito-bom 4.11.0 2023-04-16 14:54:16 +02:00
Karl Heinz Marbaise c49c4e0b18
[MNG-7451] - Remove public modifier from test methods / test classes 2023-04-15 19:24:20 +02:00
Karl Heinz Marbaise d7d8544669
[MNG-7765] - Minimum Build Requirement is wrong 2023-04-14 10:42:02 +02:00
Guillaume Nodet b7a3d85713 Simplify logger creation leveraging Map.computeIfAbsent 2023-04-13 11:35:01 +02:00
Tamas Cservenak 432bd7af3a [MNG-7741] Track missing files, plugin and parent pom dependencies (#1058)
Add more information when using `-Dmaven.repo.local.recordReverseTree=true`.

Signed-off-by: Grzegorz Grzybek <gr.grzybek@gmail.com>

---

https://issues.apache.org/jira/browse/MNG-7741
2023-04-12 13:08:37 +02:00
Niels Basjes 328ea1be31
[MNG-7750] Ensure no unwanted interpolation in plugins from profiles. (#1076)
This is the port of https://github.com/apache/maven/pull/1075 to the master branch.

The good thing is that this is ONLY the tests because the maven 4 does not have the problem of MNG-7750.

A few small changes in the tests were needed to handle the internal differences between maven 3.x and maven 4.x.

---

https://issues.apache.org/jira/browse/MNG-7750
2023-04-12 12:26:40 +02:00
Tamas Cservenak 53b6473237 [MNG-7754] Improvement and extension of plugin validation (#1079)
This is general rework of current Maven 3.9.x line how it handles plugin and mojo validations.

Changes:
* added plugin validations for dependencies
* introduced pluginValidationManager that gathers violations
* manager creates a report at build end, with dense and non repeating data
* this is in spirit to lessen already too verbose logging, as current solution would report violations as many times plugin is used in reactor, and that can be many (ie. a plugin from parent for each module)

Example report of Maven 3.9.x build: https://gist.github.com/cstamas/b62fdcd53eaf316123cf183f5a24e6a5

---

https://issues.apache.org/jira/browse/MNG-7754
2023-04-12 11:55:40 +02:00
Guillaume Nodet b2ee29e03e [MNG-6825] Get rid of commons-lang 2023-04-06 10:51:18 +02:00
Guillaume Nodet 26056b9b20 [MNG-7756] The degree of concurrency does not support "2." as a factor
Also fix the thrown exception to report valid syntaxes without assuming the user intent (for example "0.5c" would say it's not an int...)
2023-04-06 10:51:18 +02:00
Tim te Beek 8421a36592
[MNG-6825] Replace StringUtils (#1078)
Co-authored-by: Moderne <team@moderne.io>
2023-04-01 01:56:03 +00:00
Slawomir Jaranowski b2b04d2e92 [MNG-7749] Upgrade animal-sniffer from 1.21 to 1.23 2023-03-27 19:21:33 +02:00
Elliotte Rusty Harold 38ba581634
correct comment (#1074) 2023-03-26 23:58:20 +00:00
Elliotte Rusty Harold 54afd174ef
remove unused branches in fake (#1069)
* remove unused branches in a fake object
2023-03-23 10:36:23 +00:00
Guillaume Nodet ae933fe68d
[MNG-7720] Simplify code (#1063) 2023-03-23 06:31:49 +01:00
Guillaume Nodet 2788849c37
Switch version to 4.0.0 for @since tags (#1068) 2023-03-23 06:29:39 +01:00
Elliotte Rusty Harold cadeab53f6
MNG-7738 don't dump raw stack traces to System.err (#1064) 2023-03-22 12:44:37 +00:00
Tim te Beek 703f814e34
[MNG-6825] Replace FileUtils with Commons IO (#1067)
* [MNG-6825] Replace FileUtils with Commons IO

Co-authored-by: Moderne <team@moderne.io>

* Minor fixes and reverts where cases are not handled yet

* Drop explicit dependencies on plexus-utils

---------

Co-authored-by: Moderne <team@moderne.io>
2023-03-19 20:19:22 +00:00
Tamas Cservenak f071094f34 Update DOAP with Maven 3.9.1 release 2023-03-18 11:26:07 +01:00
Guillaume Nodet 8052c720e7 [maven-release-plugin] prepare for next development iteration 2023-03-15 17:06:58 +01:00
Guillaume Nodet 26d10a4bf9 [maven-release-plugin] prepare release maven-4.0.0-alpha-5 2023-03-15 17:06:43 +01:00
Guillaume Nodet ade97d5a69
[MNG-7697] Fix assembly which should not include plexus-utils-3.5.0 (#1057) 2023-03-15 13:12:48 +01:00
Michael Osipov 814af33e67 Update DOAP with Maven 3.8.8 release 2023-03-14 16:50:46 +01:00