2471 Commits

Author SHA1 Message Date
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
Guillaume Nodet
4a2a51c6db [MNG-7763] Provide UTF-8 as a default value for project.build.sourceEncoding and project.reporting.outputEncoding 2023-04-18 21:51:40 +02:00
Tamas Cservenak
31e2f5fcc9 [MNG-7767] Put related ITs into verbose mode (#258)
As they assert actual log for validation messages about
what was reported.

---

https://issues.apache.org/jira/browse/MNG-7767
2023-04-17 15:13:39 +02:00
Slawomir Jaranowski
39db9e6c51 [MNG-7697] IT - pom with emoji 2023-04-13 21:51:57 +02:00
Tamas Cservenak
de74b863ee [MNG-7754] Improve plugin validation (#256)
Fixed ITs to not fail:
- assert only for content, neglect and possible indentation
- do not assert what is NOT warn logged, as later we may log more (IT would be not future proof)

Tested with 3.9.1 and 3.9.2-SNAPSHOT w/ https://github.com/apache/maven/pull/1079 Both passes OK

MNG-7754 changes how plugin validation errors are reported (at end and as a dense report), so ITs needs a bit of lax re formatting and indentation and such.

---

https://issues.apache.org/jira/browse/MNG-7754
2023-04-05 14:20:37 +02:00
Petr Široký
19e668e096 [MNG-7661] Fix few build / compiler warnings 2023-03-13 23:11:19 +01:00
Slawomir Jaranowski
21e39ea511 Detecting tests which was not added to TestSuiteOrdering
Even test is skipped by `@Disabled` annotation
newer surefire schedule it for execution.

When tests are missing in TestSuiteOrdering
are executed as one of first tests in unpredictable order.
2023-03-13 22:37:35 +01:00
Tamas Cservenak
da33f06c06 [MNG-7737] IT for profiles (#252)
* [MNG-7737] IT for profiles

Just a simple IT that would catch issues like Maven 3.9.0
went out with, where files were wrongly interpolated: MNG-7726

---

https://issues.apache.org/jira/browse/MNG-7737
2023-03-13 15:57:08 +01:00
Michael Osipov
a988e5c95e Add missing bootstrap dependencies 2023-03-08 14:29:52 +01:00
Christoph Läubrich
dca86bfa80 [MNG-7716] ConcurrencyDependencyGraph deadlock if no root can be selected
Co-authored-by: Michael Osipov <michaelo@apache.org>

This closes #250
2023-03-03 17:22:39 +01:00
Tamas Cservenak
e80821cc11 [MNG-5181] Improve "missing dependency" message (#249)
Related IT change, as the change for this issue made MNG-7128 IT
to fail, as it was too eagerly match whole error message string
that has now due MNG-5181 changed.

To fix it, match only the key parts of the expected error message,
that project failed, due transfer failure, as insecure mirror
was blocked. This makes IT assert same thing, but is more
flexible regarding error text change in MNG-5181.

---

https://issues.apache.org/jira/browse/MNG-5185
2023-03-02 14:28:56 +01:00
Slawomir Jaranowski
497bede577 Replace deprecated systemProperties by systemPropertyVariables 2023-02-24 21:50:32 +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
Michael Osipov
9b63abec33 Upgrade to Maven Surefire 3.0.0-M9 2023-02-20 23:03:14 +01:00
Tamas Cservenak
a5744e8e34 [MNG-7679] [REGRESSION] Build fails when executing a single mojo without a POM
This closes #244
2023-02-20 21:19:01 +01:00
Tamas Cservenak
37474485fe No logic change, just improve logging (#241)
This IT helped a lot to figure out problems around parallel deploy,
and I had locally applied these changes to improve ability to
track down what is actually happening on server side.
2023-02-15 22:32:51 +01:00
Guillaume Nodet
d45dba3073 [MNG-7646] Fix IT broken by the change to not always read the whole reactor (#239) 2023-01-26 11:42:13 +01:00
Guillaume Nodet
49c12573d6 [MNG-7629] Change reactor reader to copy packaged artifacts and reuse them across builds if needed (#234) 2023-01-19 11:54:42 +01:00
Tamas Cservenak
348170eef1 [MNG-7608] Adjust IT for default transport (#237)
If 3.9 uses native as default as well, there is no need anymore
to distinguish between 3.9 and 4+.

---

https://issues.apache.org/jira/browse/MNG-7608
2023-01-17 09:51:09 +01:00
Guillaume Nodet
25c982eeb8 Remove a few system properties before initializing the maven verifier (#232) 2023-01-17 00:20:18 +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ý
8d8dba4c6f [MNG-7661] Replace deprecated 'verifier.setMavenDebug()' 2023-01-15 22:32:54 +01:00
Petr Široký
40aa1115e6 [MNG-7661] Replace deprecated 'verifier.newDefaultFilterProperties()' 2023-01-15 19:45:20 +01:00
Petr Široký
3f029c11a9 [MNG-7661] Replace deprecated 'verifier.addCliOption()' 2023-01-13 17:16:59 +01:00
Slawomir Jaranowski
ff9047ab6b Fix MavenITmng5669ReadPomsOnce
In test, we check if pom files are read only once.

When we update plugin or dependencies in test,
number of read items can change again.

So should be good enough to check if duplicate items exist in log file.
2023-01-13 09:01:24 +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
Tamas Cservenak
11e8501adb Fix plexus-component-metadata plugin version (#229)
A parent POM have it removed, but the plgMgmt does
not have this entry of IT project.
2023-01-12 13:07:09 +01:00
Tamas Cservenak
1b31813b91 [MNG-7665] Update Jetty to latest Java8 capable version (#228)
Update Jetty to latest 9.4.50, last Java 8 capable version. Apply API changes and also remove jetty-servlet as ITs does NOT use servlet aspect of Jetty HTTP server.. This will simplify our lives in future, to make jump to later versions (that are Java 11+). Also, drop jetty-servlet as test do not use any servlet aspect.

---

https://issues.apache.org/jira/browse/MNG-7665
2023-01-12 11:20:33 +01:00
Petr Široký
cb51050ea6 [MNG-7661] Fix verifier 'clean' call in one of the ITs (#227) 2023-01-11 13:42:55 +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
Petr Široký
e24b2edf84 Upgrade Groovy in one of the ITs to support JDK 19 2023-01-04 08:55:58 +01:00
Michael Osipov
78c3506412 [MNG-7640] Investigate which ITs really need to set system properties
This closes #220
2023-01-02 20:38:13 +01:00
Slawomir Jaranowski
e19a8c77c9 Use Maven 3.8.7 for GH builds 2023-01-01 21:34:55 +01:00
Michael Osipov
3506f01962 Add missing javax.annotation:javax.annotation-api:1.2 2022-12-21 22:31:44 +01:00
Michael Osipov
a5d4d3f287 [MNG-7634] Pass user properties instead of system properties
Instead of passing a user property to verify a fix a system property was passed
where code worked before and after the fix identically.
2022-12-20 09:21:08 +01:00
Guillaume Nodet
23ca811a13 Disable tests on maven >= 4.0.0-alpha-3 (#218) 2022-12-12 09:02:24 +01:00
Guillaume Nodet
4d465f3651 [MNG-7618] Fix display for plugins (#217) 2022-12-05 16:48:18 +01:00
Tamas Cservenak
8949df8abe MNG-7608] Make native transport the default (#216)
Changed default transport from 4.0.0-alpha3

---

https://issues.apache.org/jira/browse/MNG-7608
2022-12-02 16:12:31 +01:00
Konrad Windszus
66d369f612 Revert "Revert "[MNG-6609] enable IT for Maven 3.9.0 (#208)""
This reverts commit 95104990dba8131cdb718bf1bfaac2431cf3ef63.
2022-12-01 18:21:50 +01:00
Konrad Windszus
0161e27d34 [MNG-7606] add IT (#214)
Add IT, run with all Maven versions.

Co-authored-by: Tamas Cservenak <tamas@cservenak.net>
2022-12-01 12:33:23 +01:00
Tamas Cservenak
95104990db Revert "[MNG-6609] enable IT for Maven 3.9.0 (#208)"
This reverts commit 38502e2615fd27729645943bfd94f912352ec250.
2022-11-28 10:07:39 +01:00
Konrad Windszus
38502e2615 [MNG-6609] enable IT for Maven 3.9.0 (#208) 2022-11-27 16:51:33 +01:00
Slawomir Jaranowski
d61443cfef Update actions in GH build
Old actions use deprecated node 12

- checkout v2 -> v3
- setup-java v2 -> v3
- disable access to GITHUB_TOKEN
- don't store credentials with checkout
2022-11-16 00:07:44 +01:00
Slawomir Jaranowski
27271e41fb Fix flappy test - mng-6720-fail-fast
- old m-resource-p can fail in multi thread executions
- test project use aggregation - so we need provided configuration in each module
- replace deprecated method
- add message for assertions
2022-11-14 16:17:53 +01:00
Slawomir Jaranowski
fc6d2311a6 Allow basedir system property to be null for build info.txt
- basedir can be null when test is executed by IDE, use default value
- use try-with-resources
2022-11-13 18:15:23 +01:00
Tom Scholten
2c2c7fbf58 [MNG-7378] Add documentation about the location of ITs and how to run them
Closes #207.
2022-10-28 15:31:10 +02:00
Konrad Windszus
bc1c707018 [MNG-6609] packaging specific profile activation (#206) 2022-10-24 13:19:34 +02:00