You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sj...@apache.org on 2021/12/29 12:44:06 UTC
[maven-invoker] branch MSHARED-1008 updated (c950586 -> b004d2a)
This is an automated email from the ASF dual-hosted git repository.
sjaranowski pushed a change to branch MSHARED-1008
in repository https://gitbox.apache.org/repos/asf/maven-invoker.git.
discard c950586 [MSHARED-1008] Set builder id in proper way
new b004d2a [MSHARED-1008] Set builder id in proper way
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (c950586)
\
N -- N -- N refs/heads/MSHARED-1008 (b004d2a)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../java/org/apache/maven/shared/invoker/InvocationRequest.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
[maven-invoker] 01/01: [MSHARED-1008] Set builder id in proper way
Posted by sj...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sjaranowski pushed a commit to branch MSHARED-1008
in repository https://gitbox.apache.org/repos/asf/maven-invoker.git
commit b004d2aeb37b59faa3b56c6b452336c04f6b8d7d
Author: Slawomir Jaranowski <s....@gmail.com>
AuthorDate: Wed Dec 29 13:26:34 2021 +0100
[MSHARED-1008] Set builder id in proper way
---
.../java/org/apache/maven/shared/invoker/InvocationRequest.java | 6 +++---
.../org/apache/maven/shared/invoker/MavenCommandLineBuilder.java | 1 +
.../apache/maven/shared/invoker/MavenCommandLineBuilderTest.java | 8 ++++++++
3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/apache/maven/shared/invoker/InvocationRequest.java b/src/main/java/org/apache/maven/shared/invoker/InvocationRequest.java
index d65af9a..91c98d3 100644
--- a/src/main/java/org/apache/maven/shared/invoker/InvocationRequest.java
+++ b/src/main/java/org/apache/maven/shared/invoker/InvocationRequest.java
@@ -717,11 +717,11 @@ public interface InvocationRequest
InvocationRequest setResumeFrom( String resumeFrom );
/**
- * The id of the build strategy to use. equivalent of {@code --builder id}. <b>Note. This is available since Maven
- * 3.2.1</b>
+ * The id of the build strategy to use. equivalent of {@code -b id} or {@code --builder id}.
+ * <b>Note. This is available since Maven 3.2.1</b>
*
* @param id The builder id.
- * @return {@link InvocationRequest} FIXME: How to identify if this is a valid command line option?
+ * @return {@link InvocationRequest}
* @since 3.0.0
*/
InvocationRequest setBuilder( String id );
diff --git a/src/main/java/org/apache/maven/shared/invoker/MavenCommandLineBuilder.java b/src/main/java/org/apache/maven/shared/invoker/MavenCommandLineBuilder.java
index d4aee47..205ed05 100644
--- a/src/main/java/org/apache/maven/shared/invoker/MavenCommandLineBuilder.java
+++ b/src/main/java/org/apache/maven/shared/invoker/MavenCommandLineBuilder.java
@@ -573,6 +573,7 @@ public class MavenCommandLineBuilder
if ( request.getBuilder() != null )
{
+ cli.createArg().setValue( "-b" );
cli.createArg().setValue( request.getBuilder() );
}
diff --git a/src/test/java/org/apache/maven/shared/invoker/MavenCommandLineBuilderTest.java b/src/test/java/org/apache/maven/shared/invoker/MavenCommandLineBuilderTest.java
index 90cd25e..32fcdc6 100644
--- a/src/test/java/org/apache/maven/shared/invoker/MavenCommandLineBuilderTest.java
+++ b/src/test/java/org/apache/maven/shared/invoker/MavenCommandLineBuilderTest.java
@@ -346,6 +346,14 @@ public class MavenCommandLineBuilderTest
}
@Test
+ public void testShouldSetBuilderIdOptionsFromRequest()
+ {
+ mclb.setFlags( newRequest().setBuilder( "builder-id-123" ), cli );
+
+ assertArgumentsPresentInOrder( cli, "-b", "builder-id-123" );
+ }
+
+ @Test
public void testAlsoMake()
{