[jira] [Commented] (MNG-5091) Add option to fail build if WARNING's appear in POM

2022-07-09 Thread Antony Stubbs (Jira)


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

Antony Stubbs commented on MNG-5091:


FYI the GMaven workaround fails on Java 18 with: 
{quote}{{java.lang.reflect.InaccessibleObjectException: Unable to make 
protected void java.lang.Object.finalize() throws java.lang.Throwable 
accessible: module java.base does not "opens java.lang" to unnamed module 
@bf75b5c}}{quote}

> Add option to fail build if WARNING's appear in POM
> ---
>
> Key: MNG-5091
> URL: https://issues.apache.org/jira/browse/MNG-5091
> Project: Maven
>  Issue Type: Improvement
>  Components: Command Line, POM
>Affects Versions: 3.0.3
>Reporter: Karl Heinz Marbaise
>Priority: Minor
> Attachments: MNG-5091-maven-embedder.patch
>
>
> It would be nice to have the option to let a build fail if something like 
> this will appear:
> {code}
> [INFO] Scanning for projects...
> [WARNING] 
> [WARNING] Some problems were encountered while building the effective model 
> for com.soebes.training.module:050-project-without-warnings:jar:0.1.0-SNAPSHOT
> [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must 
> be unique: org.slf4j:slf4j-api:jar -> duplicate declaration of version 1.6.1 
> @ line 28, column 14
> [WARNING] 
> [WARNING] It is highly recommended to fix these problems because they 
> threaten the stability of your build.
> [WARNING] 
> [WARNING] For this reason, future Maven versions might no longer support 
> building such malformed projects.
> [WARNING] 
> {code}
> This shoud be done for WARNING's in case of missing versions for plugins etc.
> Currently it is possible to set the Validation leven in Jenkins/Hudson 
> already but it is not possible on command line. So an option on command line 
> like:
> {code}
> mvn --fail-warning ...
> {code}
> would be great. Or may be a good supplemental option to set the validation 
> level like:
> {code}
> mvn --validation-level MINIMAL
> mvn --validation-level MAVEN20
> mvn --validation-level MAVEN30
> mvn --validation-level MAVEN31
> mvn --validation-level DEFAULT
> {code}
> or may be both. May this might be an enhancement for Maven 3.0.4 ?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [maven] michael-o commented on a diff in pull request #757: [MNG-7353] support CLI "mvn pluginPrefix:version:goal"

2022-07-09 Thread GitBox


michael-o commented on code in PR #757:
URL: https://github.com/apache/maven/pull/757#discussion_r917237430


##
maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoDescriptorCreator.java:
##
@@ -176,18 +176,31 @@ public MojoDescriptor getMojoDescriptor( String task, 
MavenSession session, Mave
 }
 else if ( numTokens == 3 )
 {
-// We have everything that we need except the version
-//
-// 
org.apache.maven.plugins:maven-remote-resources-plugin:???:process
-//
-// groupId
-// artifactId
-// ???
-// goal
-//
-plugin = new Plugin();
-plugin.setGroupId( tok.nextToken() );
-plugin.setArtifactId( tok.nextToken() );
+// groupId:artifactId:goal or pluginPrefix:version:goal (since 
Maven 3.9)

Review Comment:
   3.9.0



##
maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoDescriptorCreator.java:
##
@@ -176,18 +176,31 @@ public MojoDescriptor getMojoDescriptor( String task, 
MavenSession session, Mave
 }
 else if ( numTokens == 3 )
 {
-// We have everything that we need except the version
-//
-// 
org.apache.maven.plugins:maven-remote-resources-plugin:???:process
-//
-// groupId
-// artifactId
-// ???
-// goal
-//
-plugin = new Plugin();
-plugin.setGroupId( tok.nextToken() );
-plugin.setArtifactId( tok.nextToken() );
+// groupId:artifactId:goal or pluginPrefix:version:goal (since 
Maven 3.9)
+
+String firstToken = tok.nextToken();
+// groupId or pluginPrefix? heuristics: groupId contains . but not 
pluginPrefix

Review Comment:
   ...contains dot (.), but ...



-- 
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-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Commented] (MNG-7353) add support for "mvn pluginPrefix:version:goal"

2022-07-09 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-7353:
-

michael-o commented on code in PR #757:
URL: https://github.com/apache/maven/pull/757#discussion_r917237430


##
maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoDescriptorCreator.java:
##
@@ -176,18 +176,31 @@ public MojoDescriptor getMojoDescriptor( String task, 
MavenSession session, Mave
 }
 else if ( numTokens == 3 )
 {
-// We have everything that we need except the version
-//
-// 
org.apache.maven.plugins:maven-remote-resources-plugin:???:process
-//
-// groupId
-// artifactId
-// ???
-// goal
-//
-plugin = new Plugin();
-plugin.setGroupId( tok.nextToken() );
-plugin.setArtifactId( tok.nextToken() );
+// groupId:artifactId:goal or pluginPrefix:version:goal (since 
Maven 3.9)

Review Comment:
   3.9.0



##
maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoDescriptorCreator.java:
##
@@ -176,18 +176,31 @@ public MojoDescriptor getMojoDescriptor( String task, 
MavenSession session, Mave
 }
 else if ( numTokens == 3 )
 {
-// We have everything that we need except the version
-//
-// 
org.apache.maven.plugins:maven-remote-resources-plugin:???:process
-//
-// groupId
-// artifactId
-// ???
-// goal
-//
-plugin = new Plugin();
-plugin.setGroupId( tok.nextToken() );
-plugin.setArtifactId( tok.nextToken() );
+// groupId:artifactId:goal or pluginPrefix:version:goal (since 
Maven 3.9)
+
+String firstToken = tok.nextToken();
+// groupId or pluginPrefix? heuristics: groupId contains . but not 
pluginPrefix

Review Comment:
   ...contains dot (.), but ...





> add support for "mvn pluginPrefix:version:goal"
> ---
>
> Key: MNG-7353
> URL: https://issues.apache.org/jira/browse/MNG-7353
> Project: Maven
>  Issue Type: New Feature
>  Components: Command Line
>Affects Versions: 3.8.4
>Reporter: Herve Boutemy
>Priority: Major
> Fix For: 4.0.x-candidate
>
>
> currently, we can run a simplified 2 parts form {noformat}mvn 
> wrapper:wrapper{noformat}
> but if we want to specify a version, we need to switch to full 4 prts form:
> {noformat}mvn 
> org.apache.maven.plugins:maven-wrapper-plugin:3.1.0-SNAPSHOT:wrapper{noformat}
> it would be nice to be able to write 3 parts simplified {noformat}mvn 
> wrapper:3.1.0-SNAPSHOT:wrapper{noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [maven] hboutemy commented on a diff in pull request #757: [MNG-7353] support CLI "mvn pluginPrefix:version:goal"

2022-07-09 Thread GitBox


hboutemy commented on code in PR #757:
URL: https://github.com/apache/maven/pull/757#discussion_r917239154


##
maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoDescriptorCreator.java:
##
@@ -176,18 +176,31 @@ public MojoDescriptor getMojoDescriptor( String task, 
MavenSession session, Mave
 }
 else if ( numTokens == 3 )
 {
-// We have everything that we need except the version
-//
-// 
org.apache.maven.plugins:maven-remote-resources-plugin:???:process
-//
-// groupId
-// artifactId
-// ???
-// goal
-//
-plugin = new Plugin();
-plugin.setGroupId( tok.nextToken() );
-plugin.setArtifactId( tok.nextToken() );
+// groupId:artifactId:goal or pluginPrefix:version:goal (since 
Maven 3.9)
+
+String firstToken = tok.nextToken();
+// groupId or pluginPrefix? heuristics: groupId contains . but not 
pluginPrefix

Review Comment:
   yes, but what?



-- 
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-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Commented] (MNG-5091) Add option to fail build if WARNING's appear in POM

2022-07-09 Thread Robert Scholte (Jira)


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

Robert Scholte commented on MNG-5091:
-

[~astubbs] that means you either need to update those groovy dependencies or 
switch to 
[maven-scripting-plugin|https://maven.apache.org/plugins/maven-scripting-plugin/].
 Check 
https://maven.apache.org/plugins/maven-scripting-plugin/configure-the-script-engine.html
 how to configure it for groovy.

> Add option to fail build if WARNING's appear in POM
> ---
>
> Key: MNG-5091
> URL: https://issues.apache.org/jira/browse/MNG-5091
> Project: Maven
>  Issue Type: Improvement
>  Components: Command Line, POM
>Affects Versions: 3.0.3
>Reporter: Karl Heinz Marbaise
>Priority: Minor
> Attachments: MNG-5091-maven-embedder.patch
>
>
> It would be nice to have the option to let a build fail if something like 
> this will appear:
> {code}
> [INFO] Scanning for projects...
> [WARNING] 
> [WARNING] Some problems were encountered while building the effective model 
> for com.soebes.training.module:050-project-without-warnings:jar:0.1.0-SNAPSHOT
> [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must 
> be unique: org.slf4j:slf4j-api:jar -> duplicate declaration of version 1.6.1 
> @ line 28, column 14
> [WARNING] 
> [WARNING] It is highly recommended to fix these problems because they 
> threaten the stability of your build.
> [WARNING] 
> [WARNING] For this reason, future Maven versions might no longer support 
> building such malformed projects.
> [WARNING] 
> {code}
> This shoud be done for WARNING's in case of missing versions for plugins etc.
> Currently it is possible to set the Validation leven in Jenkins/Hudson 
> already but it is not possible on command line. So an option on command line 
> like:
> {code}
> mvn --fail-warning ...
> {code}
> would be great. Or may be a good supplemental option to set the validation 
> level like:
> {code}
> mvn --validation-level MINIMAL
> mvn --validation-level MAVEN20
> mvn --validation-level MAVEN30
> mvn --validation-level MAVEN31
> mvn --validation-level DEFAULT
> {code}
> or may be both. May this might be an enhancement for Maven 3.0.4 ?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7353) add support for "mvn pluginPrefix:version:goal"

2022-07-09 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-7353:
-

hboutemy commented on code in PR #757:
URL: https://github.com/apache/maven/pull/757#discussion_r917239154


##
maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoDescriptorCreator.java:
##
@@ -176,18 +176,31 @@ public MojoDescriptor getMojoDescriptor( String task, 
MavenSession session, Mave
 }
 else if ( numTokens == 3 )
 {
-// We have everything that we need except the version
-//
-// 
org.apache.maven.plugins:maven-remote-resources-plugin:???:process
-//
-// groupId
-// artifactId
-// ???
-// goal
-//
-plugin = new Plugin();
-plugin.setGroupId( tok.nextToken() );
-plugin.setArtifactId( tok.nextToken() );
+// groupId:artifactId:goal or pluginPrefix:version:goal (since 
Maven 3.9)
+
+String firstToken = tok.nextToken();
+// groupId or pluginPrefix? heuristics: groupId contains . but not 
pluginPrefix

Review Comment:
   yes, but what?





> add support for "mvn pluginPrefix:version:goal"
> ---
>
> Key: MNG-7353
> URL: https://issues.apache.org/jira/browse/MNG-7353
> Project: Maven
>  Issue Type: New Feature
>  Components: Command Line
>Affects Versions: 3.8.4
>Reporter: Herve Boutemy
>Priority: Major
> Fix For: 4.0.x-candidate
>
>
> currently, we can run a simplified 2 parts form {noformat}mvn 
> wrapper:wrapper{noformat}
> but if we want to specify a version, we need to switch to full 4 prts form:
> {noformat}mvn 
> org.apache.maven.plugins:maven-wrapper-plugin:3.1.0-SNAPSHOT:wrapper{noformat}
> it would be nice to be able to write 3 parts simplified {noformat}mvn 
> wrapper:3.1.0-SNAPSHOT:wrapper{noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [maven] hboutemy commented on a diff in pull request #757: [MNG-7353] support CLI "mvn pluginPrefix:version:goal"

2022-07-09 Thread GitBox


hboutemy commented on code in PR #757:
URL: https://github.com/apache/maven/pull/757#discussion_r917241749


##
maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoDescriptorCreator.java:
##
@@ -176,18 +176,31 @@ public MojoDescriptor getMojoDescriptor( String task, 
MavenSession session, Mave
 }
 else if ( numTokens == 3 )
 {
-// We have everything that we need except the version
-//
-// 
org.apache.maven.plugins:maven-remote-resources-plugin:???:process
-//
-// groupId
-// artifactId
-// ???
-// goal
-//
-plugin = new Plugin();
-plugin.setGroupId( tok.nextToken() );
-plugin.setArtifactId( tok.nextToken() );
+// groupId:artifactId:goal or pluginPrefix:version:goal (since 
Maven 3.9)
+
+String firstToken = tok.nextToken();
+// groupId or pluginPrefix? heuristics: groupId contains . but not 
pluginPrefix
+if ( firstToken.contains( "." ) )

Review Comment:
   and do you really think that we'll have any single word groupId in the 
future, given Maven Central explicitely asks for DNS matching?
   heuristics is heuristics: in theory there could be edge cases, but in real 
world, it simply works



-- 
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-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Commented] (MNG-7353) add support for "mvn pluginPrefix:version:goal"

2022-07-09 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-7353:
-

hboutemy commented on code in PR #757:
URL: https://github.com/apache/maven/pull/757#discussion_r917241749


##
maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoDescriptorCreator.java:
##
@@ -176,18 +176,31 @@ public MojoDescriptor getMojoDescriptor( String task, 
MavenSession session, Mave
 }
 else if ( numTokens == 3 )
 {
-// We have everything that we need except the version
-//
-// 
org.apache.maven.plugins:maven-remote-resources-plugin:???:process
-//
-// groupId
-// artifactId
-// ???
-// goal
-//
-plugin = new Plugin();
-plugin.setGroupId( tok.nextToken() );
-plugin.setArtifactId( tok.nextToken() );
+// groupId:artifactId:goal or pluginPrefix:version:goal (since 
Maven 3.9)
+
+String firstToken = tok.nextToken();
+// groupId or pluginPrefix? heuristics: groupId contains . but not 
pluginPrefix
+if ( firstToken.contains( "." ) )

Review Comment:
   and do you really think that we'll have any single word groupId in the 
future, given Maven Central explicitely asks for DNS matching?
   heuristics is heuristics: in theory there could be edge cases, but in real 
world, it simply works





> add support for "mvn pluginPrefix:version:goal"
> ---
>
> Key: MNG-7353
> URL: https://issues.apache.org/jira/browse/MNG-7353
> Project: Maven
>  Issue Type: New Feature
>  Components: Command Line
>Affects Versions: 3.8.4
>Reporter: Herve Boutemy
>Priority: Major
> Fix For: 4.0.x-candidate
>
>
> currently, we can run a simplified 2 parts form {noformat}mvn 
> wrapper:wrapper{noformat}
> but if we want to specify a version, we need to switch to full 4 prts form:
> {noformat}mvn 
> org.apache.maven.plugins:maven-wrapper-plugin:3.1.0-SNAPSHOT:wrapper{noformat}
> it would be nice to be able to write 3 parts simplified {noformat}mvn 
> wrapper:3.1.0-SNAPSHOT:wrapper{noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [maven] michael-o commented on a diff in pull request #757: [MNG-7353] support CLI "mvn pluginPrefix:version:goal"

2022-07-09 Thread GitBox


michael-o commented on code in PR #757:
URL: https://github.com/apache/maven/pull/757#discussion_r917248360


##
maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoDescriptorCreator.java:
##
@@ -176,18 +176,31 @@ public MojoDescriptor getMojoDescriptor( String task, 
MavenSession session, Mave
 }
 else if ( numTokens == 3 )
 {
-// We have everything that we need except the version
-//
-// 
org.apache.maven.plugins:maven-remote-resources-plugin:???:process
-//
-// groupId
-// artifactId
-// ???
-// goal
-//
-plugin = new Plugin();
-plugin.setGroupId( tok.nextToken() );
-plugin.setArtifactId( tok.nextToken() );
+// groupId:artifactId:goal or pluginPrefix:version:goal (since 
Maven 3.9)
+
+String firstToken = tok.nextToken();
+// groupId or pluginPrefix? heuristics: groupId contains . but not 
pluginPrefix

Review Comment:
   It must be clear that this isn't a typo. That's why the symbol name and 
itself in parens.



-- 
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-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Commented] (MNG-7353) add support for "mvn pluginPrefix:version:goal"

2022-07-09 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-7353:
-

michael-o commented on code in PR #757:
URL: https://github.com/apache/maven/pull/757#discussion_r917248360


##
maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoDescriptorCreator.java:
##
@@ -176,18 +176,31 @@ public MojoDescriptor getMojoDescriptor( String task, 
MavenSession session, Mave
 }
 else if ( numTokens == 3 )
 {
-// We have everything that we need except the version
-//
-// 
org.apache.maven.plugins:maven-remote-resources-plugin:???:process
-//
-// groupId
-// artifactId
-// ???
-// goal
-//
-plugin = new Plugin();
-plugin.setGroupId( tok.nextToken() );
-plugin.setArtifactId( tok.nextToken() );
+// groupId:artifactId:goal or pluginPrefix:version:goal (since 
Maven 3.9)
+
+String firstToken = tok.nextToken();
+// groupId or pluginPrefix? heuristics: groupId contains . but not 
pluginPrefix

Review Comment:
   It must be clear that this isn't a typo. That's why the symbol name and 
itself in parens.





> add support for "mvn pluginPrefix:version:goal"
> ---
>
> Key: MNG-7353
> URL: https://issues.apache.org/jira/browse/MNG-7353
> Project: Maven
>  Issue Type: New Feature
>  Components: Command Line
>Affects Versions: 3.8.4
>Reporter: Herve Boutemy
>Priority: Major
> Fix For: 4.0.x-candidate
>
>
> currently, we can run a simplified 2 parts form {noformat}mvn 
> wrapper:wrapper{noformat}
> but if we want to specify a version, we need to switch to full 4 prts form:
> {noformat}mvn 
> org.apache.maven.plugins:maven-wrapper-plugin:3.1.0-SNAPSHOT:wrapper{noformat}
> it would be nice to be able to write 3 parts simplified {noformat}mvn 
> wrapper:3.1.0-SNAPSHOT:wrapper{noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [maven] hboutemy commented on a diff in pull request #757: [MNG-7353] support CLI "mvn pluginPrefix:version:goal"

2022-07-09 Thread GitBox


hboutemy commented on code in PR #757:
URL: https://github.com/apache/maven/pull/757#discussion_r917251268


##
maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoDescriptorCreator.java:
##
@@ -176,18 +176,31 @@ public MojoDescriptor getMojoDescriptor( String task, 
MavenSession session, Mave
 }
 else if ( numTokens == 3 )
 {
-// We have everything that we need except the version
-//
-// 
org.apache.maven.plugins:maven-remote-resources-plugin:???:process
-//
-// groupId
-// artifactId
-// ???
-// goal
-//
-plugin = new Plugin();
-plugin.setGroupId( tok.nextToken() );
-plugin.setArtifactId( tok.nextToken() );
+// groupId:artifactId:goal or pluginPrefix:version:goal (since 
Maven 3.9)
+
+String firstToken = tok.nextToken();
+// groupId or pluginPrefix? heuristics: groupId contains . but not 
pluginPrefix

Review Comment:
   I don't understand the sentence, then I can't transform it into any action, 
sorry



-- 
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-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Commented] (MNG-7353) add support for "mvn pluginPrefix:version:goal"

2022-07-09 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-7353:
-

hboutemy commented on code in PR #757:
URL: https://github.com/apache/maven/pull/757#discussion_r917251268


##
maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoDescriptorCreator.java:
##
@@ -176,18 +176,31 @@ public MojoDescriptor getMojoDescriptor( String task, 
MavenSession session, Mave
 }
 else if ( numTokens == 3 )
 {
-// We have everything that we need except the version
-//
-// 
org.apache.maven.plugins:maven-remote-resources-plugin:???:process
-//
-// groupId
-// artifactId
-// ???
-// goal
-//
-plugin = new Plugin();
-plugin.setGroupId( tok.nextToken() );
-plugin.setArtifactId( tok.nextToken() );
+// groupId:artifactId:goal or pluginPrefix:version:goal (since 
Maven 3.9)
+
+String firstToken = tok.nextToken();
+// groupId or pluginPrefix? heuristics: groupId contains . but not 
pluginPrefix

Review Comment:
   I don't understand the sentence, then I can't transform it into any action, 
sorry





> add support for "mvn pluginPrefix:version:goal"
> ---
>
> Key: MNG-7353
> URL: https://issues.apache.org/jira/browse/MNG-7353
> Project: Maven
>  Issue Type: New Feature
>  Components: Command Line
>Affects Versions: 3.8.4
>Reporter: Herve Boutemy
>Priority: Major
> Fix For: 4.0.x-candidate
>
>
> currently, we can run a simplified 2 parts form {noformat}mvn 
> wrapper:wrapper{noformat}
> but if we want to specify a version, we need to switch to full 4 prts form:
> {noformat}mvn 
> org.apache.maven.plugins:maven-wrapper-plugin:3.1.0-SNAPSHOT:wrapper{noformat}
> it would be nice to be able to write 3 parts simplified {noformat}mvn 
> wrapper:3.1.0-SNAPSHOT:wrapper{noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (MPIR-407) Provide a way to map license names

2022-07-09 Thread Herve Boutemy (Jira)


 [ 
https://issues.apache.org/jira/browse/MPIR-407?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Herve Boutemy updated MPIR-407:
---
Description: 
add {{licenseMappings}} parameter:
{code:xml}
 
maven-project-info-reports-plugin

  

  
The Apache Software License, Version 2.0
Apache Public License 2.0
  
  Apache License, Version 2.0

  

  
{code}

> Provide a way to map license names
> --
>
> Key: MPIR-407
> URL: https://issues.apache.org/jira/browse/MPIR-407
> Project: Maven Project Info Reports Plugin
>  Issue Type: New Feature
>Reporter: Guillaume Nodet
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.3.1
>
>
> add {{licenseMappings}} parameter:
> {code:xml}
>  
> maven-project-info-reports-plugin
> 
>   
> 
>   
> The Apache Software License, Version 2.0
> Apache Public License 2.0
>   
>   Apache License, Version 2.0
> 
>   
> 
>   
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [maven-install-plugin] slawekjaranowski commented on a diff in pull request #32: Streamline the plugin

2022-07-09 Thread GitBox


slawekjaranowski commented on code in PR #32:
URL: 
https://github.com/apache/maven-install-plugin/pull/32#discussion_r917258353


##
src/main/java/org/apache/maven/plugins/install/InstallMojo.java:
##
@@ -153,31 +163,90 @@ private boolean allProjectsMarked()
 return true;
 }
 
-private void installProject( MavenProject pir )
-throws MojoFailureException, MojoExecutionException
+private void installProject( MavenProject project ) throws 
MojoExecutionException, MojoFailureException
 {
 try
 {
-installer.install( session.getProjectBuildingRequest(), new 
ProjectInstallerRequest().setProject( pir ) );
+repositorySystem.install( session.getRepositorySession(), 
processProject( project ) );
 }
-catch ( IOException e )
+catch ( IllegalArgumentException e )
 {
-throw new MojoFailureException( "IOException", e );
+throw new MojoFailureException( e.getMessage(), e );

Review Comment:
   why not `MojoExecutionException`
   
   I must find a discussion, but as I remember `MojoFailureException` should 
not be 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-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [maven-install-plugin] slawekjaranowski commented on a diff in pull request #32: Streamline the plugin

2022-07-09 Thread GitBox


slawekjaranowski commented on code in PR #32:
URL: 
https://github.com/apache/maven-install-plugin/pull/32#discussion_r917258610


##
src/main/java/org/apache/maven/plugins/install/InstallFileMojo.java:
##
@@ -158,48 +165,36 @@
 @Parameter( property = "localRepositoryPath" )
 private File localRepositoryPath;
 
-/**
- * Used for attaching the artifacts to install to the project.
- */
-@Component
-private MavenProjectHelper projectHelper;
-
-/**
- * Used for creating the project to which the artifacts to install will be 
attached.
- */
-@Component
-private ProjectBuilder projectBuilder;
-
-/**
- * Used to install the project created.
- */
-@Component
-private ProjectInstaller installer;
-
-/**
- * @see org.apache.maven.plugin.Mojo#execute()
- */
+@Override
 public void execute()
 throws MojoExecutionException, MojoFailureException
 {
-
 if ( !file.exists() )
 {
 String message = "The specified file '" + file.getPath() + "' does 
not exist";
 getLog().error( message );
 throw new MojoFailureException( message );
 }
 
-ProjectBuildingRequest buildingRequest = 
session.getProjectBuildingRequest();
-
-// 
--
-// Override the default localRepository variable
-// 
--
+RepositorySystemSession repositorySystemSession = 
session.getRepositorySession();
 if ( localRepositoryPath != null )
 {
-buildingRequest = repositoryManager.setLocalRepositoryBasedir( 
buildingRequest, localRepositoryPath );
-
-getLog().debug( "localRepoPath: " + 
repositoryManager.getLocalRepositoryBasedir( buildingRequest ) );
+// "clone" repository session and replace localRepository
+DefaultRepositorySystemSession newSession = new 
DefaultRepositorySystemSession(
+session.getRepositorySession() );
+// Clear cache, since we're using a new local repository
+newSession.setCache( new DefaultRepositoryCache() );
+// keep same repositoryType
+String contentType = 
newSession.getLocalRepository().getContentType();
+if ( "enhanced".equals( contentType ) )
+{
+contentType = "default";
+}

Review Comment:
   in comments `keep same repositoryType` but change from `enhanced` to 
`default`



-- 
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-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [maven] varunsh-coder commented on pull request #745: ci: Add GitHub token permissions for workflows

2022-07-09 Thread GitBox


varunsh-coder commented on PR #745:
URL: https://github.com/apache/maven/pull/745#issuecomment-1179551608

   Please let me know if there is anything pending on my side for this PR?


-- 
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-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [maven] hboutemy commented on a diff in pull request #757: [MNG-7353] support CLI "mvn pluginPrefix:version:goal"

2022-07-09 Thread GitBox


hboutemy commented on code in PR #757:
URL: https://github.com/apache/maven/pull/757#discussion_r917273518


##
maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoDescriptorCreator.java:
##
@@ -176,18 +176,31 @@ public MojoDescriptor getMojoDescriptor( String task, 
MavenSession session, Mave
 }
 else if ( numTokens == 3 )
 {
-// We have everything that we need except the version
-//
-// 
org.apache.maven.plugins:maven-remote-resources-plugin:???:process
-//
-// groupId
-// artifactId
-// ???
-// goal
-//
-plugin = new Plugin();
-plugin.setGroupId( tok.nextToken() );
-plugin.setArtifactId( tok.nextToken() );
+// groupId:artifactId:goal or pluginPrefix:version:goal (since 
Maven 3.9)
+
+String firstToken = tok.nextToken();
+// groupId or pluginPrefix? heuristics: groupId contains . but not 
pluginPrefix

Review Comment:
   oh, I now understood...
   this is the type of fixes where adding a commit is easier than commenting...



-- 
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-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Commented] (MNG-7353) add support for "mvn pluginPrefix:version:goal"

2022-07-09 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-7353:
-

hboutemy commented on code in PR #757:
URL: https://github.com/apache/maven/pull/757#discussion_r917273518


##
maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoDescriptorCreator.java:
##
@@ -176,18 +176,31 @@ public MojoDescriptor getMojoDescriptor( String task, 
MavenSession session, Mave
 }
 else if ( numTokens == 3 )
 {
-// We have everything that we need except the version
-//
-// 
org.apache.maven.plugins:maven-remote-resources-plugin:???:process
-//
-// groupId
-// artifactId
-// ???
-// goal
-//
-plugin = new Plugin();
-plugin.setGroupId( tok.nextToken() );
-plugin.setArtifactId( tok.nextToken() );
+// groupId:artifactId:goal or pluginPrefix:version:goal (since 
Maven 3.9)
+
+String firstToken = tok.nextToken();
+// groupId or pluginPrefix? heuristics: groupId contains . but not 
pluginPrefix

Review Comment:
   oh, I now understood...
   this is the type of fixes where adding a commit is easier than commenting...





> add support for "mvn pluginPrefix:version:goal"
> ---
>
> Key: MNG-7353
> URL: https://issues.apache.org/jira/browse/MNG-7353
> Project: Maven
>  Issue Type: New Feature
>  Components: Command Line
>Affects Versions: 3.8.4
>Reporter: Herve Boutemy
>Priority: Major
> Fix For: 4.0.x-candidate
>
>
> currently, we can run a simplified 2 parts form {noformat}mvn 
> wrapper:wrapper{noformat}
> but if we want to specify a version, we need to switch to full 4 prts form:
> {noformat}mvn 
> org.apache.maven.plugins:maven-wrapper-plugin:3.1.0-SNAPSHOT:wrapper{noformat}
> it would be nice to be able to write 3 parts simplified {noformat}mvn 
> wrapper:3.1.0-SNAPSHOT:wrapper{noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [maven-surefire] sman-81 closed pull request #456: [SUREFIRE-1992] Limit error/failure messages to first line but do not abbreviate

2022-07-09 Thread GitBox


sman-81 closed pull request #456: [SUREFIRE-1992] Limit error/failure messages 
to first line but do not abbreviate
URL: https://github.com/apache/maven-surefire/pull/456


-- 
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-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [maven-surefire] sman-81 closed pull request #457: [SUREFIRE-1992] Do not output class name on error/failure for certain exceptions

2022-07-09 Thread GitBox


sman-81 closed pull request #457: [SUREFIRE-1992] Do not output class name on 
error/failure for certain exceptions
URL: https://github.com/apache/maven-surefire/pull/457


-- 
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-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Created] (SUREFIRE-2109) User cannot write temporary file to surefire/ temp directory

2022-07-09 Thread Markus Spann (Jira)
Markus Spann created SUREFIRE-2109:
--

 Summary: User cannot write temporary file to surefire/ temp 
directory
 Key: SUREFIRE-2109
 URL: https://issues.apache.org/jira/browse/SUREFIRE-2109
 Project: Maven Surefire
  Issue Type: Bug
  Components: Maven Surefire Plugin
Affects Versions: 3.0.0-M7
Reporter: Markus Spann


An improved management of temporary files was introduced in [SUREFIRE-2086], 
through which temporary files are all created under a {{surefire/}} directory 
under the system's directory of temporary files.

The directory is created with credentials of the logged-on user and remains 
after a test run.
In the (rare) case that another user performs Surefire tests on the same 
Linux/Unix machine, before any reboot (upon which {{tmp/}} is emptied), tests 
will fail due to permissions on the existing {{surefire/}} directory.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MNG-7353) add support for "mvn pluginPrefix:version:goal"

2022-07-09 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-7353:
-

michael-o commented on code in PR #757:
URL: https://github.com/apache/maven/pull/757#discussion_r917284006


##
maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoDescriptorCreator.java:
##
@@ -176,18 +176,31 @@ public MojoDescriptor getMojoDescriptor( String task, 
MavenSession session, Mave
 }
 else if ( numTokens == 3 )
 {
-// We have everything that we need except the version
-//
-// 
org.apache.maven.plugins:maven-remote-resources-plugin:???:process
-//
-// groupId
-// artifactId
-// ???
-// goal
-//
-plugin = new Plugin();
-plugin.setGroupId( tok.nextToken() );
-plugin.setArtifactId( tok.nextToken() );
+// groupId:artifactId:goal or pluginPrefix:version:goal (since 
Maven 3.9)
+
+String firstToken = tok.nextToken();
+// groupId or pluginPrefix? heuristics: groupId contains . but not 
pluginPrefix

Review Comment:
   Good





> add support for "mvn pluginPrefix:version:goal"
> ---
>
> Key: MNG-7353
> URL: https://issues.apache.org/jira/browse/MNG-7353
> Project: Maven
>  Issue Type: New Feature
>  Components: Command Line
>Affects Versions: 3.8.4
>Reporter: Herve Boutemy
>Priority: Major
> Fix For: 4.0.x-candidate
>
>
> currently, we can run a simplified 2 parts form {noformat}mvn 
> wrapper:wrapper{noformat}
> but if we want to specify a version, we need to switch to full 4 prts form:
> {noformat}mvn 
> org.apache.maven.plugins:maven-wrapper-plugin:3.1.0-SNAPSHOT:wrapper{noformat}
> it would be nice to be able to write 3 parts simplified {noformat}mvn 
> wrapper:3.1.0-SNAPSHOT:wrapper{noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [maven] michael-o commented on a diff in pull request #757: [MNG-7353] support CLI "mvn pluginPrefix:version:goal"

2022-07-09 Thread GitBox


michael-o commented on code in PR #757:
URL: https://github.com/apache/maven/pull/757#discussion_r917284006


##
maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoDescriptorCreator.java:
##
@@ -176,18 +176,31 @@ public MojoDescriptor getMojoDescriptor( String task, 
MavenSession session, Mave
 }
 else if ( numTokens == 3 )
 {
-// We have everything that we need except the version
-//
-// 
org.apache.maven.plugins:maven-remote-resources-plugin:???:process
-//
-// groupId
-// artifactId
-// ???
-// goal
-//
-plugin = new Plugin();
-plugin.setGroupId( tok.nextToken() );
-plugin.setArtifactId( tok.nextToken() );
+// groupId:artifactId:goal or pluginPrefix:version:goal (since 
Maven 3.9)
+
+String firstToken = tok.nextToken();
+// groupId or pluginPrefix? heuristics: groupId contains . but not 
pluginPrefix

Review Comment:
   Good



-- 
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-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [maven] slawekjaranowski commented on a diff in pull request #703: New API with immutable model

2022-07-09 Thread GitBox


slawekjaranowski commented on code in PR #703:
URL: https://github.com/apache/maven/pull/703#discussion_r917310837


##
api/maven-api-core/src/main/java/org/apache/maven/api/plugin/Mojo.java:
##
@@ -0,0 +1,44 @@
+package org.apache.maven.api.plugin;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.api.annotations.Consumer;
+import org.apache.maven.api.annotations.Experimental;
+
+/**
+ * This interface forms the contract required for Mojos to 
interact with the Maven
+ * infrastructure.
+ * It features an execute() method, which triggers the Mojo's 
build-process behavior, and can throw
+ * a MojoException if error conditions occur.
+ */
+@Experimental
+@FunctionalInterface @Consumer
+public interface Mojo
+{
+/**
+ * Perform whatever build-process behavior this Mojo 
implements.
+ * This is the main trigger for the Mojo inside the 
Maven system, and allows
+ * the Mojo to communicate errors.
+ *
+ * @throws MojoException if a problem occurs.
+ */
+void execute();

Review Comment:
   missing throws declaration for method? or intentional?



-- 
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-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [maven-apache-parent] hboutemy commented on pull request #92: [MPOM-337] load plugins containing lifecycle mappings with extensions

2022-07-09 Thread GitBox


hboutemy commented on PR #92:
URL: 
https://github.com/apache/maven-apache-parent/pull/92#issuecomment-1179610376

   -1
   having every plugin as extension just bloats and takes risk in the Maven 
core classloader


-- 
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-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [maven] slawekjaranowski commented on a diff in pull request #703: New API with immutable model

2022-07-09 Thread GitBox


slawekjaranowski commented on code in PR #703:
URL: https://github.com/apache/maven/pull/703#discussion_r917311069


##
api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/Component.java:
##
@@ -0,0 +1,57 @@
+package org.apache.maven.api.plugin.annotations;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.maven.api.annotations.Experimental;
+
+/**
+ * Used to configure injection of Plexus components by
+ * 
+ * MavenPluginManager.getConfiguredMojo(...).
+ *
+ * @author Olivier Lamy
+ * @since 3.0
+ */
+@Experimental
+@Documented
+@Retention( RetentionPolicy.CLASS )
+@Target( { ElementType.FIELD } )
+@Inherited
+public @interface Component

Review Comment:
   What do you think to allow on constructor and/or method to allow inject 
components?



-- 
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-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [maven] slawekjaranowski commented on a diff in pull request #703: New API with immutable model

2022-07-09 Thread GitBox


slawekjaranowski commented on code in PR #703:
URL: https://github.com/apache/maven/pull/703#discussion_r917312476


##
api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/Mojo.java:
##
@@ -0,0 +1,98 @@
+package org.apache.maven.api.plugin.annotations;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.maven.api.annotations.Experimental;
+
+/**
+ * This annotation will mark your class as a Mojo (ie. goal in a Maven plugin).
+ *
+ * @author Olivier Lamy
+ * @since 3.0
+ */
+@Experimental
+@Documented
+@Retention( RetentionPolicy.CLASS )
+@Target( ElementType.TYPE )
+@Inherited
+public @interface Mojo
+{
+/**
+ * goal name (required).
+ * @return the goal name
+ */
+String name();
+
+/**
+ * default phase to bind your mojo.
+ * @return the default phase
+ */
+LifecyclePhase defaultPhase() default LifecyclePhase.NONE;
+
+/**
+ * the required dependency resolution scope.
+ * @return the required dependency resolution scope
+ */
+ResolutionScope requiresDependencyResolution() default 
ResolutionScope.NONE;
+
+/**
+ * the required dependency collection scope.
+ * @return the required dependency collection scope 
+ */
+ResolutionScope requiresDependencyCollection() default 
ResolutionScope.NONE;
+
+/**
+ * your Mojo instantiation strategy. (Only per-lookup and 
singleton are supported)
+ * @return the instantiation strategy
+ */
+InstantiationStrategy instantiationStrategy() default 
InstantiationStrategy.PER_LOOKUP;
+
+/**
+ * does your mojo requires a project to be executed?
+ * @return requires a project
+ */
+boolean requiresProject() default true;
+
+/**
+ * if the Mojo uses the Maven project and its child modules.
+ * @return uses the Maven project and its child modules
+ */
+boolean aggregator() default false;
+
+/**
+ * does this Mojo need to be online to be executed?
+ * @return need to be online
+ */
+boolean requiresOnline() default false;
+
+/**
+ * own configurator class.
+ * @return own configurator class
+ */
+String configurator() default "";

Review Comment:
   It is rather bean name of configuration component.



-- 
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-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [maven] slawekjaranowski commented on a diff in pull request #703: New API with immutable model

2022-07-09 Thread GitBox


slawekjaranowski commented on code in PR #703:
URL: https://github.com/apache/maven/pull/703#discussion_r917312767


##
api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/Parameter.java:
##
@@ -0,0 +1,95 @@
+package org.apache.maven.api.plugin.annotations;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.maven.api.annotations.Experimental;
+
+/**
+ * Used to configure your Mojo parameters to be injected by
+ * 
+ * MavenPluginManager.getConfiguredMojo(...).
+ * 
+ * Beans injected into Mojo parameters are prepared by https://www.eclipse.org/sisu/";>Sisu JSR330-based
+ * container: this annotation is only effective on fields of the Mojo class 
itself, nested bean injection
+ * requires Sisu or JSR330 annotations.
+ *
+ * @author Olivier Lamy
+ * @since 3.0
+ */
+@Experimental
+@Documented
+@Retention( RetentionPolicy.CLASS )
+@Target( { ElementType.FIELD } )
+@Inherited
+public @interface Parameter

Review Comment:
   I would allow on method levels also.



-- 
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-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [maven] gnodet commented on a diff in pull request #703: New API with immutable model

2022-07-09 Thread GitBox


gnodet commented on code in PR #703:
URL: https://github.com/apache/maven/pull/703#discussion_r917315424


##
api/maven-api-core/src/main/java/org/apache/maven/api/plugin/Mojo.java:
##
@@ -0,0 +1,44 @@
+package org.apache.maven.api.plugin;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.api.annotations.Consumer;
+import org.apache.maven.api.annotations.Experimental;
+
+/**
+ * This interface forms the contract required for Mojos to 
interact with the Maven
+ * infrastructure.
+ * It features an execute() method, which triggers the Mojo's 
build-process behavior, and can throw
+ * a MojoException if error conditions occur.
+ */
+@Experimental
+@FunctionalInterface @Consumer
+public interface Mojo
+{
+/**
+ * Perform whatever build-process behavior this Mojo 
implements.
+ * This is the main trigger for the Mojo inside the 
Maven system, and allows
+ * the Mojo to communicate errors.
+ *
+ * @throws MojoException if a problem occurs.
+ */
+void execute();

Review Comment:
   The `MojoException` is an unchecked exception, so no need to add a `throws` 
declaration.



-- 
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-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [maven] gnodet commented on a diff in pull request #703: New API with immutable model

2022-07-09 Thread GitBox


gnodet commented on code in PR #703:
URL: https://github.com/apache/maven/pull/703#discussion_r917316576


##
api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/Component.java:
##
@@ -0,0 +1,57 @@
+package org.apache.maven.api.plugin.annotations;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.maven.api.annotations.Experimental;
+
+/**
+ * Used to configure injection of Plexus components by
+ * 
+ * MavenPluginManager.getConfiguredMojo(...).
+ *
+ * @author Olivier Lamy
+ * @since 3.0
+ */
+@Experimental
+@Documented
+@Retention( RetentionPolicy.CLASS )
+@Target( { ElementType.FIELD } )
+@Inherited
+public @interface Component

Review Comment:
   This is handled by sisu/plexus container, so if this type of injection is 
supported, we should definitely change 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-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [maven] gnodet commented on a diff in pull request #703: New API with immutable model

2022-07-09 Thread GitBox


gnodet commented on code in PR #703:
URL: https://github.com/apache/maven/pull/703#discussion_r917316633


##
api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/Parameter.java:
##
@@ -0,0 +1,95 @@
+package org.apache.maven.api.plugin.annotations;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.maven.api.annotations.Experimental;
+
+/**
+ * Used to configure your Mojo parameters to be injected by
+ * 
+ * MavenPluginManager.getConfiguredMojo(...).
+ * 
+ * Beans injected into Mojo parameters are prepared by https://www.eclipse.org/sisu/";>Sisu JSR330-based
+ * container: this annotation is only effective on fields of the Mojo class 
itself, nested bean injection
+ * requires Sisu or JSR330 annotations.
+ *
+ * @author Olivier Lamy
+ * @since 3.0
+ */
+@Experimental
+@Documented
+@Retention( RetentionPolicy.CLASS )
+@Target( { ElementType.FIELD } )
+@Inherited
+public @interface Parameter

Review Comment:
   Agreed.



-- 
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-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [maven] michael-o commented on a diff in pull request #703: New API with immutable model

2022-07-09 Thread GitBox


michael-o commented on code in PR #703:
URL: https://github.com/apache/maven/pull/703#discussion_r917345368


##
api/maven-api-core/src/main/java/org/apache/maven/api/plugin/Mojo.java:
##
@@ -0,0 +1,44 @@
+package org.apache.maven.api.plugin;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.api.annotations.Consumer;
+import org.apache.maven.api.annotations.Experimental;
+
+/**
+ * This interface forms the contract required for Mojos to 
interact with the Maven
+ * infrastructure.
+ * It features an execute() method, which triggers the Mojo's 
build-process behavior, and can throw
+ * a MojoException if error conditions occur.
+ */
+@Experimental
+@FunctionalInterface @Consumer
+public interface Mojo
+{
+/**
+ * Perform whatever build-process behavior this Mojo 
implements.
+ * This is the main trigger for the Mojo inside the 
Maven system, and allows
+ * the Mojo to communicate errors.
+ *
+ * @throws MojoException if a problem occurs.
+ */
+void execute();

Review Comment:
   Correct,  unchecked go to Javadoc only.



-- 
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-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org