Commit Graph

3135 Commits

Author SHA1 Message Date
Slawomir Jaranowski e625606588 [MNG-7811] Plugins verification - reporting improvements 2023-06-16 09:01:13 +02:00
Tamas Cservenak 302f55a4b7
MNG-7790] Update lifecycle plugins, take 2 (#1162)
Changes:
* war 3.3.3 -> 3.4.0

---

https://issues.apache.org/jira/browse/MNG-7790
2023-06-15 14:09:16 +02:00
Hervé Boutemy 45262ccd1d [MNG-5987] document goals execution order
fixes #1145
2023-06-14 07:43:55 +02:00
Slawomir Jaranowski 3135553e2d [MNG-7806] Plugins verification - remove used in module(s) report 2023-06-13 20:15:51 +02:00
Tamas Cservenak 8695b6d66e
[MNG-7790] Update lifecycle plugins (#1153)
Changes:
install: 3.1.0 -> 3.1.1
deploy: 3.1.0 -> 3.1.1
resources: 3.3.0 -> 3.3.1
compiler: 3.10.1 -> 3.11.0
surefire: 3.0.0 -> 3.1.2
plugin: 3.7.0 -> 3.9.0
wrapper: 3.1.1 -> 3.2.0

---

https://issues.apache.org/jira/browse/MNG-7790
2023-06-12 11:18:10 +02:00
Hervé Boutemy 434ec3b476 fix unintended s/javacocs/Javadocs/ 2023-06-04 18:16:38 +02:00
Hervé Boutemy e83192cd56 s/JavaDocs/Javadocs/ 2023-06-04 18:09:59 +02:00
Andreas Dangel 23a3a9127d
[MNG-7795] IllegalArgumentException: 'other' has different root during plugin validation (#1128)
Checks the paths before relativizing them.
Normalize and relative before adding to result
Rename local vars
Apply to ExecutionEventLogger

---

https://issues.apache.org/jira/browse/MNG-7795
2023-06-01 19:05:07 +02:00
Tamas Cservenak 8cc6b2710d
[MNG-7799] Plugin validation may falsely report there are issues (#1136)
But to show no issue, as locality to be shown is not same as reported
issues.

---

https://issues.apache.org/jira/browse/MNG-7799
2023-06-01 19:00:06 +02:00
Tamas Cservenak 1ee2c0111e [MNG-7797] Return BRIEF mode (#1132)
Make BRIEF a legal value again.

---

https://issues.apache.org/jira/browse/MNG-7797
2023-06-01 17:25:31 +02:00
Tamas Cservenak 39dd668adf
[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:19:12 +02:00
Tamas Cservenak c8d93c0552 [MNG-7789] Cleanup
PR had a leftover (unused but injected member). Removed.

---

https://issues.apache.org/jira/browse/MNG-7789
2023-05-24 12:51:35 +02:00
Tamas Cservenak 6c562a46ee
[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.

---

https://issues.apache.org/jira/browse/MNG-7789
2023-05-24 08:28:24 +02:00
Tamas Cservenak 4d6f16918a [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:07:27 +02:00
Tamas Cservenak 1a19a0f58d
[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:47:32 +02:00
Tamas Cservenak e5135698f4
[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:47:03 +02:00
Tamas Cservenak 20910f26db
[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:46:39 +02:00
Petr Široký b42f2100a7 [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>
# Conflicts:
#	.github/workflows/maven_build_itself.yml
#	maven-core/src/test/java/org/apache/maven/repository/TestRepositoryConnector.java
2023-05-16 11:40:11 +02:00
Guillaume Nodet f0c2c65526
[MNG-7785] Clean usage of SessionData (#1111) 2023-05-16 11:17:16 +02:00
Tamas Cservenak 42594643c3 [maven-release-plugin] prepare for next development iteration 2023-05-08 11:05:52 +02:00
Tamas Cservenak c9616018c7 [maven-release-plugin] prepare release maven-3.9.2 2023-05-08 11:05:23 +02:00
Tamas Cservenak a2428a6914
[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:51:39 +02:00
Tamas Cservenak 924dbfecf8
[MNG-7670] Update misc dependencies (#1089)
And do align them. Max Level is Java 8, but
we had several conflicts, like HttpClient
(used by Wagon but also by Resolver-Transport-Http).

---

https://issues.apache.org/jira/browse/MNG-7670
2023-04-17 15:23:48 +02:00
Tamas Cservenak eb7cdefaaa
[MNG-7759] Maven2 plugins will not have even session setter (#1084)
As setter was added in Maven3. Still, this causes unexpected NPE
during plugin execution, while Maven3 should support Maven2
plugins.

---

https://issues.apache.org/jira/browse/MNG-7759
2023-04-13 11:56:13 +02:00
Grzegorz Grzybek bc138dc3ba
[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:05:59 +02:00
Niels Basjes 0f18470576
[MNG-7750] Fix unwanted interpolation in plugins from profiles. (#1075)
This is ONLY the reproduction of the problem I found.

If you disable the activeProfile (in buildPom and remove the assert) then all checks pass.

If you enable this profile (provided code) then in several places the ${project.basedir} has been interpolated and shows the path of the build and the assertions fail the build.

---

https://issues.apache.org/jira/browse/MNG-7750
2023-04-12 12:26:47 +02:00
Tamas Cservenak 36a4e9ff64
[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:42:30 +02:00
Guillaume Nodet 64227e25a5 [MNG-7720] Simplify code (#1063) 2023-03-23 06:32:46 +01:00
Tamas Cservenak 22e6eb03ea [maven-release-plugin] prepare for next development iteration 2023-03-15 10:40:30 +01:00
Tamas Cservenak 2e178502fc [maven-release-plugin] prepare release maven-3.9.1 2023-03-15 10:39:58 +01:00
Slawomir Jaranowski c294ef6c22 [MNG-7725] Update surefire to 3.0.0 in default binding 2023-03-14 16:05:25 +01:00
Tamas Cservenak 57acdd41b4
[MNG-7720] Wrong build order of forked projects (#1038)
The original fix MNG-7672 matched the "scope" but missed the "order". `project.collectedProjects` are in order as loaded (POM order), is not topologically sorted.

Fix is to use DAG of projects, ask for downstream projects (will return more then we need but sorted) and narrow that list to only contain collected projects.

Related commit: 48cac1c003

---

https://issues.apache.org/jira/browse/MNG-7720
2023-03-08 09:03:33 +01:00
Andrey Bruykhov 528cea3ad9 Using Set<>() for contains()
This closes #998
2023-03-07 18:06:41 +01:00
Tamas Cservenak 366e3f5f86
[MNG-7715] Update to resolver 1.9.6 (#1025)
Update and apply some adjustments to UTs as
error message did change.

---

https://issues.apache.org/jira/browse/MNG-7715
2023-03-06 10:42:55 +01:00
Christoph Läubrich 837db7a756 [MNG-7716] ConcurrencyDependencyGraph deadlock if no root is selected
If ConcurrencyDependencyGraph#getRootSchedulableBuilds returns an empty
list then MultiThreadedBuilder is locked forever as it never gets a
build result (because nothing is scheduled).

This changes the method, that in such case just the first project is
returned, this might not give the best performance, but ensures that
there is at least one build scheduled and the build-loop can proceed.

This closes #1028
2023-03-03 18:06:09 +01:00
Tamas Cservenak 3d4fee3008
[MNG-7717] Maven warns wrongly about deprecated parameter (#1030)
The implementation for MNG-7706 is wrong: it checks parameter name where it should check type and defaultValue (expression) instead.

---

https://issues.apache.org/jira/browse/MNG-7717
2023-03-03 08:52:59 +01:00
Guillaume Nodet 9037805f77
[MNG-7583] Allow concurrent access to the MavenPluginManager (#1001)
* [MNG-7583] Allow concurrent access to the MavenPluginManager (#855)
* Add a default method to avoid breaking the api
2023-03-01 11:31:29 +01:00
Tamas Cservenak 175b35c374
[maven-3.9.x] [MNG-7713] Drop legacy-local-repository option (#1018)
There is really no need for it, and there is a resolver
option if really must (but really should not, local repo
is and should be considered as transient).

---

https://issues.apache.org/jira/browse/MNG-7713
2023-03-01 11:20:19 +01:00
Tamas Cservenak 95ceb71ccc
[MNG-7706] Deprecate 'localRepository' parameter expression (#1009)
This PR deprecates the 'localRepository' mojo parameter expression, and Core will emit warning if used by any Mojo.

---

https://issues.apache.org/jira/browse/MNG-7706
2023-02-23 15:49:47 +01:00
Tamas Cservenak b231238e64
[MNG-7693] For older clients make OOTB defaults (#1008)
Older clients (like pyliglot) will miss to inject ModelCacheFactory
as their Plexus XML will not contain that requirement. For them,
provide OOTB defaults.

This would not happen, if JSR330 used, as then Sisu would remedy
this at runtime, but Plexus XML actually puts things in "concrete"
during build time.

---

https://issues.apache.org/jira/browse/MNG-7693
2023-02-23 09:56:34 +01:00
Tamas Cservenak a2a47daaa3
[MNG-7702] Use latest deploy plugin (#1006)
And have it aligned with install plugin. These two now provides all the fixes and new functionalities like working deployAtEnd etc.

---

https://issues.apache.org/jira/browse/MNG-7702
2023-02-22 13:21:54 +01:00
Tamas Cservenak 74f1dac9fb [MNG-7679] [REGRESSION] Build fails when executing a single mojo without a POM
This closes #1004
2023-02-20 21:20:36 +01:00
Andrey Bruykhov 4454cd6d82 Normalize regex patterns
This closes #988
2023-02-09 18:49:45 +01:00
Andrey Bruykhov fbf6bdaf01 [MNG-7686] Speed up by replacing non-pattern #replaceAll() with #replace() or precompiled patterns
This closes #984
2023-02-07 22:10:29 +01:00
Andrey Bruykhov 1ef583d3e6 Added missing @Deprecated/@deprecated annotations
@Deprecated annotatio is helpful to prevent usage of deprecated API.
For example: developer can see crossed out method/field name if this item
is deprecated.
2023-02-07 20:39:33 +01:00
Christoph Läubrich 72efba9b14 [MNG-7544] MavenMetadataSource#retrieve(MetadataResolutionRequest) does not check for null when reading from project map
Currently, if a project is returned from the workspace reader, but is not part
of the reactor, a NPE occurs. In this case, the repositories are read from
the model instead.

This closes #805
2023-02-05 13:34:04 +01:00
Tamas Cservenak ad29c3c548 [maven-release-plugin] prepare for next development iteration 2023-01-31 10:58:16 +01:00
Tamas Cservenak 9b58d2bad2 [maven-release-plugin] prepare release maven-3.9.0 2023-01-31 10:57:57 +01:00
Tamas Cservenak e9d570889f Reformat 2023-01-31 10:22:08 +01:00
Tamas Cservenak a5d0ca4f1d
Fix site plugin warning (#973)
As date format in these two files were not parsed.
2023-01-30 16:20:46 +01:00