Commit Graph

3455 Commits

Author SHA1 Message Date
Guillaume Nodet fd4493580a
[MNG-7820] Get rid of plexus-utils introspection classes (#1251) 2023-09-22 08:02:25 +02:00
Guillaume Nodet e91cee9a2d
[MNG-7820] Get rid of plexus-utils DAG class (#1250) 2023-09-22 08:02:04 +02:00
Guillaume Nodet 0c37cff681
[MNG-7820] Get rid of plexus-utils Os class (#1249) 2023-09-22 08:01:36 +02:00
Guillaume Nodet 1eae6684e3
[MNG-7881] Expose the rootDirectory for model processing (#1245) 2023-09-19 16:31:35 +02:00
Guillaume Nodet 34b0591f03
[MNG-7820] Remove dependency on plexus-utils StringUtils / FileUtils (#1243)
Co-authored-by: crazyhzm <crazyhzm@apache.org>
2023-09-14 13:48:15 +02:00
Slawomir Jaranowski ce8fc3a31c [MNG-7878] Extend test for ConsumerPom and modules in plugin configuration 2023-09-14 09:51:37 +02:00
Guillaume Nodet c6380108b1
[MNG-7877] Attach the build POM and simplify build/consumer implementation (#1240)
.. at the cost of loosing xml formatting in the consumer POMs
2023-09-13 13:39:50 +02:00
Guillaume Nodet 45075233c7
[MNG-7876] Add model version analysis and downgrade (#1235) 2023-09-11 18:17:26 +02:00
Guillaume Nodet 46fd5e9586
Add ModelLocator#locateExistingPom to abstract a bit more (#1237) 2023-09-11 18:15:00 +02:00
Guillaume Nodet e71d2d7167
Improve o.a.m.api.services.Source interface (#1236) 2023-09-11 18:14:36 +02:00
Guillaume Nodet 7d6f90e8d0
Move Features to api (#1232) 2023-09-11 00:42:53 +02:00
Guillaume Nodet dde369b6fc [MNG-7810] Provide a SPI for the v4 api
# Conflicts:
#	maven-bom/pom.xml
2023-09-11 00:38:45 +02:00
Guillaume Nodet 0b3246381d
Remove useless @author tags (#1226)
This information is usually more accurately given by the GIT history
2023-09-06 10:39:32 +02:00
Guillaume Nodet 06938249a7
[MNG-7792] Use a standalone asm version (#1126) 2023-09-05 23:09:03 +02:00
Guillaume Nodet 64b32c0bb4
[MNG-7871] Fix location tracking (#1222) 2023-09-05 18:06:44 +02:00
Guillaume Nodet 98ec2eb1c8
[MNG-7861] Remove artifacts which should be kept hidden (#1221) 2023-09-01 22:26:41 +02:00
Guillaume Nodet 22ae75a304
[MNG-7843] Allow glob patterns in dependency exclusions (#1200) 2023-08-29 17:25:58 +02:00
huazhongming 7d66d19f8b
[MNG-7822] Add support for TRACE logging level (with style "bold,magenta") (#1215)
Signed-off-by: crazyhzm <crazyhzm@apache.org>
2023-08-25 17:51:43 +02:00
Guillaume Nodet f2593b97ef
[MNG-7862] The ModelLocator should always be used when locating pom.xml (#1217) 2023-08-23 21:25:14 +02:00
Tamas Cservenak 059e3c5914
Fix dependabot alerts (#1214)
(that are not applicable, but look ugly).

These tests are NOT built, but are taken from real projects
several years ago, and used in POM related UTs.

Hence, for example update of velocity is completely okay,
even if in "real life" it would not compile.
2023-08-03 11:29:10 +02:00
Tamas Cservenak 36db1e35ca
[MNG-7846] Break out of endless loop (#1206)
This is most probably "just" about broken Throwable implementations.
Some override getCause but does not perform checks to what it was inited
as "this" means "not yet inited" actually.

---

https://issues.apache.org/jira/browse/MNG-7846
2023-07-19 17:37:28 +02:00
Guillaume Nodet 9b12ccdeb0
Rename Type#getName() to getId() and improve javadoc (#1198) 2023-07-06 09:20:03 +02:00
Guillaume Nodet 8f45d51bd6 Prefer using String.isEmpty over String.length()>0 2023-07-04 08:36:08 +02:00
Guillaume Nodet 08979553f2 Prefer Files.newInputStream 2023-07-04 08:36:08 +02:00
Guillaume Nodet e39142b77a
[MNG-7830] Switch from plexus-xml to stax / woodstox (#1185) 2023-06-29 12:03:50 +02:00
Guillaume Nodet 5b540821f2 [maven-release-plugin] prepare for next development iteration 2023-06-24 10:52:55 +02:00
Guillaume Nodet bf699a388c [maven-release-plugin] prepare release maven-4.0.0-alpha-7 2023-06-24 10:52:47 +02:00
Guillaume Nodet dbfcfd5eb3
[MNG-7228] MavenProject.getOriginalModel returns interpolated parts (#1183) 2023-06-24 10:51:08 +02:00
Guillaume Nodet a279289bc3 [maven-release-plugin] prepare for next development iteration 2023-06-23 15:08:35 +02:00
Guillaume Nodet a3f0f12fab [maven-release-plugin] prepare release maven-4.0.0-alpha-6 2023-06-23 15:08:27 +02:00
Tamas Cservenak 764a9ca0be [MNG-7823] Improve plugin validation level parsing (#1182)
Changes:
* always parse it at session start
* hence, will WARN if needed there as well, and will warn once
* do not re-parse and possibly warn always, reuse parsed enum

---

https://issues.apache.org/jira/browse/MNG-7823
2023-06-23 13:05:57 +02:00
Guillaume Nodet 229b31b626
[MNG-4645] Move Central repo definition out of Maven's core so it can be more easily changed (#1139)
Co-authored-by: Christian Schulte <schulte@apache.org>
2023-06-19 17:04:04 +02:00
Guillaume Nodet 0a8491c329
[MNG-7814] Use location tracking for settings (#1164) 2023-06-19 12:39:14 +02:00
Guillaume Nodet e6303aae32
[MNG-5659] Provide project-specific settings located in ${session.rootdir}/.mvn/settings.xml by default (#1059) 2023-06-19 12:32:14 +02:00
Karl Heinz Marbaise 5ebbb8ff50
[MNG-7764] Small code improvements (#1088) 2023-06-16 10:54:09 +02:00
Slawomir Jaranowski 09e58d188c [MNG-7811] Plugins verification - reporting improvements
cherry-pick e625606588
2023-06-16 09:47:44 +02:00
Guillaume Nodet a2d435b74a
Get rid of maven-shared-utils (#1158)
Given maven-shared-utils is being deprecated (see MSHARED-1269), we need to remove its usage in maven.  Maven core only uses the logging/message related classes from maven-shared-utils, so this PR enhance the initial v4 api with the needed interfaces and move the jansi specific code into maven-embedder.
2023-06-15 16:51:32 +02:00
Guillaume Nodet 967d8fc19c
[MNG-7794][MNG-7809] Deprecate RepositorySystem and make maven-compat optional (#1150)
* Move maven-compat to jsr330
* Remove more ties to RepositorySystem
* Move more stuff to maven-compat
* Move PluginManager and LocalRepositoryNotAccessibleException to maven-compat
* Fix tests
* Break circular dependency loop in components
* Move unused deprecated classes
2023-06-15 16:24:56 +02:00
Tamas Cservenak 4f8648af7b
[MNG-7790] Update lifecycle plugins, take 2 (#1163)
Changes:
* war 3.3.3 -> 3.4.0

---

https://issues.apache.org/jira/browse/MNG-7790
2023-06-15 14:09:06 +02:00
Hervé Boutemy 6ee2c5c442 [MNG-5987] document goals execution order
fixes #1145
2023-06-14 07:48:39 +02:00
Guillaume Nodet 898e4e4b3c
Simplify code (#1156) 2023-06-13 22:45:33 +02:00
Slawomir Jaranowski 973b1b9684 [MNG-7806] Plugins verification - remove used in module(s) report
cherry-pick: 3135553e2d
2023-06-13 21:22:42 +02:00
Guillaume Nodet 56ee6a878d
[MNG-7751] Provide a way to inject XmlNode into plugins (#1071) 2023-06-12 21:39:23 +02:00
Tamas Cservenak be3625d190
[MNG-7790] Update lifecycle plugins (#1154)
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:02 +02:00
Guillaume Nodet c79a7a0272
[MNG-7740] Remove old temporary consumer*pom files from buildDir (#1117)
Co-authored-by: Giovanni van der Schelde <Giovanni.vanderSchelde@infosupport.com>
2023-06-05 10:47:13 +02:00
Guillaume Nodet e08c95a673
[MNG-7655] Switch to plexus-utils / plexus-xml 4 (#1093) 2023-06-04 21:03:41 +02:00
Guillaume Nodet b2953c52d5
[MNG-7795] IllegalArgumentException: 'other' has different root during plugin validation (#1133)
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

Co-authored-by: Andreas Dangel <adangel@apache.org>
2023-06-01 19:05:48 +02:00
Tamas Cservenak b430e7d826 [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:01:11 +02:00
Henning Schmiedehausen 8552ac3fea
[MNG-7797] Return BRIEF mode (#1132)
Make BRIEF a legal value again.

---

https://issues.apache.org/jira/browse/MNG-7797
2023-06-01 17:24:31 +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
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
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
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
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
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
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
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
Tim te Beek 8421a36592
[MNG-6825] Replace StringUtils (#1078)
Co-authored-by: Moderne <team@moderne.io>
2023-04-01 01:56:03 +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
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
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
Slawomir Jaranowski e9e0a51738 [MNG-7725] Update surefire to 3.0.0 in default binding 2023-03-14 16:42:10 +01:00
Guillaume Nodet 10128b4484
Remove references to Xpp3DomBuilder and use XmlNodeBuilder instead (#1045) 2023-03-09 16:26:58 +01:00
Hervé Boutemy ea21d6f6fc [MNG-7666] update documentation 2023-03-08 18:45:23 +01:00
Tamas Cservenak 1ffd68b802
[MNG-7720] Wrong build order of forked projects (#1040)
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.

---

https://issues.apache.org/jira/browse/MNG-7720
2023-03-08 09:04:35 +01:00
Andrey Bruykhov f7d3e30d10 Using Set<>() for contains()
This closes #998
2023-03-07 17:54:07 +01:00
Tamas Cservenak c1dfb947b5
[MNG-7715] Update to resolver 1.9.6 (#1036)
Adjust some UTs as error message did change.

---

https://issues.apache.org/jira/browse/MNG-7715
2023-03-06 11:17:56 +01:00
Christoph Läubrich f41d533e71 [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 #1029
2023-03-03 18:04:36 +01:00
Tamas Cservenak 65d95f08a6
[MNG-7717] Maven warns wrongly about deprecated parameter (#1031)
The implementation for MNG-7706 is wrong: it changes parameter NAME,
where it should check type and defaultValue instead.

---

https://issues.apache.org/jira/browse/MNG-7717
2023-03-03 08:52:40 +01:00
Tamas Cservenak afc1a2bd86
[MNG-7713] Drop legacy-local-repository option (#1020)
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:17:55 +01:00
Tamas Cservenak 22d2b47c04
[MNG-7706] Deprecate 'localRepository' parameter expression (#1009) (#1012)
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 18:14:45 +01:00
Tamas Cservenak a35307771c
[MNG-7702] Use latest deploy plugin (#1007)
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:34 +01:00
Guillaume Nodet 1d9dd4a364 [MNG-7679] [REGRESSION] Build fails when executing a single mojo without a POM
This closes #993
2023-02-20 21:21:34 +01:00
Alexey Venderov b82479bf11
[MNG-7689] Check if execution lifecycle phase is not null (#996) 2023-02-15 08:49:39 +01:00
Andrey Bruykhov 7b38457506 Normalize regex patterns
This #990
2023-02-09 18:47:51 +01:00
Andrey Bruykhov 6e25a2674b [MNG-7686] Speed up by replacing non-pattern #replaceAll() with #replace() or precompiled patterns
This closes #984
2023-02-07 21:55:12 +01:00
Andrey Bruykhov ef3cf56b51 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.

This closes #985
2023-02-07 20:46:28 +01:00
Christoph Läubrich 0525d90d42 [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 #981
2023-02-05 13:17:09 +01:00
Tamas Cservenak dfb406c5b3
Fix site plugin warning (#974)
As date format in these two files were not parsed.
2023-01-30 16:20:35 +01:00
Guillaume Nodet 41429b15ab
[MNG-7673] IllegalArgumentException thrown for invalid checksum 'never' (#972) 2023-01-30 15:11:30 +01:00
Guillaume Nodet 30fafa6741
[MNG-7672] Fork should only execute the project and its submodules (#968) 2023-01-30 15:08:08 +01:00
Guillaume Nodet fbeefb85ab [maven-release-plugin] prepare for next development iteration 2023-01-27 16:33:47 +01:00
Guillaume Nodet 009cf4a721 [maven-release-plugin] prepare release maven-4.0.0-alpha-4 2023-01-27 16:33:38 +01:00
Guillaume Nodet f153ac134c
[MNG-7598] Fix compatibility issues with toolchains and settings (#971)
* Split the header on two lines
* Properly delegates equals/hashCode to the v4 models
* Introduce object tracking in settings / toolchains
* Get back to a single template for v3 models
* Switch settings / toolchains mergers to deep merge
* Fix binary compatibility with 3.x
2023-01-27 15:56:16 +01:00
Guillaume Nodet f77de570b7
[MNG-7646] Do not parse the whole reactor unless required by command line options (#963) 2023-01-26 11:42:23 +01:00
Tamas Cservenak 8918c8144f
[MNG-7622] Maven Transformation and Consumer POM (#907)
Maven Consumer POM redone, it happens only in "maven3 realm" (before resolver), and allows use cases like m-gog-p and checksum-m-p work as before.

Key aspects:
* consumer POM is injected to build earliest possible as attached artifact
* it lives and is visible just like any other attached artifact (so m-gpg-p can process it)
* just before the install/deploy, they are "swapped out" to replace POM along with all "extras" it may have (checksum, signature)
* to support use cases like MNG-7067 (in memory model is changed, but not POM file), OnChangeTransformer could be extended to take into account both: file content and model content.

---

https://issues.apache.org/jira/browse/MNG-7622
2023-01-25 11:27:00 +01:00
Guillaume Nodet c1a900190f
[MNG-7629] Change reactor reader to copy packaged artifacts and reuse them across builds if needed (#954) 2023-01-19 11:55:20 +01:00
Tamas Cservenak 01ba8291cd
[MNG-7666] Update default binding and lifecycle plugin versions (#956)
Finally use 3.x plugins for all.

---

https://issues.apache.org/jira/browse/MNG-7666
2023-01-16 14:30:48 +01:00
Guillaume Nodet a00a44f75b
[MNG-7660] Rename Dom to XmlNode in the v4 api (#946)
* Rename Dom to XmlNode and Xpp3Dom to XmlNodeImpl
* Use XmlNodeBuilder instead of DomBuilder
2023-01-03 16:52:23 +01:00
Hervé Boutemy fbdf109b34
[MNG-7571] add Maven API javadoc (#830) 2022-12-31 17:32:07 +01:00
Pavel Horal 6178f6ed86
[MNG-7648] Fix locationTracking in DefaultModelBuildingRequest copy constructor (#940)
- Fix locationTracking in DefaultModelBuildingRequest copy constructor
- Add location tracking unit test
2022-12-29 14:02:33 +01:00
Guillaume Nodet 8150c62749 [MNG-7650] Reformat 2022-12-26 16:12:32 +01:00
Michael Osipov 538a6b40a5 [MNG-7352] org.apache.maven.toolchain.java.JavaToolchainImpl should be public
This closes #934
2022-12-23 09:16:13 +01:00
Michael Osipov f0364acb2f Directories, not folders 2022-12-18 16:36:16 +01:00
Michael Osipov 3eec6b82d3 [MNG-7636] Document MavenProject#getAttachedArtifacts() as read-only
This closes #918
2022-12-18 13:11:20 +01:00
Christoph Läubrich 7a1cc12a47 [MNG-7637] Possible NPE in MavenProject#hashCode()
This closes #921
2022-12-18 11:59:51 +01:00
Konrad Windszus ce18c56206
[MNG-7598] Enforce binary backwards-compatibility (#874)
For now only enabled in core and plugin-api

Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
2022-12-15 10:50:39 +01:00
Olivier Lamy 984f73dc7c fix pom format
Signed-off-by: Olivier Lamy <olamy@apache.org>
2022-12-13 09:59:33 +10:00
Guillaume Nodet 0e82026f2a [maven-release-plugin] prepare for next development iteration 2022-12-12 11:37:35 +01:00
Guillaume Nodet 2ccf57baa5 [maven-release-plugin] prepare release maven-4.0.0-alpha-3 2022-12-12 11:36:07 +01:00
Guillaume Nodet adf89ef63f
[MNG-7505] Remove ReportingConverter (#906) 2022-12-11 18:57:15 +01:00
Simon 55431cd267
[MNG-7578] Fallback on Linux executable in Windows for findTool utility (#861)
* [MVN-7578] Fallback on Linux executable in Windows for findTool utility
* Fix code style
Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
2022-12-09 10:07:48 +01:00
Tamas Cservenak 6773c05128
[MNG-7619] Reverse Dependency Tree (#902)
Adds Maven feature that is able to explain why an artifact is present in local repository.

Usable for diagnosing resolution issues.

In local repository, for each artifact it records `.tracking` folder, containing farthest artifact that got to this artifact, and the list of graph nodes that lead to it.

Note: this is based on by @grgrzybek proposal and reuses some code he provided. See https://github.com/apache/maven-resolver/pull/182

---

https://issues.apache.org/jira/browse/MNG-7619
2022-12-05 16:19:31 +01:00
Konrad Windszus 0d4a1a1257
[MNG-7609] Clarify extension descriptor documentation (#896) 2022-12-05 10:04:35 +01:00
Tamas Cservenak 69ef6a61ba [MNG-7612] Chained LRM
Adds new feature: Chained Local Repository Manager.

Cherry-pick 2dc7a356d3

---

https://issues.apache.org/jira/browse/MNG-7612
2022-12-03 16:55:05 +01:00
Tamas Cservenak a840ba91e3
[MNG-7608] Make native transport the default (#892)
This immediately cuts in "half" the count of HTTP requests against Maven Central or any major MRM.

Altering the meaning of "default": is now same as "auto", but still leaving it in place for future, as "default" at some point may again become something different than "native".

---

https://issues.apache.org/jira/browse/MNG-7608
2022-12-02 16:12:48 +01:00
Guillaume Nodet 249c0fe0f1
[MNG-7617] Small optimisations and cleanup in the project/model building (#816)
* Clean a bit DefaultProfileActivationContext
* Cleanup DefaultProjectBuildingResult
* Cache the injected list to avoid repetitive lookups
* Lazily compute the MavenBuildTimestamp
* Use a single loop to select active profiles
2022-12-02 14:58:56 +01:00
Guillaume Nodet f0cc176b33
[MNG-7616] Add missing exported artifacts for the new API (#894) 2022-12-02 14:56:02 +01:00
Konrad Windszus 3d0939662a
[MNG-7611] Change semantics of plugin descriptor's "requiredJavaVersion" (#888)
Always assume version constraint (the same as in requiredMavenVersion)
2022-12-01 21:54:09 +01:00
Tamas Cservenak f70b0019cc
[MNG-7607] Add M4 Transport API (#884)
Something simple to use and would reuse all the auth/proxy etc data from Maven. Intentionally super-trivial API.

If something more "serious" needed, plugin should probably roll it's own solution.

---

https://issues.apache.org/jira/browse/MNG-7607
2022-12-01 13:53:08 +01:00
Tamas Cservenak c6ecff9923
[MNG-7586] Update Maven Resolver to 1.9.2 (#882)
Updates resolver to latest release.

---

https://issues.apache.org/jira/browse/MNG-7586
2022-11-26 20:08:34 +01:00
Guillaume Nodet de19cfcd2b [MNG-7601] Reformat sources 2022-11-22 14:26:01 +01:00
Slawomir Jaranowski b1c1f7556d [MNG-7600] LocalRepositoryManager is created too early
LocalRepositoryManager needs configurations from RepositorySystemSession
so must be created after session configuration is finished.
2022-11-21 16:45:35 +01:00
Guillaume Nodet dc88c6193c
[MNG-7580] Introduce new SettingsBuilder and ToolchainsBuilder services (#852) 2022-11-21 09:51:28 +01:00
Guillaume Nodet 3f03f0e7b2
[MNG-7576] Restore compatibility with maven 3.x (#841) 2022-11-21 09:50:33 +01:00
Guillaume Nodet 6a27f5f2f6
[MNG-7597] Fix infinite loop when iterating PropertiesAsMap (#872) 2022-11-21 09:37:42 +01:00
Tamas Cservenak 724ac0b541 Revert "[MNG-7586] Update Maven Resolver to 1.9.1 (#870)"
This reverts commit 113919a5ef.
2022-11-17 17:46:08 +01:00
Tamas Cservenak 113919a5ef
[MNG-7586] Update Maven Resolver to 1.9.1 (#870)
Changes:
- hook in lifecycle

---

https://issues.apache.org/jira/browse/MNG-7586
2022-11-17 16:26:42 +01:00
Slawomir Jaranowski fa15fcf153 [MNG-7590] Allow to configure resolver by properties in settings.xml 2022-11-09 23:15:25 +01:00
Guillaume Nodet dfcf5791fc
[MNG-7583] Allow concurrent access to the MavenPluginManager (#855) 2022-11-09 14:13:18 +01:00
Michael Osipov 9c60138915 [MNG-7556] Clean up notion between user properties and system properties
This closes #810
2022-10-29 20:44:15 +02:00
Abdel Hajou bc8c6be269 [MNG-7564] Check if session is null when generating metadata
Closes #857.
2022-10-29 13:38:47 +02:00
Konrad Windszus daa8e16902
[MNG-7570] Plugin descriptor can carry the required Maven version (#832)
Its value takes precedence over POMs Maven prerequisite
2022-10-19 08:15:28 +02:00
Konrad Windszus d857c3a915
[MNG-7566] Allow a Maven plugin to require a Java version (#827) 2022-10-18 11:45:54 +02:00
Guillaume Nodet 77312f323b [maven-release-plugin] prepare for next development iteration 2022-10-15 01:41:39 +02:00
Guillaume Nodet c07700ffc9 [maven-release-plugin] prepare release maven-4.0.0-alpha-2 2022-10-15 01:41:31 +02:00
Guillaume Nodet 550f0c90fc Restore compatibility for the maven-release-plugin 2022-10-15 01:33:17 +02:00
Guillaume Nodet a492c9a4ff
Fix the repackaged plexus-utils groupId (#829)
* Fix plexus gav
* Install maven instead of just building it

The plugins need to be available in the local repo, else the build may download old snapshots
2022-10-15 01:20:24 +02:00
Guillaume Nodet 66851463f6 [maven-release-plugin] prepare for next development iteration 2022-10-14 22:57:05 +02:00
Guillaume Nodet 0d973fb624 [maven-release-plugin] prepare release maven-4.0.0-alpha-1 2022-10-14 22:36:41 +02:00
Guillaume Nodet 2b6977a85f
Fix site generation (#828) 2022-10-14 21:52:26 +02:00
Guillaume Nodet 3f90e7028e
Restore compatibility on SettingsBuilder, ToolchainsBuilder and MojoDescriptorCreator (#820) 2022-10-11 16:31:57 +02:00
Tamas Cservenak 3bc2cf6a7a
[MNG-7547] Simpler G level metadata generation (#806) 2022-10-11 14:11:17 +02:00