Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MRELEASE-1088] Remove parsing of CLI arguments #120

Merged
merged 1 commit into from
May 6, 2022

Conversation

slawekjaranowski
Copy link
Member

Following this checklist to help us incorporate your
contribution quickly and easily:

  • Make sure there is a JIRA issue filed
    for the change (usually before you start working on it). Trivial changes like typos do not
    require a JIRA issue. Your pull request should address just this issue, without
    pulling in other changes.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Format the pull request title like [MJAVADOC-XXX] - Fixes bug in ApproximateQuantiles,
    where you replace MJAVADOC-XXX with the appropriate JIRA issue. Best practice
    is to use the JIRA issue title in the pull request title and in the first line of the
    commit message.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Run mvn clean verify -Prun-its to make sure basic checks pass. A more thorough check will
    be performed on your pull request automatically.

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

@slawekjaranowski
Copy link
Member Author

Yes I know ... it will conflict with #118 😄

@@ -37,7 +37,7 @@
</dependency>
</dependencies>
<configuration>
<arguments>-Prelease,!mrelease-677 ${arguments}</arguments>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe leave to see if removal do not have side effects?
this usage pattern <arguments>.... ${arguments}</arguments> is used a lot

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is one change - now arguments is pass directly to Invoker, and here property ${arguments} is not resolved so is passed as is.
When we parsed CLI such not resolvable property was not used.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mean leaving <arguments>-Prelease,!mrelease-677 ${arguments}</arguments> is now failing the build when ${arguments} is not defined?
uhm this doesn't look right to me. at least should not fail.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exactly ... if any property in arguments are not resolvable build will fail it.
It is a cost ... parsing everything and duplicate code or pass value as is.

It worked in the same way with old forked executor.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know of projects that depend on ${arguments}, so better to fix the code instead of adjusting this IT.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I will print warning about unresolved properties in arguments and strip its before pass to Invoker.

Can be a case that will be need pass to invoker something like ${.*} ?

{
req.setLocalRepositoryDirectory( localRepoDir );
// additionalArguments will be parsed be MavenInvoker
targetGoals.add( additionalArguments );
Copy link
Member

@michael-o michael-o May 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not related to this, but InvocationRequest needs to rename #setGoals() to #setArgs()

Copy link
Member

@michael-o michael-o left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very awesome...

@slawekjaranowski slawekjaranowski merged commit 26cd6f6 into master May 6, 2022
@slawekjaranowski slawekjaranowski deleted the MRELEASE-1088 branch May 6, 2022 19:33
@michael-o
Copy link
Member

Best change ever after the massive change from @cstamas ....

@peterkronenberg
Copy link

Is this fix included in version 3.0.0-M5? I'm still getting an error trying to use --no-transfer-progress

@slawekjaranowski
Copy link
Member Author

@peterkronenberg it is in 3.0.0-M6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants