Commit Graph

12430 Commits

Author SHA1 Message Date
Tamas Cservenak 445236398d
Make rootDirectory mandatory (#1787)
Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
2024-10-08 21:45:28 +02:00
Guillaume Nodet 6c8b808760
[MNG-5910] Warn if both exists and missing file activation are set (#1773) 2024-10-08 15:46:42 +02:00
Guillaume Nodet 81af852fce
Cut link between maven-core maven-resolver-provider (#1777) 2024-10-08 11:04:45 +02:00
Guillaume Nodet a6ecbde9e9
Fix concurrency issue in DefaultModelValidator (#1786) 2024-10-08 11:04:20 +02:00
Guillaume Nodet 954eae7b56
[MNG-8293] Fix resolution of reactor models (#1783) 2024-10-07 17:32:34 +02:00
Tamas Cservenak b2b868f864
[MNG-8288] "path cannot be null" (#1782)
It seems Maven is eager to get POM from rootDirectory to support
CI Friendly versions. This change makes it "best effort", as in
if there is no POM, just walk away.

---

https://issues.apache.org/jira/browse/MNG-8288
2024-10-07 14:19:01 +02:00
dependabot[bot] 165588cbda
[MNG-8290] Bump org.ow2.asm:asm from 9.7 to 9.7.1 (#1781)
Bumps org.ow2.asm:asm from 9.7 to 9.7.1.

---
updated-dependencies:
- dependency-name: org.ow2.asm:asm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-07 09:31:06 +02:00
dependabot[bot] 9582d827f6
[MNG-8291] Bump org.junit:junit-bom from 5.11.1 to 5.11.2 (#1780)
Bumps [org.junit:junit-bom](https://github.com/junit-team/junit5) from 5.11.1 to 5.11.2.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.11.1...r5.11.2)

---
updated-dependencies:
- dependency-name: org.junit:junit-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-07 09:30:08 +02:00
Tamas Cservenak e369ce5782
[MNG-8283] Make resident able to restore state (#1779)
And move all logic out of invoke. Also, parser and other improvements, mostly adding "extension points" in form of overridable protected method.

---

https://issues.apache.org/jira/browse/MNG-8283
2024-10-05 15:57:15 +02:00
Tamas Cservenak 20fe966770
[MNG-8283] Parser must not alter global state (#1776)
Parser must not (esp "partially") alter global state like
setting Java System Properties. If invoker wants, invoker
can set those (and cleanup).

---

https://issues.apache.org/jira/browse/MNG-8283
2024-10-05 09:32:46 +02:00
Tamas Cservenak 1817aaeaad [MNG-8283] Minor: method rename 2024-10-04 18:05:13 +02:00
Tamas Cservenak 60ae468a2e
[MNG-8283] More mvnd related changes (#1775)
Changes:
* there is only one parser for "just maven", no need for 3
* aligned scopes (public) of local context for simplicity, we can fix visibility later
* allow custom guice modules (unused, may undo this)
* split logging setup in two steps: config and activate

---

https://issues.apache.org/jira/browse/MNG-8283
2024-10-04 17:33:25 +02:00
Tamas Cservenak 533790bb4a
[MNG-8283] Maven CLIng smaller bugfixes and improvements (#1772)
This PR adopts CLIng for use in mvnd, and adds several improvements to CLIng overall.

Major topics:
* ability to pass in per-request Lookup for customization
* makes parser request creation a bit friendlier
* removes a log of redundancy (same stuff copied over)
* ability to alter rootDirectory detection in parsers
* resident invoker bugfix
* adds UTs for 3 invoker implementations

---

https://issues.apache.org/jira/browse/MNG-8283
2024-10-04 14:23:10 +02:00
Guillaume Nodet 1f1a0f9a72
Fix phasing executor (#1770) 2024-10-03 22:56:36 +02:00
Tamas Cservenak 2f75465397 Touch up post merge
One dangling method and TODO
2024-10-03 19:58:19 +02:00
Tamas Cservenak ef9aea6b9c
[MNG-8283] Maven CLIng (#1750)
New CLI for Maven. Goals are reusability, extensibility and easier embeddability (a la mvnd). If you build this branch, you will end up with Maven distro that uses "new" `maven-cli:org.apache.maven.cling.MavenCling` class as entry point instead of "old" `maven-embedder:org.apache.maven.cli.MavenCli`.

First step is to make "pretty much equivalent" capable CLI as compared to "old", with some exceptions:
* "encryption" ops are gone, those should be in separate tool anyway
* "deprecated and unsupported" CLI options like `-llr` present ONLY to make Maven fail are gone (now Arg parser will fail).

Current state of affairs is messy, MavenCli mixes everything it can, contains interleaved logic for bootstrapping, arg parsing, default logic and executing Maven. First goal is to clean this up.

Commons CLI are also hidden in this PR, so is ClassWorlds. This basically opens up way to have "alternative" CLI arguments parsers as well.

Currently the "local" (CLI) flow is this:
```
arg[] -> localParser -> Request -> localInvoker -> maven runs (in situ)
```

But the point is if you "come up" somehow with a Request instance, one can also do just:
```
Request -> invoker -> maven runs (somewhere)
```

Local parser:
* parses CLI args
* infers the defaults
* creates Request object that contains all information needed to run Maven
* can be reused outside of CLI as well
* does NOT fiddle with Plexus, logging, etc.

Local invoker:
* accepts Request object
* deals with configuring env (logging, etc), creating DI container, and running Maven ONLY

There are some experiments ongoing as well, like `ForkedInvoker` is, but also `MavenTool`.

---

https://issues.apache.org/jira/browse/MNG-8283
2024-10-03 18:03:55 +02:00
Guillaume Nodet 43c0a0ad53
Restore the default parallelism in the model builder (#1768) 2024-10-02 23:39:40 +02:00
Guillaume Nodet 75e3c05841 [MNG-8279] The project local repository and project collectors are using maven.multiModuleProjectDirectory instead of rootDirectory 2024-10-02 23:26:46 +02:00
Guillaume Nodet f6417e4944 [MNG-8281] Interpolator service 2024-10-02 23:26:05 +02:00
Guillaume Nodet 5c981cdef0 Add serialVersionUID to API exceptions 2024-10-02 23:26:05 +02:00
Tamas Cservenak 1062d05cb0
Probable bug: method that nullifies model (#1735)
* Sus method that nullifies model
* Make it clear
* Same change in new API
* Fix the logic to return the old value when unchanged

---------

Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
2024-10-01 18:55:06 +02:00
Hervé Boutemy 82cf96094f
[MNG-8258] activate Reproducible Builds by default (#1726) 2024-10-01 16:51:06 +02:00
dependabot[bot] ce2675adfa
[MNG-8280] Bump jlineVersion from 3.26.3 to 3.27.0 (#1764)
Bumps `jlineVersion` from 3.26.3 to 3.27.0.

Updates `org.jline:jline-reader` from 3.26.3 to 3.27.0
- [Release notes](https://github.com/jline/jline3/releases)
- [Changelog](https://github.com/jline/jline3/blob/master/changelog.md)
- [Commits](https://github.com/jline/jline3/compare/jline-parent-3.26.3...jline-3.27.0)

Updates `org.jline:jline-terminal-ffm` from 3.26.3 to 3.27.0
- [Release notes](https://github.com/jline/jline3/releases)
- [Changelog](https://github.com/jline/jline3/blob/master/changelog.md)
- [Commits](https://github.com/jline/jline3/compare/jline-parent-3.26.3...jline-3.27.0)

Updates `org.jline:jline-terminal-jni` from 3.26.3 to 3.27.0
- [Release notes](https://github.com/jline/jline3/releases)
- [Changelog](https://github.com/jline/jline3/blob/master/changelog.md)
- [Commits](https://github.com/jline/jline3/compare/jline-parent-3.26.3...jline-3.27.0)

Updates `org.jline:jansi-core` from 3.26.3 to 3.27.0
- [Release notes](https://github.com/jline/jline3/releases)
- [Changelog](https://github.com/jline/jline3/blob/master/changelog.md)
- [Commits](https://github.com/jline/jline3/compare/jline-parent-3.26.3...jline-3.27.0)

---
updated-dependencies:
- dependency-name: org.jline:jline-reader
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.jline:jline-terminal-ffm
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.jline:jline-terminal-jni
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.jline:jansi-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-01 16:38:50 +02:00
Martin Desruisseaux 5249e1df4e
Remove a module-related exception which is not used anywhere. (#1734)
Maybe it was remanent of a previous module support attempt?
2024-10-01 16:36:05 +02:00
Guillaume Nodet fcb8147268 [MNG-8178] Fall back to system properties for missing profile activation context properties (#1609)
Missed port to the build implementation from f2a0865
2024-10-01 13:59:58 +02:00
Guillaume Nodet 885a4b3a26
[MNG-8230] Rewrite CI friendly versions (#1710) 2024-10-01 13:58:57 +02:00
Guillaume Nodet eefe2c73bc
Improve speed in stax readers (#1748) 2024-10-01 13:02:58 +02:00
Guillaume Nodet 3fdc54c975
Use Version and Severity directly (#1756) 2024-10-01 13:02:36 +02:00
Guillaume Nodet 0cff3ea22b
Improve model validator wrt modelVersion which is now set in the file model (#1757) 2024-10-01 13:02:25 +02:00
Guillaume Nodet 075d3acd10
Cleanup assembly rat plugin config (#1758) 2024-10-01 13:02:14 +02:00
Guillaume Nodet 04f3609eb0
Fix possible NPE during project building (#1759) 2024-10-01 13:02:03 +02:00
dependabot[bot] 5207475361
[MNG-8275] Bump com.google.guava:guava from 33.3.0-jre to 33.3.1-jre (#1740)
Bumps [com.google.guava:guava](https://github.com/google/guava) from 33.3.0-jre to 33.3.1-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-30 21:28:56 +02:00
dependabot[bot] 9a02b3b39d
[MNG-8276] Bump org.apache.velocity:velocity-engine-core from 2.3 to 2.4 (#1741)
Bumps org.apache.velocity:velocity-engine-core from 2.3 to 2.4.

---
updated-dependencies:
- dependency-name: org.apache.velocity:velocity-engine-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-30 21:28:24 +02:00
dependabot[bot] e48ff26885
[MNG-8273] Bump mockitoVersion from 5.13.0 to 5.14.1 (#1762)
Bumps `mockitoVersion` from 5.13.0 to 5.14.1.

Updates `org.mockito:mockito-bom` from 5.13.0 to 5.14.1
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.13.0...v5.14.1)

Updates `org.mockito:mockito-junit-jupiter` from 5.13.0 to 5.14.1
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.13.0...v5.14.1)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-bom
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-30 21:27:48 +02:00
dependabot[bot] ba76c6288e
[MNG-8277] Bump org.junit:junit-bom from 5.11.0 to 5.11.1 (#1747)
Bumps [org.junit:junit-bom](https://github.com/junit-team/junit5) from 5.11.0 to 5.11.1.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.11.0...r5.11.1)

---
updated-dependencies:
- dependency-name: org.junit:junit-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-30 21:26:18 +02:00
dependabot[bot] 6625c0e9ea
[MNG-8274] Bump net.bytebuddy:byte-buddy from 1.15.1 to 1.15.3 (#1749)
Bumps [net.bytebuddy:byte-buddy](https://github.com/raphw/byte-buddy) from 1.15.1 to 1.15.3.
- [Release notes](https://github.com/raphw/byte-buddy/releases)
- [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)
- [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.15.1...byte-buddy-1.15.3)

---
updated-dependencies:
- dependency-name: net.bytebuddy:byte-buddy
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-30 21:23:02 +02:00
Guillaume Nodet be6a535b83 Disable Jenkins temporarily 2024-09-30 16:11:55 +02:00
Guillaume Nodet e28283d81c Disable parallelism 2024-09-30 16:11:42 +02:00
XenoAmess 6ffdc2015a Add license header to m2.conf 2024-09-30 11:23:02 +02:00
Martin Desruisseaux 8f34ea4ce0 More readable formatting in the warning advising users to not publish a project having auto-named dependencies.
Note: this warning is questionable. Should it be removed?
2024-09-30 10:55:03 +02:00
Guillaume Nodet 2efeaf75f5 [MNG-8264] Deprecate maven-model-builder 2024-09-28 20:56:59 +02:00
Guillaume Nodet 75738858d6 [MNG-8264] Deprecate maven-resolver-provider 2024-09-28 20:56:59 +02:00
Guillaume Nodet 9404145faa [MNG-8264] Deprecate maven-settings-builder 2024-09-28 20:56:59 +02:00
Guillaume Nodet db74ba8788 [MNG-8264] Deprecate maven-toolchain-builder 2024-09-28 20:56:59 +02:00
Guillaume Nodet d77462e78a
[MNG-8261] Remove jline-terminal-ffm direct dependency (#1719) 2024-09-28 20:51:07 +02:00
Guillaume Nodet 2d224623a3
[MNG-8120] Refactor ModelBuilder and ProjectBuilder (#1700)
With the introduction of the build pom and raw -> build pom transformation, the construction of the effective poms in two steps become very problematic. Over the time, multiple caches have been added to the ProjectBuilder and ModelBuilder related classes which are often redundant.

This PR thus changes things and move the recursive construction of the models fully into the ModelBuilder in a single call. When building build poms, a first step is done by parsing the file models from the root, then building all needed effective models from those. All the inference can be cleanly done because the builder has all the file models ready. The result will be used by the ProjectBuilder to build the projects.
2024-09-28 11:03:24 +02:00
Tamas Cservenak 2c6846b09b
No issue, no change (#1745)
Just a simple PR to make properties file a "properties file"
as majority would expect. According to spec '=', ':', or white space
can be delimiter and this file IS valid, but still, users my
be surprised, or tools like IDEs may misinterpret this,
otherwise valid Java Properties File.
2024-09-24 17:34:45 +02:00
Tamas Cservenak 034ef155da
[MNG-8263] Remove last remnants of wrapper integration (#1736)
Last two bits to be removed:
* wrapper lifecycle
* exploded scripts

---

https://issues.apache.org/jira/browse/MNG-8263
2024-09-24 09:54:24 +02:00
Tamas Cservenak 45f9b81b4a
Simple typo bugfix (NPE) (#1731)
No issue, just spotted.
2024-09-19 21:15:51 +02:00
Tamas Cservenak 368ddec0e4
[MNG-8233] Client should handle modelIds as "opaque" (#1701)
Javadoc states wrong things (about format of modelId, they are
paths in reality), but also these all are "implementation details".
Crafting modelIds to "walk" lineage is wrong, there is a dedicated
method that provide "opaque" key Strings in defined order to
do that. And client should not care (nor assume) anything
about format of the key String.

---

https://issues.apache.org/jira/browse/MNG-8233
2024-09-19 19:38:41 +02:00