Guillaume Nodet
d62113772e
Clean up dependencies versions ( #1300 )
2023-11-17 16:31:11 +01:00
Guillaume Nodet
7fcdd32e87
[MNG-7615] Multithreaded project builder
2023-11-07 09:20:52 +01:00
Guillaume Nodet
2f6ec159fe
[MNG-7615] Add a cycle detection to the transformer context
2023-11-07 09:20:52 +01:00
Guillaume Nodet
53ff1690de
[MNG-7615] Add some methods for supporting Maven 4 api to ProfileInjector / ProfileSelector
2023-11-07 09:20:52 +01:00
Guillaume Nodet
54ca01c779
[MNG-7615] Use lambas to access ModelCache
2023-11-07 09:20:52 +01:00
Guillaume Nodet
3fc399318e
[maven-release-plugin] prepare for next development iteration
2023-10-20 21:20:23 +02:00
Guillaume Nodet
a2cbf4873a
[maven-release-plugin] prepare release maven-4.0.0-alpha-8
2023-10-20 21:20:23 +02:00
Guillaume Nodet
4251e3f9c2
[MNG-7915] Use MavenStaxReader/Writer in MavenXpp3Reader/Writer ( #1293 )
...
This removes the generated v4 model reader/writer based on Xpp3 api and deprecates the v3 Xpp3 reader/writer.
2023-10-20 09:14:01 +02:00
Guillaume Nodet
251a316962
[MNG-7893] Fix exception loading superpom with invalid modelVersion ( #1290 )
...
Even though this should not be supported, Maven 3.x is always using the 4.0.0 superpom. So if the version is not a supported model version, simply use 4.0.0. Any invalid value will be later verified by the model validator and eventually throw a meaninful exception.
2023-10-18 15:31:36 +02:00
Guillaume Nodet
92a82dcefd
[MNG-6437] Better support for path and uri in property interpolation ( #812 )
2023-10-17 19:55:08 +02:00
Tamas Cservenak
bd608d8cc9
[MNG-7910] DefaultProfileSelector empty ctor uses immutable list ( #1283 )
...
It uses immutable list and while it suggests it allows this below, it actually fails on constructs like this (runtime ONLY):
{noformat}
new DefaultProfileSelector()
.addProfileActivator(new JdkVersionProfileActivator())
.addProfileActivator(new PropertyProfileActivator())
{noformat}
As default ctor creates immutable list, but API kinda suggests this is ok.
---
https://issues.apache.org/jira/browse/MNG-7910
2023-10-16 13:26:42 +02:00
Guillaume Nodet
07db6ec76a
[MNG-7911] Require JDK 11 and support JDK 21 at build time ( #1278 )
2023-10-16 13:25:27 +02:00
Slawomir Jaranowski
5c2e671a06
[MNG-7895] Support ${project.basedir} in file profile activation
2023-09-26 19:50:21 +02:00
Guillaume Nodet
10fa5c713a
[MNG-7893] Allow versioning the superpom according to the model version ( #1253 )
2023-09-26 07:17:52 +02:00
Guillaume Nodet
35022a3616
Fix newlines and indentation in ModelBuildingException message ( #1257 )
2023-09-22 12:54:27 +02:00
Guillaume Nodet
10487d7b5d
[MNG-7820] Get rid of plexus-utils ( #1255 )
2023-09-22 10:59:31 +02:00
Guillaume Nodet
f24266eb64
[MNG-7836] Support alternative syntaxes for POMs ( #1197 )
...
The IT associated with this PR is using the Maven model to generate a hocon POM parser. This requires the maven-api-model module to attach the POM as an artifact, and the maven.yml change so that the model is present in the local repository.
2023-09-22 09:25:10 +02:00
Guillaume Nodet
89d3ac90d1
Make DefaultInheritanceAssembler#merger field final and reorder fields correctly
2023-09-22 08:34:51 +02:00
Guillaume Nodet
0c37cff681
[MNG-7820] Get rid of plexus-utils Os class ( #1249 )
2023-09-22 08:01:36 +02:00
Guillaume Nodet
1eae6684e3
[MNG-7881] Expose the rootDirectory for model processing ( #1245 )
2023-09-19 16:31:35 +02:00
Guillaume Nodet
34b0591f03
[MNG-7820] Remove dependency on plexus-utils StringUtils / FileUtils ( #1243 )
...
Co-authored-by: crazyhzm <crazyhzm@apache.org>
2023-09-14 13:48:15 +02:00
Guillaume Nodet
c6380108b1
[MNG-7877] Attach the build POM and simplify build/consumer implementation ( #1240 )
...
.. at the cost of loosing xml formatting in the consumer POMs
2023-09-13 13:39:50 +02:00
Guillaume Nodet
45075233c7
[MNG-7876] Add model version analysis and downgrade ( #1235 )
2023-09-11 18:17:26 +02:00
Guillaume Nodet
46fd5e9586
Add ModelLocator#locateExistingPom to abstract a bit more ( #1237 )
2023-09-11 18:15:00 +02:00
Guillaume Nodet
7d6f90e8d0
Move Features to api ( #1232 )
2023-09-11 00:42:53 +02:00
Guillaume Nodet
0b3246381d
Remove useless @author tags ( #1226 )
...
This information is usually more accurately given by the GIT history
2023-09-06 10:39:32 +02:00
Guillaume Nodet
06938249a7
[MNG-7792] Use a standalone asm version ( #1126 )
2023-09-05 23:09:03 +02:00
Guillaume Nodet
64b32c0bb4
[MNG-7871] Fix location tracking ( #1222 )
2023-09-05 18:06:44 +02:00
Guillaume Nodet
b0170a612b
[MNG-7851] Improve error message when modelVersion is 4.0 ( #1219 )
...
Improve DefaultModelValidator.compareModelVersions to be able to compare
versions which different numbers of segments, allowing it to compare
"4", "4.0", and "4.0.0" to each other for example.
Signed-off-by: Craig Andrews <candrews@integralblue.com>
# Conflicts:
# maven-model-builder/src/test/java/org/apache/maven/model/validation/DefaultModelValidatorTest.java
Co-authored-by: Craig Andrews <candrews@integralblue.com>
2023-08-29 13:33:17 +02:00
Guillaume Nodet
f2593b97ef
[MNG-7862] The ModelLocator should always be used when locating pom.xml ( #1217 )
2023-08-23 21:25:14 +02:00
Elliotte Rusty Harold
1a714351ef
remove pointless string concatenation ( #1201 )
2023-07-15 13:58:20 -04:00
Guillaume Nodet
e39142b77a
[MNG-7830] Switch from plexus-xml to stax / woodstox ( #1185 )
2023-06-29 12:03:50 +02:00
Guillaume Nodet
5b540821f2
[maven-release-plugin] prepare for next development iteration
2023-06-24 10:52:55 +02:00
Guillaume Nodet
bf699a388c
[maven-release-plugin] prepare release maven-4.0.0-alpha-7
2023-06-24 10:52:47 +02:00
Guillaume Nodet
dbfcfd5eb3
[MNG-7228] MavenProject.getOriginalModel returns interpolated parts ( #1183 )
2023-06-24 10:51:08 +02:00
Guillaume Nodet
a279289bc3
[maven-release-plugin] prepare for next development iteration
2023-06-23 15:08:35 +02:00
Guillaume Nodet
a3f0f12fab
[maven-release-plugin] prepare release maven-4.0.0-alpha-6
2023-06-23 15:08:27 +02:00
Guillaume Nodet
229b31b626
[MNG-4645] Move Central repo definition out of Maven's core so it can be more easily changed ( #1139 )
...
Co-authored-by: Christian Schulte <schulte@apache.org>
2023-06-19 17:04:04 +02:00
Guillaume Nodet
8b0bf378b8
[MNG-5600] Dependency management import should support exclusions. ( #1155 )
...
The original patch is made by: Christian Schulte <schulte@apache.org>
Co-authored-by: Alex Szakaly <alex.szakaly@gmail.com>
2023-06-15 17:29:05 +02:00
Guillaume Nodet
ea1a280714
[MNG-7604] Removal of pom.* interpolation makes some older plugins defunct ( #1137 )
...
This partially reverts commit b2a21f12f8
.
Co-authored-by: Maarten Mulders <mthmulders@users.noreply.github.com>
2023-06-05 10:44:46 +02:00
Guillaume Nodet
e08c95a673
[MNG-7655] Switch to plexus-utils / plexus-xml 4 ( #1093 )
2023-06-04 21:03:41 +02:00
Guillaume Nodet
26ee15a47e
Fix possible NPE
2023-05-31 15:52:05 +02:00
Guillaume Nodet
d826b575ac
[MNG-7784] Fix compatibility for SuperPomProvider ( #1109 )
2023-05-17 07:19:19 +02:00
Guillaume Nodet
7fe9499361
[MNG-7783] Profile source point to file instead of to module ( #1110 )
2023-05-17 07:15:44 +02:00
Tim te Beek
a8319821a9
[MNG-6829] Replace any StringUtils#isEmpty(String) and #isNotEmpty(String) ( #1104 )
...
* [MNG-6829] Replace any StringUtils#isEmpty(String) and #isNotEmpty(String)
Use this link to re-run the recipe: https://public.moderne.io/recipes/org.openrewrite.java.migrate.apache.commons.lang.IsNotEmptyToJdk?organizationId=QXBhY2hlIE1hdmVu
Co-authored-by: Moderne <team@moderne.io>
* Apply Spotless
---------
Co-authored-by: Moderne <team@moderne.io>
2023-05-09 19:46:02 -04:00
Guillaume Nodet
2db7c85b64
[MNG-7038] Introduce public properties to point to the root and top directories of (multi-module) project ( #1061 )
...
This commit introduces three properties:
* project.rootDirectory: the project's directory or parent directory containing a .mvn subdirectory or a pom.xml flagged with the root="true" attribute. If no such directory can be found, accessing the rootDirectory property will throw an IllegalStateException.
* session.topDirectory : the directory of the topmost project being built, usually the current directory or the directory pointed at by the -f/--file command line argument. The topDirectory is similar to the executionRootDirectory property available on the session, but renamed to make it coherent with the new rootDirectory and to avoid using root in its name. The topDirectory property is computed by the CLI as the directory pointed at by the -f/--file command line argument, or the current directory if there's no such argument.
* session.rootDirectory : the rootDirectory for the topDirectory project.
The topDirectory and rootDirectory properties are made available on the MavenSession / Session and deprecate the executionRootDirectory and multiModuleProjectDirectory properties. The rootDirectory should never change for a given project and is thus made available for profile activation and model interpolation (without the project. prefix, similar to basedir). The goal is also to make the rootDirectory property also available during command line arguments interpolation.
A root boolean attribute is also added to the model to indicate that the project is the root project. This attribute is only supported if the buildconsumer feature is active and removed before the pom is installed or deployed. It can be used as an alternative mechanism to the .mvn directory.
2023-04-20 12:58:12 +02:00
Guillaume Nodet
9e51a8fe95
[MNG-7763] Provide UTF-8 as a default value for project.build.sourceEncoding and project.reporting.outputEncoding ( #1085 )
2023-04-17 15:20:54 +02:00
Karl Heinz Marbaise
c49c4e0b18
[MNG-7451] - Remove public modifier from test methods / test classes
2023-04-15 19:24:20 +02:00
Guillaume Nodet
2788849c37
Switch version to 4.0.0 for @since tags ( #1068 )
2023-03-23 06:29:39 +01:00
Guillaume Nodet
8052c720e7
[maven-release-plugin] prepare for next development iteration
2023-03-15 17:06:58 +01:00
Guillaume Nodet
26d10a4bf9
[maven-release-plugin] prepare release maven-4.0.0-alpha-5
2023-03-15 17:06:43 +01:00
Andrey Bruykhov
7b38457506
Normalize regex patterns
...
This #990
2023-02-09 18:47:51 +01:00
Andrey Bruykhov
6e25a2674b
[MNG-7686] Speed up by replacing non-pattern #replaceAll() with #replace() or precompiled patterns
...
This closes #984
2023-02-07 21:55:12 +01:00
Guillaume Nodet
fbeefb85ab
[maven-release-plugin] prepare for next development iteration
2023-01-27 16:33:47 +01:00
Guillaume Nodet
009cf4a721
[maven-release-plugin] prepare release maven-4.0.0-alpha-4
2023-01-27 16:33:38 +01:00
Guillaume Nodet
f153ac134c
[MNG-7598] Fix compatibility issues with toolchains and settings ( #971 )
...
* Split the header on two lines
* Properly delegates equals/hashCode to the v4 models
* Introduce object tracking in settings / toolchains
* Get back to a single template for v3 models
* Switch settings / toolchains mergers to deep merge
* Fix binary compatibility with 3.x
2023-01-27 15:56:16 +01:00
Tamas Cservenak
8918c8144f
[MNG-7622] Maven Transformation and Consumer POM ( #907 )
...
Maven Consumer POM redone, it happens only in "maven3 realm" (before resolver), and allows use cases like m-gog-p and checksum-m-p work as before.
Key aspects:
* consumer POM is injected to build earliest possible as attached artifact
* it lives and is visible just like any other attached artifact (so m-gpg-p can process it)
* just before the install/deploy, they are "swapped out" to replace POM along with all "extras" it may have (checksum, signature)
* to support use cases like MNG-7067 (in memory model is changed, but not POM file), OnChangeTransformer could be extended to take into account both: file content and model content.
---
https://issues.apache.org/jira/browse/MNG-7622
2023-01-25 11:27:00 +01:00
Guillaume Nodet
1968951a53
[MNG-7642] Restore compatibility with flatten-maven-plugin ( #947 )
...
Revert "[MNG-7505] Remove ReportingConverter (#906 )"
This reverts commit adf89ef63f
.
2023-01-09 16:06:48 +01:00
Michael Osipov
7b00069388
[MNG-7658] CI-friendly versions should only come from/rely on user properties
...
This closes #945
2023-01-01 21:08:55 +01:00
Hervé Boutemy
fbdf109b34
[MNG-7571] add Maven API javadoc ( #830 )
2022-12-31 17:32:07 +01:00
Pavel Horal
6178f6ed86
[MNG-7648] Fix locationTracking in DefaultModelBuildingRequest copy constructor ( #940 )
...
- Fix locationTracking in DefaultModelBuildingRequest copy constructor
- Add location tracking unit test
2022-12-29 14:02:33 +01:00
Guillaume Nodet
8150c62749
[MNG-7650] Reformat
2022-12-26 16:12:32 +01:00
Guillaume Nodet
0e82026f2a
[maven-release-plugin] prepare for next development iteration
2022-12-12 11:37:35 +01:00
Guillaume Nodet
2ccf57baa5
[maven-release-plugin] prepare release maven-4.0.0-alpha-3
2022-12-12 11:36:07 +01:00
Guillaume Nodet
adf89ef63f
[MNG-7505] Remove ReportingConverter ( #906 )
2022-12-11 18:57:15 +01:00
Guillaume Nodet
f27b975ddc
[MNG-7576] Restore compatibility for flatten-maven-plugin ( #903 )
2022-12-05 17:22:33 +01:00
Guillaume Nodet
249c0fe0f1
[MNG-7617] Small optimisations and cleanup in the project/model building ( #816 )
...
* Clean a bit DefaultProfileActivationContext
* Cleanup DefaultProjectBuildingResult
* Cache the injected list to avoid repetitive lookups
* Lazily compute the MavenBuildTimestamp
* Use a single loop to select active profiles
2022-12-02 14:58:56 +01:00
Guillaume Nodet
de19cfcd2b
[MNG-7601] Reformat sources
2022-11-22 14:26:01 +01:00
Guillaume Nodet
3f03f0e7b2
[MNG-7576] Restore compatibility with maven 3.x ( #841 )
2022-11-21 09:50:33 +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
Konrad Windszus
79b6dd0bab
[MNG-6609] expose packaging via property "project.packaging" ( #835 )
2022-10-24 13:13:35 +02:00
Guillaume Nodet
18eff3baeb
Restore compatibility with 3.x ( #836 )
...
* Restore compatibility with 3.x
* Deprecate the old constructor
2022-10-20 23:06:06 +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
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
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
Sylwester Lachiewicz
5502c0c8db
[MNG-7502] Upgrade to Guice 5.1.0
2022-09-10 21:27:25 +02: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
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
Karl Heinz Marbaise
896c707d32
[MNG-7447] - Several Improvements by using Stream API
2022-04-04 20:39:14 +02:00
Arturo Bernal
48fc4c9937
[MNG-7299] Simplify conditional expressions
...
This closes #583
2022-03-05 23:32:14 +01:00
Giovanni van der Schelde
b2a21f12f8
[MNG-7244] Remove deprecated WARNING for usage of pom.X placeholders
...
This closes #678
2022-02-19 23:05:27 +01:00
Christoph Läubrich
62cf29bab3
[MNG-7407] Introduce a ModelVersionProcessor component to make CI Friendly Versions pluggable
...
This closes #675
2022-02-19 17:49:59 +01:00
Guillaume Nodet
1d473233f2
[MNG-6727] Using version range in parent and CI Friendly Version fails
2022-02-01 14:35:07 +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
Hervé Boutemy
f46a9131d5
fix javadoc errors
2021-10-17 12:07:50 +02:00
Arturo Bernal
0080e84588
[MNG-7297] Remove redundant type arguments ( #581 )
2021-10-11 20:58:38 +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
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
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
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