Commit Graph

10793 Commits

Author SHA1 Message Date
Tamas Cservenak 4c95a50332
[MNG-6609] Profile activation based on packaging (#883)
In short: do NOT set request.setRawModel as NOTHING sets it. The Maven4 vs Maven3 is different, in Maven 3 NOTHING calls request.setRawModel

Full explanation: as ModelBuildingRequest is REUSED, and nothing sets this value in Maven3, once you set it here (as in original PR https://github.com/apache/maven/pull/849 ) results in awkward situation in Maven3: it will not load any other model...

---

https://issues.apache.org/jira/browse/MNG-6609
2022-12-01 12:51:18 +01:00
Tamas Cservenak 36ff9a65e6 Revert "[MNG-6609] Maven 3.9: profile activation by packaging (#849)"
This reverts commit e921f1564e.
2022-11-28 09:06:29 +01:00
Konrad Windszus e921f1564e
[MNG-6609] Maven 3.9: profile activation by packaging (#849)
Generate raw model before profile activation context is generated
2022-11-27 16:49:43 +01:00
Konrad Windszus eb66f225db
[MNG-7561] never resolve version ranges with same lower and upper bound (#864)
Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
2022-11-27 11:36:17 +01:00
Tamas Cservenak c3919cdd0e
[MNG-7586] Update Maven Resolver to 1.9.2 (#881)
* [MNG-7586] Update Maven Resolver to 1.9.2

Updates resolver to latest release.

---

https://issues.apache.org/jira/browse/MNG-7586
2022-11-26 20:08:09 +01:00
Slawomir Jaranowski 474a470aa9 [MNG-7600] LocalRepositoryManager is created too early
LocalRepositoryManager needs configurations from RepositorySystemSession
so must be created after session configuration is finished.

(cherry picked from commit b1c1f7556d)
2022-11-22 00:01:05 +01:00
Tamas Cservenak b8b41c6d40 Revert "[3.9.x][MNG-7586] Update Maven Resolver to 1.9.1 (#831)"
This reverts commit 2d384ddce3.
2022-11-18 10:28:09 +01:00
Slawomir Jaranowski 638364fb92 Update actions in GH build
chery-pick from a6b1ebb1cd

Old actions use deprecated node 12

- cache v2 -> v3
- checkout v2 -> v3
- download-artifact v2 -> v3
- setup-java v2 -> v3
- disable access to GITHUB_TOKEN
- don't store credentials with checkout
- don't execute build for PR from local repository branches - we have build on push event
2022-11-17 21:14:40 +01:00
Tamas Cservenak 2d384ddce3
[3.9.x][MNG-7586] Update Maven Resolver to 1.9.1 (#831)
Update to Maven Resolver 1.9.1 and apply required changed changes in Maven.

Changes:
- hook in lifecycle

---

https://issues.apache.org/jira/browse/MNG-7586
2022-11-17 16:21:41 +01:00
Slawomir Jaranowski fa2febb6f3 [MNG-7590] Allow to configure resolver by properties in settings.xml
Cherry-pick from fa15fcf153
2022-11-12 12:36:39 +01:00
Piotrek Żygieło 8a5dada82c [MNG-7568] Consider inactive profiles for validation 2022-11-05 10:30:11 +01:00
Abdel Hajou 3212efee78 [MNG-7564] Check if session is null when generating metadata
Backported (and adapted) from master.
2022-10-31 10:20:08 +01:00
Michael Osipov 0f4387543d [MNG-7556] Clean up notion between user properties and system properties 2022-10-29 20:19:49 +02:00
Konrad Windszus 75e1940695
[MNG-7106] Accept same lower and upper bound in version spec string (#826) 2022-10-13 15:31:56 +02:00
Tamas Cservenak 5136a5ea81
Maven-3.9.x Simplify maven-plugin metadata handling (#807) 2022-10-11 14:11:34 +02:00
Guillaume Nodet a7a5b8169b
Make sure RAT plugin ignores files in the target folder (#813) (#815)
* Make sure RAT plugin ignores files in the target folder
* Fix gitignore so that it can work with rat, do not inherit execution in children, use a single place to configure rat
* Exclude .asf.yaml from rat check
* Add repo/ to the .gitignore file as it's often used for local repository
2022-10-05 16:44:10 +02:00
Slawomir Jaranowski a4ed7bb6ba [MNG-7463] Improve documentation about deprecation in Mojo
(cherry picked from commit 47e2d689d6)
2022-09-18 16:37:06 +02:00
Sylwester Lachiewicz 2f7dfcfe82 [MNG-7502] Upgrade to Guice 5.1.0
(cherry picked from commit 5502c0c8db)
2022-09-11 10:00:07 +02:00
Henning Schmiedehausen d1bc037cc0
[MNG-7529] Maven resolver makes bad repository choices (#796)
Structure the version checks slightly different to make the separation
between repository versions and the version range resolution clearer.

Backport from master branch
2022-09-02 20:25:05 -07:00
Slawomir Jaranowski 55a2182a6b [MNG-7530] Upgrade Apache Maven parent POM to version 37
(cherry picked from commit 750e1e3e71)
2022-08-25 13:11:45 +02:00
Henning Schmiedehausen 9fe564cdc7
[MNG-7529] Maven resolver makes bad repository choices (#787)
Ensure that any versions resolved as part of a version range request
only reference repositories that are actually enabled for the type of
version (SNAPSHOT versions against snapshot repos, release versions
against release repositories).
2022-08-24 21:26:02 -07:00
Michael Osipov 20f539a3fd [MNG-7520] Simplify integration of Redisson and Hazelcast for Maven Resolver
Co-authored-by: Jacques-Etienne Beaudet <jebeaudet@gmail.com>

This closes #776
2022-08-23 22:05:51 +02:00
Guillaume Nodet b762fa9d5c
[3.9.x] [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>
2022-08-23 11:19:11 +02:00
Henning P. Schmiedehausen 29c53d6748 [MNG-7193] Introduce MAVEN_ARGS environment variable
Add args directly after the class name and leave users the option to override
with maven.config or CLI args.

This closes #782
2022-07-29 20:30:24 +02:00
Michael Osipov 73360100ca [MNG-7522] Upgrade Maven Resolver to 1.8.2
This closes #779
2022-07-28 22:09:31 +02:00
Michael Osipov 029587fb0b Add missing dependency 2022-07-24 10:30:49 +02:00
Hervé Boutemy 95bdbf6821 [MNG-7353] Add support for "mvn pluginPrefix:version:goal"
This closes #757
2022-07-21 14:37:34 -07:00
Josef Cacek e1e4f5bda0 [MNG-7511] Ensure the degreeOfConcurrency is a positive number in MavenExecutionRequest
This closes #767
2022-07-18 22:35:28 +02:00
Rafael Chaves eaac5f3458 [MNG-7515] Cannot see a dependency tree for apache-maven module
This closes #770
2022-07-18 18:02:09 +02:00
Michael Osipov f164ab5f89 [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:31:06 +02:00
Michael Osipov 9b876fa90b [MNG-7506] Upgrade Maven Wagon to 3.5.2 2022-06-27 13:33:07 +02:00
Hervé Boutemy c9a3e0e45b [MNG-7501] add relative path to pom.xml in module build start output 2022-06-26 18:38:40 +02:00
Sylwester Lachiewicz e4f347ed85 [MNG-6965] Extensions suddenly have org.codehaus.plexus:plexus-utils:jar:1.1 on their classpath
This closes #367
2022-06-24 19:10:33 +02:00
Slawomir Jaranowski b3e7e57e4b [MNG-7504] Don't print warning unsupported reportPlugins for m-site-p 2022-06-20 23:59:02 +02:00
Michael Osipov f0cef23c6e [MNG-7499] Upgrade Maven Resolver to 1.8.1
This closes #754
2022-06-18 12:30:43 +02:00
Guillaume Nodet 115febf29b [MNG-7160] Ability to customize core extensions classloaders (#616) 2022-06-18 12:30:40 +02:00
Michael Osipov bb6bbf882d Update DOAP with Maven 3.8.6 release 2022-06-11 17:17:51 +02:00
Slawomir Jaranowski 0504c361b4 [MNG-7468] Check unsupported plugins parameters in configuration - 3.9
(cherry picked from commit 54f9d91ebb)
2022-06-06 17:23:15 +02:00
Tamas Cservenak ca479180c5
[MNG-7491] Update parent POM 36 (3.9.x) (#748)
Update parent POM to v 36, remove redundant bits.
2022-06-02 12:57:18 +02:00
Hervé Boutemy ac9132e4f4 deploy master, 3.8.x and 3.9.x 2022-05-31 09:22:36 +02:00
Michael Osipov d0c387b7bd [MNG-7489] Upgrade JUnit to 4.13.2 2022-05-30 23:23:31 +02:00
Michael Osipov 8a928e59ac [MNG-7488] Upgrade SLF4J to 1.7.36 2022-05-30 22:50:54 +02:00
Guillaume Nodet 0a94ff769c [MNG-7476] Display a warning when an aggregator mojo is locking other mojos executions 2022-05-30 13:10:42 +02:00
Guillaume Nodet 0b0a96782e [MNG-7487] Fix deadlock during forked lifecycle executions
# Conflicts:
#	maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoExecutor.java
2022-05-30 13:10:25 +02:00
Guillaume Nodet aec341a7a9 [MNG-7486] Create a multiline message helper for boxed log messages
This closes #746
2022-05-29 13:34:53 +02:00
Karl Heinz Marbaise 5002a0b0b8 [MNG-7448] Don't ignore bin/ otherwise bin/ in apache-maven module cannot be readded
This closes #742
2022-05-27 22:07:09 +02:00
Tamas Cservenak 70e9381a74 [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:58:21 +02:00
Tamas Cservenak 4de39476ff [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:06:37 +02:00
Guillaume Nodet 89237dd74d Revert "[MNG-7347] SessionScoped beans should be singletons for a given session (#653)" (#715)
This reverts commit b4518b5fe4.
2022-05-09 10:04:54 +02:00
Slawomir Jaranowski 74eba2968b [MNG-7464] Warn about using read-only parameters for Mojo in configuration
(cherry picked from commit 3dd0afd897)
2022-05-06 23:05:12 +02:00