Commit Graph

341 Commits

Author SHA1 Message Date
Tamas Cservenak 79d7739dcc
[MNG-8406] Proper IT isolation (#1968)
Implement proper IT isolation, in a way, that user running ITs should not have it's own env "mixed in" into IT runs. In essence, use "alternate" `user.home` for ITs. Also use proper means to set user home. This will also stop fork 4 ITs (as they were forked due presence of env variable).

Note: yes, this causes longer IT execution time (as can be seen), as the ITs user home (core-it-suite/target/user-home) starts as empty (tail is set to "outer" local repo), so ITs do download stuff.

---

https://issues.apache.org/jira/browse/MNG-8406
2024-12-12 15:24:03 +01:00
Tamas Cservenak 5b7a6de55a
[MNG-8421] Move all of logging setup to LookupInvoker; mvnenc IT (#1964)
Currently mvnenc is unable to log to file (-l) as logging setup is incomplete, move all of this logic to LookupInvoker. Also, create prompt in mvnenc only when needed. Finally, implement needed changes to support mvnenc ITs and add mvnenc IT.

Other changes:
* get rid of `distributionFileName` dirty hack, is remnant from old ITs
* fix CI re removal of that above and use of site that is brain-dead

---

https://issues.apache.org/jira/browse/MNG-8421
2024-12-12 09:43:12 +01:00
Tamas Cservenak 01e47259d2
IT: Streamline ITs more (#1952)
Changes:
* remove unneeded POM cruft
* remove embedded profile (is default) introduce forked profile
* CI: drop "embedded" profile use
2024-12-05 17:03:20 +01:00
Tamas Cservenak 8cd6f83e73
[MNG-8403] Collapse IT utils and helpers (#1949)
Changes:
* move all into same package
* stop direct use of ResourceExtractor, redirect all ITs to superclass method
* drop unneeded ResourceExtractor, it never "extracts" anything
* un-fork ITs where applicable (ie. due new CLI param or so that was not supported before)

---

https://issues.apache.org/jira/browse/MNG-8403
2024-12-05 13:40:02 +01:00
Tamas Cservenak e74bde05c9
[MNG-8403] Maven ITs use maven-executor (#1940)
The goal of this PR is manifold, but major one is to be able to use in ITs new options introduced in Maven4. Currently the "embedded" mode supports only Maven3 options, as Maven4 got new CLI entry point (CLIng), while verifier uses old MavenCli entry point, that is also deprecated. Finally, a full cleanup of (black) magic happened as well, keep ITs simple and clean.

Changes:
* dropped from ITs classpath maven-shared-util
* dropped from ITs classpath maven-verifier, copied last master Verifier to maven-it-helper and modified
* enhancements to new maven-executor to make it fully replace maven-verifier
* ITs are now using new infra and are using new CLIng "entry point" as well (so far ITs used deprecated maven-embedder/MavenCLI class).

---

https://issues.apache.org/jira/browse/MNG-8403
2024-12-05 09:02:41 +01:00
dependabot[bot] 377bc3192c
IT: Bump commons-io:commons-io from 2.17.0 to 2.18.0 (#1927)
Bumps commons-io:commons-io from 2.17.0 to 2.18.0.

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  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-11-20 19:48:45 +01:00
Tamas Cservenak 88c6ff5e7e
IT: Consolidate ITs somewhat (#1924)
Align versions where possible, remove dead stuff.

Ant based Mojos were deprecated in Maven3 era, and
this is Maven4, so no need to test this. Is full
of ancient artifacts anyway.
2024-11-19 14:30:27 +01:00
dependabot[bot] 13342db73e
Bump org.apache.maven.plugin-tools:maven-plugin-annotations (#1908)
Bumps [org.apache.maven.plugin-tools:maven-plugin-annotations](https://github.com/apache/maven-plugin-tools) from 3.6.4 to 3.15.1.
- [Release notes](https://github.com/apache/maven-plugin-tools/releases)
- [Commits](https://github.com/apache/maven-plugin-tools/compare/maven-plugin-tools-3.6.4...maven-plugin-tools-3.15.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugin-tools:maven-plugin-annotations
  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-11-18 08:32:55 +01:00
Guillaume Nodet 12b3dae3ce
Add CI cache (#1914)
* Add cache for all steps
* Pass through the maven.repo.loca.tail property
2024-11-17 15:50:32 +01:00
Guillaume Nodet c4834efdba
Move everything out of bootstrap (#1909) 2024-11-16 18:50:22 +01:00
Guillaume Nodet 4b0dd4362a
Cleanup file access and assertions in ITs (#1912) 2024-11-15 13:08:33 +01:00
Tamas Cservenak f36f8e1bd6
IT: update archaic deps (#1903)
This PR is based on dependabot PRs but they require code changes as well.

Based on:
* https://github.com/apache/maven/pull/1895
* https://github.com/apache/maven/pull/1889
2024-11-13 16:00:55 +01:00
dependabot[bot] c7effeb15c
IT: Bump org.codehaus.plexus:plexus-velocity from 1.1.7 to 2.2.0 (#1901)
Bumps [org.codehaus.plexus:plexus-velocity](https://github.com/codehaus-plexus/plexus-velocity) from 1.1.7 to 2.2.0.
- [Release notes](https://github.com/codehaus-plexus/plexus-velocity/releases)
- [Commits](https://github.com/codehaus-plexus/plexus-velocity/commits/plexus-velocity-2.2.0)

---
updated-dependencies:
- dependency-name: org.codehaus.plexus:plexus-velocity
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-13 10:51:39 +01:00
dependabot[bot] d0cdd8c13e
IT: Bump commons-io:commons-io from 2.14.0 to 2.17.0 (#1899)
Bumps commons-io:commons-io from 2.14.0 to 2.17.0.

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  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-11-12 20:35:16 +01:00
dependabot[bot] de4bba8787
IT: Bump org.junit.jupiter:junit-jupiter from 5.8.0 to 5.11.3 (#1894)
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.8.0 to 5.11.3.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.8.0...r5.11.3)

---
updated-dependencies:
- dependency-name: org.junit.jupiter: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-11-11 12:10:52 +01:00
dependabot[bot] 0752547314
IT: Bump org.apache.maven.shared:maven-shared-utils from 0.9 to 3.4.2 (#1896)
Bumps [org.apache.maven.shared:maven-shared-utils](https://github.com/apache/maven-shared-utils) from 0.9 to 3.4.2.
- [Release notes](https://github.com/apache/maven-shared-utils/releases)
- [Commits](https://github.com/apache/maven-shared-utils/compare/maven-shared-utils-0.9...maven-shared-utils-3.4.2)

---
updated-dependencies:
- dependency-name: org.apache.maven.shared:maven-shared-utils
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-11 12:10:32 +01:00
dependabot[bot] 8dcee59138
IT: Bump log4j:log4j from 1.2.14 to 1.2.17 (#1890)
Bumps log4j:log4j from 1.2.14 to 1.2.17.

---
updated-dependencies:
- dependency-name: log4j:log4j
  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-11-08 09:51:42 +01:00
dependabot[bot] 5be30376e9
IT: Bump org.codehaus.plexus:plexus-container-default (#1891)
Bumps org.codehaus.plexus:plexus-container-default from 1.0-alpha-9 to 2.1.1.

---
updated-dependencies:
- dependency-name: org.codehaus.plexus:plexus-container-default
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-08 09:51:32 +01:00
dependabot[bot] e65819388f
IT: Bump junit:junit from 3.8.1 to 4.13.2 (#1892)
Bumps [junit:junit](https://github.com/junit-team/junit4) from 3.8.1 to 4.13.2.
- [Release notes](https://github.com/junit-team/junit4/releases)
- [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.13.2.md)
- [Commits](https://github.com/junit-team/junit4/commits/r4.13.2)

---
updated-dependencies:
- dependency-name: junit:junit
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-08 09:51:22 +01:00
Tamas Cservenak 37b8a62bd5
IT fix: Drop ancient reporting, use latest (#1887)
Attempt to stop ITs pulling in ancient (and vulnerable) deps.
2024-11-07 17:41:37 +01:00
Tamas Cservenak a836e898b0
IT: cleanup (#1886)
Yet another round

Changes:
* get rid of Guava (2 classes affected)
* align dependencies
* align plugins
2024-11-07 12:43:46 +01:00
Tamas Cservenak 1b3a3575ca
IT: Ant update (#1879)
Dependabot missed that it needs several deps updated
at once.
2024-11-06 14:36:32 +01:00
dependabot[bot] 0da78176d7
Bump org.codehaus.plexus:plexus-utils (#1867)
Bumps [org.codehaus.plexus:plexus-utils](https://github.com/codehaus-plexus/plexus-utils) from 1.1 to 3.0.24.
- [Release notes](https://github.com/codehaus-plexus/plexus-utils/releases)
- [Commits](https://github.com/codehaus-plexus/plexus-utils/commits/plexus-utils-3.0.24)

---
updated-dependencies:
- dependency-name: org.codehaus.plexus:plexus-utils
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-06 14:00:02 +01:00
dependabot[bot] e9f5a1fd4a
Bump commons-io:commons-io (#1868)
Bumps commons-io:commons-io from 1.4 to 2.14.0.

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-06 13:59:53 +01:00
dependabot[bot] 1ff134ecc3
Bump org.apache.maven.shared:maven-shared-utils (#1869)
Bumps [org.apache.maven.shared:maven-shared-utils](https://github.com/apache/maven-shared-utils) from 0.1 to 3.3.3.
- [Release notes](https://github.com/apache/maven-shared-utils/releases)
- [Commits](https://github.com/apache/maven-shared-utils/compare/maven-shared-utils-0.1...maven-shared-utils-3.3.3)

---
updated-dependencies:
- dependency-name: org.apache.maven.shared:maven-shared-utils
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-06 13:59:31 +01:00
dependabot[bot] fe35d034ef
Bump org.apache.maven:maven-core (#1871)
Bumps org.apache.maven:maven-core from 3.6.0 to 3.8.1.

---
updated-dependencies:
- dependency-name: org.apache.maven:maven-core
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-06 13:59:07 +01:00
dependabot[bot] aa863a93a6
Bump org.ow2.asm:asm from 7.3.1 to 9.7.1 (#1875)
Bumps org.ow2.asm:asm from 7.3.1 to 9.7.1.

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-06 13:58:49 +01:00
dependabot[bot] 7c0181db09
Bump org.apache.maven:maven-archiver from 3.6.0 to 3.6.3 (#1877)
Bumps [org.apache.maven:maven-archiver](https://github.com/apache/maven-archiver) from 3.6.0 to 3.6.3.
- [Release notes](https://github.com/apache/maven-archiver/releases)
- [Commits](https://github.com/apache/maven-archiver/compare/maven-archiver-3.6.0...maven-archiver-3.6.3)

---
updated-dependencies:
- dependency-name: org.apache.maven:maven-archiver
  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-11-06 13:58:28 +01:00
Guillaume Nodet 75258afcc6 Integrate into maven's build 2024-11-05 16:56:49 +01:00
Guillaume Nodet fefb93bd57 Use non deprecated option for Maven >= 4.0.0-beta-4 2024-08-27 21:02:01 +02:00
Guillaume Nodet 517bc993ea Fix failing MavenITmng4387QuietLoggingTest (#351) 2024-08-27 11:28:09 +02:00
Slawomir Jaranowski 6de0ea10df Bump Maven to 3.9.7 on GH build 2024-06-01 19:02:13 +02:00
Guillaume Nodet b806d5972e Change bootstrap syntax to align with the usual one (#316) 2023-11-26 07:35:09 +01:00
Slawomir Jaranowski 15707702d8 [MNG-7939] Allow to exclude plugins from validation 2023-11-19 22:10:29 +01:00
Tamas Cservenak d77141df66 [MNG-7909] Apply Resolver 2.0.0 changes (#317)
Changes:
* IT MNG-4368 "smart install" undone
* IT MNG-5175 force Wagon as it uses Wagon config
* IT MNG-7470 adapt to new default and new transport
2023-11-07 13:27:35 +01:00
Slawomir Jaranowski 08fceb5d84 Remove methods used for JUnit 3/4 2023-10-04 20:44:29 +02:00
Guillaume Nodet 1ed2264c17 [MNG-7792] Fix shaded javaagent to relocate the asm package (#290) 2023-09-05 23:08:50 +02:00
Guillaume Nodet 386efc3d6c Reformat 2023-06-05 08:54:28 +02:00
Tamas Cservenak 5e0613e996 [MNG-7788] Fix for IT MavenITmng6562WarnDefaultBindings (#261)
The MavenITmng6562WarnDefaultBindings IT tests new Maven4 feature "fail on severity" (for WARN level).

The stub core plugin maven-resources-plugin depends on maven-compat, and it emits plugin validation warning.

BEFORE MNG-7788 was merged, the warnings were logged AFTER build summary and was not picked up by "fail on severity".

AFTER MNG-7788 merged, it causes that warnings breaks the build, as "fail on severity" is set to WARN level.

Fix:
The stub maven-resources-plugin does NOT need to depend on maven-compat, what it really needs is maven-core (for MavenProject).
2023-05-19 20:33:57 +02:00
Guillaume Nodet 7366fe6bd7 [MNG-7038] Introduce public properties to point to the root and top directories of (multi-module) project 2023-04-20 12:57:57 +02:00
Petr Široký 19e668e096 [MNG-7661] Fix few build / compiler warnings 2023-03-13 23:11:19 +01:00
Tamas Cservenak 57c1066862 [MNG-7706] Fix for ITs WARNING detection (#245)
The MNG-7706 deprecates ancient ArtifactRepository type use to get access to local repository, and issues warning as for any other deprecated Mojo parameters.

But alas, in ITs the MNG-5576 completely unrelated IT there is an assertion to have WARNING-free log. This IT uses the IT-plugins/IT-plugin-expression EvalMojo, that in turn uses the deprecated `${localRepository}` parameter (but does not use it). Result is, Maven 3.9.1 emits a WARNING about use of deprecated parameter and the IT fails.

Further inspection shows, that while EvalMojo injects ArtifactRepository for local repository, there is only one IT that actually uses it, the MNG-4305, but even that one is interested in basedir of the local repository only. So to say, the use of deprecated ArtifactRepository type is not needed at all.

Fix:
* change EvalMojo to not expose in context the localRepository (w/ type ArtifactRepository), but a new expression `localRepositoryBasedir` only, that is injected in non-deprecated way (in real life repoSysSession would be injected, but in IT we keep all super-safe and use Object types).
* adjusted MNG-4305 to use new epxression instead to use object reflection in template to get basedir from ArtifactRepository
* This makes the originally failing MNG-5576 pass, as warning due EvalMojo is gone.

See
https://issues.apache.org/jira/browse/MNG-7706
https://github.com/apache/maven/pull/1009
2023-02-23 13:52:03 +01:00
Tamas Cservenak 76c0d133a3 [MNG-7667] Fix DownloadMojo to properly resolve (#236)
The m-p-p depends on m-p-tools-ant and m-p-tools-beanshell as runtime/optional, and the way DownloadMojo resolves every artifact causes that OptionalDependencySelector filter these out even at "collection" stage (as depth >= 2).

Hence, fix DownloadMojo to resolve properly, that actually shifts all the tree "one level up", and hence result is same as in Maven, as the optional dependencies become "first level sibling".

---

https://issues.apache.org/jira/browse/MNG-7667
2023-01-16 14:13:55 +01:00
Petr Široký 3f029c11a9 [MNG-7661] Replace deprecated 'verifier.addCliOption()' 2023-01-13 17:16:59 +01:00
Tamas Cservenak b035fb3037 [MNG-7667] Fix Bootstrap IT (#230)
This change extends Bootstrap IT (1st IT that fills in local repo) to hunt down some plugins that are bound in lifecycles provided by Maven under test.

Changes:
* the Bootstrap IT invokes only the phase where DownloadMojo is bound
* DownloadMojo (the "bootstrap") changed to do "this or that": it either resolves all artifacts from provided file OR collects plugins for given project packaging plugin versions provided by tested Maven default lifecycle.
* Split more Bootstrap project POMs, now we have 4 modules, we can add more (even extension if needed)

---

https://issues.apache.org/jira/browse/MNG-7667
2023-01-12 22:34:16 +01:00
Guillaume Nodet 59f503bece Modernize IT plugins to use annotations (#184)
* Modernize IT plugins to use annotations

* Align some tests to maven 3.8.6

# Conflicts:
#	core-it-suite/src/test/resources-filtered/bootstrap.txt
#	core-it-suite/src/test/resources/mng-3221/report/pom.xml
#	core-it-suite/src/test/resources/mng-3428/pom.xml
#	core-it-suite/src/test/resources/mng-3530/build-path/plugin/pom.xml
#	core-it-suite/src/test/resources/mng-3530/pom-property/plugin/pom.xml
#	core-it-suite/src/test/resources/mng-3530/resource-object/plugin/pom.xml
#	core-it-suite/src/test/resources/mng-3704/maven-mng3704-plugin/pom.xml
#	core-it-suite/src/test/resources/mng-3743/plugins/maven-mng3743-check-plugin/pom.xml
#	core-it-suite/src/test/resources/mng-3743/plugins/maven-mng3743-report-plugin/pom.xml
#	core-it-suite/src/test/resources/mng-3743/project/pom.xml
#	core-it-suite/src/test/resources/mng-4086/repo/org/apache/maven/its/mng4086/maven-it-plugin-a/0.1/maven-it-plugin-a-0.1.pom
#	core-it-suite/src/test/resources/mng-4086/repo/org/apache/maven/its/mng4086/maven-it-plugin-a/0.2-SNAPSHOT/maven-it-plugin-a-0.2-20090315.124508-1.pom
#	core-it-suite/src/test/resources/mng-5581-lifecycle-mapping-delegate/extension/pom.xml
#	core-it-suite/src/test/resources/mng-7310-lifecycle-activated-in-specified-module/project/pom.xml

* Add dependencies on all support artifacts to ensure multithreaded builds can use correct ordering

* Add missing dependencies on plexus-utils

* Fix for mng-7335 test

* Fix ITs for maven 4

* Rename Component -> TestComponent to leave room for the annotation

* Upgrade a few plugin versions

* Upgrade some JDK requirements to 1.8

* Remove unwanted parentheseses

* Convert the last mojo to annotations

* Force timestamped build

* Fix ITs following Component -> TestComponent rename

* Remove commented block

* Remove versions infered from plugin management

* The implementation parameter is not supported anymore

* Align maven core version

* Fix bad merge
2023-01-11 13:35:56 +01:00
Petr Široký 5ec94529d2 [MNG-7661] Replace deprecated 'verifier.executeGoal()' 2023-01-09 17:55:26 +01:00
Petr Široký 9eb3ee980f [MNG-7661] Use provided scope for Maven deps in IT plugins 2023-01-09 16:46:14 +01:00
Petr Široký 1a78c89175 [MNG-7661] Remove deprecated 'verifier.resetStreams()'
* the method itself is empty in newer versions of verifier,
   so this change is not removing any behavior
2023-01-05 19:35:02 +01:00
Guillaume Nodet 77a2226aa1 Allow running the it suite with mvn4 (#203) 2022-10-07 08:27:22 +02:00