Commit Graph

3169 Commits

Author SHA1 Message Date
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
Tamas Cservenak 5136a5ea81
Maven-3.9.x Simplify maven-plugin metadata handling (#807) 2022-10-11 14:11:34 +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
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
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
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
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
Guillaume Nodet 115febf29b [MNG-7160] Ability to customize core extensions classloaders (#616) 2022-06-18 12:30:40 +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
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
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
Slawomir Jaranowski dd0ddef8f6 [MNG-7457] Warn about deprecated plugin Mojo
(cherry picked from commit 702f52d0ea)
2022-04-24 13:49:26 +02:00
Slawomir Jaranowski 28c763c72c [MNG-5222] Improvement in deprecated params detection
This is backport of commit 9ac2d08dc7 from master to maven-3.9.x branch.
2022-04-23 12:29:41 +02:00
Tamas Cservenak 4c9dc5abb2
[MNG-7055] Fix G level metadata handling in 3.9.x (#691)
Maven Artifact Transfer silently prevents group level metadata to reach Resolver and causes metadata loss on install/deploy.
Fix is to "bridge" this from maven-resolver-provider (and core) by reusing the actual metadata that
m-plugin-p:addPluginArtifactMetadata mojo adds, but m-a-t filters out.

This is backport of commit d141957ff5 from master to maven-3.9.x branch.
2022-04-22 17:51:07 +02:00
Tamas Cservenak 85caf98029 [MNG-7454] Include resolver-transport-http in Maven (#720)
Addendum to 1ad5a1b1e9bb0a17fc12bbe0314564a616078602:
* fix property name to align with existing ones
* fix logging configuration as no more shaded httpClient
* fix constant names
2022-04-16 18:21:48 +02:00
Hervé Boutemy 3c6009cbf4 [MNG-7438] add execution id to "configuring mojo" debug message
[DEBUG] Configuring mojo execution
'org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test:default-test'
with basic configurator

rephrase "Configuring" to "Loading" mojo "from plugin realm"
to differentiate from "configuring mojo" = apply configuration

rename populatePluginFields(..) private method
to populateMojoExecutionFields(..) to better match the intent
2022-04-15 18:40:52 +02:00
Tamas Cservenak 1ad5a1b1e9
[MNG-7454] Include resolver-transport-http in Maven 3.9.x (#710)
But keep Wagon as default transport. This PR merely includes
resolver http and file transport and switches wagon-http
to non-shaded one.

Changes:
* switch to non-shaded wagon-http (as httpClient is now shared)
* include resolver http and file transport
* override resolver default behaviour (native transport preferred over wagon, when both on classpath)
* provide simplistic means to choose transport

The chosen transport can be seen in debug (-X) output on line
`[DEBUG] Using transporter XXX...`

The `-Dmaven.transport` simplistic switch can be used to choose transport:
* not set: default, that is Wagon
* `wagon`: explicitly sets Wagon
* `resolver`: explicitly sets resolver native transports (file and http)
* `auto`: relies on resolver "auto discovery" (priorities, etc). This is MUST to keep transport pluggable with 3rd party transports. In fact, this was the default so far in Maven, along with the fact that native resolver transports were not included (as resolver prefers native ones over Wagon).
2022-04-13 12:51:19 +02:00
Gabriel Belingueres ff0300b7cf
[MNG-5222] Maven 3 no longer logs warnings about deprecated plugin parameters
- Added warning when setting deprecated parameter with value different
than the default.
- Changed Logger to SLF4J.

(cherry picked from commit c99028b9fb)
2022-04-12 22:49:03 +02:00
Tamas Cservenak 08dff22a41
[MNG-7447] Fix ReactorReader unintended change (#709)
The commit c604db3c3a
changed ReactorReader to use MavenSession#getAllProjects()
instead of deprecated MavenSession#getProjectMap() that
is equivalent of MavenSession#getProjects().

This undoes this unintended change.
2022-04-08 18:24:03 +02:00
Tamas Cservenak 263cf9542b [MNG-7432] Resolver session contains non-MavenWorkspaceReader (#695)
As Resolver session contains non-MavenWorkspaceReader, the reactor models (already resolved w/ profiles applied) are re-built when using Resolver within Mojo, instead to get them via ReactorReader as expected. The rebuilt models will lack explicit (-P on CLI) profiles applied, as resolver itself is not maven aware, hence there is no way to "tell" resolver to apply them. Building reactor models w/ profiles applied is NOT done using resolver, but by Maven when loading up reactor, as profiles are NOT applied for downstream transitive dependencies (see discussion on MNG-1388 why).

Signed-off-by: Christoph Läubrich <christoph@laeubi-soft.de>
Co-authored-by: Christoph Läubrich <christoph@laeubi-soft.de>
Co-authored-by: Tamas Cservenak <tamas@cservenak.net>
2022-04-08 10:32:15 +02:00
Karl Heinz Marbaise c604db3c3a
[MNG-7447] - Several Improvements by using Stream API 2022-04-05 21:24:58 +02:00
Jacky f7b073f3eb
[MNG-7445] - Refactoring, remove the useless line
Contribution by JakcyHu Gakiii

Signed-off-by: Karl Heinz Marbaise <khmarbaise@apache.org>
2022-04-01 22:21:36 +02:00
Guillaume Nodet 3a5a40c6d2
[MNG-7391] Fix MojosExecutionStrategy lookup to be able to look into the SessionScope (#692) 2022-03-15 06:55:50 +01:00
Guillaume Nodet 14ca723438 [MNG-7350] Introduce a factory for ModelCache 2022-03-09 13:33:45 +01:00
Guillaume Nodet 1954d51ff2 [MNG-7391] add execution strategy+runner required by Maven Build Cache 2022-03-09 10:33:40 +01:00
mickroll a55300a588 [MNG-6972] Allow access to org.apache.maven.graph
This is, for example, needed for rebuilding the dependency graph during build
extension execution after changing dependencies.

This closes #368
2022-03-06 21:12:47 +01:00
Michael Osipov 6b7beb4db8 [MNG-7019] Notify also at start when profile is missing 2022-03-06 21:12:47 +01:00
boris-unckel e1b46e2339 [MNG-7068] Active dependency management for Google Guice/Guava
This closes #462
2022-03-06 20:46:56 +01:00
Michael Osipov 78ca83e2a4 Bump version to 3.9.0-SNAPSHOT 2022-03-06 10:46:56 +01:00
Michael Osipov 0a6f12fba1 [maven-release-plugin] prepare for next development iteration 2022-03-05 12:41:16 +01:00
Michael Osipov 3599d3414f [maven-release-plugin] prepare release maven-3.8.5 2022-03-05 12:41:04 +01:00
Michael Osipov cfeea9dac4 Remove unused imports 2022-03-05 12:39:24 +01:00
Michael Osipov f0caf9c9b3 [MNG-6960] Use RuntimeInformation instead of reading properties 2022-02-27 19:31:35 +01:00
Christoph Läubrich d29af9018b [MNG-7402] BuildListCalculator never detaches the classloader
This closes #683
2022-02-26 21:40:28 +01:00
Sylwester Lachiewicz 395411fe31 [MNG-7417] Several classes do not set properties properly for building requests
This closes #306
2022-02-20 19:27:59 +01:00
Christoph Läubrich 6f14196846 [MNG-7400] Allow more WorkspaceReaders to participate
This closes #668
2022-02-13 10:41:06 +01:00
Guillaume Nodet d79485ff23
[MNG-6727] Using version range in parent and CI Friendly Version fails 2022-02-01 14:26:54 +01:00
Guillaume Nodet 83257bfde0
[MNG-7349] Limit relocation warning message to direct dependencies only 2022-01-24 07:53:26 +01:00
Falko Modler 67ff805448 [MNG-7381] Shorten parallel builder thread name to artifactId, conditionally with groupId
This closes #663
2022-01-17 22:16:39 +01:00
Falko Modler 99de6b49ee [MNG-7380] Don't log non-threadsafe warning if only building a single module
This closes #655
2022-01-11 15:45:53 +01:00
Guillaume Nodet b4518b5fe4
[MNG-7347] SessionScoped beans should be singletons for a given session (#653) 2022-01-10 08:19:41 +01:00
Michael Osipov 05b748ff6a [MNG-5561] Plugin relocation loses configuration
Previously, to locate plugin configuration in the project the plugin descriptor
was read and the GA were extracted. This always worked because the GA from the
model and the GA from plugin descriptor (plugin.xml) were identical. When a
plugin is relocated the target artifact is read, thus its plugin descriptor as
well. Naturally, the GA of new (relocated) does not correspond to the old
(static) one in the model. Therefore, the configuration is not found.
New approach is to use the original plugin GA to locate the configuration in
the model regardless of relocation.
2021-12-30 17:05:02 +01:00
Guillaume Nodet 4ff27db4f9 [MNG-7156][MNG-7285] Fix typo in test 2021-12-17 08:57:42 +01:00
Guillaume Nodet 10a72f30f7
[MNG-7156][MNG-7285] Add locking in MojoExecutor (#628) 2021-12-17 08:42:18 +01:00
Michael Osipov 8af0a674db [maven-release-plugin] prepare for next development iteration 2021-11-14 10:14:54 +01:00
Michael Osipov 9b656c72d5 [maven-release-plugin] prepare release maven-3.8.4 2021-11-14 10:14:42 +01:00
Michael Osipov 5c36bf5ef7 [MNG-7312] Revert ThreadLocal approach from MNG-6843 and MNG-7251
Revert "[MNG-7251] Fix threadLocalArtifactsHolder leaking into cloned project"

This reverts commit 4e5b3d5554.

Revert "[MNG-6843] Parallel build fails due to missing JAR artifacts in compilePath"

This reverts commit 76d5f0d942.

===

This closes #595
2021-10-22 21:58:12 +02:00
Michael Osipov 21e597ec77 [maven-release-plugin] prepare for next development iteration 2021-09-27 20:28:37 +02:00
Michael Osipov ff8e977a15 [maven-release-plugin] prepare release maven-3.8.3 2021-09-27 20:28:25 +02:00
Guillaume Nodet 0a6bbb8301 [MNG-7235] Speed improvements when calculating the sorted project graph
This closes #530
2021-09-27 20:18:53 +02:00
George Gastaldi ab54d17dc2 [MNG-7253] Display relocation message defined in model
Move logging to DefaultArtifactDescriptorReader

This closes #544
2021-09-18 20:54:05 +02:00
Michael Osipov d1aa1e1f0a [MNG-7252] Fix warnings issued by dependency:analyze
This closes #541
2021-09-16 11:54:33 +02:00
Romain Manni-Bucau 93f9e85955 [MNG-7045] Drop CDI API from Maven
This closes #540
2021-09-15 16:40:00 +02:00
Guillaume Nodet 98a9d089bd [MNG-7236] The DefaultPluginVersionResolver should cache results for the session 2021-09-14 20:09:40 +02:00
Michael Osipov 1ea42b0371 [MNG-7219] [Regression] plexus-cipher missing from transitive dependencies 2021-09-14 19:23:22 +02:00
Falko Modler 4e5b3d5554 [MNG-7251] Fix threadLocalArtifactsHolder leaking into cloned project
This closes #527
2021-09-14 17:28:24 +02:00
Tamas Cservenak e08834b79e [MNG-7250] Upgrade Sisu Inject/Plexus to 0.3.5
Since we have replaced the old JSR 250 library with javax.annotation library we
go straight to 1.2.

This closes #539
2021-09-13 23:24:06 +02:00
Michael Osipov 383cabf9e4 [MNG-7216] [Regression] Revert MNG-7170
This reverts commit 5a89973126.

This closes #524
2021-09-12 16:42:13 +02:00
Tamas Cservenak c76c9d9116 [MNG-7246] Upgrade Plexus Cipher and Sec Dispatcher to 2.0
Both plexus-cipher and plexus-sec-dispatcher have had a
groupId change, but plexus-cipher change was implemented
for 1.8 version.

Latest versions of artifacts are 2.0. This PR
ups plexus-cipher version and adds proper changes
for plexus-sec-dispatcher groupId change.

This closes #534
2021-09-11 10:53:52 +02:00
Michael Osipov 865dcaa6ff [maven-release-plugin] prepare for next development iteration 2021-08-04 21:03:42 +02:00
Michael Osipov ea98e05a04 [maven-release-plugin] prepare release maven-3.8.2 2021-08-04 21:03:30 +02:00
Michael Osipov 268f956574 Use proper term: directory 2021-07-19 23:47:10 +02:00
Michael Osipov a3907fcb2b [MNG-6754] Set the same timestamp in multi module builds
Reuse MavenExecutionRequest#getStartTime() throughout for snapshot versions,
last updated fields in metadata consistently for local and remote repositories
for the entire reactor and its modules.

This closes #381
2021-07-12 19:47:14 +02:00
Romain Manni-Bucau f32c3dba94 [MNG-6471] Parallel builder should use the module name as thread name
This closes #177
2021-07-12 19:42:57 +02:00
Michael Osipov 8b693cc992 Document hacks as such 2021-07-02 17:51:17 +02:00
Artem Krosheninnikov 9ae1d95a58 [MNG-6844] Use StandardCharsets and remove outdated @SuppressWarnings
This closes #312
2021-07-02 14:53:16 +02:00
huangkaifeng 2a2392f15e [MNG-6873] Align JUnit version to 4.13
Closes #331
2021-07-02 14:50:25 +02:00
Michael Osipov b5ee583381 [MNG-6859] Build not reproducible when built from source release
This closes #322
2021-07-02 14:02:05 +02:00
Artem Krosheninnikov a659ade9a0 [MNG-6827] Replace deprecated StringUtils#defaultString() from Plexus Utils
This closes #302
2021-07-02 10:46:56 +02:00
Karl Heinz Marbaise 6f5c3d57a6 [MNG-6872] - Found CVEs in your dependencies - plexus-utils (tests) 2021-07-02 10:40:32 +02:00
Olivier Lamy 41efc134a9 [MNG-6886] upgrade plexus-cipher to 1.8 and update changed groupId (#335)
Signed-off-by: olivier lamy <olamy@apache.org>
2021-07-02 10:28:16 +02:00
Mickael Istria 5a89973126 [MNG-7170] Allow to associate pomFile/${basedir} with DefaultProjectBuilder.build(ModelSource, ...)
Actually a subset backport of MNG-5669 (5cdb8332f9)

Also-By: rfscholte <rfscholte@apache.org>

This closes #478
2021-06-27 00:33:40 +02:00
Artem Krosheninnikov d4ad077ef5 [MNG-6816] Prefer System.lineSeparator() over system properties
This closes #300
2021-06-26 23:41:16 +02:00
Falko Modler 76d5f0d942 [MNG-6843] Parallel build fails due to missing JAR artifacts in compilePath
Signed-off-by: rfscholte <rfscholte@apache.org>
(cherry picked from commit 73e00ed85d)

This closes #482
2021-06-26 22:40:14 +02:00
Artem Krosheninnikov 863f9193e6 [MNG-6842] ProjectBuilderTest uses Guava, but Guava is not defined in dependencies
This closes #311
2021-06-26 22:24:17 +02:00
Sylwester Lachiewicz b5056e4188 [MNG-6828] DependencyResolutionException breaks serialization 2021-06-26 22:17:45 +02:00
pazderski 3645593bfa [MNG-6983] Plugin key can get out of sync with artifactId and groupId
The plugin key is build as combination of artifactId and groupId but not
updated if either of these two ids change.
This can be a problem if artifactId or groupId is a variable. The calculated
key will likely contain the unresolved property and is not updated once the
variable is interpolated.

This closes #372
2021-06-26 21:19:56 +02:00
olivier lamy 66a4381377 [MNG-5868] No duplicate artifacts in attached artifacts
if attached artifacts already contains the artifact remove it and add the new one

Signed-off-by: olivier lamy <olamy@apache.org>
2021-06-26 20:56:05 +02:00
rfscholte 5213f43df1 [maven-release-plugin] prepare for next development iteration 2021-03-30 19:15:13 +02:00
rfscholte 05c21c65bd [maven-release-plugin] prepare release maven-3.8.1 2021-03-30 19:14:35 +02:00
Hervé Boutemy d295dc362f [MNG-7128] keep blocked attribute from mirrors in artifact repositories 2021-03-25 23:51:26 +01:00
Hervé Boutemy a46906806a next version in branch 3.8.x is 3.8.1-SNAPSHOT 2021-03-24 19:33:13 +01:00
rfscholte dad8a3e1c5 [maven-release-plugin] prepare for next development iteration 2021-03-21 22:31:55 +01:00
rfscholte 6aa1f4acf5 [maven-release-plugin] prepare release maven-3.8.0 2021-03-21 22:31:24 +01:00
Hervé Boutemy 899465aeec [MNG-7117] add support for blocked mirror 2021-03-19 20:43:01 +01:00
Hervé Boutemy fa79cb22e4 [MNG-7116] add support for mirrorOf external:http:* 2021-03-19 20:42:49 +01:00
Michael Osipov e2891667dd Bump version to 3.8.0-SNAPSHOT 2021-03-16 17:59:50 +01:00
rfscholte cecedd3430 [maven-release-plugin] prepare release maven-3.6.3 2019-11-19 20:17:06 +01:00
Robert Scholte c82409a2d8
[MNG-6759] Maven fails to use <repositories> section from dependency when resolving transitive dependencies in some cases 2019-11-17 22:10:01 +01:00
Hervé Boutemy 53ccee3486 [MNG-6778] use https for schema location 2019-11-09 13:45:14 +01:00
Christian Wansart 0c7c69f78b [MNG-6778] - Use https for maven schemaLocations 2019-11-07 16:16:39 +01:00
Hervé Boutemy bd10f00b68 [MNG-6789] upgrade and configure plugins for Reproducible Builds
- packaging plugins (source, jar, assembly) 3.2.0
- plexus-metadata 2.1.0
- sisu.inject 3.3.4
2019-11-07 13:35:52 +01:00
rfscholte 3f3d775ede Rewrite assertTrue to assertThat to get more meaningful messages 2019-10-13 15:33:42 +02:00
Stig Rohde Døssing db3e44694c [MNG-6759] - Fix issue where MavenMetadataSource failed to set the right repositories when preparing artifact metadata 2019-10-12 18:54:44 +02:00
rfscholte 38efe8444c Fix checkstyle reported errors 2019-09-10 18:51:18 +02:00
Dezhi Cai d09bc7437f [refactor] use utility method of Objects to simplify code (#284)
* [refactor] use utility method of Objects to simplify code

* [refactor] use utility method of Objects to simplify code
2019-09-10 16:22:22 +10:00
rfscholte 3eb242c571 [MNG-6760] ExclusionArtifactFilter result invalid when wildcard exclusion is followed by other exclusions 2019-09-07 14:24:21 +02:00
Enrico Olivelli d9a0eee7fe [maven-release-plugin] prepare for next development iteration 2019-08-27 16:59:23 +02:00
Enrico Olivelli 40f5233313 [maven-release-plugin] prepare release maven-3.6.2 2019-08-27 16:59:01 +02:00
Mickael Istria b65e846531 [MNG-6716] Avoid setting compileRoots
Recent changes in ProjectBuilder make that the compile roots could be
set erroneously on 1st phase and propagated in the results.
This patch just skips setting the compile source root in the 1st pass
(when buildParentIfNonExisting==false).

It also tests some other fields of MavenProject

Reviewers: Michael Osipov, Robert Scholte, Hervé Boutemy

This closes #274
2019-08-19 23:42:40 +02:00
Ray Tsang 8a1f572910 [MNG-6713] Fix ExclusionArtifactFilter to respect wildcard exclusions. (#269)
* [MNG-6713] Fix ExclusionArtifactFilter to respect wildcard exclusions.

* Moved `*` to a constant
2019-08-06 18:18:58 +02:00
tibordigana 6c5be9ce26 fixed ArtifactHandlerTest after commit d5b0f4ce 2019-08-05 23:38:16 +02:00
Hervé Boutemy d5b0f4cef3 improved handlers documentation: artifact vs dependency attributes 2019-08-05 13:12:08 +01:00
Stefan Oehme 0515cb1f0e [MNG-6720] MultiThreadedBuilder: wait for parallel running projects when using --fail-fast
Otherwise the sessionFinished event may be sent before some
projects/goals finish, which violates the contracts of execution
listeners and makes it hard to properly life cycle components that
are needed for goal execution.

This closes #272
2019-07-26 23:38:16 +02:00
Michael Osipov dd0776d949 [MNG-6653] DefaultProjectBuildingRequest copy constructor does not copy all fields 2019-07-26 22:18:45 +02:00
Mickael Istria 809cac2266 [MNG-6723] MavenProject.getParentFile() not set when using ProjectBuilder.build()
This closes #273
2019-07-26 22:16:49 +02:00
Guillaume Nodet 7ba9700386 [MNG-6698] Lazily compute the ManagedVersionMap
This map is not used by Maven and the computation can be quite heavy, so lazily
compute it. In addition, do not clone the map as it's an unmodifiable one already.

This closes #263
2019-07-07 00:30:10 +02:00
Bo Zhang 84bf1877f0 [MNG-6700] Equal compile source roots are added multiple times
This closes #266
2019-07-06 18:27:47 +02:00
Joseph Walton 353d3eaa8f [MNG-6685] Convert Maven Model Builder to JSR 330
This closes #256
2019-06-23 00:20:54 +02:00
Christian Schulte c2f13f7e87 [MNG-6675] Make Resolver debug log messages for projects and plugins consistent
This closes #124 and closes #253
2019-06-15 20:12:36 +02:00
MartinKanters aed5130487 [MNG-6665] toolchain.xml file should support environment variables 2019-06-08 10:43:12 +02:00
Stephen Connolly 01405a2d60
[MNG-6667] Enhance the error reporting when trying to build a modelVersion that the current Maven doesn't understand 2019-06-03 21:33:44 +01:00
Stefan Oehme d3ace78602 [MNG-6638] Prevent reparsing POMs in MavenMetadataSource
If a dependency on another project is found, don't parse its
POM again, but instead use the model we already have in memory.
This saves a large amount of time and memory for builds that have
lots of subprojects and dependencies between them.
The approach was directly copied from DefaultArtifactDescriptorReader,
which does the same optimization.

This closes #244
2019-05-27 23:11:09 +02:00
Sylwester Lachiewicz 6c01ec18cb [MNG-6633] - Reduce memory usage of excludes - fix rat/checkstyle errors 2019-05-25 14:26:09 +02:00
Stefan Oehme 790dc0f2b7 [MNG-6633] - Reduce memory usage of excludes
ExcludesArtifactFilter was highly inefficient.
It took the group and artifact ID of an Exclusion, concatenated them into
a new String, which was kept in memory for the whole duration
of the build and then compared that String against the concatenation
of group and artifact ID of each incoming artifact, adding more
CPU cycles than necessary.

Instead we now just wrap the existing Exclusion object and check its
groupId and artifactId against the artifact to tell whether it should
be excluded.

The old class is kept around for binary compatibility, but is now unused.

Closes #243
2019-05-25 13:12:47 +02:00
Sergey Chernov 1a18eb6c9c [MNG-6626] fix DefaultExceptionHandler NPE
Closes #241
2019-05-13 09:43:56 +02:00
Stefan Oehme 1e03388d5b [MNG-6632] - Remember artifact handlers after they've been used once
Otherwise we have to go through the whole sisu engine again,
which is very slow, because it does a linear scan.
2019-04-27 18:23:00 +02:00
Joseph Walton fdde73fcb4 Remove unused code that triggers Error Prone (#245)
Running Error Prone over Maven triggers an infinite recursion
check in AbstractCoreMavenComponentTestCase.PluginBuilder
2019-04-20 16:08:06 +02:00
Sylwester Lachiewicz 763f76cf83 [MNG-6642] Revert "[MNG-5995] Remove dependency to maven-compat (#185)"
This partially reverts commit bb3ec5da71 to restore working with Tycho P2 repository.
2019-04-20 00:10:59 +02:00
Jesse Glick 0940c7c973 [MNG-6405] Fix basedir in MavenProject.deepCopy (#225)
* [MNG-6405] Fix basedir in MavenProject.deepCopy.

* Reproduced bug in test.
Failure without patch:
junit.framework.AssertionFailedError: Base directory is preserved across clone expected:<…/maven-core/target/test-classes> but was:<…/maven-core/target/test-classes/target>
	at org.apache.maven.project.MavenProjectTest.testCloneWithBaseDir(MavenProjectTest.java:188)

* Code style. Not enforced in tests during build?
2019-04-16 21:28:03 +10:00
Karl Heinz Marbaise 5222f03d05
[maven-release-plugin] prepare for next development iteration 2019-04-04 20:56:37 +02:00
Karl Heinz Marbaise d66c9c0b31
[maven-release-plugin] prepare release maven-3.6.1 2019-04-04 20:56:16 +02:00
Romain Manni-Bucau 0ba5753c17 [MNG-6618] adding org.slf4j.event in exported packages
Based on MNG-6360
2019-04-01 11:55:58 +02:00
Hervé Boutemy 4bec5502d5 [MNG-6600] add inputlocation tracking for default lifecycle executions 2019-03-11 23:44:31 +01:00
Michael Osipov 9dd4732b74 Revert "[MNG-6548] Lifecycle plugin version upgrades"
This reverts commit 33e4f201d3.
Commit will be postponed to 3.7.0.
2019-02-17 20:30:25 +01:00
Sylwester Lachiewicz bb3ec5da71 [MNG-5995] Remove dependency to maven-compat (#185)
No implementation for deprecated Maven 2.x RepositorySystem interface
2019-01-26 14:37:51 +01:00
Hervé Boutemy 24c762d7c3 [MNG-6533] catch InvalidArtifactRTException runtime exception
instead of global Exception that may hide too many cases
2019-01-14 14:30:06 +01:00
Mickael Istria 27332cfab0 [MNG-6533] ProjectBuilder report ModelProblem instead of Exception
Sending ModelProblems allows to keep processing other pom files.
2019-01-14 13:55:45 +01:00
Mickael Istria 8b7055fe3f [MNG-6533] Prefer passing the interim project in ProjectBuildingResult
Initialize the interim project with "simple" items (ie do not build
not reference parent if it's not yet in the projectIndex) and returns
it when installation fails further.
This give a partial validation of the file, pretty convenient in IDEs.
2019-01-14 13:55:45 +01:00
Mickael Istria ae1c32aa09 [MNG-6533] Test: ProjectBuildingException miss reference to MavenProject 2019-01-14 13:55:44 +01:00
Hervé Boutemy 049b7a7ba8 refactoring: reduced try/catch scope 2019-01-14 13:52:03 +01:00
Hervé Boutemy 2928dc6b68 refactoring: extracted initParent() method 2019-01-14 13:52:03 +01:00
Hervé Boutemy fdf5d921a3 renamed variables for better understanding 2019-01-13 19:18:30 +01:00
Mickael Istria d9facde3bc [MNG-6530] Introduce system property to disable global model cache
The global model cache introduced in MNG-6311 causes severe regressions
in case of POM files changing during application lifetime.
This patch adds a system property
`defaultProjectBuilder.disableGlobalModelCache` that disables this global
model cache when set to true, ensure pom modifications are honored.

This closes #194
2019-01-08 15:25:27 +01:00
Michael Osipov 33e4f201d3 [MNG-6548] Lifecycle plugin version upgrades
* Upgrade to Maven Clean Plugin 3.1.0
* Upgrade to Maven Site Plugin 3.7.1
2019-01-07 13:23:57 +01:00
Josh Soref 71128cb6c0 spelling: vertices
This closes #102
2018-12-28 15:07:21 +01:00
Michael Osipov c7ab9876f5 [MNG-6544] Replace CacheUtils#{eq,hash} with Objects
This closes #195
2018-12-27 21:41:59 +01:00
Duarte Meneses c6bdafed23 [MNG-5965] Parallel build multiplies work if multiple goals are given
This closes #125
2018-12-26 15:24:16 +01:00
Mickael Istria 732e7de893 [MNG-6529] ProjectBuilder.build(List<Project> ...) honor
request.isResolveDependency
2018-12-18 09:04:17 +01:00