Commit Graph

3353 Commits

Author SHA1 Message Date
Guillaume Nodet faf5d5d274
[MNG-7347] SessionScoped beans should be singletons for a given session (#621) 2022-01-10 08:19:33 +01:00
Hervé Boutemy c229278477 rework javadoc 2022-01-08 17:27:28 +01:00
Hervé Boutemy f30a0ab4dd [MNG-7267] update artifact handlers documentation 2022-01-08 16:03:57 +01:00
Hervé Boutemy 8bde888dc8 [MNG-7267] update lifecycle documentation after switch from Plexus XML 2022-01-08 15:57:39 +01:00
Hervé Boutemy e617d51bd4 [MNG-7264] packaging plugins bindings cannot be empty 2022-01-08 15:25:54 +01:00
Tamas Cservenak 7180d68a18 Proposal to change abstract provider
Changes:
* validate input
* do not modify loop invariant within loop body
2022-01-08 15:25:54 +01:00
Hervé Boutemy a53083db6c [MNG-7264] refactor packaging bindings providers to ease maintenance 2022-01-08 15:25:54 +01:00
Hervé Boutemy a7375a0eff [MNG-7263] use constants instead of copy/paste 2022-01-08 15:25:13 +01:00
Hervé Boutemy 94af1d99f8 [MNG-7263] improve AbstractLifecycleProvider 2022-01-08 15:25:13 +01:00
Hervé Boutemy 711d5fbbf2 [MNG-7263] introduce AbstractLifecycleProvider 2022-01-08 15:25:13 +01:00
Hervé Boutemy e5b0831c10 [MNG-7263] refactor lifecycle providers to ease documentation
- lifecycle id
- phases
- default plugins bindings
2022-01-08 15:25:13 +01:00
Michael Osipov 2670c00751 [MNG-5561] Plugin relocation loses configuration
Previously, to locate plugin configuration in a project the plugin descriptor
was read first and then 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 the relocation.

This closes #642
2022-01-06 16:54:03 +01:00
Hervé Boutemy d6b9108f58 [MNG-6917] upgrade maven-wrapper-plugin to 3.1.0 2022-01-05 00:09:35 +01:00
Guillaume Nodet 33aedfc28b
[MNG-7156][MNG-7285] Add locking in MojoExecutor (#627) 2021-12-17 09:18:40 +01:00
Guillaume Nodet ae8aebea19
[MNG-7182] Use the MX xpp parser instead of a STAX transformation (#486) 2021-11-29 13:31:55 +01:00
Michael Osipov 8784812cf6 [MNG-7312] Revert ThreadLocal approach from MNG-6843 and MNG-7251
Revert "[MNG-7251] Fix threadLocalArtifactsHolder leaking into cloned project"

This reverts commit a6e462b53a.

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

This reverts commit 73e00ed85d.

===

This closes #594
2021-10-22 21:57:09 +02:00
Karl Heinz Marbaise 965aaa53da
[MNG-7314] - Refactoring - Remove unused MavenExecutionResult 2021-10-18 20:47:55 +02:00
Hervé Boutemy f46a9131d5 fix javadoc errors 2021-10-17 12:07:50 +02:00
Arturo Bernal 274388fc0f [MNG-7303] - Replace Throwable.initCause() with constructor. 2021-10-13 22:52:02 +02:00
Giovanni van der Schelde ffc2b99e3e [MNG-6389] Move the toolchains model to a separate artifactId
Closes #586
2021-10-13 16:10:22 +02:00
Arturo Bernal 0080e84588
[MNG-7297] Remove redundant type arguments (#581) 2021-10-11 20:58:38 +02:00
Arturo Bernal 4daa48e0f6 [MNG-7287] Simplify assertion with simpler and equivalent calls
Closes #576
2021-10-10 22:34:07 +02:00
Arturo Bernal b31f3aeef3
[MNG-7291] Avoid String concatenation in loops (#572) 2021-10-10 22:12:41 +02:00
Arturo Bernal 16afe061c9 [MNG-7290] Java8 improvements
Closes #571
2021-10-10 12:50:42 +02:00
Arturo Bernal d61fcf7da1 [MNG-7288] Remove redundant local variables
Closes #569
2021-10-10 12:42:12 +02:00
Arturo Bernal b9fb762215 [MNG-7292] Unnecessarily escaped character
Closes #573
2021-10-10 12:18:15 +02:00
Arturo Bernal 4fafe44112 MNG-7296 - Remove redundant 'if' statement 2021-10-10 10:53:58 +02:00
Arturo Bernal e50d65d228 MNG-7295 - Remove redundant/unused import statements. 2021-10-09 16:26:14 +02:00
Tamas Cservenak 3017b85141
Refactor MavenSession#getPluginContext to be thread safe (#575)
This PR introduce no API change, merely refactors MavenSession
getPluginContext method to truly thread-safe.

Also added Javadoc to affected field and method.
2021-10-09 12:11:36 +02:00
Tamas Cservenak d75bea4154
[MNG-7279] Drop deprecated constructor (#564)
This constructor was deprecated in Maven 3.0-RC1 (!!!).
Removal also means that Maven4 will NOT work with
(Maven2 compatible) m-enforcer-p 2.x, only with
modern m-enforcer-p 3.x line.
2021-10-04 11:56:09 +02:00
Tamas Cservenak 69ee0c8b59
[MNG-7103] VersionScheme provider (#563)
This PR makes VersionScheme a component, is injected where needed
(instead of ad-hoc instantiation), but provides room for
different schemas, as GenericVersionScheme is "default"
but now nothing stops to add other schemes as well.
2021-10-04 11:55:18 +02:00
Tamas Cservenak c3962c1a6c
[MNG-7278] Clean up core logging (#562)
We had all kind of Loggers in Core, some Plexus
injected, some acquired using SLF4J LoggerFactory,
some static, some final, etc.

This PR aligns all those uses to SLF4J finals.

Notices:
* maven-core does NOT use Plexus Logger anymore
* did not touch maven-compat
2021-10-02 20:33:55 +02:00
Tamas Cservenak af9c64f80d
[MNG-6898] Drop plexus-component-metadata plugin from maven-core (#554)
Now that Plexus XMLs (and components) are out, no need
for this plugin in maven-core module anymore.

Changes:
* convert DefaultLifecyclePluginAnalyzer to JSR330 (last plexus component in core)
* drop dependency on plexus-component-annotations (note: it is still there but only as transitive dep of plexus-shim, needed to boot up Plexus Shim in tests)
* remove plexus-component-metadata plugin from build
* drop unused test Plexus XML
2021-10-02 15:40:58 +02:00
Tamas Cservenak d141957ff5
[MNG-7055] Fix G level metadata handling (#555)
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.
2021-10-02 15:22:32 +02:00
Karl Heinz Marbaise 71a0a49904
[MNG-7272] - Code Improvement - II 2021-10-02 12:39:52 +02:00
Guillaume Nodet 35e5a4d71d [MNG-5577] Use JSR 330 constructor injection
# Conflicts:
#	maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecyclePluginAnalyzer.java
2021-10-02 12:26:22 +02:00
Karl Heinz Marbaise 25cf1576cc
[MNG-7271] - Code Improvement 2021-09-29 22:27:07 +02:00
Guillaume Nodet c8d5ba3705 [MNG-7235] Speed improvements when calculating the sorted project graph
This closes #532
2021-09-27 20:17:08 +02:00
Tamas Cservenak 6c7d105916
[MNG-7264] Convert maven-core default-bindings to Providers (#550)
This change get rids of Plexus components defined in META-INF/plexus/default-bindings.xml and converts them to Providers.
2021-09-26 13:34:27 +02:00
Tamas Cservenak 6c343136b0
Merge pull request #549 from apache/drop-components-xml
[MNG-7263] Convert maven-core components XML to Providers
2021-09-25 12:29:35 +02:00
Tamas Cservenak 2926f033cb [MNG-7265] Convert maven-core artifact-handlers.xml to Providers
Gets rid of another set of Plexus components defined in XML.

Changes:
* DefaultArtifactHandler was declared as component but it is not needed; not
  a component anymore
* Sanitize DefaultArtifactHandler class but retain Plexus XML provisioning
  compatiblity (as plugins does have it declared in Plexus XML) and update its
  uses within Maven code (be explicit)
* Use new "full" constructors in handler providers for easier comparison and
  inspection (be explicit)

This closes #551
2021-09-24 22:09:23 +02:00
Guoxiong Li 5fd536853f [MNG-7248] Fix warnings issued by dependency:analyze
This changeset does intentionally not touch Guice and its dependencies
as well as test-scoped dependencies.

This closes #546
2021-09-24 20:55:03 +02:00
Tamas Cservenak c647dbc665 Get rid of guava 2021-09-23 21:19:50 +02:00
Tamas Cservenak 4cb8909336 Convert maven-core components XML to Providers
This change get's rid of component.xml in maven-core
2021-09-23 11:13:46 +02:00
George Gastaldi a1ba33069f [MNG-7253] Display relocation message defined in model
Move logging to DefaultArtifactDescriptorReader

This closes #543
2021-09-18 20:39:37 +02:00
Guillaume Nodet 23ffe3349f [MNG-7236] The DefaultPluginVersionResolver should cache results for the session 2021-09-14 20:10:13 +02:00
Michael Osipov 6b6589bf1c [MNG-7219] [Regression] plexus-cipher missing from transitive dependencies 2021-09-14 19:21:08 +02:00
Falko Modler a6e462b53a [MNG-7251] Fix threadLocalArtifactsHolder leaking into cloned project
This closes #535
2021-09-14 17:22:42 +02:00
Tamas Cservenak 406c525ec4 [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.3.2 because Maven Resolver 1.7.0 introduced this already as a
transitive dependency in fc806a25eb.
The only difference between version 1.2 and 1.3.2 is a Java upgrade from 6 to 8.

This closes #539
2021-09-13 22:57:31 +02:00
Tamas Cservenak 067171d28a [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:52:20 +02:00
Mickael Istria f594c0b916 Add ModelSource test for MNG-5669
This closes #525
2021-08-17 10:59:48 +02:00
Michael Osipov a2a3df3d02 [MNG-7203] Introduce a long option --verbose and deprecate --debug
This closes #519
2021-08-01 22:33:33 +02:00
rfscholte a2f81065ff [MNG-6656] Features must use userProperties instead of systemProperties 2021-07-23 11:21:18 +02:00
Michael Osipov e9a54c6d02 Use proper term: directory 2021-07-19 23:45:50 +02:00
Michael Osipov 78fc3734f9 Trim trailing whitespace 2021-07-02 18:47:10 +02:00
Michael Osipov b551be7445 Document hacks as such 2021-07-02 17:50:44 +02:00
Falko Modler 73e00ed85d [MNG-6843] Parallel build fails due to missing JAR artifacts in compilePath
Signed-off-by: rfscholte <rfscholte@apache.org>
2021-06-25 19:28:40 +02:00
Sylwester Lachiewicz ab95197436 Fix Checkstyle reported issues with maven-shared-resources 3 2021-05-30 12:00:03 +02:00
rfscholte 12f3e7e878 Remove maven-test-support in favor of plexus-testing 2021-05-28 18:26:03 +02:00
Michael Simacek 83e36649c0 [MNG-6294] Convert MavenPluginValidator into a JSR 330 component
Modified by: Guillaume Dufour <guillaume.duff@gmail.com>

This closes #134 and closes #470
2021-05-03 08:09:58 +02:00
Michael Osipov 1a65351b43 Revert "[MNG-6772] Prevent Super POM central entry from overriding"
This reverts commit 2a23d7bf16.
2021-04-22 18:45:57 +02:00
rfscholte d6e70e297a [MNG-6917] Update maven-wrapper-plugin to 3.0.2 2021-04-08 19:41:43 +02:00
Hervé Boutemy b08e4d277e [MNG-6917] add wrapper lifecycle to reference documentation 2021-04-05 19:48:39 +02:00
Hervé Boutemy c4df060c26 fix javadoc 2021-04-05 10:11:39 +02:00
Hervé Boutemy 1b6caed1ea [MNG-6656] rename build+consumer filters to buildToRaw+rawToConsumer 2021-04-04 19:49:51 +02:00
Hervé Boutemy e25cf17d3b [MNG-6656] move to o.a.m.model.transform + .sax 2021-04-04 19:39:05 +02:00
Hervé Boutemy 22954a04ff [MNG-6656] rename maven-xml module to maven-model-transform 2021-04-04 13:24:41 +02:00
Martin Kanters 7c742c298b [MNG-7112] Do not select child modules when --non-recursive is given.
Closes #459
2021-04-02 16:11:49 +02:00
Martin Kanters c4cd93d55f [MNG-7102] Exclude all children of aggregators, even if the aggregator was already removed from the reactor. 2021-03-27 17:38:05 +01:00
Hervé Boutemy 1ab29f5485 [MNG-7128] keep blocked attribute from mirrors in artifact repositories 2021-03-27 03:00:25 +01:00
Maarten Mulders c3cf29438e [MNG-6511] Optional project selection
Closes #446.
2021-03-22 14:41:59 +01:00
Martin Kanters a02834611b [MNG-7102] The child modules of excluded projects are now excluded as well, making the behavior consistent with MNG-6981. 2021-03-22 13:16:42 +01:00
Michael Osipov 1e19805097 [MNG-6075] Increase the model validation level to the next minor level version
This closes #455
2021-03-20 15:09:33 +01:00
Hervé Boutemy 28b4ea92d3 [MNG-7117] add support for blocked mirror 2021-03-19 20:36:00 +01:00
Hervé Boutemy 3b21386c3f [MNG-7116] add support for mirrorOf external:http:* 2021-03-19 20:35:50 +01:00
Michael Osipov a5c68f7a4a Revert "[MNG-7046] Revert MNG-5639 and make repo config static only"
This reverts commit 8c9c303f9c.
2021-03-13 17:09:40 +01:00
Maarten Mulders ad24f599ce [MNG-7051] Return unmodifiable profile lists
This helps deprecation and keeps the code consistent.

Closes #452.
2021-03-08 16:52:28 +01:00
Martin Kanters 9643ac630c [MNG-7051] When an optional profile could not be found, an info message should be thrown instead of a warning. 2021-03-08 16:24:16 +01:00
Hervé Boutemy 0e75baae25 improve and fix javadoc 2021-03-05 21:23:44 +01:00
Romain Manni-Bucau a242c1a912 [MNG-6471] Parallel builder should use the module name as thread name
This closes #177
2021-02-28 19:59:45 +01:00
rfscholte 8ceb6c6e99 [MNG-7063] Infinite loop using Shade plugin and JUnit 5 dependency 2021-02-21 11:23:08 +01:00
Hervé Boutemy 9b5b8d4082 extract AbstractMavenLifecycleParticipant dispatch methods 2021-02-20 19:55:40 +01:00
Hervé Boutemy 441cf73c06 improve documentation 2021-02-20 19:34:43 +01:00
rfscholte 84a1ff2d5c [MNG-7063] Add unittest to ensure rereading a pom won't return the cached Model 2021-02-14 16:56:25 +01:00
Guillaume Nodet 619973b91c [MNG-7063] Infinite loop using Shade plugin and JUnit 5 dependency
Signed-off-by: rfscholte <rfscholte@apache.org>
2021-02-14 15:52:04 +01:00
Guillaume Nodet f820b41aed [MNG-7095] Fix resume for parallel builds
Resolves #444
2021-02-13 11:32:34 +01:00
Guillaume Nodet 48fc10889e [MNG-7077] Use JUnit 5 extension
Signed-off-by: rfscholte <rfscholte@apache.org>
2021-02-12 17:21:59 +01:00
boris-unckel 1e575a2bd7 [MNG-7068] Active dependency management for Google Guice/Guava
This closes #462
2021-02-02 14:17:43 +01:00
Maarten Mulders 8defd16965 [MNG-7051] Optionally skip non-existing profiles and break on missing required profiles. 2021-02-02 08:20:21 +01:00
Michael Osipov 8df10f93be Test for empty value and avoid needless space 2021-01-31 20:20:23 +01:00
Michael Osipov ceb08cfa77 Test for empty locations and avoid printing them 2021-01-30 23:04:46 +01:00
Guillaume Nodet bb916d0784 [MNG-7035] Migrate unit tests to Unit 5
Signed-off-by: rfscholte <rfscholte@apache.org>
2021-01-15 15:07:06 +01:00
Martin Kanters 83dc6909aa [MNG-7071] Remove the profiles.xml warning, since the functionality is ignored since Maven 3. 2021-01-11 19:17:16 +01:00
Sylwester Lachiewicz b877445cb9 [MNG-6909] Convert to JSR330 in tests - maven-core
Closes #346
2021-01-08 03:55:24 +01:00
Michael Osipov a6d5e86155 Use consistent static final loggers 2021-01-05 15:47:20 +01:00
Michael Osipov 2201698234 Apply consistent log argument quoting for sigle- and multi-valued args 2021-01-05 15:47:20 +01:00
rfscholte 94612f96fa [MNG-7060] Let build fail fast in case any maven-gpg-plugin goal is called 2021-01-03 13:09:59 +01:00
Michael Osipov 31ad2ff43a Use system line separator wherever possible
This closes #424
2021-01-01 12:55:01 +01:00
Maarten Mulders 2caed6218a [MNG-4660] Increase usefulness of logging
Closes #416
2020-12-28 11:27:28 +01:00
Michael Osipov c79682bca9 [MNG-7057] Param style of Javadoc in ReactorModelPool is wrong 2020-12-27 01:00:25 +01:00
Michael Osipov 8eda091d4e Replace tabs with proper count of spaces 2020-12-24 19:50:27 +01:00
Michael Osipov 673a7d1fef Trim trailing whitespace 2020-12-24 19:09:10 +01:00
Michael Osipov 8c9c303f9c [MNG-7046] Revert MNG-5639 and make repo config static only
This closes #409
2020-12-24 15:23:59 +01:00
Michael Osipov 7f63daccc7 [MNG-7021] Remove old MHELP backward compat code
This closes #395
2020-12-24 13:40:58 +01:00
Michael Osipov 72a125ef04 [MNG-7022] Remove o.a.m.lifecycle.mapping.Lifecycle optional mojos backward compat code
This closes #396
2020-12-24 00:52:57 +01:00
Christian Schulte d2adab7bf3 [MNG-6054] Remove super POM plugin management section
This closes #410
2020-12-24 00:05:32 +01:00
Maarten Mulders 7e21a521c7 [MNG-4660] Increase usefulness of logging 2020-12-23 16:45:58 +01:00
rfscholte 9f88494b60 [MNG-6957] Versionless reactor dependencies/parent should work even if modules are aggregated in reverse order
This closes #391
2020-12-22 16:30:37 +01:00
Romain Manni-Bucau 2609cdcbc0 [MNG-7045] Drop CDI API from Maven
This closes #408
2020-12-22 09:58:55 +01:00
Martin Kanters d8c2cc7e4a [MNG-6566] Plugins that require a certain phase should not fork goals that are already in the execution plan.
This closes #397
2020-12-15 09:21:16 +01:00
Nicolas Juneau 95ee890837 [MNG-5728] Switch the default checksum policy from "warn" to "fail"
Signed-off-by: rfscholte <rfscholte@apache.org>
Signed-off-by: Michael Osipov <michaelo@apache.org>
2020-12-02 20:49:46 +01:00
Robert Scholte 251ba225c6 Revert "[MNG-5728] Switch the default checksum policy from "warn" to "fail"" 2020-12-02 20:28:04 +01:00
rfscholte 06c3217899 Merge branch 'MNG-5728' of https://gitbox.apache.org/repos/asf/maven 2020-12-02 19:57:23 +01:00
Nicolas Juneau d8ad76b9cb [MNG-5728] Switch the default checksum policy from "warn" to "fail"
Signed-off-by: rfscholte <rfscholte@apache.org>
Signed-off-by: Michael Osipov <michaelo@apache.org>
2020-11-30 21:12:14 +01:00
Michael Osipov b24c34bb23 [MNG-7041] Update @since, version ranges and other version related strings
This closes #404
2020-11-29 11:23:53 +01:00
rfscholte 3736be9c15 Updating version in preparation for Maven 4 2020-11-27 12:22:47 +01:00
Michael Osipov 827224c7c8 [MNG-7019] Notify also at start when profile is missing 2020-11-13 19:49:35 +01:00
Michael Osipov 72688805c4 [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
2020-11-11 23:09:49 +01:00
Michael Osipov 207237223a [MNG-6550] Packaging 'pom' binding plugin upgrades
* Upgrade to Maven Install Plugin 3.0.0-M1
* Upgrade to Maven Deploy Plugin 3.0.0-M1
2020-11-11 23:04:53 +01:00
Michael Osipov 7251b8dda8 [MNG-6551] Packaging 'jar' binding plugin upgrades
* Upgrade to Maven Resources Plugin 3.2.0
* Upgrade to Maven Compiler Plugin 3.8.1
* Upgrade to Maven Surefire Plugin 3.0.0-M5
* Upgrade to Maven JAR Plugin 3.2.0
* Upgrade to Maven Install Plugin 3.0.0-M1
* Upgrade to Maven Deploy Plugin 3.0.0-M1
2020-11-10 15:02:47 +01:00
Michael Osipov 7b04f82f87 [MNG-6556] Packaging 'maven-plugin' binding plugin upgrades
* Upgrade to Maven Resources Plugin 3.2.0
* Upgrade to Maven Compiler Plugin 3.8.1
* Upgrade to Maven Surefire Plugin 3.0.0-M5
* Upgrade to Maven Deploy Plugin 2.8.2
* Upgrade to Maven Install Plugin 2.5.2
* Upgrade to Maven Plugin Plugin 3.6.0
* Upgrade to Maven JAR Plugin 3.2.0
2020-11-10 14:59:06 +01:00
Michael Osipov 033a7a2b71 [MNG-6553] Packaging 'war' binding plugin upgrades
* Upgrade to Maven Resources Plugin 3.2.0
* Upgrade to Maven Compiler Plugin 3.8.1
* Upgrade to Maven Surefire Plugin 3.0.0-M5
* Upgrade to Maven WAR Plugin 3.3.1
* Upgrade to Maven Install Plugin 3.0.0-M1
* Upgrade to Maven Deploy Plugin 3.0.0-M1
2020-11-10 11:33:24 +01:00
Michael Osipov 658b7a9362 [MNG-6552] Packaging 'rar' binding plugin upgrades
* Upgrade to Maven Resources Plugin 3.2.0
* Upgrade to Maven Compiler Plugin 3.8.1
* Upgrade to Maven Surefire Plugin 3.0.0-M5
* Upgrade to Maven RAR Plugin 2.4
* Upgrade to Maven Install Plugin 3.0.0-M1
* Upgrade to Maven Deploy Plugin 3.0.0-M1
2020-11-10 11:31:36 +01:00
Michael Osipov 6d75136fa5 [MNG-6552] Packaging 'ejb' binding plugin upgrades
* Upgrade to Maven Resources Plugin 3.2.0
* Upgrade to Maven Compiler Plugin 3.8.1
* Upgrade to Maven Surefire Plugin 3.0.0-M5
* Upgrade to Maven EJB Plugin 3.1.0
* Upgrade to Maven Install Plugin 3.0.0-M1
* Upgrade to Maven Deploy Plugin 3.0.0-M1
2020-11-10 11:07:26 +01:00
Michael Osipov 230773a35d [MNG-6554] Packaging 'ear' binding plugin upgrades
* Upgrade to Maven EAR Plugin 3.1.2
* Upgrade to Maven Resources Plugin 3.2.0
* Upgrade to Maven Install Plugin 3.0.0-M1
* Upgrade to Maven Deploy Plugin 3.0.0-M1
2020-11-10 10:55:16 +01:00
Michael Osipov 7a4b77b582 [MNG-6548] Lifecycle plugin version upgrades
* Upgrade to Maven Clean Plugin 3.1.0
* Upgrade to Maven Site Plugin 3.9.1
2020-11-08 16:18:41 +01:00
Maarten Mulders ba7a0376b1 Refactor ProjectsCollector.collectProjects
This method now returns it result instead of modifying one of its arguments.
Closes #388.
2020-11-08 09:43:19 +01:00
rfscholte e7eef9d34f [MNG-6999] Chained (consumer) XMLFilters can result in "floating" comments 2020-10-30 12:39:23 +01:00
rfscholte 24697184cc Merge branch 'master' of https://gitbox.apache.org/repos/asf/maven 2020-10-27 20:09:23 +01:00
Sylwester Lachiewicz 449e6dc9db [MNG-6873] update junit dependency to 4.13.1 - also in unit tests 2020-10-27 11:08:56 +01:00
Martin Kanters afd17a3979 [MNG-7002] Added a test scenario for including child modules when using the --pl switch. 2020-10-23 10:41:31 +02:00
rfscholte 8913502589 Merge branch 'master' of https://gitbox.apache.org/repos/asf/maven 2020-10-21 21:25:41 +02:00
Martin Kanters 42af8ba5a2 [MNG-6981] Include the child projects (modules) of the selected projects with --pl in the reactor.
This closes #374.
2020-10-19 20:14:10 +02:00
Maarten Mulders a5b292ddf8 [MNG-6118] Make Maven aware of all projects in a multi module project when using -f or when changing directory to a submodule.
This closes #373
2020-10-18 20:34:51 +02:00
rfscholte 789d75fc68 Merge branch 'master' of https://gitbox.apache.org/repos/asf/maven 2020-10-16 20:34:10 +02:00
Sylwester Lachiewicz c61e63032f [MNG-6965] Extensions suddenly have org.codehaus.plexus:plexus-utils:jar:1.1 on their classpath
This closes #367
2020-10-05 09:06:46 +02:00
Slawomir Jaranowski d5a5bc553a [MNG-6992] Allow access to org.eclipse.aether.transform
This closes #379
2020-10-04 21:45:53 +02:00
pazderski 39641ac803 [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
2020-10-03 12:51:51 +02:00
Maarten Mulders ac80f5c2b9 Refactor MavenCli.populateRequest 2020-09-20 11:33:53 +02:00
Eddie Wiegers 2a23d7bf16 [MNG-6772] Prevent Super POM central entry from overriding
Closes #289
2020-09-01 08:31:58 +02:00
Michael Osipov 9120d86573 [MNG-6977] Use hyphen when creating builder threads (names) 2020-08-17 11:43:20 +02:00
rfscholte f2116001b9 Merge branch 'master' of https://gitbox.apache.org/repos/asf/maven 2020-08-08 11:25:29 +02:00
mickroll 6087444430 [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
2020-08-04 14:04:51 +02:00
Maarten Mulders 117cfde44e [MNG-5760] Several fixes for the --resume feature.
BuildResumptionDataRepository is not used in MavenCli

Make setResume() on MavenExecutionRequest a traditional setter

Fix resolution of resume.properties file

Add unit test for DefaultBuildResumptionDataRepository#applyResumptionData

Avoid storing and using an empty excludedProjects field in the resume.properties file.

Avoid star imports

Don't create a unneeded Path when resolving resume.properties

Support the scenario where the first project was failed, but subsequent projects succeeded. (e.g. by fail-at-end or parallel builds)

Maven invocations without project shouldn't fail
2020-07-15 08:58:45 +02:00
rfscholte 2e66809e0e [MNG-6952] Fail early if pom cannot be transformed 2020-07-04 23:27:12 +02:00
rfscholte a945ca4ed3 [MNG-6944] Fix ordering lifecycles 2020-06-23 19:37:29 +02:00
rfscholte bdec668de9 [MNG-6656] Introduce base for build/consumer pom 2020-06-22 21:24:49 +02:00
rfscholte 881274914a [MNG-6917] Introduce wrapper lifecycle 2020-06-22 20:26:56 +02:00
rfscholte 1e217703a8 [MNG-6863] Support --also-make flag in combination with --resume-from.
Author: Martin Kanters <Martin.Kanters@infosupport.com>
2020-06-20 22:39:29 +02:00
rfscholte 658ad90b38 [MNG-5760] Add `-r/--resume` to automatically resume from the last failure point
Author: Martin Kanters <mkanters93@gmail.com>
2020-06-20 13:55:48 +02:00
rfscholte a7771a1234 [MNG-6562] WARN if plugins injected by default lifecycle bindings don't have their version locked in pom.xml or parent 2020-06-19 17:28:46 +02:00
rfscholte 46ed754572 Revert "[MNG-6562] added WARNING on default bindings plugins unlocked versions"
This reverts commit d9bf929c74.
2020-06-19 17:28:01 +02:00
Sylwester Lachiewicz b4725dbe06 Fix maven-checkstyle-plugin 3.1.1 reported error
- with maven-shared-resources v3
2020-06-11 20:53:36 +02:00
Sylwester Lachiewicz 2537e5306c [MNG-6828] DependencyResolutionException breaks serialization 2020-06-11 09:32:54 +02:00
olivier lamy 295c205a65 [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>
2020-06-04 12:37:04 +10:00
huangkaifeng 5397fb66e7 [MNG-6873] Align JUnit version to 4.13
Closes #331
2020-05-09 21:19:41 +02:00
Martin Kanters f6c07d9358
[MNG-6863] --also-make is being ignored when calling --resume-from
[MNG-6676] Resume reactor build after skipped project using -pl !X -rf X combination

Co-authored-by: Martin Kanters <Martin.Kanters@infosupport.com>
2020-04-24 12:01:27 +02:00
Maarten Mulders ec92934bf0
[MNG-4660] --resume-from flag resolves inter-module dependencies
Co-authored-by: Martin Kanters <Martin.Kanters@infosupport.com>
2020-04-14 22:04:55 +02:00
Olivier Lamy af1bf4c8b4
[MNG-6886] upgrade plexus-cipher to 1.8 and update changed groupId (#335)
Signed-off-by: olivier lamy <olamy@apache.org>
2020-04-10 09:17:25 +10:00
Lewinski, Arne d127bce8c9 Revert "[MNG-6867] extract methods, apply SLA"
This reverts commit c423a090e3.
2020-04-02 23:31:20 +02:00
Lewinski, Arne c423a090e3 [MNG-6867] extract methods, apply SLA 2020-04-02 22:51:55 +02:00
Joseph Walton 9567da2bc8 [MNG-5577] Convert maven-core to JSR 330
Convert (almost) all Plexus components in maven-core to JSR 330 annotations

Closes #332
2020-04-02 15:38:26 +02:00
Joseph Walton d4207748a8 [MNG-5577] Don't use LegacyRepositoryLayout in tests.
This class was deleted, but retained in tests. We don't need
it anymore, so drop it.
2020-04-01 19:40:53 +02:00
Joseph Walton b962ff361a [MNG-5577] Simplify tests to reduce use of wiring.
- Reduce the use of wiring in unit tests
- Enable class scanning for tests that require it.
- Remove test and wiring that's not used.
2020-04-01 19:40:37 +02:00
Karl Heinz Marbaise 2628d713a9
[MNG-6882] - Change the URL's in tests etc. from http to https 2020-03-29 21:02:56 +02:00
Karl Heinz Marbaise 9e92a93ab8
[MNG-6872] - Found CVEs in your dependencies - plexus-utils (tests) 2020-03-08 15:38:11 +01:00
rfscholte f2e9afd788 Refactor getLocalRepository() in tests by using the repositorySystem 2020-02-29 21:01:24 +01:00
Hervé Boutemy d9bf929c74 [MNG-6562] added WARNING on default bindings plugins unlocked versions 2020-02-06 08:58:05 +01:00
Michael Osipov b0d2846e07 [MNG-6859] Build not reproducible when built from source release
This closes #322
2020-02-05 09:30:39 +01:00
rfscholte 716cc1fe02 [MNG-5669] same pom.xml is read multiple times 2020-01-29 21:18:42 +01:00
thelproad 96e11e1c84 [MNG-6855] Remove redundant code
Closes #280
2020-01-26 11:13:26 +01:00
Lipmanpoi e6c897efb6 [MNG-6855] Simplify some code
Closes #279
2020-01-26 11:13:18 +01:00
Sylwester Lachiewicz ace32fdbe0 [MNG-6855] Simplify code - computeIfAbsent() 2020-01-26 11:13:09 +01:00
Rostislav Krasny 1697e7a06b [MNG-6855] Simplify code
- use Integer/Long.compare()
- use List.removeIf()
- remove unused imports
- redundant .toString()

Closes #319
2020-01-26 11:12:53 +01:00
Artem Krosheninnikov ddb454ac83 [MNG-6831] Replace Anonymous classes by lambdas
Closes #303
2020-01-25 22:52:20 +01:00
Artem Krosheninnikov 39492281b2 [MNG-6847] Explicit type can be replaced by the diamond operator
This closes #315
2020-01-13 20:57:35 +01:00
Artem Krosheninnikov 5670dfa909 [MNG-6842] ProjectBuilderTest uses Guava, but Guava is not defined in dependencies
This closes #311
2020-01-09 21:45:26 +01:00
Artem Krosheninnikov 735b72fcf1 [MNG-6844] Use StandardCharsets and remove outdated @SuppressWarnings
This closes #312
2020-01-09 18:09:44 +01:00
Artem Krosheninnikov 1ad780143c [MNG-6827] Replace deprecated StringUtils#defaultString() from Plexus Utils
This closes #302
2019-12-22 12:57:34 +01:00
rfscholte 11b8b2d5d4 [MNG-6824] ModelMerger is broken
Fix modules
Apply Java 8 Functions
2019-12-21 15:03:04 +01:00
Artem Krosheninnikov 3332f4dbcc [MNG-6816] Prefer System.lineSeparator() over system properties
This closes #300
2019-12-10 09:43:47 +01:00
rfscholte ead06d23d4 [maven-release-plugin] prepare for next development iteration 2019-11-19 20:17:36 +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
Sylwester Lachiewicz 78f605e377 [MNG-6515] Fix Javadoc build errors 2018-11-12 17:23:56 +01:00
Karl Heinz Marbaise 6e376d424e
[maven-release-plugin] prepare for next development iteration 2018-10-24 20:38:30 +02:00
Karl Heinz Marbaise 97c98ec64a
[maven-release-plugin] prepare release maven-3.6.0 2018-10-24 20:38:06 +02:00
HoaPhan ba74b96633
[MNG-6492] - Minor improvement on Array construction, conversion performance 2018-10-24 18:07:13 +02:00
Christian Schulte 44826ab446 [MNG-6164] Collections inconsistently immutable
Make non-empty collections returned immutable just like those returned by
java.util.Collections.
2018-10-09 22:12:50 +02:00
rfscholte 7c1e7129b1 [MNG-6415] Project Artifacts Cache does not retain the order of classpath entries. 2018-09-24 19:50:39 +02:00
Sylwester Lachiewicz 8bc3c207d0 [MNG-6311] Implement class-level ModelCache in DefaultProjectBuilder to solve slow pom resolutions
Fix by: David Churcher
2018-09-14 18:43:47 +02:00
Phillip Webb 01f098efd1
[MNG-6475] Remove unused Guava dependencies 2018-09-13 20:45:25 +02:00
Hervé Boutemy f5674713a6 improved documentation 2018-08-12 00:01:17 +02:00
rfscholte 72dca39807 Replace org.apache.commons.lang3.Validate#notNull with java.util.Objects#requireNonNull 2018-07-15 10:36:08 +02:00
Stephen Connolly bf0bd6350e Master is now on 3.6.0-SNAPSHOT 2018-06-17 22:38:49 +01:00
Stephen Connolly 1efd571b0a [maven-release-plugin] prepare for next development iteration 2018-06-17 19:29:56 +01:00
Stephen Connolly 1edded0938 [maven-release-plugin] prepare release maven-3.5.4 2018-06-17 19:29:25 +01:00
Łukasz Dywicki 454a4e7954 [MNG-6411] Improve readability of project list returned when --resume-from option value is invalid
This closes #164
2018-05-18 22:47:24 +02:00
Michael Osipov 8e0efaa107 [MNG-6386] ${project.baseUri} is not a valid URI (according to RFC 3986)
File#toURI()#toString() produces a non-compliant URI making tools like
Subversion or Git to choke on those URIs. Whereas Path#toUri()#toASCIIString()
does the right job.
2018-05-07 22:35:43 +02:00
Michael Osipov 5beb347f41 Fix missing/improper use of @link
This closes #132
2018-05-05 22:56:09 +02:00