[jira] [Commented] (MSHADE-428) Typo causes mysterious NPE in build

2024-05-28 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MSHADE-428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17850023#comment-17850023
 ] 

ASF GitHub Bot commented on MSHADE-428:
---

cstamas merged PR #229:
URL: https://github.com/apache/maven-shade-plugin/pull/229




> Typo causes mysterious NPE in build
> ---
>
> Key: MSHADE-428
> URL: https://issues.apache.org/jira/browse/MSHADE-428
> Project: Maven Shade Plugin
>  Issue Type: Bug
>Reporter: Tamas Cservenak
>Priority: Major
> Fix For: 3.6.0
>
>
> All versions are affected. 
> Has this config for plugin:
> {noformat}
>   
>  implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer"
>  />
>  implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"
>  />
>  implementatioh="org.apache.maven.plugins.shade.resource.SisuIndexResourceTransformer"
>  />
>  implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
>   
> 
> org.apache.maven.index.cli.NexusIndexerCli
> true
>   
> 
>{noformat}
> And build was failing with 
> {noformat}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-shade-plugin:3.4.0:shade (default) on project 
> indexer-cli: Error creating shaded jar: Problem shading JAR 
> /home/cstamas/Worx/apache-maven/maven-indexer/indexer-cli/target/indexer-cli-7.0.0-SNAPSHOT.jar
>  entry META-INF/sisu/javax.inject.Named: java.lang.NullPointerException -> 
> [Help 1] {noformat}
> Cause: there is a typo in config, notive {{implementatioH}} for sisu 
> transformer.
> This caused that list of transformes had a null element, and seems there is 
> no validation that transformers list may not have null element. NPE happened 
> when default shared method {{private boolean resourceTransformed(}} stepped 
> onto null element and had {{null.canTransformResource( name )}}.



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


[jira] [Commented] (MPLUGIN-526) Clean up dependencies reported by dependencies:analyze

2024-05-28 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MPLUGIN-526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17850013#comment-17850013
 ] 

ASF GitHub Bot commented on MPLUGIN-526:


michael-o commented on PR #287:
URL: 
https://github.com/apache/maven-plugin-tools/pull/287#issuecomment-2135059349

   > > > @michael-o @gnodet should we cherry-pick to 3.x branch?
   > > 
   > > 
   > > If the 3.x branch is active, we should, but I should that @gnodet would 
reset 3.x as as soon as he will bump master to 4.0.0.
   > 
   > I've reset the 3.x branch to the current master (just after the release).
   
   Perfect, thanks. Let's wait until the vote has passed and then we can 
continue with your open PRs.




> Clean up dependencies reported by dependencies:analyze
> --
>
> Key: MPLUGIN-526
> URL: https://issues.apache.org/jira/browse/MPLUGIN-526
> Project: Maven Plugin Tools
>  Issue Type: Task
>Affects Versions: 3.13.0
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.13.1
>
>
> A lot of output from {{dependencies:analyze}}. Let's clean up before we split.



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


[jira] [Commented] (MPLUGIN-526) Clean up dependencies reported by dependencies:analyze

2024-05-28 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MPLUGIN-526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17850008#comment-17850008
 ] 

ASF GitHub Bot commented on MPLUGIN-526:


gnodet commented on PR #287:
URL: 
https://github.com/apache/maven-plugin-tools/pull/287#issuecomment-2135049608

   > > @michael-o @gnodet should we cherry-pick to 3.x branch?
   > 
   > If the 3.x branch is active, we should, but I should that @gnodet would 
reset 3.x as as soon as he will bump master to 4.0.0.
   
   I've reset the 3.x branch to the current master (just after the release).




> Clean up dependencies reported by dependencies:analyze
> --
>
> Key: MPLUGIN-526
> URL: https://issues.apache.org/jira/browse/MPLUGIN-526
> Project: Maven Plugin Tools
>  Issue Type: Task
>Affects Versions: 3.13.0
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.13.1
>
>
> A lot of output from {{dependencies:analyze}}. Let's clean up before we split.



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


[jira] [Commented] (MSHADE-428) Typo causes mysterious NPE in build

2024-05-28 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MSHADE-428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849995#comment-17849995
 ] 

ASF GitHub Bot commented on MSHADE-428:
---

cstamas opened a new pull request, #229:
URL: https://github.com/apache/maven-shade-plugin/pull/229

   As Plexus will silently add it as in issue.
   
   ---
   
   https://issues.apache.org/jira/browse/MSHADE-428




> Typo causes mysterious NPE in build
> ---
>
> Key: MSHADE-428
> URL: https://issues.apache.org/jira/browse/MSHADE-428
> Project: Maven Shade Plugin
>  Issue Type: Bug
>Reporter: Tamas Cservenak
>Priority: Major
> Fix For: 3.6.0
>
>
> All versions are affected. 
> Has this config for plugin:
> {noformat}
>   
>  implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer"
>  />
>  implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"
>  />
>  implementatioh="org.apache.maven.plugins.shade.resource.SisuIndexResourceTransformer"
>  />
>  implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
>   
> 
> org.apache.maven.index.cli.NexusIndexerCli
> true
>   
> 
>{noformat}
> And build was failing with 
> {noformat}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-shade-plugin:3.4.0:shade (default) on project 
> indexer-cli: Error creating shaded jar: Problem shading JAR 
> /home/cstamas/Worx/apache-maven/maven-indexer/indexer-cli/target/indexer-cli-7.0.0-SNAPSHOT.jar
>  entry META-INF/sisu/javax.inject.Named: java.lang.NullPointerException -> 
> [Help 1] {noformat}
> Cause: there is a typo in config, notive {{implementatioH}} for sisu 
> transformer.
> This caused that list of transformes had a null element, and seems there is 
> no validation that transformers list may not have null element. NPE happened 
> when default shared method {{private boolean resourceTransformed(}} stepped 
> onto null element and had {{null.canTransformResource( name )}}.



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


[jira] [Commented] (MSHADE-478) Add ability to inject extra artifacts into shaded output

2024-05-28 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MSHADE-478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849984#comment-17849984
 ] 

ASF GitHub Bot commented on MSHADE-478:
---

cstamas merged PR #228:
URL: https://github.com/apache/maven-shade-plugin/pull/228




> Add ability to inject extra artifacts into shaded output
> 
>
> Key: MSHADE-478
> URL: https://issues.apache.org/jira/browse/MSHADE-478
> Project: Maven Shade Plugin
>  Issue Type: New Feature
>Reporter: Tamas Cservenak
>Assignee: Tamas Cservenak
>Priority: Major
> Fix For: 3.6.0
>
>
> Use case: Let's assume your main artifact is a "plugin" of some sort. 
> Moreover, assume that the "host" of your plugin uses SLF4J API for logging, 
> hence the module have {{slf4j-api}} declared as compile dependency (or 
> provided, does not matter). Still, you want to create a self contained JAR 
> out of same module, hence shade it. But the problem is given: how would 
> standalone JAR log?
> You should be able to "inject" extra JARs, but at the same time to have all 
> the "benefits" of all resource transformers as well (ie. your "extra 
> artifact" may have Sisu components, or Service providers).
> The {{extrajars}} IT showcase this very scenario.



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


[jira] [Commented] (MPLUGIN-526) Clean up dependencies reported by dependencies:analyze

2024-05-28 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MPLUGIN-526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849979#comment-17849979
 ] 

ASF GitHub Bot commented on MPLUGIN-526:


michael-o commented on PR #287:
URL: 
https://github.com/apache/maven-plugin-tools/pull/287#issuecomment-2134922184

   > @michael-o @gnodet should we cherry-pick to 3.x branch?
   
   If the 3.x branch is active, we should, but I should that @gnodet would 
reset 3.x as as soon as he will bump master to 4.0.0.




> Clean up dependencies reported by dependencies:analyze
> --
>
> Key: MPLUGIN-526
> URL: https://issues.apache.org/jira/browse/MPLUGIN-526
> Project: Maven Plugin Tools
>  Issue Type: Task
>Affects Versions: 3.13.0
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.13.1
>
>
> A lot of output from {{dependencies:analyze}}. Let's clean up before we split.



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


[jira] [Commented] (MSHADE-478) Add ability to inject extra artifacts into shaded output

2024-05-28 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MSHADE-478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849965#comment-17849965
 ] 

ASF GitHub Bot commented on MSHADE-478:
---

slawekjaranowski commented on code in PR #228:
URL: 
https://github.com/apache/maven-shade-plugin/pull/228#discussion_r1616976316


##
src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java:
##
@@ -444,6 +474,17 @@ public void execute() throws MojoExecutionException {
 
 artifacts.add(project.getArtifact().getFile());
 
+if (extraJars != null && !extraJars.isEmpty()) {
+for (File extraJar : extraJars) {
+if (!Files.isRegularFile(extraJar.toPath())) {
+createErrorOutput();

Review Comment:
   ```java
   private void createErrorOutput() {
   getLog().error("The project main artifact does not exist. This could 
have the following");
   getLog().error("reasons:");
   
   ```





> Add ability to inject extra artifacts into shaded output
> 
>
> Key: MSHADE-478
> URL: https://issues.apache.org/jira/browse/MSHADE-478
> Project: Maven Shade Plugin
>  Issue Type: New Feature
>Reporter: Tamas Cservenak
>Assignee: Tamas Cservenak
>Priority: Major
> Fix For: 3.6.0
>
>
> Use case: Let's assume your main artifact is a "plugin" of some sort. 
> Moreover, assume that the "host" of your plugin uses SLF4J API for logging, 
> hence the module have {{slf4j-api}} declared as compile dependency (or 
> provided, does not matter). Still, you want to create a self contained JAR 
> out of same module, hence shade it. But the problem is given: how would 
> standalone JAR log?
> You should be able to "inject" extra JARs, but at the same time to have all 
> the "benefits" of all resource transformers as well (ie. your "extra 
> artifact" may have Sisu components, or Service providers).
> The {{extrajars}} IT showcase this very scenario.



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


[jira] [Commented] (MSHADE-478) Add ability to inject extra artifacts into shaded output

2024-05-28 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MSHADE-478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849962#comment-17849962
 ] 

ASF GitHub Bot commented on MSHADE-478:
---

slawekjaranowski commented on code in PR #228:
URL: 
https://github.com/apache/maven-shade-plugin/pull/228#discussion_r1616973202


##
src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java:
##
@@ -444,6 +474,17 @@ public void execute() throws MojoExecutionException {
 
 artifacts.add(project.getArtifact().getFile());
 
+if (extraJars != null && !extraJars.isEmpty()) {
+for (File extraJar : extraJars) {
+if (!Files.isRegularFile(extraJar.toPath())) {
+createErrorOutput();

Review Comment:
   Please check if this error message are correct here  





> Add ability to inject extra artifacts into shaded output
> 
>
> Key: MSHADE-478
> URL: https://issues.apache.org/jira/browse/MSHADE-478
> Project: Maven Shade Plugin
>  Issue Type: New Feature
>Reporter: Tamas Cservenak
>Assignee: Tamas Cservenak
>Priority: Major
> Fix For: 3.6.0
>
>
> Use case: Let's assume your main artifact is a "plugin" of some sort. 
> Moreover, assume that the "host" of your plugin uses SLF4J API for logging, 
> hence the module have {{slf4j-api}} declared as compile dependency (or 
> provided, does not matter). Still, you want to create a self contained JAR 
> out of same module, hence shade it. But the problem is given: how would 
> standalone JAR log?
> You should be able to "inject" extra JARs, but at the same time to have all 
> the "benefits" of all resource transformers as well (ie. your "extra 
> artifact" may have Sisu components, or Service providers).
> The {{extrajars}} IT showcase this very scenario.



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


[jira] [Commented] (MSHADE-478) Add ability to inject extra artifacts into shaded output

2024-05-28 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MSHADE-478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849955#comment-17849955
 ] 

ASF GitHub Bot commented on MSHADE-478:
---

cstamas commented on code in PR #228:
URL: 
https://github.com/apache/maven-shade-plugin/pull/228#discussion_r1616945401


##
src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java:
##
@@ -393,6 +392,36 @@ public class ShadeMojo extends AbstractMojo {
 @Parameter(defaultValue = "false")
 private boolean skip;
 
+/**
+ * Extra JAR files to infuse into shaded result.
+ * 
+ * One can add here "extra JARs", to be worked into the resulting shaded 
JAR. The listed JAR files must exist.
+ * Extra JARs will be processed in same way as main JAR (if any): applied 
relocation, resource transformers
+ * but not filtering.
+ * 
+ * Note: this feature should be used lightly, is not meant as ability to 
replace dependency hull! It is more
+ * just a feature to be able to slightly "differentiate" shaded JAR from 
main only.
+ *
+ * @since 3.6.0
+ */
+@Parameter
+private List extraJars;

Review Comment:
   pushed update



##
src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java:
##
@@ -393,6 +392,36 @@ public class ShadeMojo extends AbstractMojo {
 @Parameter(defaultValue = "false")
 private boolean skip;
 
+/**
+ * Extra JAR files to infuse into shaded result.
+ * 
+ * One can add here "extra JARs", to be worked into the resulting shaded 
JAR. The listed JAR files must exist.
+ * Extra JARs will be processed in same way as main JAR (if any): applied 
relocation, resource transformers
+ * but not filtering.
+ * 
+ * Note: this feature should be used lightly, is not meant as ability to 
replace dependency hull! It is more
+ * just a feature to be able to slightly "differentiate" shaded JAR from 
main only.
+ *
+ * @since 3.6.0
+ */
+@Parameter
+private List extraJars;
+
+/**
+ * Extra Artifacts to infuse into shaded result.
+ * 
+ * One can add here "extra Artifacts" to be worked into the resulting 
shaded JAR. The artifacts will be resolved
+ * (not transitively), and will be processed in same way as dependency 
JARs (if any): regarding relocation,
+ * resource transformers and filtering.
+ * 
+ * Note: this feature should be used lightly, is not meant as ability to 
replace dependency hull! It is more
+ * just a feature to be able to slightly "differentiate" shaded JAR from 
main only.
+ *
+ * @since 3.6.0
+ */
+@Parameter
+private List extraArtifacts;

Review Comment:
   pushed update





> Add ability to inject extra artifacts into shaded output
> 
>
> Key: MSHADE-478
> URL: https://issues.apache.org/jira/browse/MSHADE-478
> Project: Maven Shade Plugin
>  Issue Type: New Feature
>Reporter: Tamas Cservenak
>Assignee: Tamas Cservenak
>Priority: Major
> Fix For: 3.6.0
>
>
> Use case: Let's assume your main artifact is a "plugin" of some sort. 
> Moreover, assume that the "host" of your plugin uses SLF4J API for logging, 
> hence the module have {{slf4j-api}} declared as compile dependency (or 
> provided, does not matter). Still, you want to create a self contained JAR 
> out of same module, hence shade it. But the problem is given: how would 
> standalone JAR log?
> You should be able to "inject" extra JARs, but at the same time to have all 
> the "benefits" of all resource transformers as well (ie. your "extra 
> artifact" may have Sisu components, or Service providers).
> The {{extrajars}} IT showcase this very scenario.



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


[jira] [Commented] (MSHADE-478) Add ability to inject extra artifacts into shaded output

2024-05-28 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MSHADE-478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849953#comment-17849953
 ] 

ASF GitHub Bot commented on MSHADE-478:
---

cstamas commented on code in PR #228:
URL: 
https://github.com/apache/maven-shade-plugin/pull/228#discussion_r1616940993


##
src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java:
##
@@ -393,6 +392,36 @@ public class ShadeMojo extends AbstractMojo {
 @Parameter(defaultValue = "false")
 private boolean skip;
 
+/**
+ * Extra JAR files to infuse into shaded result.
+ * 
+ * One can add here "extra JARs", to be worked into the resulting shaded 
JAR. The listed JAR files must exist.
+ * Extra JARs will be processed in same way as main JAR (if any): applied 
relocation, resource transformers
+ * but not filtering.
+ * 
+ * Note: this feature should be used lightly, is not meant as ability to 
replace dependency hull! It is more
+ * just a feature to be able to slightly "differentiate" shaded JAR from 
main only.
+ *
+ * @since 3.6.0
+ */
+@Parameter
+private List extraJars;
+
+/**
+ * Extra Artifacts to infuse into shaded result.
+ * 
+ * One can add here "extra Artifacts" to be worked into the resulting 
shaded JAR. The artifacts will be resolved
+ * (not transitively), and will be processed in same way as dependency 
JARs (if any): regarding relocation,
+ * resource transformers and filtering.
+ * 
+ * Note: this feature should be used lightly, is not meant as ability to 
replace dependency hull! It is more
+ * just a feature to be able to slightly "differentiate" shaded JAR from 
main only.
+ *
+ * @since 3.6.0
+ */
+@Parameter
+private List extraArtifacts;

Review Comment:
   The ["standard" 
format](https://github.com/apache/maven-resolver/blob/master/maven-resolver-api/src/main/java/org/eclipse/aether/artifact/DefaultArtifact.java#L51-L63),
 will add to comment.





> Add ability to inject extra artifacts into shaded output
> 
>
> Key: MSHADE-478
> URL: https://issues.apache.org/jira/browse/MSHADE-478
> Project: Maven Shade Plugin
>  Issue Type: New Feature
>Reporter: Tamas Cservenak
>Assignee: Tamas Cservenak
>Priority: Major
> Fix For: 3.6.0
>
>
> Use case: Let's assume your main artifact is a "plugin" of some sort. 
> Moreover, assume that the "host" of your plugin uses SLF4J API for logging, 
> hence the module have {{slf4j-api}} declared as compile dependency (or 
> provided, does not matter). Still, you want to create a self contained JAR 
> out of same module, hence shade it. But the problem is given: how would 
> standalone JAR log?
> You should be able to "inject" extra JARs, but at the same time to have all 
> the "benefits" of all resource transformers as well (ie. your "extra 
> artifact" may have Sisu components, or Service providers).
> The {{extrajars}} IT showcase this very scenario.



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


[jira] [Commented] (MSHADE-478) Add ability to inject extra artifacts into shaded output

2024-05-28 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MSHADE-478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849952#comment-17849952
 ] 

ASF GitHub Bot commented on MSHADE-478:
---

cstamas commented on code in PR #228:
URL: 
https://github.com/apache/maven-shade-plugin/pull/228#discussion_r1616939947


##
src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java:
##
@@ -393,6 +392,36 @@ public class ShadeMojo extends AbstractMojo {
 @Parameter(defaultValue = "false")
 private boolean skip;
 
+/**
+ * Extra JAR files to infuse into shaded result.
+ * 
+ * One can add here "extra JARs", to be worked into the resulting shaded 
JAR. The listed JAR files must exist.
+ * Extra JARs will be processed in same way as main JAR (if any): applied 
relocation, resource transformers
+ * but not filtering.
+ * 
+ * Note: this feature should be used lightly, is not meant as ability to 
replace dependency hull! It is more
+ * just a feature to be able to slightly "differentiate" shaded JAR from 
main only.
+ *
+ * @since 3.6.0
+ */
+@Parameter
+private List extraJars;

Review Comment:
   Yes, these are files.





> Add ability to inject extra artifacts into shaded output
> 
>
> Key: MSHADE-478
> URL: https://issues.apache.org/jira/browse/MSHADE-478
> Project: Maven Shade Plugin
>  Issue Type: New Feature
>Reporter: Tamas Cservenak
>Assignee: Tamas Cservenak
>Priority: Major
> Fix For: 3.6.0
>
>
> Use case: Let's assume your main artifact is a "plugin" of some sort. 
> Moreover, assume that the "host" of your plugin uses SLF4J API for logging, 
> hence the module have {{slf4j-api}} declared as compile dependency (or 
> provided, does not matter). Still, you want to create a self contained JAR 
> out of same module, hence shade it. But the problem is given: how would 
> standalone JAR log?
> You should be able to "inject" extra JARs, but at the same time to have all 
> the "benefits" of all resource transformers as well (ie. your "extra 
> artifact" may have Sisu components, or Service providers).
> The {{extrajars}} IT showcase this very scenario.



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


[jira] [Commented] (MSHADE-478) Add ability to inject extra artifacts into shaded output

2024-05-28 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MSHADE-478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849950#comment-17849950
 ] 

ASF GitHub Bot commented on MSHADE-478:
---

slawekjaranowski commented on code in PR #228:
URL: 
https://github.com/apache/maven-shade-plugin/pull/228#discussion_r1616933185


##
src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java:
##
@@ -393,6 +392,36 @@ public class ShadeMojo extends AbstractMojo {
 @Parameter(defaultValue = "false")
 private boolean skip;
 
+/**
+ * Extra JAR files to infuse into shaded result.
+ * 
+ * One can add here "extra JARs", to be worked into the resulting shaded 
JAR. The listed JAR files must exist.
+ * Extra JARs will be processed in same way as main JAR (if any): applied 
relocation, resource transformers
+ * but not filtering.
+ * 
+ * Note: this feature should be used lightly, is not meant as ability to 
replace dependency hull! It is more
+ * just a feature to be able to slightly "differentiate" shaded JAR from 
main only.
+ *
+ * @since 3.6.0
+ */
+@Parameter
+private List extraJars;

Review Comment:
   we should add what is the item ... I guess that is a path to jar file





> Add ability to inject extra artifacts into shaded output
> 
>
> Key: MSHADE-478
> URL: https://issues.apache.org/jira/browse/MSHADE-478
> Project: Maven Shade Plugin
>  Issue Type: New Feature
>Reporter: Tamas Cservenak
>Assignee: Tamas Cservenak
>Priority: Major
> Fix For: 3.6.0
>
>
> Use case: Let's assume your main artifact is a "plugin" of some sort. 
> Moreover, assume that the "host" of your plugin uses SLF4J API for logging, 
> hence the module have {{slf4j-api}} declared as compile dependency (or 
> provided, does not matter). Still, you want to create a self contained JAR 
> out of same module, hence shade it. But the problem is given: how would 
> standalone JAR log?
> You should be able to "inject" extra JARs, but at the same time to have all 
> the "benefits" of all resource transformers as well (ie. your "extra 
> artifact" may have Sisu components, or Service providers).
> The {{extrajars}} IT showcase this very scenario.



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


[jira] [Commented] (MSHADE-478) Add ability to inject extra artifacts into shaded output

2024-05-28 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MSHADE-478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849951#comment-17849951
 ] 

ASF GitHub Bot commented on MSHADE-478:
---

slawekjaranowski commented on code in PR #228:
URL: 
https://github.com/apache/maven-shade-plugin/pull/228#discussion_r1616934940


##
src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java:
##
@@ -393,6 +392,36 @@ public class ShadeMojo extends AbstractMojo {
 @Parameter(defaultValue = "false")
 private boolean skip;
 
+/**
+ * Extra JAR files to infuse into shaded result.
+ * 
+ * One can add here "extra JARs", to be worked into the resulting shaded 
JAR. The listed JAR files must exist.
+ * Extra JARs will be processed in same way as main JAR (if any): applied 
relocation, resource transformers
+ * but not filtering.
+ * 
+ * Note: this feature should be used lightly, is not meant as ability to 
replace dependency hull! It is more
+ * just a feature to be able to slightly "differentiate" shaded JAR from 
main only.
+ *
+ * @since 3.6.0
+ */
+@Parameter
+private List extraJars;
+
+/**
+ * Extra Artifacts to infuse into shaded result.
+ * 
+ * One can add here "extra Artifacts" to be worked into the resulting 
shaded JAR. The artifacts will be resolved
+ * (not transitively), and will be processed in same way as dependency 
JARs (if any): regarding relocation,
+ * resource transformers and filtering.
+ * 
+ * Note: this feature should be used lightly, is not meant as ability to 
replace dependency hull! It is more
+ * just a feature to be able to slightly "differentiate" shaded JAR from 
main only.
+ *
+ * @since 3.6.0
+ */
+@Parameter
+private List extraArtifacts;

Review Comment:
   We should describe format of item ... `groupId:artifactId:...` 
   which items are required?





> Add ability to inject extra artifacts into shaded output
> 
>
> Key: MSHADE-478
> URL: https://issues.apache.org/jira/browse/MSHADE-478
> Project: Maven Shade Plugin
>  Issue Type: New Feature
>Reporter: Tamas Cservenak
>Assignee: Tamas Cservenak
>Priority: Major
> Fix For: 3.6.0
>
>
> Use case: Let's assume your main artifact is a "plugin" of some sort. 
> Moreover, assume that the "host" of your plugin uses SLF4J API for logging, 
> hence the module have {{slf4j-api}} declared as compile dependency (or 
> provided, does not matter). Still, you want to create a self contained JAR 
> out of same module, hence shade it. But the problem is given: how would 
> standalone JAR log?
> You should be able to "inject" extra JARs, but at the same time to have all 
> the "benefits" of all resource transformers as well (ie. your "extra 
> artifact" may have Sisu components, or Service providers).
> The {{extrajars}} IT showcase this very scenario.



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


[jira] [Commented] (MPLUGIN-526) Clean up dependencies reported by dependencies:analyze

2024-05-28 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MPLUGIN-526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849949#comment-17849949
 ] 

ASF GitHub Bot commented on MPLUGIN-526:


slawekjaranowski commented on PR #287:
URL: 
https://github.com/apache/maven-plugin-tools/pull/287#issuecomment-2134786032

   @michael-o @gnodet should we cherry-pick to 3.x branch?




> Clean up dependencies reported by dependencies:analyze
> --
>
> Key: MPLUGIN-526
> URL: https://issues.apache.org/jira/browse/MPLUGIN-526
> Project: Maven Plugin Tools
>  Issue Type: Task
>Affects Versions: 3.13.0
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.13.1
>
>
> A lot of output from {{dependencies:analyze}}. Let's clean up before we split.



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


[jira] [Commented] (MPLUGIN-526) Clean up dependencies reported by dependencies:analyze

2024-05-28 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MPLUGIN-526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849929#comment-17849929
 ] 

ASF GitHub Bot commented on MPLUGIN-526:


asfgit closed pull request #287: [MPLUGIN-526] Clean up dependencies reported 
by dependencies:analyze
URL: https://github.com/apache/maven-plugin-tools/pull/287




> Clean up dependencies reported by dependencies:analyze
> --
>
> Key: MPLUGIN-526
> URL: https://issues.apache.org/jira/browse/MPLUGIN-526
> Project: Maven Plugin Tools
>  Issue Type: Task
>Affects Versions: 3.13.0
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.13.1
>
>
> A lot of output from {{dependencies:analyze}}. Let's clean up before we split.



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


[jira] [Commented] (MSHADE-478) Add ability to inject extra artifacts into shaded output

2024-05-28 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MSHADE-478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849912#comment-17849912
 ] 

ASF GitHub Bot commented on MSHADE-478:
---

cstamas closed pull request #226: [MSHADE-478] Extra JARs feature
URL: https://github.com/apache/maven-shade-plugin/pull/226




> Add ability to inject extra artifacts into shaded output
> 
>
> Key: MSHADE-478
> URL: https://issues.apache.org/jira/browse/MSHADE-478
> Project: Maven Shade Plugin
>  Issue Type: New Feature
>Reporter: Tamas Cservenak
>Assignee: Tamas Cservenak
>Priority: Major
> Fix For: 3.6.0
>
>
> Use case: Let's assume your main artifact is a "plugin" of some sort. 
> Moreover, assume that the "host" of your plugin uses SLF4J API for logging, 
> hence the module have {{slf4j-api}} declared as compile dependency (or 
> provided, does not matter). Still, you want to create a self contained JAR 
> out of same module, hence shade it. But the problem is given: how would 
> standalone JAR log?
> You should be able to "inject" extra JARs, but at the same time to have all 
> the "benefits" of all resource transformers as well (ie. your "extra 
> artifact" may have Sisu components, or Service providers).
> The {{extrajars}} showcase this very scenario.



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


[jira] [Commented] (MSHADE-478) Add ability to inject extra artifacts into shaded output

2024-05-28 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MSHADE-478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849911#comment-17849911
 ] 

ASF GitHub Bot commented on MSHADE-478:
---

cstamas opened a new pull request, #228:
URL: https://github.com/apache/maven-shade-plugin/pull/228

   Ability to add "extra JARs and Artifacts" and still enjoy the full benefits 
of relocation, resource transformation, etc.
   
   ---
   
   https://issues.apache.org/jira/browse/MSHADE-478




> Add ability to inject extra artifacts into shaded output
> 
>
> Key: MSHADE-478
> URL: https://issues.apache.org/jira/browse/MSHADE-478
> Project: Maven Shade Plugin
>  Issue Type: New Feature
>Reporter: Tamas Cservenak
>Assignee: Tamas Cservenak
>Priority: Major
> Fix For: 3.6.0
>
>
> Use case: Let's assume your main artifact is a "plugin" of some sort. 
> Moreover, assume that the "host" of your plugin uses SLF4J API for logging, 
> hence the module have {{slf4j-api}} declared as compile dependency (or 
> provided, does not matter). Still, you want to create a self contained JAR 
> out of same module, hence shade it. But the problem is given: how would 
> standalone JAR log?
> You should be able to "inject" extra JARs, but at the same time to have all 
> the "benefits" of all resource transformers as well (ie. your "extra 
> artifact" may have Sisu components, or Service providers).
> The {{extrajars}} showcase this very scenario.



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


[jira] [Commented] (MSHADE-478) Add ability to inject extra artifacts into shaded output

2024-05-28 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MSHADE-478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849913#comment-17849913
 ] 

ASF GitHub Bot commented on MSHADE-478:
---

cstamas commented on PR #226:
URL: 
https://github.com/apache/maven-shade-plugin/pull/226#issuecomment-2134517672

   Superseded by https://github.com/apache/maven-shade-plugin/pull/228




> Add ability to inject extra artifacts into shaded output
> 
>
> Key: MSHADE-478
> URL: https://issues.apache.org/jira/browse/MSHADE-478
> Project: Maven Shade Plugin
>  Issue Type: New Feature
>Reporter: Tamas Cservenak
>Assignee: Tamas Cservenak
>Priority: Major
> Fix For: 3.6.0
>
>
> Use case: Let's assume your main artifact is a "plugin" of some sort. 
> Moreover, assume that the "host" of your plugin uses SLF4J API for logging, 
> hence the module have {{slf4j-api}} declared as compile dependency (or 
> provided, does not matter). Still, you want to create a self contained JAR 
> out of same module, hence shade it. But the problem is given: how would 
> standalone JAR log?
> You should be able to "inject" extra JARs, but at the same time to have all 
> the "benefits" of all resource transformers as well (ie. your "extra 
> artifact" may have Sisu components, or Service providers).
> The {{extrajars}} showcase this very scenario.



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


[jira] [Commented] (MSHADE-478) Add ability to inject extra artifacts into shaded output

2024-05-27 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MSHADE-478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849831#comment-17849831
 ] 

ASF GitHub Bot commented on MSHADE-478:
---

cstamas commented on PR #226:
URL: 
https://github.com/apache/maven-shade-plugin/pull/226#issuecomment-2134041929

   This is not enough, filters are not applied. Reason is that artifact keys 
are not added to very convoluted structure of filters...




> Add ability to inject extra artifacts into shaded output
> 
>
> Key: MSHADE-478
> URL: https://issues.apache.org/jira/browse/MSHADE-478
> Project: Maven Shade Plugin
>  Issue Type: New Feature
>Reporter: Tamas Cservenak
>Assignee: Tamas Cservenak
>Priority: Major
> Fix For: 3.6.0
>
>
> Use case: Let's assume your main artifact is a "plugin" of some sort. 
> Moreover, assume that the "host" of your plugin uses SLF4J API for logging, 
> hence the module have {{slf4j-api}} declared as compile dependency (or 
> provided, does not matter). Still, you want to create a self contained JAR 
> out of same module, hence shade it. But the problem is given: how would 
> standalone JAR log?
> You should be able to "inject" extra JARs, but at the same time to have all 
> the "benefits" of all resource transformers as well (ie. your "extra 
> artifact" may have Sisu components, or Service providers).
> The {{extrajars}} showcase this very scenario.



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


[jira] [Commented] (MJAVADOC-795) Upgrade to Parent 42 and Maven 3.6.3

2024-05-27 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MJAVADOC-795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849817#comment-17849817
 ] 

ASF GitHub Bot commented on MJAVADOC-795:
-

asfgit closed pull request #281: [MJAVADOC-795] Upgrade to Parent 42 and Maven 
3.6.3
URL: https://github.com/apache/maven-javadoc-plugin/pull/281




> Upgrade to Parent 42 and Maven 3.6.3
> 
>
> Key: MJAVADOC-795
> URL: https://issues.apache.org/jira/browse/MJAVADOC-795
> Project: Maven Javadoc Plugin
>  Issue Type: Dependency upgrade
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.7.0
>
>




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


[jira] [Commented] (MDEP-923) Code cleanups

2024-05-27 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MDEP-923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849787#comment-17849787
 ] 

ASF GitHub Bot commented on MDEP-923:
-

slawekjaranowski merged PR #389:
URL: https://github.com/apache/maven-dependency-plugin/pull/389




> Code cleanups
> -
>
> Key: MDEP-923
> URL: https://issues.apache.org/jira/browse/MDEP-923
> Project: Maven Dependency Plugin
>  Issue Type: Task
>Reporter: Slawomir Jaranowski
>Assignee: Slawomir Jaranowski
>Priority: Major
> Fix For: 3.7.0
>
>
> * remove usage of deprecated API where possible
>  * cleanup pom after update to 42
>  * exclude transitive dependencies on org.apache.maven
>  * add {{@project.version@}} in ITs
>  * Remove plexus logger from DependencySilentLog
>  



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


[jira] [Commented] (MPLUGIN-526) Clean up dependencies reported by dependencies:analyze

2024-05-27 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MPLUGIN-526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849781#comment-17849781
 ] 

ASF GitHub Bot commented on MPLUGIN-526:


michael-o commented on PR #287:
URL: 
https://github.com/apache/maven-plugin-tools/pull/287#issuecomment-2133785830

   > > > @michael-o I still have a bunch of warnings when running 
`dependency:3.6.1:analyze`:
   > > > ```
   > > > [INFO] -

> Clean up dependencies reported by dependencies:analyze
> --
>
> Key: MPLUGIN-526
> URL: https://issues.apache.org/jira/browse/MPLUGIN-526
> Project: Maven Plugin Tools
>  Issue Type: Task
>Affects Versions: 3.13.0
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.13.1
>
>
> A lot of output from {{dependencies:analyze}}. Let's clean up before we split.



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


[jira] [Commented] (MPLUGIN-526) Clean up dependencies reported by dependencies:analyze

2024-05-27 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MPLUGIN-526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849769#comment-17849769
 ] 

ASF GitHub Bot commented on MPLUGIN-526:


gnodet commented on PR #287:
URL: 
https://github.com/apache/maven-plugin-tools/pull/287#issuecomment-2133692548

   > > @michael-o I still have a bunch of warnings when running 
`dependency:3.6.1:analyze`:
   > > ```
   > > [INFO] -

> Clean up dependencies reported by dependencies:analyze
> --
>
> Key: MPLUGIN-526
> URL: https://issues.apache.org/jira/browse/MPLUGIN-526
> Project: Maven Plugin Tools
>  Issue Type: Task
>Affects Versions: 3.13.0
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.13.1
>
>
> A lot of output from {{dependencies:analyze}}. Let's clean up before we split.



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


[jira] [Commented] (MPLUGIN-526) Clean up dependencies reported by dependencies:analyze

2024-05-27 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MPLUGIN-526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849754#comment-17849754
 ] 

ASF GitHub Bot commented on MPLUGIN-526:


michael-o commented on PR #287:
URL: 
https://github.com/apache/maven-plugin-tools/pull/287#issuecomment-2133664981

   > @michael-o I still have a bunch of warnings when running 
`dependency:3.6.1:analyze`:
   > 
   > ```
   > [INFO] -

> Clean up dependencies reported by dependencies:analyze
> --
>
> Key: MPLUGIN-526
> URL: https://issues.apache.org/jira/browse/MPLUGIN-526
> Project: Maven Plugin Tools
>  Issue Type: Task
>Affects Versions: 3.13.0
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.13.1
>
>
> A lot of output from {{dependencies:analyze}}. Let's clean up before we split.



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


[jira] [Commented] (MPLUGIN-526) Clean up dependencies reported by dependencies:analyze

2024-05-27 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MPLUGIN-526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849752#comment-17849752
 ] 

ASF GitHub Bot commented on MPLUGIN-526:


gnodet commented on PR #287:
URL: 
https://github.com/apache/maven-plugin-tools/pull/287#issuecomment-2133658854

   @michael-o I still have a bunch of warnings when running 
`dependency:3.6.1:analyze`:
   ```
   [INFO] -

> Clean up dependencies reported by dependencies:analyze
> --
>
> Key: MPLUGIN-526
> URL: https://issues.apache.org/jira/browse/MPLUGIN-526
> Project: Maven Plugin Tools
>  Issue Type: Task
>Affects Versions: 3.13.0
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.13.1
>
>
> A lot of output from {{dependencies:analyze}}. Let's clean up before we split.



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


[jira] [Commented] (MSHADE-478) Add ability to inject extra artifacts into shaded output

2024-05-27 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MSHADE-478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849744#comment-17849744
 ] 

ASF GitHub Bot commented on MSHADE-478:
---

cstamas opened a new pull request, #226:
URL: https://github.com/apache/maven-shade-plugin/pull/226

   Ability to add "extra JARs" and still enjoy the full benefits of relocation, 
resource transformation, etc.
   
   ---
   
   https://issues.apache.org/jira/browse/MSHADE-478




> Add ability to inject extra artifacts into shaded output
> 
>
> Key: MSHADE-478
> URL: https://issues.apache.org/jira/browse/MSHADE-478
> Project: Maven Shade Plugin
>  Issue Type: New Feature
>Reporter: Tamas Cservenak
>Priority: Major
> Fix For: 3.6.0
>
>
> Use case: Let's assume your main artifact is a "plugin" of some sort. 
> Moreover, assume that the "host" of your plugin uses SLF4J API for logging, 
> hence the module have {{slf4j-api}} declared as compile dependency (or 
> provided, does not matter). Still, you want to create a self contained JAR 
> out of same module, hence shade it. But the problem is given: how would 
> standalone JAR log?
> You should be able to "inject" extra JARs, but at the same time to have all 
> the "benefits" of all resource transformers as well (ie. your "extra 
> artifact" may have Sisu components, or Service providers).
> The {{extrajars}} showcase this very scenario.



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


[jira] [Commented] (MNG-7266) Remove maven-compat module

2024-05-27 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-7266:
-

cstamas commented on PR #1487:
URL: https://github.com/apache/maven/pull/1487#issuecomment-2133427438

   Cruft piled up in Maven should not be underestimated :smile: 




> Remove maven-compat module
> --
>
> Key: MNG-7266
> URL: https://issues.apache.org/jira/browse/MNG-7266
> Project: Maven
>  Issue Type: Sub-task
>Reporter: Guillaume Nodet
>Priority: Major
> Fix For: 4.0.x-candidate
>
>
> Maven-core does not depend on maven-compat anymore (runtime or compile time). 
>  Do we want to carry it over up to 4.0.0 and delete it in 4.1.0, or do we 
> want to drop it before 4.0.0 ?
> [~cstamas] [~olamy] [~romain.manni-bucau] [~sjaranowski] and others... ?



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


[jira] [Commented] (MPLUGIN-527) Remove javadoc annotation support

2024-05-27 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MPLUGIN-527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849718#comment-17849718
 ] 

ASF GitHub Bot commented on MPLUGIN-527:


gnodet opened a new pull request, #288:
URL: https://github.com/apache/maven-plugin-tools/pull/288

   - **[MPLUGIN-523] Switch to version 4.0.0-SNAPSHOT**
   - **[MPLUGIN-525] Remove ant and beanshell support**
   - **[MPLUGIN-527] Remove javadoc annotation support**
   




> Remove javadoc annotation support
> -
>
> Key: MPLUGIN-527
> URL: https://issues.apache.org/jira/browse/MPLUGIN-527
> Project: Maven Plugin Tools
>  Issue Type: Task
>Reporter: Guillaume Nodet
>Priority: Major
> Fix For: 4.0.0
>
>




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


[jira] [Commented] (MPLUGIN-526) Clean up dependencies reported by dependencies:analyze

2024-05-27 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MPLUGIN-526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849670#comment-17849670
 ] 

ASF GitHub Bot commented on MPLUGIN-526:


michael-o commented on PR #287:
URL: 
https://github.com/apache/maven-plugin-tools/pull/287#issuecomment-2132973225

   Guys, please have a look. If all fine, I'd like to start the vote today.




> Clean up dependencies reported by dependencies:analyze
> --
>
> Key: MPLUGIN-526
> URL: https://issues.apache.org/jira/browse/MPLUGIN-526
> Project: Maven Plugin Tools
>  Issue Type: Task
>Affects Versions: 3.13.0
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.13.1
>
>
> A lot of output from {{dependencies:analyze}}. Let's clean up before we split.



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


[jira] [Commented] (MNG-7266) Remove maven-compat module

2024-05-27 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-7266:
-

michael-o commented on PR #1487:
URL: https://github.com/apache/maven/pull/1487#issuecomment-2132856197

   > > > @cstamas @michael-o one blocker after upgrading to latest site is 
[AbstractProjectInfoReport.java](https://github.com/apache/maven-project-info-reports-plugin/blob/master/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java)
 which uses the `org.apache.maven.repository.RepositorySystem` class from 
`maven-compat`. That part also uses MAT...
   > > 
   > > 
   > > This is something I need to look at as a whole (reporting plugins) with 
@cstamas when the current Maven Reporting votes are done and Maven Site Plugin 
is done as well. I am currently working on lifting the reporting plugin to 
3.6.3 first, whenever possible. So please bear with me.
   > 
   > Sure, np. I just had a quick look again at this PR with the latest site 
plugin, so just wanted to report the outcome.
   
   Thanks, I did have this on my radar. I assumed that the cleanup in Maven 
Reporting Impl was enough. It obviously wasn't.




> Remove maven-compat module
> --
>
> Key: MNG-7266
> URL: https://issues.apache.org/jira/browse/MNG-7266
> Project: Maven
>  Issue Type: Sub-task
>Reporter: Guillaume Nodet
>Priority: Major
> Fix For: 4.0.x-candidate
>
>
> Maven-core does not depend on maven-compat anymore (runtime or compile time). 
>  Do we want to carry it over up to 4.0.0 and delete it in 4.1.0, or do we 
> want to drop it before 4.0.0 ?
> [~cstamas] [~olamy] [~romain.manni-bucau] [~sjaranowski] and others... ?



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


[jira] [Commented] (MNG-7266) Remove maven-compat module

2024-05-27 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-7266:
-

gnodet commented on PR #1487:
URL: https://github.com/apache/maven/pull/1487#issuecomment-2132819017

   > > @cstamas @michael-o one blocker after upgrading to latest site is 
[AbstractProjectInfoReport.java](https://github.com/apache/maven-project-info-reports-plugin/blob/master/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java)
 which uses the `org.apache.maven.repository.RepositorySystem` class from 
`maven-compat`. That part also uses MAT...
   > 
   > This is something I need to look at as a whole (reporting plugins) with 
@cstamas when the current Maven Reporting votes are done and Maven Site Plugin 
is done as well. I am currently working on lifting the reporting plugin to 
3.6.3 first, whenever possible. So please bear with me.
   
   Sure, np.  I just had a quick look again with at this PR with the latest 
site plugin, so just wanted to report the outcome.




> Remove maven-compat module
> --
>
> Key: MNG-7266
> URL: https://issues.apache.org/jira/browse/MNG-7266
> Project: Maven
>  Issue Type: Sub-task
>Reporter: Guillaume Nodet
>Priority: Major
> Fix For: 4.0.x-candidate
>
>
> Maven-core does not depend on maven-compat anymore (runtime or compile time). 
>  Do we want to carry it over up to 4.0.0 and delete it in 4.1.0, or do we 
> want to drop it before 4.0.0 ?
> [~cstamas] [~olamy] [~romain.manni-bucau] [~sjaranowski] and others... ?



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


[jira] [Commented] (MPLUGIN-508) Upgrade to Maven 4.x

2024-05-27 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MPLUGIN-508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849639#comment-17849639
 ] 

ASF GitHub Bot commented on MPLUGIN-508:


michael-o commented on PR #286:
URL: 
https://github.com/apache/maven-plugin-tools/pull/286#issuecomment-2132781470

   Please hold this one off until #287 and 3.13.1 has been cut. I want to clean 
up first before we cut 3.x.




> Upgrade to Maven 4.x
> 
>
> Key: MPLUGIN-508
> URL: https://issues.apache.org/jira/browse/MPLUGIN-508
> Project: Maven Plugin Tools
>  Issue Type: New Feature
>Affects Versions: 3.12.0
>Reporter: Guillaume Nodet
>Assignee: Guillaume Nodet
>Priority: Major
> Fix For: 4.0.0
>
>




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


[jira] [Commented] (MNG-7266) Remove maven-compat module

2024-05-27 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-7266:
-

michael-o commented on PR #1487:
URL: https://github.com/apache/maven/pull/1487#issuecomment-2132779147

   > @cstamas @michael-o one blocker after upgrading to latest site is 
[AbstractProjectInfoReport.java](https://github.com/apache/maven-project-info-reports-plugin/blob/master/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java)
 which uses the `org.apache.maven.repository.RepositorySystem` class from 
`maven-compat`. That part also uses MAT...
   
   This is something I need to look at as a whole (reporting plugins) with 
@cstamas when the current Maven Reporting votes are done and Maven Site Plugin 
is done as well. I am currently working on lifting the reporting plugin to 
3.6.3 first, whenever possible. So please bear with me.




> Remove maven-compat module
> --
>
> Key: MNG-7266
> URL: https://issues.apache.org/jira/browse/MNG-7266
> Project: Maven
>  Issue Type: Sub-task
>Reporter: Guillaume Nodet
>Priority: Major
> Fix For: 4.0.x-candidate
>
>
> Maven-core does not depend on maven-compat anymore (runtime or compile time). 
>  Do we want to carry it over up to 4.0.0 and delete it in 4.1.0, or do we 
> want to drop it before 4.0.0 ?
> [~cstamas] [~olamy] [~romain.manni-bucau] [~sjaranowski] and others... ?



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


[jira] [Commented] (MNG-7266) Remove maven-compat module

2024-05-27 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-7266:
-

gnodet commented on PR #1487:
URL: https://github.com/apache/maven/pull/1487#issuecomment-2132769075

   @cstamas @michael-o one blocker after upgrading to latest site is 
https://github.com/apache/maven-project-info-reports-plugin/blob/master/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java
 which uses the `org.apache.maven.repository.RepositorySystem` class from 
`maven-compat`.




> Remove maven-compat module
> --
>
> Key: MNG-7266
> URL: https://issues.apache.org/jira/browse/MNG-7266
> Project: Maven
>  Issue Type: Sub-task
>Reporter: Guillaume Nodet
>Priority: Major
> Fix For: 4.0.x-candidate
>
>
> Maven-core does not depend on maven-compat anymore (runtime or compile time). 
>  Do we want to carry it over up to 4.0.0 and delete it in 4.1.0, or do we 
> want to drop it before 4.0.0 ?
> [~cstamas] [~olamy] [~romain.manni-bucau] [~sjaranowski] and others... ?



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


[jira] [Commented] (MJAVADOC-795) Upgrade to Parent 42 and Maven 3.6.3

2024-05-26 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MJAVADOC-795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849582#comment-17849582
 ] 

ASF GitHub Bot commented on MJAVADOC-795:
-

cstamas commented on PR #281:
URL: 
https://github.com/apache/maven-javadoc-plugin/pull/281#issuecomment-2132388033

   Yes, in general they should be provided (sans maven-resolver-util).




> Upgrade to Parent 42 and Maven 3.6.3
> 
>
> Key: MJAVADOC-795
> URL: https://issues.apache.org/jira/browse/MJAVADOC-795
> Project: Maven Javadoc Plugin
>  Issue Type: Dependency upgrade
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.7.0
>
>




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


[jira] [Commented] (MJAVADOC-795) Upgrade to Parent 42 and Maven 3.6.3

2024-05-26 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MJAVADOC-795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849581#comment-17849581
 ] 

ASF GitHub Bot commented on MJAVADOC-795:
-

michael-o commented on PR #281:
URL: 
https://github.com/apache/maven-javadoc-plugin/pull/281#issuecomment-2132387755

   @cstamas Can you address the question?




> Upgrade to Parent 42 and Maven 3.6.3
> 
>
> Key: MJAVADOC-795
> URL: https://issues.apache.org/jira/browse/MJAVADOC-795
> Project: Maven Javadoc Plugin
>  Issue Type: Dependency upgrade
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.7.0
>
>




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


[jira] [Commented] (MJAVADOC-795) Upgrade to Parent 42 and Maven 3.6.3

2024-05-26 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MJAVADOC-795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849575#comment-17849575
 ] 

ASF GitHub Bot commented on MJAVADOC-795:
-

michael-o commented on PR #281:
URL: 
https://github.com/apache/maven-javadoc-plugin/pull/281#issuecomment-2132368841

   Question: Shouldn't Resolver deps be in `provided` scope?




> Upgrade to Parent 42 and Maven 3.6.3
> 
>
> Key: MJAVADOC-795
> URL: https://issues.apache.org/jira/browse/MJAVADOC-795
> Project: Maven Javadoc Plugin
>  Issue Type: Dependency upgrade
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.7.0
>
>




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


[jira] [Commented] (MJAVADOC-795) Upgrade to Parent 42 and Maven 3.6.3

2024-05-26 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MJAVADOC-795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849574#comment-17849574
 ] 

ASF GitHub Bot commented on MJAVADOC-795:
-

michael-o opened a new pull request, #281:
URL: https://github.com/apache/maven-javadoc-plugin/pull/281

   This closes #281
   
   Following this checklist to help us incorporate your
   contribution quickly and easily:
   
- [ ] 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.
- [ ] Each commit in the pull request should have a meaningful subject line 
and body.
- [ ] Format the pull request title like `[MJAVADOC-XXX] - Fixes bug in 
ApproximateQuantiles`,
  where you replace `MJAVADOC-XXX` with the appropriate JIRA issue. 
Best practice
  is to use the JIRA issue title in the pull request title and in the 
first line of the
  commit message.
- [ ] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
- [ ] Run `mvn clean verify -Prun-its` to make sure basic checks pass. A 
more thorough check will
  be performed on your pull request automatically.
   
   If your pull request is about ~20 lines of code you don't need to sign an
   [Individual Contributor License 
Agreement](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.
   
- [ ] I hereby declare this contribution to be licensed under the [Apache 
License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   
- [ ] In any other case, please file an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   




> Upgrade to Parent 42 and Maven 3.6.3
> 
>
> Key: MJAVADOC-795
> URL: https://issues.apache.org/jira/browse/MJAVADOC-795
> Project: Maven Javadoc Plugin
>  Issue Type: Dependency upgrade
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.7.0
>
>




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


[jira] [Commented] (MENFORCER-490) Properly declare dependencies

2024-05-26 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MENFORCER-490?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849544#comment-17849544
 ] 

ASF GitHub Bot commented on MENFORCER-490:
--

elharo merged PR #316:
URL: https://github.com/apache/maven-enforcer/pull/316




> Properly declare dependencies
> -
>
> Key: MENFORCER-490
> URL: https://issues.apache.org/jira/browse/MENFORCER-490
> Project: Maven Enforcer Plugin
>  Issue Type: Improvement
>Reporter: Elliotte Rusty Harold
>Assignee: Elliotte Rusty Harold
>Priority: Minor
> Fix For: 3.4.1, 3.5.0
>
>
> mvn dependency:analyze reveals a number of undeclared dependencies in various 
> sub modules. 



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


[jira] [Commented] (MENFORCER-490) Properly declare dependencies

2024-05-26 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MENFORCER-490?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849541#comment-17849541
 ] 

ASF GitHub Bot commented on MENFORCER-490:
--

slawekjaranowski commented on PR #316:
URL: https://github.com/apache/maven-enforcer/pull/316#issuecomment-2132216445

   There is an `extraArtifact` options for maven-invoker-plugin ... 
   eventually dependency has an impact on module order 




> Properly declare dependencies
> -
>
> Key: MENFORCER-490
> URL: https://issues.apache.org/jira/browse/MENFORCER-490
> Project: Maven Enforcer Plugin
>  Issue Type: Improvement
>Reporter: Elliotte Rusty Harold
>Assignee: Elliotte Rusty Harold
>Priority: Minor
> Fix For: 3.4.1, 3.5.0
>
>
> mvn dependency:analyze reveals a number of undeclared dependencies in various 
> sub modules. 



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


[jira] [Commented] (MENFORCER-497) Require Maven 3.6.3+

2024-05-26 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MENFORCER-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849540#comment-17849540
 ] 

ASF GitHub Bot commented on MENFORCER-497:
--

slawekjaranowski merged PR #317:
URL: https://github.com/apache/maven-enforcer/pull/317




> Require Maven 3.6.3+
> 
>
> Key: MENFORCER-497
> URL: https://issues.apache.org/jira/browse/MENFORCER-497
> Project: Maven Enforcer Plugin
>  Issue Type: Dependency upgrade
>Reporter: Sylwester Lachiewicz
>Assignee: Slawomir Jaranowski
>Priority: Minor
> Fix For: 3.5.0
>
>




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


[jira] [Commented] (MENFORCER-497) Require Maven 3.6.3+

2024-05-26 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MENFORCER-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849539#comment-17849539
 ] 

ASF GitHub Bot commented on MENFORCER-497:
--

slachiewicz commented on PR #317:
URL: https://github.com/apache/maven-enforcer/pull/317#issuecomment-2132209428

   Thanks




> Require Maven 3.6.3+
> 
>
> Key: MENFORCER-497
> URL: https://issues.apache.org/jira/browse/MENFORCER-497
> Project: Maven Enforcer Plugin
>  Issue Type: Dependency upgrade
>Reporter: Sylwester Lachiewicz
>Assignee: Slawomir Jaranowski
>Priority: Minor
> Fix For: 3.5.0
>
>




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


[jira] [Commented] (MPLUGIN-526) Clean up dependencies reported by dependencies:analyze

2024-05-26 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MPLUGIN-526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849538#comment-17849538
 ] 

ASF GitHub Bot commented on MPLUGIN-526:


michael-o opened a new pull request, #287:
URL: https://github.com/apache/maven-plugin-tools/pull/287

   This closes #287




> Clean up dependencies reported by dependencies:analyze
> --
>
> Key: MPLUGIN-526
> URL: https://issues.apache.org/jira/browse/MPLUGIN-526
> Project: Maven Plugin Tools
>  Issue Type: Task
>Affects Versions: 3.13.0
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.13.1
>
>
> A lot of output from {{dependencies:analyze}}. Let's clean up before we split.



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


[jira] [Commented] (MENFORCER-503) requireOS cause NPE with Maven 3.9.7

2024-05-26 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MENFORCER-503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849536#comment-17849536
 ] 

ASF GitHub Bot commented on MENFORCER-503:
--

slawekjaranowski merged PR #315:
URL: https://github.com/apache/maven-enforcer/pull/315




> requireOS cause NPE with Maven 3.9.7
> 
>
> Key: MENFORCER-503
> URL: https://issues.apache.org/jira/browse/MENFORCER-503
> Project: Maven Enforcer Plugin
>  Issue Type: Bug
>  Components: requireOS
>Reporter: Slawomir Jaranowski
>Assignee: Slawomir Jaranowski
>Priority: Critical
> Fix For: 3.5.0
>
>
> In rule {{requireOS}} we use: 
> {{org.apache.maven.model.profile.activation.ProfileActivator#isActive}}
> as
> {code:java}
> activator.isActive(createProfile(), null, null); 
> {code}
> so provided {{context}} is null ... but not Maven use {{context}} without 
> protecting it
>  
> From docs:
> {code:java}
> /**
>  * Determines whether the specified profile is active in the given activator 
> context.
>  *
>  * @param profile The profile whose activation status should be determined, 
> must not be {@code null}.
>  * @param context The environmental context used to determine the activation 
> status of the profile, must not be
>  *{@code null}.
>  * @param problems The container used to collect problems (e.g. bad syntax) 
> that were encountered, must not be
>  *{@code null}.
>  * @return {@code true} if the profile is active, {@code false} otherwise.
>  */
> boolean isActive( Profile profile, ProfileActivationContext context, 
> ModelProblemCollector problems ); {code}
>  
> So enforcer use it in wrong way.



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


[jira] [Commented] (MENFORCER-497) Require Maven 3.6.3+

2024-05-26 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MENFORCER-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849535#comment-17849535
 ] 

ASF GitHub Bot commented on MENFORCER-497:
--

slawekjaranowski commented on PR #317:
URL: https://github.com/apache/maven-enforcer/pull/317#issuecomment-2132204834

   @slachiewicz I have refreshed your branch  




> Require Maven 3.6.3+
> 
>
> Key: MENFORCER-497
> URL: https://issues.apache.org/jira/browse/MENFORCER-497
> Project: Maven Enforcer Plugin
>  Issue Type: Dependency upgrade
>Reporter: Sylwester Lachiewicz
>Assignee: Slawomir Jaranowski
>Priority: Minor
> Fix For: 3.5.0
>
>




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


[jira] [Commented] (MENFORCER-497) Require Maven 3.6.3+

2024-05-26 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MENFORCER-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849534#comment-17849534
 ] 

ASF GitHub Bot commented on MENFORCER-497:
--

slawekjaranowski opened a new pull request, #317:
URL: https://github.com/apache/maven-enforcer/pull/317

   https://issues.apache.org/jira/browse/MENFORCER-497




> Require Maven 3.6.3+
> 
>
> Key: MENFORCER-497
> URL: https://issues.apache.org/jira/browse/MENFORCER-497
> Project: Maven Enforcer Plugin
>  Issue Type: Dependency upgrade
>Reporter: Sylwester Lachiewicz
>Assignee: Slawomir Jaranowski
>Priority: Minor
> Fix For: 3.5.0
>
>




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


[jira] [Commented] (MENFORCER-494) Allow banning dynamic versions before computing the final dependency tree

2024-05-26 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MENFORCER-494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849528#comment-17849528
 ] 

ASF GitHub Bot commented on MENFORCER-494:
--

slawekjaranowski merged PR #294:
URL: https://github.com/apache/maven-enforcer/pull/294




> Allow banning dynamic versions before computing the final dependency tree
> -
>
> Key: MENFORCER-494
> URL: https://issues.apache.org/jira/browse/MENFORCER-494
> Project: Maven Enforcer Plugin
>  Issue Type: Improvement
>  Components: banDynamicVersions
>Affects Versions: 3.4.1
>Reporter: Jimmy Axenhus
>Assignee: Slawomir Jaranowski
>Priority: Major
>
> {{banDynamicVersions}} won't ban a dependency with a dynamic version if it 
> exists multiple times in the dependency tree, as long as the final dependency 
> tree has no dynamic version.
> As an example consider the following dependency tree where D appears multiple 
> times.
> {noformat}
> A
> +- B
> |  \- D version 1.0
> \- C
>\- D version [1.0,2.0){noformat}
> Before the rule {{banDynmicVersions}} is applied the final dependency tree is 
> computed which means we end up with the following.
> {noformat}
> A
> +- B
> |  \- D version 1.0
> \- C{noformat}
> This computed dependency tree is fine by itself and has no dynamic versions 
> but if the original dependency tree changes for whatever reason (such as D no 
> longer being a dependency of B) the rule will now detect the dynamic version 
> of D that C is trying to use.
> {noformat}
> A
> +- B
> \- C
>\- D version [1.0,2.0){noformat}
> The above example is actually something that happens to me. For various 
> reasons I have a Maven project A with the dependencies B and C being 
> developed independently from each other. In order to have a reproducible 
> build I've applied the {{banDynamicVersions}} rule to the entire project. As 
> B or C might introduce or remove dependencies at will I could actually end up 
> with B removing the dependency on D and suddenly my project won't build any 
> longer. At that moment I do not have the possibility of making C use a fixed 
> version of D, and I do not want to introduce a dependency on D in my project 
> A just to resolve that (my dependency tree is much larger than this and it 
> will be unreasonable to keep fixing things up).
> In order to solve that I want to ban dynamic versions in the entire 
> dependency tree before the final dependency tree is computed. This currently 
> isn't supported by the plugin.



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


[jira] [Commented] (MENFORCER-494) Allow banning dynamic versions before computing the final dependency tree

2024-05-26 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MENFORCER-494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849529#comment-17849529
 ] 

ASF GitHub Bot commented on MENFORCER-494:
--

slawekjaranowski commented on PR #294:
URL: https://github.com/apache/maven-enforcer/pull/294#issuecomment-2132189941

   @JimmyAx thanks




> Allow banning dynamic versions before computing the final dependency tree
> -
>
> Key: MENFORCER-494
> URL: https://issues.apache.org/jira/browse/MENFORCER-494
> Project: Maven Enforcer Plugin
>  Issue Type: Improvement
>  Components: banDynamicVersions
>Affects Versions: 3.4.1
>Reporter: Jimmy Axenhus
>Assignee: Slawomir Jaranowski
>Priority: Major
>
> {{banDynamicVersions}} won't ban a dependency with a dynamic version if it 
> exists multiple times in the dependency tree, as long as the final dependency 
> tree has no dynamic version.
> As an example consider the following dependency tree where D appears multiple 
> times.
> {noformat}
> A
> +- B
> |  \- D version 1.0
> \- C
>\- D version [1.0,2.0){noformat}
> Before the rule {{banDynmicVersions}} is applied the final dependency tree is 
> computed which means we end up with the following.
> {noformat}
> A
> +- B
> |  \- D version 1.0
> \- C{noformat}
> This computed dependency tree is fine by itself and has no dynamic versions 
> but if the original dependency tree changes for whatever reason (such as D no 
> longer being a dependency of B) the rule will now detect the dynamic version 
> of D that C is trying to use.
> {noformat}
> A
> +- B
> \- C
>\- D version [1.0,2.0){noformat}
> The above example is actually something that happens to me. For various 
> reasons I have a Maven project A with the dependencies B and C being 
> developed independently from each other. In order to have a reproducible 
> build I've applied the {{banDynamicVersions}} rule to the entire project. As 
> B or C might introduce or remove dependencies at will I could actually end up 
> with B removing the dependency on D and suddenly my project won't build any 
> longer. At that moment I do not have the possibility of making C use a fixed 
> version of D, and I do not want to introduce a dependency on D in my project 
> A just to resolve that (my dependency tree is much larger than this and it 
> will be unreasonable to keep fixing things up).
> In order to solve that I want to ban dynamic versions in the entire 
> dependency tree before the final dependency tree is computed. This currently 
> isn't supported by the plugin.



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


[jira] [Commented] (MENFORCER-503) requireOS cause NPE with Maven 3.9.7

2024-05-26 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MENFORCER-503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849525#comment-17849525
 ] 

ASF GitHub Bot commented on MENFORCER-503:
--

slawekjaranowski opened a new pull request, #315:
URL: https://github.com/apache/maven-enforcer/pull/315

   https://issues.apache.org/jira/browse/MENFORCER-503




> requireOS cause NPE with Maven 3.9.7
> 
>
> Key: MENFORCER-503
> URL: https://issues.apache.org/jira/browse/MENFORCER-503
> Project: Maven Enforcer Plugin
>  Issue Type: Bug
>  Components: requireOS
>Reporter: Slawomir Jaranowski
>Assignee: Slawomir Jaranowski
>Priority: Critical
> Fix For: 3.5.0
>
>
> In rule {{requireOS}} we use: 
> {{org.apache.maven.model.profile.activation.ProfileActivator#isActive}}
> as
> {code:java}
> activator.isActive(createProfile(), null, null); 
> {code}
> so provided {{context}} is null ... but not Maven use {{context}} without 
> protecting it
>  
> From docs:
> {code:java}
> /**
>  * Determines whether the specified profile is active in the given activator 
> context.
>  *
>  * @param profile The profile whose activation status should be determined, 
> must not be {@code null}.
>  * @param context The environmental context used to determine the activation 
> status of the profile, must not be
>  *{@code null}.
>  * @param problems The container used to collect problems (e.g. bad syntax) 
> that were encountered, must not be
>  *{@code null}.
>  * @return {@code true} if the profile is active, {@code false} otherwise.
>  */
> boolean isActive( Profile profile, ProfileActivationContext context, 
> ModelProblemCollector problems ); {code}
>  
> So enforcer use it in wrong way.



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


[jira] [Commented] (MENFORCER-501) Update commons dependencies

2024-05-26 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MENFORCER-501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849523#comment-17849523
 ] 

ASF GitHub Bot commented on MENFORCER-501:
--

slawekjaranowski merged PR #311:
URL: https://github.com/apache/maven-enforcer/pull/311




> Update commons dependencies
> ---
>
> Key: MENFORCER-501
> URL: https://issues.apache.org/jira/browse/MENFORCER-501
> Project: Maven Enforcer Plugin
>  Issue Type: Dependency upgrade
>Reporter: Sylwester Lachiewicz
>Assignee: Sylwester Lachiewicz
>Priority: Minor
> Fix For: 3.5.0
>
>




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


[jira] [Commented] (MENFORCER-501) Update commons dependencies

2024-05-26 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MENFORCER-501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849521#comment-17849521
 ] 

ASF GitHub Bot commented on MENFORCER-501:
--

slawekjaranowski merged PR #312:
URL: https://github.com/apache/maven-enforcer/pull/312




> Update commons dependencies
> ---
>
> Key: MENFORCER-501
> URL: https://issues.apache.org/jira/browse/MENFORCER-501
> Project: Maven Enforcer Plugin
>  Issue Type: Dependency upgrade
>Reporter: Sylwester Lachiewicz
>Assignee: Sylwester Lachiewicz
>Priority: Minor
> Fix For: 3.5.0
>
>




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


[jira] [Commented] (MENFORCER-504) Upgrade Parent to 42

2024-05-26 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MENFORCER-504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849507#comment-17849507
 ] 

ASF GitHub Bot commented on MENFORCER-504:
--

slawekjaranowski merged PR #314:
URL: https://github.com/apache/maven-enforcer/pull/314




> Upgrade Parent to 42
> 
>
> Key: MENFORCER-504
> URL: https://issues.apache.org/jira/browse/MENFORCER-504
> Project: Maven Enforcer Plugin
>  Issue Type: Dependency upgrade
>Reporter: Slawomir Jaranowski
>Assignee: Slawomir Jaranowski
>Priority: Major
> Fix For: next-release
>
>




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


[jira] [Commented] (MSHARED-1403) Configure log file as as File (not only file name relative to base directory)

2024-05-25 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MSHARED-1403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849444#comment-17849444
 ] 

ASF GitHub Bot commented on MSHARED-1403:
-

olamy merged PR #89:
URL: https://github.com/apache/maven-verifier/pull/89




> Configure log file as as File (not only file name relative to base directory)
> -
>
> Key: MSHARED-1403
> URL: https://issues.apache.org/jira/browse/MSHARED-1403
> Project: Maven Shared Components
>  Issue Type: Task
>  Components: maven-verifier
>Affects Versions: maven-verifier-2.0.0-M1
>Reporter: Olivier Lamy
>Assignee: Olivier Lamy
>Priority: Major
> Fix For: maven-verifier-2.0.0
>
>




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


[jira] [Commented] (MSHARED-1403) Configure log file as as File (not only file name relative to base directory)

2024-05-24 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MSHARED-1403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849424#comment-17849424
 ] 

ASF GitHub Bot commented on MSHARED-1403:
-

olamy opened a new pull request, #89:
URL: https://github.com/apache/maven-verifier/pull/89

   Signed-off-by: Olivier Lamy 
   




> Configure log file as as File (not only file name relative to base directory)
> -
>
> Key: MSHARED-1403
> URL: https://issues.apache.org/jira/browse/MSHARED-1403
> Project: Maven Shared Components
>  Issue Type: Task
>  Components: maven-verifier
>Affects Versions: maven-verifier-2.0.0-M1
>Reporter: Olivier Lamy
>Assignee: Olivier Lamy
>Priority: Major
> Fix For: maven-verifier-2.0.0
>
>




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


[jira] [Commented] (MNG-7902) Sort plugins in validation report

2024-05-24 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-7902:
-

slawekjaranowski commented on PR #1510:
URL: https://github.com/apache/maven/pull/1510#issuecomment-2130330820

   I hope we can cherry-pick it to maven-3.x




> Sort plugins in validation report
> -
>
> Key: MNG-7902
> URL: https://issues.apache.org/jira/browse/MNG-7902
> Project: Maven
>  Issue Type: Improvement
>  Components: Core
>Reporter: Michael Keppler
>Priority: Minor
> Fix For: 4.0.0-beta-4
>
> Attachments: image-2023-10-07-13-33-27-762.png
>
>
> Please don't ever output the content of a Set for consumption by humans 
> without sorting it first. The order is otherwise "random". Sorting (case 
> insensitive) makes the same output easier to read, especially when trying to 
> find one specific entry (e.g. "Did we fix plugin foo already?")
> !image-2023-10-07-13-33-27-762.png!



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


[jira] [Commented] (MDEP-799) improve mvn dependency:tree - add optional JSON output of the results

2024-05-24 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MDEP-799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849293#comment-17849293
 ] 

ASF GitHub Bot commented on MDEP-799:
-

monperrus commented on PR #391:
URL: 
https://github.com/apache/maven-dependency-plugin/pull/391#issuecomment-2129493157

   > @LogFlames @monperrus I guess you plan to use it in 
[chains-project/maven-lockfile](https://github.com/chains-project/maven-lockfile)
 ?
   
   @pombredanne yes and in other [Chains](https://chains.proj.kth.se/) 
experiments 
   
   > Demo for it is here [cstamas/tc-demo](https://github.com/cstamas/tc-demo)
   
   @cstamas interesting, this is related to how we store checksums in lockfiles 
in https://github.com/chains-project/maven-lockfile




> improve mvn dependency:tree - add optional JSON output of the results
> -
>
> Key: MDEP-799
> URL: https://issues.apache.org/jira/browse/MDEP-799
> Project: Maven Dependency Plugin
>  Issue Type: New Feature
>  Components: tree
>Reporter: Zhenxu Ke
>Assignee: Elliotte Rusty Harold
>Priority: Major
> Fix For: 3.7.0
>
>
> I'd like to add an output type JSON, will open a pull request soon



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


[jira] [Commented] (MDEP-799) improve mvn dependency:tree - add optional JSON output of the results

2024-05-24 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MDEP-799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849292#comment-17849292
 ] 

ASF GitHub Bot commented on MDEP-799:
-

slawekjaranowski commented on PR #391:
URL: 
https://github.com/apache/maven-dependency-plugin/pull/391#issuecomment-2129491870

   > @slawekjaranowski re: doc, I was about to post a comment here too!
   > 
   > 
https://github.com/apache/maven-dependency-plugin/blob/09775b3c0effa7d102b4e71ce8c3688caa6dee71/src/site/apt/usage.apt.vm#L603
   > 
   > ... thank for catching this.
   
   We can add in mentioned place a new format, but I think that we should 
publish structure of generated json somewhere a new page will be the best for 
it in my opinion




> improve mvn dependency:tree - add optional JSON output of the results
> -
>
> Key: MDEP-799
> URL: https://issues.apache.org/jira/browse/MDEP-799
> Project: Maven Dependency Plugin
>  Issue Type: New Feature
>  Components: tree
>Reporter: Zhenxu Ke
>Assignee: Elliotte Rusty Harold
>Priority: Major
> Fix For: 3.7.0
>
>
> I'd like to add an output type JSON, will open a pull request soon



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


[jira] [Commented] (MPMD-395) Build doesn't fail for invalid CPD format

2024-05-24 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MPMD-395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849276#comment-17849276
 ] 

ASF GitHub Bot commented on MPMD-395:
-

adangel commented on code in PR #150:
URL: https://github.com/apache/maven-pmd-plugin/pull/150#discussion_r1613377842


##
src/main/java/org/apache/maven/plugins/pmd/exec/CpdReportConsumer.java:
##
@@ -0,0 +1,133 @@
+/*
+ * 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.
+ */
+package org.apache.maven.plugins.pmd.exec;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.util.function.Consumer;
+import java.util.function.Predicate;
+
+import net.sourceforge.pmd.cpd.CPDReport;
+import net.sourceforge.pmd.cpd.CPDReportRenderer;
+import net.sourceforge.pmd.cpd.Match;
+import net.sourceforge.pmd.cpd.XMLRenderer;
+import org.apache.maven.plugins.pmd.ExcludeDuplicationsFromFile;
+import org.apache.maven.reporting.MavenReportException;
+import org.codehaus.plexus.util.FileUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+class CpdReportConsumer implements Consumer {
+private static final Logger LOG = 
LoggerFactory.getLogger(CpdReportConsumer.class);
+
+private final CpdRequest request;
+private final ExcludeDuplicationsFromFile excludeDuplicationsFromFile;
+private MavenReportException reportException;
+
+CpdReportConsumer(CpdRequest request, ExcludeDuplicationsFromFile 
excludeDuplicationsFromFile) {
+this.request = request;
+this.excludeDuplicationsFromFile = excludeDuplicationsFromFile;
+}
+
+@Override
+public void accept(CPDReport report) {
+try {
+// always create XML format. we need to output it even if the file 
list is empty or we have no
+// duplications so that the "check" goals can check for violations
+writeXmlReport(report);
+
+// html format is handled by maven site report, xml format has 
already been rendered
+// a renderer is only needed for other formats
+String format = request.getFormat();
+if (!"html".equals(format) && !"xml".equals(format)) {
+writeFormattedReport(report);
+}
+} catch (MavenReportException e) {
+// Exceptions happening during this consumer are only logged by 
PMD.
+// Remembering the exception here, so that we can rethrow it later 
to fail the build.
+reportException = e;
+throw new RuntimeException(e);

Review Comment:
   We need to use the `Consumer` interface here, as that's PMD's API for now.
   I've done a different approach now: The exceptions happening during CPD 
analysis (including when the report is written), are logged and can be 
intercepted. I'm collecting them now via the logging facility and rethrow them 
at the end.





> Build doesn't fail for invalid CPD format
> -
>
> Key: MPMD-395
> URL: https://issues.apache.org/jira/browse/MPMD-395
> Project: Maven PMD Plugin
>  Issue Type: Bug
>  Components: CPD
>Affects Versions: 3.22.0
>Reporter: Andreas Dangel
>Assignee: Andreas Dangel
>Priority: Major
>
> See 
> [https://github.com/apache/maven-pmd-plugin/pull/144#issuecomment-2094371392]
>  
> If an exception occurs while the CPD report is created, the exception is only 
> logged but doesn't fail the build. This means, that build appears to be 
> successful, although it didn't produce all expected build artifacts.



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


[jira] [Commented] (MDEP-799) improve mvn dependency:tree - add optional JSON output of the results

2024-05-24 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MDEP-799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849234#comment-17849234
 ] 

ASF GitHub Bot commented on MDEP-799:
-

pombredanne commented on PR #391:
URL: 
https://github.com/apache/maven-dependency-plugin/pull/391#issuecomment-2129090873

   @slawekjaranowski re: doc, I was about to post a comment here too! 
https://github.com/apache/maven-dependency-plugin/blob/09775b3c0effa7d102b4e71ce8c3688caa6dee71/src/site/apt/usage.apt.vm#L603
 ... thank for catching this.




> improve mvn dependency:tree - add optional JSON output of the results
> -
>
> Key: MDEP-799
> URL: https://issues.apache.org/jira/browse/MDEP-799
> Project: Maven Dependency Plugin
>  Issue Type: New Feature
>  Components: tree
>Reporter: Zhenxu Ke
>Assignee: Elliotte Rusty Harold
>Priority: Major
> Fix For: 3.7.0
>
>
> I'd like to add an output type JSON, will open a pull request soon



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


[jira] [Commented] (MDEP-799) improve mvn dependency:tree - add optional JSON output of the results

2024-05-23 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MDEP-799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849153#comment-17849153
 ] 

ASF GitHub Bot commented on MDEP-799:
-

slawekjaranowski commented on PR #391:
URL: 
https://github.com/apache/maven-dependency-plugin/pull/391#issuecomment-2128524291

   Thanks again everybody for contribution ... but we are lack of 
documentation, so I created issue:
   https://issues.apache.org/jira/browse/MDEP-933
   
   @LogFlames @elharo or someone else can you look.
   




> improve mvn dependency:tree - add optional JSON output of the results
> -
>
> Key: MDEP-799
> URL: https://issues.apache.org/jira/browse/MDEP-799
> Project: Maven Dependency Plugin
>  Issue Type: New Feature
>  Components: tree
>Reporter: Zhenxu Ke
>Assignee: Elliotte Rusty Harold
>Priority: Major
> Fix For: 3.7.0
>
>
> I'd like to add an output type JSON, will open a pull request soon



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


[jira] [Commented] (MDEP-799) improve mvn dependency:tree - add optional JSON output of the results

2024-05-23 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MDEP-799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849124#comment-17849124
 ] 

ASF GitHub Bot commented on MDEP-799:
-

pombredanne commented on PR #391:
URL: 
https://github.com/apache/maven-dependency-plugin/pull/391#issuecomment-2128158079

   Everyone thank you ++ and @LogFlames :bow: :heart: 
   
   You have rendered obsolete about 22K files on GitHub that try to parse the 
output of tree!
   See https://github.com/search?q=mvn+"dependency%3Atree"=code 
   
   @LogFlames @monperrus I guess you plan to use it in 
https://github.com/chains-project/maven-lockfile ?
   
   FWIW, on my side this is going to be used in a front end to the 
https://github.com/nexB/scancode.io/ code scanner and matcher:
   - created for Maven in in 
https://github.com/nexB/dependency-inspector/issues/6
   - otherwise,  part of a general purpose solution to 
https://github.com/nexB/dependency-inspector/issues/2
   - and the companion to ecosystem-specific dependency resolvers such as 
https://github.com/nexB/python-inspector or 
https://github.com/nexB/nuget-inspector 




> improve mvn dependency:tree - add optional JSON output of the results
> -
>
> Key: MDEP-799
> URL: https://issues.apache.org/jira/browse/MDEP-799
> Project: Maven Dependency Plugin
>  Issue Type: New Feature
>  Components: tree
>Reporter: Zhenxu Ke
>Assignee: Elliotte Rusty Harold
>Priority: Major
> Fix For: 3.7.0
>
>
> I'd like to add an output type JSON, will open a pull request soon



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


[jira] [Commented] (MDEP-923) Code cleanups

2024-05-23 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MDEP-923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849049#comment-17849049
 ] 

ASF GitHub Bot commented on MDEP-923:
-

slawekjaranowski commented on code in PR #389:
URL: 
https://github.com/apache/maven-dependency-plugin/pull/389#discussion_r1612080238


##
src/test/java/org/apache/maven/plugins/dependency/fromDependencies/TestCopyDependenciesMojo.java:
##
@@ -80,7 +80,7 @@ public void assertNoMarkerFile(Artifact artifact) throws 
MojoExecutionException
 assertFalse(handle.isMarkerSet());
 }
 
-public void testCopyFile() throws MojoExecutionException, IOException {
+public void testCopyFile() throws Exception {

Review Comment:
   ok, one exception is new in 3.7.0 but one is old from copied  class - so 
should I discovered versions for original class or add since now





> Code cleanups
> -
>
> Key: MDEP-923
> URL: https://issues.apache.org/jira/browse/MDEP-923
> Project: Maven Dependency Plugin
>  Issue Type: Task
>Reporter: Slawomir Jaranowski
>Assignee: Slawomir Jaranowski
>Priority: Major
> Fix For: 3.7.0
>
>
> * remove usage of deprecated API where possible
>  * cleanup pom after update to 42
>  * exclude transitive dependencies on org.apache.maven
>  * add {{@project.version@}} in ITs
>  * Remove plexus logger from DependencySilentLog
>  



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


[jira] [Commented] (MDEP-799) improve mvn dependency:tree - add optional JSON output of the results

2024-05-23 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MDEP-799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849038#comment-17849038
 ] 

ASF GitHub Bot commented on MDEP-799:
-

elharo commented on PR #325:
URL: 
https://github.com/apache/maven-dependency-plugin/pull/325#issuecomment-2127618794

   feature complete under another PR




> improve mvn dependency:tree - add optional JSON output of the results
> -
>
> Key: MDEP-799
> URL: https://issues.apache.org/jira/browse/MDEP-799
> Project: Maven Dependency Plugin
>  Issue Type: New Feature
>  Components: tree
>Reporter: Zhenxu Ke
>Assignee: Elliotte Rusty Harold
>Priority: Major
> Fix For: 3.7.0
>
>
> I'd like to add an output type JSON, will open a pull request soon



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


[jira] [Commented] (MDEP-799) improve mvn dependency:tree - add optional JSON output of the results

2024-05-23 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MDEP-799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849037#comment-17849037
 ] 

ASF GitHub Bot commented on MDEP-799:
-

elharo closed pull request #325: [MDEP-799] tree: add optional output type json
URL: https://github.com/apache/maven-dependency-plugin/pull/325




> improve mvn dependency:tree - add optional JSON output of the results
> -
>
> Key: MDEP-799
> URL: https://issues.apache.org/jira/browse/MDEP-799
> Project: Maven Dependency Plugin
>  Issue Type: New Feature
>  Components: tree
>Reporter: Zhenxu Ke
>Assignee: Elliotte Rusty Harold
>Priority: Major
> Fix For: 3.7.0
>
>
> I'd like to add an output type JSON, will open a pull request soon



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


[jira] [Commented] (MDEP-799) improve mvn dependency:tree - add optional JSON output of the results

2024-05-23 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MDEP-799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849035#comment-17849035
 ] 

ASF GitHub Bot commented on MDEP-799:
-

elharo closed pull request #207: [MDEP-799] - improve dependency:tree to add 
optional JSON output of the results
URL: https://github.com/apache/maven-dependency-plugin/pull/207




> improve mvn dependency:tree - add optional JSON output of the results
> -
>
> Key: MDEP-799
> URL: https://issues.apache.org/jira/browse/MDEP-799
> Project: Maven Dependency Plugin
>  Issue Type: New Feature
>  Components: tree
>Reporter: Zhenxu Ke
>Assignee: Elliotte Rusty Harold
>Priority: Major
> Fix For: 3.7.0
>
>
> I'd like to add an output type JSON, will open a pull request soon



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


[jira] [Commented] (MDEP-799) improve mvn dependency:tree - add optional JSON output of the results

2024-05-23 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MDEP-799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849036#comment-17849036
 ] 

ASF GitHub Bot commented on MDEP-799:
-

elharo commented on PR #207:
URL: 
https://github.com/apache/maven-dependency-plugin/pull/207#issuecomment-2127618346

   feature complete under another PR




> improve mvn dependency:tree - add optional JSON output of the results
> -
>
> Key: MDEP-799
> URL: https://issues.apache.org/jira/browse/MDEP-799
> Project: Maven Dependency Plugin
>  Issue Type: New Feature
>  Components: tree
>Reporter: Zhenxu Ke
>Assignee: Elliotte Rusty Harold
>Priority: Major
> Fix For: 3.7.0
>
>
> I'd like to add an output type JSON, will open a pull request soon



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


[jira] [Commented] (MDEP-923) Code cleanups

2024-05-23 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MDEP-923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849031#comment-17849031
 ] 

ASF GitHub Bot commented on MDEP-923:
-

elharo commented on code in PR #389:
URL: 
https://github.com/apache/maven-dependency-plugin/pull/389#discussion_r1612013270


##
src/test/java/org/apache/maven/plugins/dependency/fromDependencies/TestCopyDependenciesMojo.java:
##
@@ -80,7 +80,7 @@ public void assertNoMarkerFile(Artifact artifact) throws 
MojoExecutionException
 assertFalse(handle.isMarkerSet());
 }
 
-public void testCopyFile() throws MojoExecutionException, IOException {
+public void testCopyFile() throws Exception {

Review Comment:
   I like to know when an exception is added or removed from an API, and I'd 
make the same comment about the other methods in this class. :-)





> Code cleanups
> -
>
> Key: MDEP-923
> URL: https://issues.apache.org/jira/browse/MDEP-923
> Project: Maven Dependency Plugin
>  Issue Type: Task
>Reporter: Slawomir Jaranowski
>Assignee: Slawomir Jaranowski
>Priority: Major
> Fix For: 3.7.0
>
>
> * remove usage of deprecated API where possible
>  * cleanup pom after update to 42
>  * exclude transitive dependencies on org.apache.maven
>  * add {{@project.version@}} in ITs
>  * Remove plexus logger from DependencySilentLog
>  



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


[jira] [Commented] (MDEP-799) improve mvn dependency:tree - add optional JSON output of the results

2024-05-23 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MDEP-799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849027#comment-17849027
 ] 

ASF GitHub Bot commented on MDEP-799:
-

monperrus commented on PR #391:
URL: 
https://github.com/apache/maven-dependency-plugin/pull/391#issuecomment-2127542024

   > There is on my list ... I hope do next release 3.7.0 it at next week or two
   
   excellent, thanks!




> improve mvn dependency:tree - add optional JSON output of the results
> -
>
> Key: MDEP-799
> URL: https://issues.apache.org/jira/browse/MDEP-799
> Project: Maven Dependency Plugin
>  Issue Type: New Feature
>  Components: tree
>Reporter: Zhenxu Ke
>Assignee: Elliotte Rusty Harold
>Priority: Major
> Fix For: 3.7.0
>
>
> I'd like to add an output type JSON, will open a pull request soon



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


[jira] [Commented] (MPLUGIN-525) Remove ant and beanshell support

2024-05-23 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MPLUGIN-525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849026#comment-17849026
 ] 

ASF GitHub Bot commented on MPLUGIN-525:


gnodet commented on PR #285:
URL: 
https://github.com/apache/maven-plugin-tools/pull/285#issuecomment-2127541125

   > > > Is this Maven 4 only?
   > > 
   > > 
   > > Yes, I've created a [3.x 
branch](https://github.com/apache/maven-plugin-tools/tree/3.x) to support Maven 
3 plugins and master will support Maven 4 plugins. The goal is to split the 
plugins to ease maintenance, as the code will ultimately be quite different. 
See https://issues.apache.org/jira/browse/MPLUGIN-523. We should also drop the 
Maven 4.x support from the 3.x branch.
   > 
   > I see. There is no way to have this in one branch with common modules and 
module per Maven version?
   
   Sure, I suppose it's technically feasible, but instead of streamlining and 
making the code simpler, it will have the exact opposite effect. 
   The javadoc generator is now irrelevant, and the generator one, while I kept 
a single one for the alpha versions, is becoming more problematic, as the API 
seems to diverge a bit with the Maven 3 one.  We currently generate a 
plugin.xml but this is all tacky as it assumes there's no difference between 
the 3.x and 4.x ones.   We do have a writer which is generated in Maven 4 which 
we could use to write the plugin.xml (do we really need it btw ?). I was hoping 
to clean things and avoids lots of hacks to make the code more robust. 




> Remove ant and beanshell support
> 
>
> Key: MPLUGIN-525
> URL: https://issues.apache.org/jira/browse/MPLUGIN-525
> Project: Maven Plugin Tools
>  Issue Type: Task
>Reporter: Guillaume Nodet
>Assignee: Guillaume Nodet
>Priority: Major
> Fix For: 4.0.0
>
>




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


[jira] [Commented] (MDEP-923) Code cleanups

2024-05-23 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MDEP-923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849021#comment-17849021
 ] 

ASF GitHub Bot commented on MDEP-923:
-

slawekjaranowski commented on code in PR #389:
URL: 
https://github.com/apache/maven-dependency-plugin/pull/389#discussion_r1611946471


##
src/main/java/org/apache/maven/plugins/dependency/utils/CopyUtil.java:
##
@@ -0,0 +1,66 @@
+/*
+ * 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.
+ */
+package org.apache.maven.plugins.dependency.utils;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.inject.Singleton;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.logging.Log;
+import org.codehaus.plexus.util.FileUtils;
+import org.sonatype.plexus.build.incremental.BuildContext;
+
+/**
+ * Provide a copyFile method in one place.
+ */
+@Named
+@Singleton
+public class CopyUtil {
+
+private final BuildContext buildContext;
+
+@Inject
+public CopyUtil(BuildContext buildContext) {
+this.buildContext = buildContext;
+}
+
+/**
+ * Does the actual copy of the file and logging.
+ *
+ * @param source represents the file to copy.
+ * @param destination file name of destination file.
+ * @throws IOException with a message if an error occurs.
+ */
+public void copyFile(Log log, File source, File destination) throws 
IOException, MojoExecutionException {
+log.info("Copying " + source + " to " + destination);

Review Comment:
   Log removed from method argument





> Code cleanups
> -
>
> Key: MDEP-923
> URL: https://issues.apache.org/jira/browse/MDEP-923
> Project: Maven Dependency Plugin
>  Issue Type: Task
>Reporter: Slawomir Jaranowski
>Assignee: Slawomir Jaranowski
>Priority: Major
> Fix For: 3.7.0
>
>
> * remove usage of deprecated API where possible
>  * cleanup pom after update to 42
>  * exclude transitive dependencies on org.apache.maven
>  * add {{@project.version@}} in ITs
>  * Remove plexus logger from DependencySilentLog
>  



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


[jira] [Commented] (MDEP-923) Code cleanups

2024-05-23 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MDEP-923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17849017#comment-17849017
 ] 

ASF GitHub Bot commented on MDEP-923:
-

slawekjaranowski commented on code in PR #389:
URL: 
https://github.com/apache/maven-dependency-plugin/pull/389#discussion_r1611937502


##
src/test/java/org/apache/maven/plugins/dependency/fromDependencies/TestCopyDependenciesMojo.java:
##
@@ -80,7 +80,7 @@ public void assertNoMarkerFile(Artifact artifact) throws 
MojoExecutionException
 assertFalse(handle.isMarkerSet());
 }
 
-public void testCopyFile() throws MojoExecutionException, IOException {
+public void testCopyFile() throws Exception {

Review Comment:
   It is a Unit Test ... all other methods simply throws `Exception`





> Code cleanups
> -
>
> Key: MDEP-923
> URL: https://issues.apache.org/jira/browse/MDEP-923
> Project: Maven Dependency Plugin
>  Issue Type: Task
>Reporter: Slawomir Jaranowski
>Assignee: Slawomir Jaranowski
>Priority: Major
> Fix For: 3.7.0
>
>
> * remove usage of deprecated API where possible
>  * cleanup pom after update to 42
>  * exclude transitive dependencies on org.apache.maven
>  * add {{@project.version@}} in ITs
>  * Remove plexus logger from DependencySilentLog
>  



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


[jira] [Commented] (MDEP-923) Code cleanups

2024-05-23 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MDEP-923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17848942#comment-17848942
 ] 

ASF GitHub Bot commented on MDEP-923:
-

elharo commented on code in PR #389:
URL: 
https://github.com/apache/maven-dependency-plugin/pull/389#discussion_r1611629057


##
src/main/java/org/apache/maven/plugins/dependency/utils/CopyUtil.java:
##
@@ -0,0 +1,66 @@
+/*
+ * 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.
+ */
+package org.apache.maven.plugins.dependency.utils;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.inject.Singleton;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.logging.Log;
+import org.codehaus.plexus.util.FileUtils;
+import org.sonatype.plexus.build.incremental.BuildContext;
+
+/**
+ * Provide a copyFile method in one place.
+ */
+@Named
+@Singleton
+public class CopyUtil {
+
+private final BuildContext buildContext;
+
+@Inject
+public CopyUtil(BuildContext buildContext) {
+this.buildContext = buildContext;
+}
+
+/**
+ * Does the actual copy of the file and logging.
+ *
+ * @param source represents the file to copy.
+ * @param destination file name of destination file.
+ * @throws IOException with a message if an error occurs.
+ */
+public void copyFile(Log log, File source, File destination) throws 
IOException, MojoExecutionException {
+log.info("Copying " + source + " to " + destination);

Review Comment:
   YAGNI. I spend way too much time wading through maven logs trying to 
understand why and how builds failed. Info messages for normal operations just 
get in the way and make developers' jobs harder. That someone somewhere might 
one day want this message is not a good enough reason to include it.
   
   I can sort of see letting this slip through as a separate issue from the 
refactoring, though now that I look at it, I think that refactoring should also 
remove the log argument here too. This is a new public API we did not have 
before, and including that Log argument now makes it harder to remove later 
since it would be a public API change. 
   
   If the choice is between adding this method with the Log argument and not 
doing the refactoring, I think I'm going to pick not doing the refactoring. 





> Code cleanups
> -
>
> Key: MDEP-923
> URL: https://issues.apache.org/jira/browse/MDEP-923
> Project: Maven Dependency Plugin
>  Issue Type: Task
>Reporter: Slawomir Jaranowski
>Assignee: Slawomir Jaranowski
>Priority: Major
> Fix For: 3.7.0
>
>
> * remove usage of deprecated API where possible
>  * cleanup pom after update to 42
>  * exclude transitive dependencies on org.apache.maven
>  * add {{@project.version@}} in ITs
>  * Remove plexus logger from DependencySilentLog
>  



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


[jira] [Commented] (MPLUGIN-525) Remove ant and beanshell support

2024-05-23 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MPLUGIN-525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17848934#comment-17848934
 ] 

ASF GitHub Bot commented on MPLUGIN-525:


michael-o commented on PR #285:
URL: 
https://github.com/apache/maven-plugin-tools/pull/285#issuecomment-2126989217

   > > Is this Maven 4 only?
   > 
   > Yes, I've created a [3.x 
branch](https://github.com/apache/maven-plugin-tools/tree/3.x) to support Maven 
3 plugins and master will support Maven 4 plugins. The goal is to split the 
plugins to ease maintenance, as the code will ultimately be quite different. 
See https://issues.apache.org/jira/browse/MPLUGIN-523. We should also drop the 
Maven 4.x support from the 3.x branch.
   
   I see. There is no way to have this in one branch with common modules and 
module per Maven version?




> Remove ant and beanshell support
> 
>
> Key: MPLUGIN-525
> URL: https://issues.apache.org/jira/browse/MPLUGIN-525
> Project: Maven Plugin Tools
>  Issue Type: Task
>Reporter: Guillaume Nodet
>Assignee: Guillaume Nodet
>Priority: Major
> Fix For: 4.0.0
>
>




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


[jira] [Commented] (MPLUGINTESTING-62) use maven API 3.6.0 and Plexus 2.0.0

2024-05-23 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MPLUGINTESTING-62?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17848933#comment-17848933
 ] 

ASF GitHub Bot commented on MPLUGINTESTING-62:
--

gnodet closed pull request #8: [MPLUGINTESTING-62] target maven 3.6.0 and 
Plexus 2.0.0
URL: https://github.com/apache/maven-plugin-testing/pull/8




> use maven API 3.6.0 and Plexus 2.0.0
> 
>
> Key: MPLUGINTESTING-62
> URL: https://issues.apache.org/jira/browse/MPLUGINTESTING-62
> Project: Maven Plugin Testing
>  Issue Type: Dependency upgrade
>Reporter: Samael Bate
>Priority: Major
>  Labels: close-pending
>
> Along with updating to use Java 7 (MPLUGINTESTING-61) the plugin should use a 
> recent maven API.
> As there is no 3.6.0 for maven-aether-provider it will need be set to 3.3.9



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


[jira] [Commented] (MNG-7902) sort plugins in validation report

2024-05-23 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-7902:
-

gnodet merged PR #1510:
URL: https://github.com/apache/maven/pull/1510




> sort plugins in validation report
> -
>
> Key: MNG-7902
> URL: https://issues.apache.org/jira/browse/MNG-7902
> Project: Maven
>  Issue Type: Improvement
>  Components: Core
>Reporter: Michael Keppler
>Priority: Minor
> Attachments: image-2023-10-07-13-33-27-762.png
>
>
> Please don't ever output the content of a Set for consumption by humans 
> without sorting it first. The order is otherwise "random". Sorting (case 
> insensitive) makes the same output easier to read, especially when trying to 
> find one specific entry (e.g. "Did we fix plugin foo already?")
> !image-2023-10-07-13-33-27-762.png!



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


[jira] [Commented] (MDEP-923) Code cleanups

2024-05-23 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MDEP-923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17848930#comment-17848930
 ] 

ASF GitHub Bot commented on MDEP-923:
-

slawekjaranowski commented on code in PR #389:
URL: 
https://github.com/apache/maven-dependency-plugin/pull/389#discussion_r1611596047


##
src/main/java/org/apache/maven/plugins/dependency/utils/CopyUtil.java:
##
@@ -0,0 +1,66 @@
+/*
+ * 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.
+ */
+package org.apache.maven.plugins.dependency.utils;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.inject.Singleton;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.logging.Log;
+import org.codehaus.plexus.util.FileUtils;
+import org.sonatype.plexus.build.incremental.BuildContext;
+
+/**
+ * Provide a copyFile method in one place.
+ */
+@Named
+@Singleton
+public class CopyUtil {
+
+private final BuildContext buildContext;
+
+@Inject
+public CopyUtil(BuildContext buildContext) {
+this.buildContext = buildContext;
+}
+
+/**
+ * Does the actual copy of the file and logging.
+ *
+ * @param source represents the file to copy.
+ * @param destination file name of destination file.
+ * @throws IOException with a message if an error occurs.
+ */
+public void copyFile(Log log, File source, File destination) throws 
IOException, MojoExecutionException {
+log.info("Copying " + source + " to " + destination);
+
+if (source.isDirectory()) {
+// usual case is a future jar packaging, but there are special 
cases: classifier and other packaging
+throw new MojoExecutionException("Artifact has not been packaged 
yet. When used on reactor artifact, "
++ "copy should be executed after packaging: see 
MDEP-187.");

Review Comment:
   try paste it in your favorite web search  
   here similar - it is refactor not improvements





> Code cleanups
> -
>
> Key: MDEP-923
> URL: https://issues.apache.org/jira/browse/MDEP-923
> Project: Maven Dependency Plugin
>  Issue Type: Task
>Reporter: Slawomir Jaranowski
>Assignee: Slawomir Jaranowski
>Priority: Major
> Fix For: 3.7.0
>
>
> * remove usage of deprecated API where possible
>  * cleanup pom after update to 42
>  * exclude transitive dependencies on org.apache.maven
>  * add {{@project.version@}} in ITs
>  * Remove plexus logger from DependencySilentLog
>  



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


[jira] [Commented] (MDEP-923) Code cleanups

2024-05-23 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MDEP-923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17848928#comment-17848928
 ] 

ASF GitHub Bot commented on MDEP-923:
-

slawekjaranowski commented on code in PR #389:
URL: 
https://github.com/apache/maven-dependency-plugin/pull/389#discussion_r1611591836


##
src/main/java/org/apache/maven/plugins/dependency/utils/CopyUtil.java:
##
@@ -0,0 +1,66 @@
+/*
+ * 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.
+ */
+package org.apache.maven.plugins.dependency.utils;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.inject.Singleton;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.logging.Log;
+import org.codehaus.plexus.util.FileUtils;
+import org.sonatype.plexus.build.incremental.BuildContext;
+
+/**
+ * Provide a copyFile method in one place.
+ */
+@Named
+@Singleton
+public class CopyUtil {
+
+private final BuildContext buildContext;
+
+@Inject
+public CopyUtil(BuildContext buildContext) {
+this.buildContext = buildContext;
+}
+
+/**
+ * Does the actual copy of the file and logging.
+ *
+ * @param source represents the file to copy.
+ * @param destination file name of destination file.
+ * @throws IOException with a message if an error occurs.
+ */
+public void copyFile(Log log, File source, File destination) throws 
IOException, MojoExecutionException {
+log.info("Copying " + source + " to " + destination);

Review Comment:
   As I said - I want to keep this as only refactor - without impact on final 
features
   
   If we want to remove such logs it should be a new issue for it ... maybe 
someone like or  use it





> Code cleanups
> -
>
> Key: MDEP-923
> URL: https://issues.apache.org/jira/browse/MDEP-923
> Project: Maven Dependency Plugin
>  Issue Type: Task
>Reporter: Slawomir Jaranowski
>Assignee: Slawomir Jaranowski
>Priority: Major
> Fix For: 3.7.0
>
>
> * remove usage of deprecated API where possible
>  * cleanup pom after update to 42
>  * exclude transitive dependencies on org.apache.maven
>  * add {{@project.version@}} in ITs
>  * Remove plexus logger from DependencySilentLog
>  



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


[jira] [Commented] (MPLUGIN-525) Remove ant and beanshell support

2024-05-23 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MPLUGIN-525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17848926#comment-17848926
 ] 

ASF GitHub Bot commented on MPLUGIN-525:


gnodet commented on PR #285:
URL: 
https://github.com/apache/maven-plugin-tools/pull/285#issuecomment-2126955036

   > Is this Maven 4 only?
   
   Yes, I've created a [3.x 
branch](https://github.com/apache/maven-plugin-tools/tree/3.x) to support Maven 
3 plugins and master will support Maven 4 plugins. The goal is to split the 
plugins to ease maintenance, as the code will ultimately be quite different.  
See https://issues.apache.org/jira/browse/MPLUGIN-523. We should also drop the 
Maven 4.x support from the 3.x branch.




> Remove ant and beanshell support
> 
>
> Key: MPLUGIN-525
> URL: https://issues.apache.org/jira/browse/MPLUGIN-525
> Project: Maven Plugin Tools
>  Issue Type: Task
>Reporter: Guillaume Nodet
>Assignee: Guillaume Nodet
>Priority: Major
> Fix For: 4.0.0
>
>




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


[jira] [Commented] (MRESOLVER-564) Align with Maven4 beta-3

2024-05-23 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MRESOLVER-564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17848914#comment-17848914
 ] 

ASF GitHub Bot commented on MRESOLVER-564:
--

cstamas commented on PR #480:
URL: https://github.com/apache/maven-resolver/pull/480#issuecomment-2126900491

   Before merge the staging repository (assuming beta-3 is release and is in 
Maven Central) should be dropped.




> Align with Maven4 beta-3
> 
>
> Key: MRESOLVER-564
> URL: https://issues.apache.org/jira/browse/MRESOLVER-564
> Project: Maven Resolver
>  Issue Type: Dependency upgrade
>Reporter: Tamas Cservenak
>Assignee: Tamas Cservenak
>Priority: Major
> Fix For: 2.0.0, 2.0.0-beta-1
>
>




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


[jira] [Commented] (MDEP-923) Code cleanups

2024-05-23 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MDEP-923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17848913#comment-17848913
 ] 

ASF GitHub Bot commented on MDEP-923:
-

elharo commented on code in PR #389:
URL: 
https://github.com/apache/maven-dependency-plugin/pull/389#discussion_r1611510587


##
src/main/java/org/apache/maven/plugins/dependency/utils/CopyUtil.java:
##
@@ -0,0 +1,66 @@
+/*
+ * 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.
+ */
+package org.apache.maven.plugins.dependency.utils;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.inject.Singleton;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.logging.Log;
+import org.codehaus.plexus.util.FileUtils;
+import org.sonatype.plexus.build.incremental.BuildContext;
+
+/**
+ * Provide a copyFile method in one place.
+ */
+@Named
+@Singleton
+public class CopyUtil {
+
+private final BuildContext buildContext;
+
+@Inject
+public CopyUtil(BuildContext buildContext) {
+this.buildContext = buildContext;
+}
+
+/**
+ * Does the actual copy of the file and logging.
+ *
+ * @param source represents the file to copy.
+ * @param destination file name of destination file.
+ * @throws IOException with a message if an error occurs.
+ */
+public void copyFile(Log log, File source, File destination) throws 
IOException, MojoExecutionException {
+log.info("Copying " + source + " to " + destination);

Review Comment:
   Log message is likely noise. Either thew copy succeeds and no one wants to 
read this, ior it fails and an exception is thrown. Demote to debug or remove 
it.



##
src/test/java/org/apache/maven/plugins/dependency/fromDependencies/TestCopyDependenciesMojo.java:
##
@@ -80,7 +80,7 @@ public void assertNoMarkerFile(Artifact artifact) throws 
MojoExecutionException
 assertFalse(handle.isMarkerSet());
 }
 
-public void testCopyFile() throws MojoExecutionException, IOException {
+public void testCopyFile() throws Exception {

Review Comment:
   did this change to throw a raw exception? Otherwise it's better to declare 
the actual exceptions instead of the common superclass. 



##
src/main/java/org/apache/maven/plugins/dependency/utils/CopyUtil.java:
##
@@ -0,0 +1,66 @@
+/*
+ * 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.
+ */
+package org.apache.maven.plugins.dependency.utils;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.inject.Singleton;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.logging.Log;
+import org.codehaus.plexus.util.FileUtils;
+import org.sonatype.plexus.build.incremental.BuildContext;
+
+/**
+ * Provide a copyFile method in one place.
+ */
+@Named
+@Singleton
+public class CopyUtil {
+
+private final BuildContext buildContext;
+
+@Inject
+public CopyUtil(BuildContext buildContext) {
+this.buildContext = buildContext;
+}
+
+/**
+ * Does the actual copy of the file and logging.
+ *
+ * @param source represents the file to copy.
+ * @param destination file name of destination file.
+ * @throws IOException with a message if an error occurs.
+ */
+

[jira] [Commented] (MRESOLVER-526) Import Eclipse Aether wiki content to Maven Site

2024-05-23 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MRESOLVER-526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17848908#comment-17848908
 ] 

ASF GitHub Bot commented on MRESOLVER-526:
--

cstamas merged PR #496:
URL: https://github.com/apache/maven-resolver/pull/496




> Import Eclipse Aether wiki content to Maven Site
> 
>
> Key: MRESOLVER-526
> URL: https://issues.apache.org/jira/browse/MRESOLVER-526
> Project: Maven Resolver
>  Issue Type: Task
>  Components: Resolver
>Reporter: Konrad Windszus
>Assignee: Tamas Cservenak
>Priority: Major
> Fix For: 2.0.0, 2.0.0-beta-1
>
> Attachments: EclipseAetherWikiExportAsMD.zip, 
> Eclipsepedia-20240410130147.xml
>
>
> As the Eclipse wiki is gonna be shutdown soon the content currently only 
> available on https://wiki.eclipse.org/Aether (and other pages with category 
> {{Aether}}) should be migrated to the resolver site.
> The steps for exporting and converting to Markdown are outlined at 
> https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-Move-FAQ.



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


[jira] [Commented] (MNG-7354) Refactor MavenCli to ease extensibility

2024-05-23 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-7354:
-

cstamas commented on PR #634:
URL: https://github.com/apache/maven/pull/634#issuecomment-2126753112

   This PR needs to be revived, at least on master (mvn4) as maintenance of 
mvnd is nightmare. Maven 3.9.x (mvnd m39) can remain as is, as it is not 
getting new features anymore, and hence, the frequency of changes will tend to 
zero, but mvn4 is different story.




> Refactor MavenCli to ease extensibility
> ---
>
> Key: MNG-7354
> URL: https://issues.apache.org/jira/browse/MNG-7354
> Project: Maven
>  Issue Type: Improvement
>Reporter: Guillaume Nodet
>Priority: Major
>
> {{mvnd}} has to fully rewrite {{MavenCli}} in order to extend / slightly 
> alter its behavior. 
> The goal is to avoid code duplication and ease maintenance for mvnd when 
> upgrading maven.



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


[jira] [Commented] (MINVOKER-351) Prevent XML-prohibited characters from entering JUnit report

2024-05-23 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MINVOKER-351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17848901#comment-17848901
 ] 

ASF GitHub Bot commented on MINVOKER-351:
-

michael-o commented on PR #242:
URL: 
https://github.com/apache/maven-invoker-plugin/pull/242#issuecomment-2126717780

   @slawekjaranowski Thanks for the great collaboration. We have achieved a 
awesome result here.




> Prevent XML-prohibited characters from entering JUnit report
> 
>
> Key: MINVOKER-351
> URL: https://issues.apache.org/jira/browse/MINVOKER-351
> Project: Maven Invoker Plugin
>  Issue Type: Bug
>Reporter: Mikkel Kjeldsen
>Assignee: Slawomir Jaranowski
>Priority: Major
> Fix For: 3.7.0
>
> Attachments: minvoker-351.tar.gz
>
>
> Neither the Maven Invoker plugin's implementation of {{}} 
> nor the underlying XML infrastructure directly protect against the presence 
> of character literals prohibited by the XML specification, meaning such 
> literals can appear in the JUnit report and render it unreadable. *I would 
> appreciate if the Maven Invoker plugin could learn to strip prohibited 
> literals to protect its users from creative plugins.* I argue that this is a 
> safe and expected transformation that is not materially lossy.
> 
> h2. Background
> MINVOKER-196 added the {{}} option [back in 
> maven-invoker-plugin-3.2.1|https://github.com/apache/maven-invoker-plugin/blob/maven-invoker-plugin-3.2.1/src/main/java/org/apache/maven/plugins/invoker/AbstractInvokerMojo.java#L1878-L1946].
>  As of [maven-invoker-plugin-3.6.0 the effective implementation of the JUnit 
> report remains effectively 
> unchanged|https://github.com/apache/maven-invoker-plugin/blob/maven-invoker-plugin-3.6.0/src/main/java/org/apache/maven/plugins/invoker/AbstractInvokerMojo.java#L1695-L1754].
> The JUnit report includes a {{}} element ([example 
> documentation|https://github.com/testmoapp/junitxml]) whose value Maven 
> Invoker populates with the raw build log contents. I've observed that this 
> value is XML-escaped, which I imagine is well understood in the 
> implementation, although I can't immediately find documentation to support 
> that.
> However, escaping notwithstanding, a number of character literals are 
> outright prohibited by the XML specifications. These literals cannot be 
> escaped, and their presence renders an XML document not well formed. The 
> exact set of prohibited characters varies by XML version; the report produced 
> by the Maven Invoker plugin is XML version 1.0. When the Maven Invoker plugin 
> reads in the build log it does not strip these character literals and neither 
> does the XML writer the Maven Invoker plugin relies on. Consequently, if a 
> build log ends up including a prohibited character the resulting JUnit report 
> will not be well formed.
> The set of prohibited characters is the complement of [the XML 
> specification's definition of {{Char}}|https://www.w3.org/TR/xml/#NT-Char].
> h2. Example
> Among the literals prohibited by XML version 1.0 is {{^H}} (backspace). When 
> [pitest runs via Maven|https://pitest.org/quickstart/maven/] it prints a 
> spinner to standard out, and the implementation uses backspace to render the 
> spinner in place. I have used the Maven Invoker plugin with 
> {{}} to verify a pitest configuration, whereby I discovered 
> this limitation.
> h2. Remediation
> h3. Blame plugins
> Perhaps pitest should not behave this way but we can't change pitest, and 
> even if pitest could be changed that offers no protection against any other 
> plugin, so blaming plugins is an ineffective course of action.
> h3. Work-arounds
> The user can manually clean the build log in-place via 
> {{}}. This is technically fairly easy to do, and makes 
> the transformation very explicit, but it requires considerable local work to 
> address an issue many would find obscure and the transformation is 
> permanently lossy unless the user also backs up the raw log to another file 
> name.
> h3. Strip prohibited literals inside Maven Invoker plugin
> If the Maven Invoker plugin learns to strip offending character literals 
> in-between reading the build log and writing to the {{}} value 
> then {{}} will Just Work™, which I assert is what a user 
> will typically expect. Although the {{}} value will no longer 
> exactly match the build log contents, this lossy translation is acceptable: 
> the prohibited characters are overwhelmingly unprintable to begin with and 
> therefore cannot be meaningfully rendered in a static context, and the raw 
> build log remains unchanged in the event that the user needs to investigate 
> or assert against the raw output.
> This change would be backwards compatible, because any existing user that 
> would be affected by it would 

[jira] [Commented] (MPLUGINTESTING-94) Create 3.x branch and switch master to support Maven 4.x

2024-05-23 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MPLUGINTESTING-94?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17848900#comment-17848900
 ] 

ASF GitHub Bot commented on MPLUGINTESTING-94:
--

gnodet opened a new pull request, #40:
URL: https://github.com/apache/maven-plugin-testing/pull/40

   (no comment)




> Create 3.x branch and switch master to support Maven 4.x
> 
>
> Key: MPLUGINTESTING-94
> URL: https://issues.apache.org/jira/browse/MPLUGINTESTING-94
> Project: Maven Plugin Testing
>  Issue Type: Task
>Reporter: Guillaume Nodet
>Assignee: Guillaume Nodet
>Priority: Major
> Fix For: 4.0.0-alpha-3
>
>




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


[jira] [Commented] (MPLUGIN-525) Remove ant and beanshell support

2024-05-23 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MPLUGIN-525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17848896#comment-17848896
 ] 

ASF GitHub Bot commented on MPLUGIN-525:


michael-o commented on PR #285:
URL: 
https://github.com/apache/maven-plugin-tools/pull/285#issuecomment-2126686147

   Is this Maven 4 only?




> Remove ant and beanshell support
> 
>
> Key: MPLUGIN-525
> URL: https://issues.apache.org/jira/browse/MPLUGIN-525
> Project: Maven Plugin Tools
>  Issue Type: Task
>Reporter: Guillaume Nodet
>Assignee: Guillaume Nodet
>Priority: Major
> Fix For: 4.0.0
>
>




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


[jira] [Commented] (MPLUGIN-508) Upgrade to Maven 4.x

2024-05-23 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MPLUGIN-508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17848877#comment-17848877
 ] 

ASF GitHub Bot commented on MPLUGIN-508:


gnodet closed pull request #242: [MPLUGIN-508] Upgrade to Maven 4.0.0-alpha-13
URL: https://github.com/apache/maven-plugin-tools/pull/242




> Upgrade to Maven 4.x
> 
>
> Key: MPLUGIN-508
> URL: https://issues.apache.org/jira/browse/MPLUGIN-508
> Project: Maven Plugin Tools
>  Issue Type: New Feature
>Affects Versions: 3.12.0
>Reporter: Guillaume Nodet
>Assignee: Guillaume Nodet
>Priority: Major
> Fix For: 4.0.0
>
>




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


[jira] [Commented] (MPLUGIN-508) Upgrade to Maven 4.x

2024-05-23 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MPLUGIN-508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17848876#comment-17848876
 ] 

ASF GitHub Bot commented on MPLUGIN-508:


gnodet commented on PR #242:
URL: 
https://github.com/apache/maven-plugin-tools/pull/242#issuecomment-2126521901

   Closed in favour of https://github.com/apache/maven-plugin-tools/pull/286




> Upgrade to Maven 4.x
> 
>
> Key: MPLUGIN-508
> URL: https://issues.apache.org/jira/browse/MPLUGIN-508
> Project: Maven Plugin Tools
>  Issue Type: New Feature
>Affects Versions: 3.12.0
>Reporter: Guillaume Nodet
>Assignee: Guillaume Nodet
>Priority: Major
> Fix For: 4.0.0
>
>




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


[jira] [Commented] (MPLUGIN-508) Upgrade to Maven 4.x

2024-05-23 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MPLUGIN-508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17848875#comment-17848875
 ] 

ASF GitHub Bot commented on MPLUGIN-508:


gnodet opened a new pull request, #286:
URL: https://github.com/apache/maven-plugin-tools/pull/286

   - **[MPLUGIN-523] Switch to version 4.0.0-SNAPSHOT**
   - **[MPLUGIN-525] Remove ant and beanshell support**
   - **[MPLUGIN-508] Upgrade to 4.0.0-beta-3**
   




> Upgrade to Maven 4.x
> 
>
> Key: MPLUGIN-508
> URL: https://issues.apache.org/jira/browse/MPLUGIN-508
> Project: Maven Plugin Tools
>  Issue Type: New Feature
>Affects Versions: 3.12.0
>Reporter: Guillaume Nodet
>Assignee: Guillaume Nodet
>Priority: Major
> Fix For: 4.0.0
>
>




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


[jira] [Commented] (MSHADE-452) Shade plugin can't replace SPI content correct when pattern not end with dot

2024-05-23 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MSHADE-452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17848873#comment-17848873
 ] 

ASF GitHub Bot commented on MSHADE-452:
---

hk-lrzy commented on PR #193:
URL: 
https://github.com/apache/maven-shade-plugin/pull/193#issuecomment-2126515899

   > Hi @hk-lrzy , sorry for the delay (guess the PR popped during holidays). 
From my window this PR has the risk to revert some of the fixes done before. 
Long story short shade mixing the same API (relocation) for sources (variables, 
classes, packages), paths and other things, there is always a such a risk so 
ultimately I think a safer fix would make the relocated file more contextual 
(`if (filePath ~ META-INF/services/xx` then use relocateSPIFile()` to share 
the idea).
   > 
   > Hope it makes sense.
   
   Thanks for reply, i will recheck the logical follow your suggestion and 
commit it later.




> Shade plugin can't replace SPI content correct when pattern not end with dot
> 
>
> Key: MSHADE-452
> URL: https://issues.apache.org/jira/browse/MSHADE-452
> Project: Maven Shade Plugin
>  Issue Type: Bug
>Affects Versions: 3.5.0
>Reporter: hk__lrzy
>Priority: Critical
> Attachments: 20230720-205856.png, 20230720-205900.png
>
>
> We have java path as below
> _*org.apache.demo1*_
> _*org.apache.demo2*_
> In {_}*maven-shade-plugin 3.2.1*{_}, we use relocation to process path and 
> SPI Service file at the same time, and we will follow result.
> {code:java}
> 
> org.apache.demo
> shaded.org.apache.demo
>  {code}
> {code:java}
> META-INF/services/shaded.org.apache.demo{code}
> But in _*maven-shaded-plugin 3.5.0,*_ it can't work as before, alouthght it 
> SPI file name alao could be changed, but the SPI file content will {_}*have 
> no change*{_}.
> I see the differneces between the _*maven-shaded-plugin 3.5.0 and 
> maven-shaded-plugin 3.2.1,*_ finally find in _*maven-shaded-plugin 3.2.1,*_ 
> file content changed by follow code
>  
> {code:java}
> public String applyToSourceContent( String sourceContent )
> {
> if ( rawString )
> {
> return sourceContent;
> }
> else
> {
> return sourceContent.replaceAll( "\\b" + pattern, shadedPattern );
> }
> }{code}
> but in {_}*maven-shaded-plugin 3.5.0*{_}, _**_ the code change to 
> {code:java}
> private String shadeSourceWithExcludes( String sourceContent, String 
> patternFrom, String patternTo,
> Set excludedPatterns )
> {
> // Usually shading makes package names a bit longer, so make buffer 10% 
> bigger than original source
> StringBuilder shadedSourceContent = new StringBuilder( 
> sourceContent.length() * 11 / 10 );
> boolean isFirstSnippet = true;
> // Make sure that search pattern starts at word boundary and we look for 
> literal ".", not regex jokers
> for ( String snippet : sourceContent.split( "\\b" + patternFrom.replace( 
> ".", "[.]" + "\\b" ) ) )
> {
> boolean doExclude = false;
> for ( String excludedPattern : excludedPatterns )
> {
> if ( snippet.startsWith( excludedPattern ) )
> {
> doExclude = true;
> break;
> }
> }
> if ( isFirstSnippet )
> {
> shadedSourceContent.append( snippet );
> isFirstSnippet = false;
> }
> else
> {
> shadedSourceContent.append( doExclude ? patternFrom : patternTo 
> ).append( snippet );
> }
> }
> return shadedSourceContent.toString();
> } {code}
> In my cases, source content is {_}*org.apache.demo1*{_}, pattern from is 
> {_}*org.apache.demo*{_}, pattern to is _*shaded.org.apache.demo.*_
> and the code _*sourceContent.split( "\\b" + patternFrom.replace( ".", "[.]" + 
> "\\b" ) )*_ __ will only have one response.
>  



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


[jira] [Commented] (MPLUGIN-525) Remove ant and beanshell support

2024-05-23 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MPLUGIN-525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17848872#comment-17848872
 ] 

ASF GitHub Bot commented on MPLUGIN-525:


gnodet opened a new pull request, #285:
URL: https://github.com/apache/maven-plugin-tools/pull/285

   - **[MPLUGIN-523] Switch to version 4.0.0-SNAPSHOT**
   - **[MPLUGIN-525] Remove ant and beanshell support**
   




> Remove ant and beanshell support
> 
>
> Key: MPLUGIN-525
> URL: https://issues.apache.org/jira/browse/MPLUGIN-525
> Project: Maven Plugin Tools
>  Issue Type: Task
>Reporter: Guillaume Nodet
>Assignee: Guillaume Nodet
>Priority: Major
> Fix For: 4.0.0
>
>




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


[jira] [Commented] (MPLUGIN-523) Split Maven3 and Maven4 support

2024-05-23 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MPLUGIN-523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17848864#comment-17848864
 ] 

ASF GitHub Bot commented on MPLUGIN-523:


gnodet opened a new pull request, #284:
URL: https://github.com/apache/maven-plugin-tools/pull/284

   (no comment)




> Split Maven3 and Maven4 support
> ---
>
> Key: MPLUGIN-523
> URL: https://issues.apache.org/jira/browse/MPLUGIN-523
> Project: Maven Plugin Tools
>  Issue Type: Task
>  Components: Plugin Plugin
>Reporter: Tamas Cservenak
>Priority: Major
> Fix For: 4.0.0, 3.14.0
>
>
> We should split m-p-p (two branches), one for Maven3 (maven-3.x) and one for 
> Maven4 (master), as plugin can be only this or that, no need to support both 
> at same time. This will result in simpl(er) code base, defaults, config.



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


[jira] [Commented] (MDEP-929) Bump org.apache.maven.shared:maven-dependency-analyzer from 1.13.2 to 1.14.1

2024-05-22 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MDEP-929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17848768#comment-17848768
 ] 

ASF GitHub Bot commented on MDEP-929:
-

slawekjaranowski merged PR #394:
URL: https://github.com/apache/maven-dependency-plugin/pull/394




> Bump org.apache.maven.shared:maven-dependency-analyzer from 1.13.2 to 1.14.1
> 
>
> Key: MDEP-929
> URL: https://issues.apache.org/jira/browse/MDEP-929
> Project: Maven Dependency Plugin
>  Issue Type: Dependency upgrade
>Reporter: Slawomir Jaranowski
>Assignee: Slawomir Jaranowski
>Priority: Major
> Fix For: 3.7.0
>
>




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


[jira] [Commented] (MNG-7902) sort plugins in validation report

2024-05-22 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-7902:
-

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


##
maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultPluginValidationManager.java:
##
@@ -203,7 +204,7 @@ public void reportPluginMojoValidationIssue(
 mayReportInline(mavenSession.getRepositorySession(), locality, issue);
 }
 
-private void reportSessionCollectedValidationIssues(MavenSession 
mavenSession) {
+public void reportSessionCollectedValidationIssues(MavenSession 
mavenSession) {

Review Comment:
   why change to `public`?





> sort plugins in validation report
> -
>
> Key: MNG-7902
> URL: https://issues.apache.org/jira/browse/MNG-7902
> Project: Maven
>  Issue Type: Improvement
>  Components: Core
>Reporter: Michael Keppler
>Priority: Minor
> Attachments: image-2023-10-07-13-33-27-762.png
>
>
> Please don't ever output the content of a Set for consumption by humans 
> without sorting it first. The order is otherwise "random". Sorting (case 
> insensitive) makes the same output easier to read, especially when trying to 
> find one specific entry (e.g. "Did we fix plugin foo already?")
> !image-2023-10-07-13-33-27-762.png!



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


[jira] [Commented] (MNG-7902) sort plugins in validation report

2024-05-22 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-7902:
-

yuehcw commented on code in PR #1510:
URL: https://github.com/apache/maven/pull/1510#discussion_r1610724857


##
maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultPluginValidationManager.java:
##
@@ -23,17 +23,7 @@
 
 import java.nio.file.Path;
 import java.nio.file.Paths;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;

Review Comment:
   Hello,
   
   I have made the requested changes and pushed the new commit to this pull 
request. Please review the updates at your earliest convenience. Thank you for 
your feedback and guidance!





> sort plugins in validation report
> -
>
> Key: MNG-7902
> URL: https://issues.apache.org/jira/browse/MNG-7902
> Project: Maven
>  Issue Type: Improvement
>  Components: Core
>Reporter: Michael Keppler
>Priority: Minor
> Attachments: image-2023-10-07-13-33-27-762.png
>
>
> Please don't ever output the content of a Set for consumption by humans 
> without sorting it first. The order is otherwise "random". Sorting (case 
> insensitive) makes the same output easier to read, especially when trying to 
> find one specific entry (e.g. "Did we fix plugin foo already?")
> !image-2023-10-07-13-33-27-762.png!



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


[jira] [Commented] (MNG-7902) sort plugins in validation report

2024-05-22 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-7902:
-

yuehcw commented on code in PR #1510:
URL: https://github.com/apache/maven/pull/1510#discussion_r1610725091


##
maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultPluginValidationManager.java:
##
@@ -222,7 +212,12 @@ private void 
reportSessionCollectedValidationIssues(MavenSession mavenSession) {
 logger.warn("");
 logger.warn("Plugin {} validation issues were detected in 
following plugin(s)", issueLocalitiesToReport);
 logger.warn("");
-for (Map.Entry entry : 
issuesMap.entrySet()) {
+
+// Sorting the plugins (Fix the open issue)

Review Comment:
   Fixed! 





> sort plugins in validation report
> -
>
> Key: MNG-7902
> URL: https://issues.apache.org/jira/browse/MNG-7902
> Project: Maven
>  Issue Type: Improvement
>  Components: Core
>Reporter: Michael Keppler
>Priority: Minor
> Attachments: image-2023-10-07-13-33-27-762.png
>
>
> Please don't ever output the content of a Set for consumption by humans 
> without sorting it first. The order is otherwise "random". Sorting (case 
> insensitive) makes the same output easier to read, especially when trying to 
> find one specific entry (e.g. "Did we fix plugin foo already?")
> !image-2023-10-07-13-33-27-762.png!



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


[jira] [Commented] (MPLUGIN-508) Upgrade to Maven 4.0.0-alpha-12

2024-05-22 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MPLUGIN-508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17848755#comment-17848755
 ] 

ASF GitHub Bot commented on MPLUGIN-508:


slawekjaranowski commented on code in PR #242:
URL: 
https://github.com/apache/maven-plugin-tools/pull/242#discussion_r1610706745


##
pom.xml:
##
@@ -333,6 +333,21 @@
 
   
 
+  
+
+  
+true
+never
+fail
+  
+  
+false
+  
+  maven-2126
+  https://repository.apache.org/content/repositories/maven-2126/

Review Comment:
   should be a PR as draft





> Upgrade to Maven 4.0.0-alpha-12
> ---
>
> Key: MPLUGIN-508
> URL: https://issues.apache.org/jira/browse/MPLUGIN-508
> Project: Maven Plugin Tools
>  Issue Type: Improvement
>Affects Versions: 3.12.0
>Reporter: Guillaume Nodet
>Assignee: Guillaume Nodet
>Priority: Major
>




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


[jira] [Commented] (MDEP-923) Code cleanups

2024-05-22 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MDEP-923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17848754#comment-17848754
 ] 

ASF GitHub Bot commented on MDEP-923:
-

slawekjaranowski commented on code in PR #389:
URL: 
https://github.com/apache/maven-dependency-plugin/pull/389#discussion_r1610688853


##
src/main/java/org/apache/maven/plugins/dependency/utils/CopyUtil.java:
##
@@ -0,0 +1,70 @@
+/*
+ * 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.
+ */
+package org.apache.maven.plugins.dependency.utils;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.inject.Singleton;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.logging.Log;
+import org.codehaus.plexus.util.FileUtils;
+import org.sonatype.plexus.build.incremental.BuildContext;
+
+/**
+ * Provide a copyFile method in one place.
+ */
+@Named
+@Singleton
+public class CopyUtil {
+
+private final BuildContext buildContext;
+
+@Inject
+public CopyUtil(BuildContext buildContext) {
+this.buildContext = buildContext;
+}
+
+/**
+ * Does the actual copy of the file and logging.
+ *
+ * @param source represents the file to copy.
+ * @param destination file name of destination file.
+ * @throws MojoExecutionException with a message if an error occurs.
+ */
+public void copyFile(Log log, File source, File destination) throws 
MojoExecutionException {
+try {
+log.info("Copying " + source + " to " + destination);
+
+if (source.isDirectory()) {
+// usual case is a future jar packaging, but there are special 
cases: classifier and other packaging
+throw new MojoExecutionException("Artifact has not been 
packaged yet. When used on reactor artifact, "
++ "copy should be executed after packaging: see 
MDEP-187.");
+}
+
+FileUtils.copyFile(source, destination);
+buildContext.refresh(destination);
+} catch (IOException e) {

Review Comment:
   done - please look





> Code cleanups
> -
>
> Key: MDEP-923
> URL: https://issues.apache.org/jira/browse/MDEP-923
> Project: Maven Dependency Plugin
>  Issue Type: Task
>Reporter: Slawomir Jaranowski
>Assignee: Slawomir Jaranowski
>Priority: Major
> Fix For: 3.7.0
>
>
> * remove usage of deprecated API where possible
>  * cleanup pom after update to 42
>  * exclude transitive dependencies on org.apache.maven
>  * add {{@project.version@}} in ITs
>  * Remove plexus logger from DependencySilentLog
>  



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


[jira] [Commented] (MINVOKER-351) Prevent XML-prohibited characters from entering JUnit report

2024-05-22 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MINVOKER-351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17848750#comment-17848750
 ] 

ASF GitHub Bot commented on MINVOKER-351:
-

slawekjaranowski merged PR #242:
URL: https://github.com/apache/maven-invoker-plugin/pull/242




> Prevent XML-prohibited characters from entering JUnit report
> 
>
> Key: MINVOKER-351
> URL: https://issues.apache.org/jira/browse/MINVOKER-351
> Project: Maven Invoker Plugin
>  Issue Type: Bug
>Reporter: Mikkel Kjeldsen
>Assignee: Slawomir Jaranowski
>Priority: Major
> Fix For: 3.7.0
>
> Attachments: minvoker-351.tar.gz
>
>
> Neither the Maven Invoker plugin's implementation of {{}} 
> nor the underlying XML infrastructure directly protect against the presence 
> of character literals prohibited by the XML specification, meaning such 
> literals can appear in the JUnit report and render it unreadable. *I would 
> appreciate if the Maven Invoker plugin could learn to strip prohibited 
> literals to protect its users from creative plugins.* I argue that this is a 
> safe and expected transformation that is not materially lossy.
> 
> h2. Background
> MINVOKER-196 added the {{}} option [back in 
> maven-invoker-plugin-3.2.1|https://github.com/apache/maven-invoker-plugin/blob/maven-invoker-plugin-3.2.1/src/main/java/org/apache/maven/plugins/invoker/AbstractInvokerMojo.java#L1878-L1946].
>  As of [maven-invoker-plugin-3.6.0 the effective implementation of the JUnit 
> report remains effectively 
> unchanged|https://github.com/apache/maven-invoker-plugin/blob/maven-invoker-plugin-3.6.0/src/main/java/org/apache/maven/plugins/invoker/AbstractInvokerMojo.java#L1695-L1754].
> The JUnit report includes a {{}} element ([example 
> documentation|https://github.com/testmoapp/junitxml]) whose value Maven 
> Invoker populates with the raw build log contents. I've observed that this 
> value is XML-escaped, which I imagine is well understood in the 
> implementation, although I can't immediately find documentation to support 
> that.
> However, escaping notwithstanding, a number of character literals are 
> outright prohibited by the XML specifications. These literals cannot be 
> escaped, and their presence renders an XML document not well formed. The 
> exact set of prohibited characters varies by XML version; the report produced 
> by the Maven Invoker plugin is XML version 1.0. When the Maven Invoker plugin 
> reads in the build log it does not strip these character literals and neither 
> does the XML writer the Maven Invoker plugin relies on. Consequently, if a 
> build log ends up including a prohibited character the resulting JUnit report 
> will not be well formed.
> The set of prohibited characters is the complement of [the XML 
> specification's definition of {{Char}}|https://www.w3.org/TR/xml/#NT-Char].
> h2. Example
> Among the literals prohibited by XML version 1.0 is {{^H}} (backspace). When 
> [pitest runs via Maven|https://pitest.org/quickstart/maven/] it prints a 
> spinner to standard out, and the implementation uses backspace to render the 
> spinner in place. I have used the Maven Invoker plugin with 
> {{}} to verify a pitest configuration, whereby I discovered 
> this limitation.
> h2. Remediation
> h3. Blame plugins
> Perhaps pitest should not behave this way but we can't change pitest, and 
> even if pitest could be changed that offers no protection against any other 
> plugin, so blaming plugins is an ineffective course of action.
> h3. Work-arounds
> The user can manually clean the build log in-place via 
> {{}}. This is technically fairly easy to do, and makes 
> the transformation very explicit, but it requires considerable local work to 
> address an issue many would find obscure and the transformation is 
> permanently lossy unless the user also backs up the raw log to another file 
> name.
> h3. Strip prohibited literals inside Maven Invoker plugin
> If the Maven Invoker plugin learns to strip offending character literals 
> in-between reading the build log and writing to the {{}} value 
> then {{}} will Just Work™, which I assert is what a user 
> will typically expect. Although the {{}} value will no longer 
> exactly match the build log contents, this lossy translation is acceptable: 
> the prohibited characters are overwhelmingly unprintable to begin with and 
> therefore cannot be meaningfully rendered in a static context, and the raw 
> build log remains unchanged in the event that the user needs to investigate 
> or assert against the raw output.
> This change would be backwards compatible, because any existing user that 
> would be affected by it would already have unparseable JUnit reports.
> * I _believe_ that Java's {{j.u.r.Pattern}} can trivially express the 
> 

[jira] [Commented] (MDEP-928) Allow to exclude classes from dependency:analyze

2024-05-22 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MDEP-928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17848749#comment-17848749
 ] 

ASF GitHub Bot commented on MDEP-928:
-

slawekjaranowski merged PR #393:
URL: https://github.com/apache/maven-dependency-plugin/pull/393




> Allow to exclude classes from dependency:analyze
> 
>
> Key: MDEP-928
> URL: https://issues.apache.org/jira/browse/MDEP-928
> Project: Maven Dependency Plugin
>  Issue Type: New Feature
>  Components: analyze, analyze-only, analyze-report
>Reporter: Slawomir Jaranowski
>Assignee: Slawomir Jaranowski
>Priority: Major
> Fix For: 3.7.0
>
>
> Some of classes can be broken - so possibility to exclude can be helpful.



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


[jira] [Commented] (MDEP-799) improve mvn dependency:tree - add optional JSON output of the results

2024-05-22 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/MDEP-799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17848739#comment-17848739
 ] 

ASF GitHub Bot commented on MDEP-799:
-

LogFlames commented on code in PR #391:
URL: 
https://github.com/apache/maven-dependency-plugin/pull/391#discussion_r1610578562


##
src/test/java/org/apache/maven/plugins/dependency/tree/TestTreeMojo.java:
##
@@ -137,6 +147,74 @@ public void testTreeTGFSerializing() throws Exception {
 assertTrue(findString(contents, 
"testGroupId:release:jar:1.0:compile"));
 }
 
+/**
+ * Test the JSON format serialization on DependencyNodes with circular 
dependence
+ */
+public void testTreeJsonCircularDependency() throws Exception {
+String outputFileName = testDir.getAbsolutePath() + "tree1.json";
+File outputFile = new File(outputFileName);
+Files.createDirectories(outputFile.getParentFile().toPath());
+outputFile.createNewFile();
+
+Artifact artifact1 = this.stubFactory.createArtifact("testGroupId", 
"project1", "1.0");
+Artifact artifact2 = this.stubFactory.createArtifact("testGroupId", 
"project2", "1.0");
+DefaultDependencyNode node1 = new DefaultDependencyNode(artifact1);
+DefaultDependencyNode node2 = new DefaultDependencyNode(artifact2);
+
+node1.setChildren(new ArrayList());
+node2.setChildren(new ArrayList());
+
+node1.getChildren().add(node2);
+node2.getChildren().add(node1);
+
+JsonDependencyNodeVisitor jsonDependencyNodeVisitor =
+new JsonDependencyNodeVisitor(new OutputStreamWriter(new 
FileOutputStream(outputFile)));
+
+jsonDependencyNodeVisitor.visit(node1);
+}
+
+/*
+ * Test parsing of Json output and verify all key-value pairs
+ */
+public void testTreeJsonParsing() throws Exception {
+List contents = runTreeMojo("tree2.json", "json");
+
+JsonReader reader = Json.createReader(new 
StringReader(String.join("\n", contents)));
+JsonObject root = reader.readObject();
+reader.close();

Review Comment:
   Cool feature, thanks! This has been updated to use try-with-resource





> improve mvn dependency:tree - add optional JSON output of the results
> -
>
> Key: MDEP-799
> URL: https://issues.apache.org/jira/browse/MDEP-799
> Project: Maven Dependency Plugin
>  Issue Type: New Feature
>  Components: tree
>Reporter: Zhenxu Ke
>Priority: Major
>
> I'd like to add an output type JSON, will open a pull request soon



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


  1   2   3   4   5   6   7   8   9   10   >