Commit Graph

3227 Commits

Author SHA1 Message Date
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
Guillaume Nodet ae655e0e83
[MNG-7553] v4 api enhancements
* Fix DefaultArtifactManager to allow using both Artifact and Dependency
* Add a TODO for an EventSpy related api
* Add simple string/model conversion on the XmlFactory
* Decouple services creation
* Move services to @Singleton scope
* Add protected constructors as builders should not be created directly
* Fix typos "can not" -> "cannot"
* Add some null checks on build(xx) shortcut methods
* Add a some missing conversion to immutable collections for requests
2022-10-10 20:47:26 +02:00
Guillaume Nodet bff84bd634
Replace Properties with Map<String, String> in the v4 api (#808) 2022-10-05 16:52:17 +02:00
Guillaume Nodet 2a9f39336c
[MNG-7553] New clean API with immutable model (#703) 2022-10-02 10:41:25 +02:00
Martin Kanters 7e0e9f9fbe [MNG-7310] Using the plexusContainer to prevent loading lifecycles from defined by extensions from other submodules.
This resolves #639.
2022-09-16 14:46:01 +02:00
Sylwester Lachiewicz 5502c0c8db [MNG-7502] Upgrade to Guice 5.1.0 2022-09-10 21:27:25 +02:00
Guillaume Nodet 631f1c7611 [MNG-7401] [MNG-7474] Remove unused commented code 2022-08-23 11:54:18 +02:00
Guillaume Nodet e02e0c84ce [MNG-7401] [MNG-7474] Keep a single maven session and fix session scope (#743)
* [MNG-7474] SessionScoped beans should be singletons for a given session

Now that the Session is not cloned anymore, we can revert to the original
(Maven < 3.3) behavior of the session scoped components.

Co-authored-by: Christoph Läubrich <christoph@laeubi-soft.de>

This closes #743

* Remove setting a value which is the default already

Co-authored-by: Christoph Läubrich <christoph@laeubi-soft.de>
# Conflicts:
#	maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleModuleBuilder.java
#	maven-core/src/main/java/org/apache/maven/session/scope/internal/SessionScope.java
2022-08-23 11:51:44 +02:00
Giovanni van der Schelde a53a1aa232 [MNG-7443] Implement consistent logging between optional projects and optional profiles
This closes #701
2022-07-29 11:06:26 +02:00
Michael Osipov 0f8f22e404 [MNG-7020] Remove Maven 2 WagonExcluder backward compat code
This closes #394
2022-07-24 10:47:35 +02:00
Michael Osipov 2d9918a2d1 Clean up dependency warnings by dependency:analyze
This closes #769
2022-07-24 10:44:43 +02:00
Hervé Boutemy 35b93b0a58 [MNG-7353] Add support for "mvn pluginPrefix:version:goal"
This closes #757
2022-07-21 14:38:30 -07:00
Marc Wrobel 8125b3131f Fix typos in code
Fix minor typos in code :

- test method names,
- method parameter names,
- variable names.
2022-07-19 00:45:13 +02:00
Marc Wrobel 5ce5591ae3 Fix minor typos
Fix various minor typos in :

- project documentations,
- javadoc and comments,
- test files.
2022-07-18 19:22:19 +02:00
Michael Osipov efa9f0c678 [MNG-7513] Address commons-io_commons-io vulnerability found in maven latest version
We can safely remove Commons IO altogether because it is not used in any direct or
transitive usecase at compile time or runtime.

This closes #771
2022-07-18 17:26:54 +02:00
Josef Cacek 03b1faff7e [MNG-7511] Ensure the degreeOfConcurrency is a positive number in MavenExecutionRequest
This closes #767
2022-07-18 13:35:27 +02:00
Tamas Cservenak f05397a88d
Pull out lifecycle plugin versions (#766)
To lessen mistake (copy-paste vs forgotten update) but also just to
make things less redundant. This also makes possible "experimenting"
much more easier.

This is merely a refactoring that does not takes or gives anything, just tidies up.
2022-07-12 15:13:55 +02:00
Guillaume Nodet 415eaf31de
[MNG-7160] Ability to customize core extensions classloaders (#616) 2022-06-15 10:43:17 +02:00
Slawomir Jaranowski 54f9d91ebb [MNG-7468] Check unsupported plugins parameters in configuration 2022-06-03 20:54:27 +02:00
Guillaume Nodet 7da0214d1d [MNG-7476] Display a warning when an aggregator mojo is locking other mojos executions
# Conflicts:
#	maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoExecutor.java
2022-05-30 13:29:43 +02:00
Guillaume Nodet 2a276d0dcf [MNG-7487] Fix deadlock during forked lifecycle executions
# Conflicts:
#	maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoExecutor.java

# Conflicts:
#	maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoExecutor.java
2022-05-30 13:15:06 +02:00
Guillaume Nodet 6767f2500f [MNG-7486] Create a multiline message helper for boxed log messages
This closes #746
2022-05-29 13:35:24 +02:00
Tamas Cservenak fc1962e659
[MNG-7478] Transport selection should use config properties (#739)
Instead of user properties, as this allows making "permanent" the
selection by using MAVEN_OPTS and other places as well. Currently
only via command line works.

Also, do not modify existing Maven behavior, so introduce "default" branch
in selection. See comment in code
2022-05-17 08:54:29 +02:00
Tamas Cservenak a83ed86c48 [MNG-7471] Make Resolver util and connector-basic provided (#732)
Problem: resolver spi, impl and connector-basic has changes in 1.8.0 (SPI interface RepositoryLayout got new method, that is implemented in connector-basic, and code from impl is using it). But, Maven core exports only resolver api, spi and impl packages, while the rest is at mercy of a plugin. This means ,that these artifacts (api, spi and impl) will always come from Maven core, whatever version plugin declares, while the "rest" (connector-basic and util) will be of version that plugin declares. The current state hence prevented ANY KIND of changes on SPI interfaces that would be implemented in connector-basic (which is the case in Resolver 1.8.0).

Solution: make all these resolver artifacts "provided" (to behave like maven-core or maven-plugin-api is behaving): simply put, whatever resolver artifact plugin depends on, it should NOT use it's own version, but the version from Maven. This ensures that api-spi-impl-connector-basic as "aligned" and are same version.

Details:

The change is to make util is exportedArtifact AND exportedPackage, while connector-basic is only exportedArtifact.

Reasoning:
* exportedArtifact -- prevents "own" artifact to be added to realm
* exportedPackage -- makes it "visible" in realm

So, this basically prevents bad versions of util and connector-basic
enter the plugin realm (as they will be not added to it), while
util remains "visible" to plugins, as the intent was, most
common due GenericVersions etc.

This change also results in simpler expectations to plugin developers:
resolver libraries should really behave like maven-core or maven-compat:
when plugin declares dependency on these (w/ scope provided as best
practice), they really get version of these that are of version that
maven runs in, not version they declare. So same thing happens now with
resolver: you will get same version of resolver that maven uses your plugin
runs in.

Before this change, it was a mixed bag: api, spi and impl was from maven,
while util and connector-basic was version you pulled in as dep.
2022-05-11 16:09:52 +02:00
Guillaume Nodet 1c22f94522 [MNG-7459] Revert "[MNG-7347] SessionScoped beans should be singletons for a given session (#621)"
This reverts commit faf5d5d274.
2022-05-09 10:11:54 +02:00
Slawomir Jaranowski 3dd0afd897 [MNG-7464] Warn about using read-only parameters for Mojo in configuration 2022-05-05 21:12:25 +02:00
Giovanni van der Schelde 93196d4bb7 [MNG-7404] Drop deprecated prefixless expressions
Fixed failing unit tests to use the 'project.' prefix and removed legacy
unit tests that tested support for prefixless expressions.

Closes #696.
2022-04-27 20:12:57 +02:00
Slawomir Jaranowski 702f52d0ea [MNG-7457] Warn about deprecated plugin Mojo 2022-04-24 09:57:10 +02:00
Slawomir Jaranowski 9ac2d08dc7 [MNG-5222] Improvement in deprecated params detection 2022-04-23 09:24:22 +02:00