Merged
Conversation
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 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.
* 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
apache/maven#1009
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
localRepositoryBasedironly, 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).See
https://issues.apache.org/jira/browse/MNG-7706
apache/maven#1009