[jira] [Commented] (MNG-6410) Add groupId to --resume-from suggestion if artifactId is not unique in reactor

2020-03-28 Thread Hudson (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-6410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17069763#comment-17069763
 ] 

Hudson commented on MNG-6410:
-

Build failed in Jenkins: Maven TLP » maven-studies » maven-metrics #4

See 
https://builds.apache.org/job/maven-box/job/maven-studies/job/maven-metrics/4/

> Add groupId to --resume-from suggestion if artifactId is not unique in reactor
> --
>
> Key: MNG-6410
> URL: https://issues.apache.org/jira/browse/MNG-6410
> Project: Maven
>  Issue Type: Bug
>  Components: Command Line
>Affects Versions: 3.5.3
>Reporter: Łukasz Dywicki
>Assignee: Michael Osipov
>Priority: Minor
> Fix For: 3.5.4
>
>
> In multi module builds same artifact id can be repeated with different group 
> id. For example if project strategy is to use nesting of modules, instead of 
> using long artifact names, {{ap}} or {{model}} module can occur multiple 
> times with different group id.
> By default maven, upon failed build, prints out only {{-rf :artifactId}}. 
> When developer will copy given suggestion and run build again then his build 
> will be started from first module which have given artifact id.
> While severity of this bug is quite low, it affects productivity in bigger 
> projects big time. To improve usability of returned message a Maven should 
> return {{-rf groupId:artifactId}} once artifact id is not unique.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (MNG-6410) Add groupId to --resume-from suggestion if artifactId is not unique in reactor

2018-11-08 Thread Hudson (JIRA)


[ 
https://issues.apache.org/jira/browse/MNG-6410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16680241#comment-16680241
 ] 

Hudson commented on MNG-6410:
-

Build failed in Jenkins: Maven TLP » maven » MNG-6012-Missing-Profile-At-End #16

See 
https://builds.apache.org/job/maven-box/job/maven/job/MNG-6012-Missing-Profile-At-End/16/

> Add groupId to --resume-from suggestion if artifactId is not unique in reactor
> --
>
> Key: MNG-6410
> URL: https://issues.apache.org/jira/browse/MNG-6410
> Project: Maven
>  Issue Type: Bug
>  Components: Command Line
>Affects Versions: 3.5.3
>Reporter: Łukasz Dywicki
>Assignee: Michael Osipov
>Priority: Minor
> Fix For: 3.5.4
>
>
> In multi module builds same artifact id can be repeated with different group 
> id. For example if project strategy is to use nesting of modules, instead of 
> using long artifact names, {{ap}} or {{model}} module can occur multiple 
> times with different group id.
> By default maven, upon failed build, prints out only {{-rf :artifactId}}. 
> When developer will copy given suggestion and run build again then his build 
> will be started from first module which have given artifact id.
> While severity of this bug is quite low, it affects productivity in bigger 
> projects big time. To improve usability of returned message a Maven should 
> return {{-rf groupId:artifactId}} once artifact id is not unique.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (MNG-6410) Add groupId to --resume-from suggestion if artifactId is not unique in reactor

2018-05-20 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/MNG-6410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16482022#comment-16482022
 ] 

Hudson commented on MNG-6410:
-

Build failed in Jenkins: Maven TLP » maven » master #16

See https://builds.apache.org/job/maven-box/job/maven/job/master/16/

> Add groupId to --resume-from suggestion if artifactId is not unique in reactor
> --
>
> Key: MNG-6410
> URL: https://issues.apache.org/jira/browse/MNG-6410
> Project: Maven
>  Issue Type: Bug
>  Components: Command Line
>Affects Versions: 3.5.3
>Reporter: Łukasz Dywicki
>Assignee: Michael Osipov
>Priority: Minor
> Fix For: 3.5.4
>
>
> In multi module builds same artifact id can be repeated with different group 
> id. For example if project strategy is to use nesting of modules, instead of 
> using long artifact names, {{ap}} or {{model}} module can occur multiple 
> times with different group id.
> By default maven, upon failed build, prints out only {{-rf :artifactId}}. 
> When developer will copy given suggestion and run build again then his build 
> will be started from first module which have given artifact id.
> While severity of this bug is quite low, it affects productivity in bigger 
> projects big time. To improve usability of returned message a Maven should 
> return {{-rf groupId:artifactId}} once artifact id is not unique.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (MNG-6410) Add groupId to --resume-from suggestion if artifactId is not unique in reactor

2018-05-20 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/MNG-6410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16482019#comment-16482019
 ] 

ASF GitHub Bot commented on MNG-6410:
-

asfgit closed pull request #166: [MNG-6410] Clean suggestion on build resume.
URL: https://github.com/apache/maven/pull/166
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java 
b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
index 7b5d97bdbe..a7ff18fbe3 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
@@ -1006,8 +1006,8 @@ private int execute( CliRequest cliRequest )
 {
 slf4jLogger.error( "" );
 slf4jLogger.error( "After correcting the problems, you can 
resume the build with the command" );
-slf4jLogger.error( buffer().a( "  " ).strong( "mvn  -rf 
:"
-+ project.getArtifactId() ).toString() );
+slf4jLogger.error( buffer().a( "  " ).strong( "mvn  -rf 
"
++ getFailedProject( 
result.getTopologicallySortedProjects(), project ) ).toString() );
 }
 
 if ( MavenExecutionRequest.REACTOR_FAIL_NEVER.equals( 
cliRequest.request.getReactorFailureBehavior() ) )
@@ -1027,6 +1027,32 @@ private int execute( CliRequest cliRequest )
 }
 }
 
+/**
+ * A helper method to determine value returned for re execution of build.
+ *
+ * By default -rf :artifactId will pick up first module which matches, but 
quite often failed project might be later
+ * in build queue. This means that developer will either have to type 
group id or wait for build execution of all
+ * modules which were fine, but they are still before one which reported 
errors.
+ * Since build reactor might contain multiple projects with same artifact 
id for developer convenience we print
+ * out groupId:artifactId when there is name clash and :artifactId, if 
there is no conflict.
+ *
+ * @param mavenProjects Maven projects which are part of build execution.
+ * @param failedProject Project which have failed.
+ * @return Value for -rf flag to restart build exactly from place where it 
failed.
+ */
+private String getFailedProject( List mavenProjects, 
MavenProject failedProject )
+{
+for ( MavenProject buildProject : mavenProjects )
+{
+if ( failedProject.getArtifactId().equals( 
buildProject.getArtifactId() ) && !failedProject.equals(
+buildProject ) )
+{
+return failedProject.getGroupId() + ":" + 
failedProject.getArtifactId();
+}
+}
+return ":" + failedProject.getArtifactId();
+}
+
 private void logSummary( ExceptionSummary summary, Map 
references, String indent,
  boolean showErrors )
 {


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add groupId to --resume-from suggestion if artifactId is not unique in reactor
> --
>
> Key: MNG-6410
> URL: https://issues.apache.org/jira/browse/MNG-6410
> Project: Maven
>  Issue Type: Bug
>  Components: Command Line
>Affects Versions: 3.5.3
>Reporter: Łukasz Dywicki
>Assignee: Michael Osipov
>Priority: Minor
> Fix For: 3.5.4
>
>
> In multi module builds same artifact id can be repeated with different group 
> id. For example if project strategy is to use nesting of modules, instead of 
> using long artifact names, {{ap}} or {{model}} module can occur multiple 
> times with different group id.
> By default maven, upon failed build, prints out only {{-rf :artifactId}}. 
> When developer will copy given suggestion and run build again then his build 
> will be started from first module which have given artifact id.
> While severity of this bug is quite low, it affects productivity in bigger 
> projects big time. To improve usability of returned message a Maven should 
> return {{-rf groupId:artifactId}} once artifact id is not unique.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (MNG-6410) Add groupId to --resume-from suggestion if artifactId is not unique in reactor

2018-05-20 Thread JIRA

[ 
https://issues.apache.org/jira/browse/MNG-6410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16481966#comment-16481966
 ] 

Hervé Boutemy commented on MNG-6410:


great!
+1

> Add groupId to --resume-from suggestion if artifactId is not unique in reactor
> --
>
> Key: MNG-6410
> URL: https://issues.apache.org/jira/browse/MNG-6410
> Project: Maven
>  Issue Type: Bug
>  Components: Command Line
>Affects Versions: 3.5.3
>Reporter: Łukasz Dywicki
>Assignee: Michael Osipov
>Priority: Minor
> Fix For: 3.5.4-candidate
>
>
> In multi module builds same artifact id can be repeated with different group 
> id. For example if project strategy is to use nesting of modules, instead of 
> using long artifact names, {{ap}} or {{model}} module can occur multiple 
> times with different group id.
> By default maven, upon failed build, prints out only {{-rf :artifactId}}. 
> When developer will copy given suggestion and run build again then his build 
> will be started from first module which have given artifact id.
> While severity of this bug is quite low, it affects productivity in bigger 
> projects big time. To improve usability of returned message a Maven should 
> return {{-rf groupId:artifactId}} once artifact id is not unique.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (MNG-6410) Add groupId to --resume-from suggestion if artifactId is not unique in reactor

2018-05-20 Thread Michael Osipov (JIRA)

[ 
https://issues.apache.org/jira/browse/MNG-6410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16481932#comment-16481932
 ] 

Michael Osipov commented on MNG-6410:
-

[~hboutemy], that's a good improvement. I have added a subsequent commit which 
aligns the method name with the CLI option name. If no one objects, I will 
squash, rebase and merge into master.

> Add groupId to --resume-from suggestion if artifactId is not unique in reactor
> --
>
> Key: MNG-6410
> URL: https://issues.apache.org/jira/browse/MNG-6410
> Project: Maven
>  Issue Type: Bug
>  Components: Command Line
>Affects Versions: 3.5.3
>Reporter: Łukasz Dywicki
>Assignee: Michael Osipov
>Priority: Minor
> Fix For: 3.5.4-candidate
>
>
> In multi module builds same artifact id can be repeated with different group 
> id. For example if project strategy is to use nesting of modules, instead of 
> using long artifact names, {{ap}} or {{model}} module can occur multiple 
> times with different group id.
> By default maven, upon failed build, prints out only {{-rf :artifactId}}. 
> When developer will copy given suggestion and run build again then his build 
> will be started from first module which have given artifact id.
> While severity of this bug is quite low, it affects productivity in bigger 
> projects big time. To improve usability of returned message a Maven should 
> return {{-rf groupId:artifactId}} once artifact id is not unique.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (MNG-6410) Add groupId to --resume-from suggestion if artifactId is not unique in reactor

2018-05-18 Thread JIRA

[ 
https://issues.apache.org/jira/browse/MNG-6410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16481411#comment-16481411
 ] 

Hervé Boutemy commented on MNG-6410:


javadoc and method name reworked ("improved" IMHO :) ) 
https://gitbox.apache.org/repos/asf?p=maven.git;a=commitdiff;h=f2084970a30af8c823b98702aa431eac6ae1581a

feedback welcome

> Add groupId to --resume-from suggestion if artifactId is not unique in reactor
> --
>
> Key: MNG-6410
> URL: https://issues.apache.org/jira/browse/MNG-6410
> Project: Maven
>  Issue Type: Bug
>  Components: Command Line
>Affects Versions: 3.5.3
>Reporter: Łukasz Dywicki
>Assignee: Michael Osipov
>Priority: Minor
> Fix For: 3.5.4-candidate
>
>
> In multi module builds same artifact id can be repeated with different group 
> id. For example if project strategy is to use nesting of modules, instead of 
> using long artifact names, {{ap}} or {{model}} module can occur multiple 
> times with different group id.
> By default maven, upon failed build, prints out only {{-rf :artifactId}}. 
> When developer will copy given suggestion and run build again then his build 
> will be started from first module which have given artifact id.
> While severity of this bug is quite low, it affects productivity in bigger 
> projects big time. To improve usability of returned message a Maven should 
> return {{-rf groupId:artifactId}} once artifact id is not unique.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)