You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/05/05 21:45:01 UTC
[GitHub] [maven-release] slawekjaranowski opened a new pull request, #120: [MRELEASE-1088] Remove parsing of CLI arguments
slawekjaranowski opened a new pull request, #120:
URL: https://github.com/apache/maven-release/pull/120
Following this checklist to help us incorporate your
contribution quickly and easily:
- [x] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/MJAVADOC) 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.
- [x] Each commit in the pull request should have a meaningful subject line and body.
- [x] 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.
- [x] 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](https://www.apache.org/licenses/icla.pdf) 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](http://www.apache.org/licenses/LICENSE-2.0)
you have to acknowledge this by using the following check-box.
- [x] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
- [x] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [maven-release] peterkronenberg commented on pull request #120: [MRELEASE-1088] Remove parsing of CLI arguments
Posted by GitBox <gi...@apache.org>.
peterkronenberg commented on PR #120:
URL: https://github.com/apache/maven-release/pull/120#issuecomment-1150283298
Is this fix included in version 3.0.0-M5? I'm still getting an error trying to use --no-transfer-progress
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [maven-release] michael-o commented on a diff in pull request #120: [MRELEASE-1088] Remove parsing of CLI arguments
Posted by GitBox <gi...@apache.org>.
michael-o commented on code in PR #120:
URL: https://github.com/apache/maven-release/pull/120#discussion_r866738885
##########
maven-release-manager/src/main/java/org/apache/maven/shared/release/exec/InvokerMavenExecutor.java:
##########
@@ -400,10 +119,11 @@ public void executeGoals( File workingDirectory, List<String> goals, ReleaseEnvi
throw new MavenExecutorException( "Error executing Maven.",
invocationResult.getExecutionException() );
}
+
if ( invocationResult.getExitCode() != 0 )
{
throw new MavenExecutorException(
- "Maven execution failed, exit code: \'" + invocationResult.getExitCode() + "\'",
+ "Maven execution failed, exit code: '" + invocationResult.getExitCode() + "'",
Review Comment:
I think, the single quotes are redundant: (1) it is a number, (2) we have a colon
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [maven-release] slawekjaranowski commented on a diff in pull request #120: [MRELEASE-1088] Remove parsing of CLI arguments
Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on code in PR #120:
URL: https://github.com/apache/maven-release/pull/120#discussion_r866495051
##########
maven-release-plugin/src/it/projects/prepare/MRELEASE-667/pom.xml:
##########
@@ -37,7 +37,7 @@
</dependency>
</dependencies>
<configuration>
- <arguments>-Prelease,!mrelease-677 ${arguments}</arguments>
Review Comment:
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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [maven-release] michael-o commented on a diff in pull request #120: [MRELEASE-1088] Remove parsing of CLI arguments
Posted by GitBox <gi...@apache.org>.
michael-o commented on code in PR #120:
URL: https://github.com/apache/maven-release/pull/120#discussion_r866738102
##########
maven-release-manager/src/main/java/org/apache/maven/shared/release/exec/InvokerMavenExecutor.java:
##########
@@ -379,17 +97,18 @@ public void executeGoals( File workingDirectory, List<String> goals, ReleaseEnvi
throw new MavenExecutorException( "Could not create temporary file for release settings.xml", e );
}
}
+
try
{
- File localRepoDir = releaseEnvironment.getLocalRepositoryDirectory();
- if ( localRepoDir != null )
+ List<String> targetGoals = new ArrayList<>( goals );
+
+ if ( additionalArguments != null && !additionalArguments.isEmpty() )
{
- req.setLocalRepositoryDirectory( localRepoDir );
+ // additionalArguments will be parsed be MavenInvoker
+ targetGoals.add( additionalArguments );
Review Comment:
Not related to this, but `InvocationRequest` needs to rename `#setGoals()` to `#setArgs()`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [maven-release] slawekjaranowski merged pull request #120: [MRELEASE-1088] Remove parsing of CLI arguments
Posted by GitBox <gi...@apache.org>.
slawekjaranowski merged PR #120:
URL: https://github.com/apache/maven-release/pull/120
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [maven-release] slawekjaranowski commented on a diff in pull request #120: [MRELEASE-1088] Remove parsing of CLI arguments
Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on code in PR #120:
URL: https://github.com/apache/maven-release/pull/120#discussion_r866505806
##########
maven-release-plugin/src/it/projects/prepare/MRELEASE-667/pom.xml:
##########
@@ -37,7 +37,7 @@
</dependency>
</dependencies>
<configuration>
- <arguments>-Prelease,!mrelease-677 ${arguments}</arguments>
Review Comment:
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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [maven-release] slawekjaranowski commented on pull request #120: [MRELEASE-1088] Remove parsing of CLI arguments
Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on PR #120:
URL: https://github.com/apache/maven-release/pull/120#issuecomment-1150725493
@peterkronenberg it is in 3.0.0-M6
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [maven-release] olamy commented on a diff in pull request #120: [MRELEASE-1088] Remove parsing of CLI arguments
Posted by GitBox <gi...@apache.org>.
olamy commented on code in PR #120:
URL: https://github.com/apache/maven-release/pull/120#discussion_r866499261
##########
maven-release-plugin/src/it/projects/prepare/MRELEASE-667/pom.xml:
##########
@@ -37,7 +37,7 @@
</dependency>
</dependencies>
<configuration>
- <arguments>-Prelease,!mrelease-677 ${arguments}</arguments>
Review Comment:
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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [maven-release] michael-o commented on a diff in pull request #120: [MRELEASE-1088] Remove parsing of CLI arguments
Posted by GitBox <gi...@apache.org>.
michael-o commented on code in PR #120:
URL: https://github.com/apache/maven-release/pull/120#discussion_r866738102
##########
maven-release-manager/src/main/java/org/apache/maven/shared/release/exec/InvokerMavenExecutor.java:
##########
@@ -379,17 +97,18 @@ public void executeGoals( File workingDirectory, List<String> goals, ReleaseEnvi
throw new MavenExecutorException( "Could not create temporary file for release settings.xml", e );
}
}
+
try
{
- File localRepoDir = releaseEnvironment.getLocalRepositoryDirectory();
- if ( localRepoDir != null )
+ List<String> targetGoals = new ArrayList<>( goals );
+
+ if ( additionalArguments != null && !additionalArguments.isEmpty() )
{
- req.setLocalRepositoryDirectory( localRepoDir );
+ // additionalArguments will be parsed be MavenInvoker
+ targetGoals.add( additionalArguments );
Review Comment:
Not related to this, but `InvocatoinRequest` needs to rename `#setGoals()` to `#setArgs()`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [maven-release] slawekjaranowski commented on pull request #120: [MRELEASE-1088] Remove parsing of CLI arguments
Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on PR #120:
URL: https://github.com/apache/maven-release/pull/120#issuecomment-1119076088
Yes I know ... it will conflict with #118 😄
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [maven-release] olamy commented on a diff in pull request #120: [MRELEASE-1088] Remove parsing of CLI arguments
Posted by GitBox <gi...@apache.org>.
olamy commented on code in PR #120:
URL: https://github.com/apache/maven-release/pull/120#discussion_r866431757
##########
maven-release-plugin/src/it/projects/prepare/MRELEASE-667/pom.xml:
##########
@@ -37,7 +37,7 @@
</dependency>
</dependencies>
<configuration>
- <arguments>-Prelease,!mrelease-677 ${arguments}</arguments>
Review Comment:
maybe leave to see if removal do not have side effects?
this usage pattern `<arguments>.... ${arguments}</arguments>` is used a lot
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [maven-release] slawekjaranowski commented on a diff in pull request #120: [MRELEASE-1088] Remove parsing of CLI arguments
Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on code in PR #120:
URL: https://github.com/apache/maven-release/pull/120#discussion_r866610083
##########
maven-release-plugin/src/it/projects/prepare/MRELEASE-667/pom.xml:
##########
@@ -37,7 +37,7 @@
</dependency>
</dependencies>
<configuration>
- <arguments>-Prelease,!mrelease-677 ${arguments}</arguments>
Review Comment:
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 `${.*}` ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [maven-release] rfscholte commented on a diff in pull request #120: [MRELEASE-1088] Remove parsing of CLI arguments
Posted by GitBox <gi...@apache.org>.
rfscholte commented on code in PR #120:
URL: https://github.com/apache/maven-release/pull/120#discussion_r866588859
##########
maven-release-plugin/src/it/projects/prepare/MRELEASE-667/pom.xml:
##########
@@ -37,7 +37,7 @@
</dependency>
</dependencies>
<configuration>
- <arguments>-Prelease,!mrelease-677 ${arguments}</arguments>
Review Comment:
I know of projects that depend on ${arguments}, so better to fix the code instead of adjusting this IT.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [maven-release] michael-o commented on pull request #120: [MRELEASE-1088] Remove parsing of CLI arguments
Posted by GitBox <gi...@apache.org>.
michael-o commented on PR #120:
URL: https://github.com/apache/maven-release/pull/120#issuecomment-1119986965
Best change ever after the massive change from @cstamas ....
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org