Re: [PR] [MNG-8134] Add a @Resolution annotation to mojos to inject project dependencies collection / resolution result [maven]

2024-06-11 Thread via GitHub


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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



[jira] [Commented] (MNG-8134) Provide an annotation that can be used to inject dependencies resolution/collection in mojos

2024-06-11 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-8134:
-

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




> Provide an annotation that can be used to inject dependencies 
> resolution/collection in mojos
> 
>
> Key: MNG-8134
> URL: https://issues.apache.org/jira/browse/MNG-8134
> Project: Maven
>  Issue Type: Task
>Reporter: Guillaume Nodet
>Priority: Major
> Fix For: 4.0.0
>
>
> See 
> https://github.com/apache/maven-plugin-tools/pull/286#discussion_r1620871349



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


[jira] [Closed] (MNG-8151) Merge DependencyCollector into DependencyResolver

2024-06-11 Thread Guillaume Nodet (Jira)


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

Guillaume Nodet closed MNG-8151.

Resolution: Fixed

Fixed with [[MNG-8151] Merge DependencyCollector into 
DependencyResolver|https://github.com/apache/maven/pull/1559/commits/097344fca58b6e3ab33b403b5c7be102b9f32f16]

> Merge DependencyCollector into DependencyResolver
> -
>
> Key: MNG-8151
> URL: https://issues.apache.org/jira/browse/MNG-8151
> Project: Maven
>  Issue Type: Improvement
>  Components: API
>Reporter: Guillaume Nodet
>Assignee: Guillaume Nodet
>Priority: Major
> Fix For: 4.0.0-beta-4
>
>




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


[jira] [Closed] (MNG-8152) Implement @SessionScoped and @MojoExecutionScoped from the DI API

2024-06-11 Thread Guillaume Nodet (Jira)


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

Guillaume Nodet closed MNG-8152.

Resolution: Fixed

> Implement @SessionScoped and @MojoExecutionScoped from the DI API
> -
>
> Key: MNG-8152
> URL: https://issues.apache.org/jira/browse/MNG-8152
> Project: Maven
>  Issue Type: Improvement
>Reporter: Guillaume Nodet
>Assignee: Guillaume Nodet
>Priority: Major
> Fix For: 4.0.0-beta-4
>
>




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


[jira] [Commented] (MNG-8152) Implement @SessionScoped and @MojoExecutionScoped from the DI API

2024-06-11 Thread Guillaume Nodet (Jira)


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

Guillaume Nodet commented on MNG-8152:
--

Fixed with [[MNG-8152] Implement @SessionScoped and @MojoExecutionScoped from 
the…|https://github.com/apache/maven/pull/1559/commits/b1590a52ed78983cd24399639ac412f1647481fb]

> Implement @SessionScoped and @MojoExecutionScoped from the DI API
> -
>
> Key: MNG-8152
> URL: https://issues.apache.org/jira/browse/MNG-8152
> Project: Maven
>  Issue Type: Improvement
>Reporter: Guillaume Nodet
>Assignee: Guillaume Nodet
>Priority: Major
> Fix For: 4.0.0-beta-4
>
>




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


[jira] [Commented] (MNG-8134) Provide an annotation that can be used to inject dependencies resolution/collection in mojos

2024-06-11 Thread Guillaume Nodet (Jira)


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

Guillaume Nodet commented on MNG-8134:
--

Fixed with 
[https://github.com/apache/maven/pull/1559/commits/6aa4f0663a3c5b22f2626723cadad22461b8d76f]

> Provide an annotation that can be used to inject dependencies 
> resolution/collection in mojos
> 
>
> Key: MNG-8134
> URL: https://issues.apache.org/jira/browse/MNG-8134
> Project: Maven
>  Issue Type: Task
>Reporter: Guillaume Nodet
>Priority: Major
> Fix For: 4.0.0
>
>
> See 
> https://github.com/apache/maven-plugin-tools/pull/286#discussion_r1620871349



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


[jira] [Updated] (MNG-8134) Provide an annotation that can be used to inject dependencies resolution/collection in mojos

2024-06-11 Thread Guillaume Nodet (Jira)


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

Guillaume Nodet updated MNG-8134:
-
Fix Version/s: 4.0.0-beta-4

> Provide an annotation that can be used to inject dependencies 
> resolution/collection in mojos
> 
>
> Key: MNG-8134
> URL: https://issues.apache.org/jira/browse/MNG-8134
> Project: Maven
>  Issue Type: Task
>Reporter: Guillaume Nodet
>Priority: Major
> Fix For: 4.0.0, 4.0.0-beta-4
>
>
> See 
> https://github.com/apache/maven-plugin-tools/pull/286#discussion_r1620871349



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


[jira] [Updated] (MNG-8151) Merge DependencyCollector into DependencyResolver

2024-06-11 Thread Guillaume Nodet (Jira)


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

Guillaume Nodet updated MNG-8151:
-
Fix Version/s: 4.0.0

> Merge DependencyCollector into DependencyResolver
> -
>
> Key: MNG-8151
> URL: https://issues.apache.org/jira/browse/MNG-8151
> Project: Maven
>  Issue Type: Improvement
>  Components: API
>Reporter: Guillaume Nodet
>Assignee: Guillaume Nodet
>Priority: Major
> Fix For: 4.0.0, 4.0.0-beta-4
>
>




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


[jira] [Updated] (MNG-8152) Implement @SessionScoped and @MojoExecutionScoped from the DI API

2024-06-11 Thread Guillaume Nodet (Jira)


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

Guillaume Nodet updated MNG-8152:
-
Fix Version/s: 4.0.0

> Implement @SessionScoped and @MojoExecutionScoped from the DI API
> -
>
> Key: MNG-8152
> URL: https://issues.apache.org/jira/browse/MNG-8152
> Project: Maven
>  Issue Type: Improvement
>Reporter: Guillaume Nodet
>Assignee: Guillaume Nodet
>Priority: Major
> Fix For: 4.0.0, 4.0.0-beta-4
>
>




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


[jira] [Updated] (MNG-8134) Provide a @Resolution annotation that can be used to inject dependencies resolution/collection in mojos

2024-06-11 Thread Guillaume Nodet (Jira)


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

Guillaume Nodet updated MNG-8134:
-
Summary: Provide a @Resolution annotation that can be used to inject 
dependencies resolution/collection in mojos  (was: Provide an annotation that 
can be used to inject dependencies resolution/collection in mojos)

> Provide a @Resolution annotation that can be used to inject dependencies 
> resolution/collection in mojos
> ---
>
> Key: MNG-8134
> URL: https://issues.apache.org/jira/browse/MNG-8134
> Project: Maven
>  Issue Type: Task
>Reporter: Guillaume Nodet
>Assignee: Guillaume Nodet
>Priority: Major
> Fix For: 4.0.0, 4.0.0-beta-4
>
>
> See 
> https://github.com/apache/maven-plugin-tools/pull/286#discussion_r1620871349



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


[jira] [Closed] (MNG-8134) Provide an annotation that can be used to inject dependencies resolution/collection in mojos

2024-06-11 Thread Guillaume Nodet (Jira)


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

Guillaume Nodet closed MNG-8134.

  Assignee: Guillaume Nodet
Resolution: Fixed

> Provide an annotation that can be used to inject dependencies 
> resolution/collection in mojos
> 
>
> Key: MNG-8134
> URL: https://issues.apache.org/jira/browse/MNG-8134
> Project: Maven
>  Issue Type: Task
>Reporter: Guillaume Nodet
>Assignee: Guillaume Nodet
>Priority: Major
> Fix For: 4.0.0, 4.0.0-beta-4
>
>
> See 
> https://github.com/apache/maven-plugin-tools/pull/286#discussion_r1620871349



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


Re: [PR] Bump commons-cli:commons-cli from 1.5.0 to 1.8.0 [maven]

2024-06-11 Thread via GitHub


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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



Re: [PR] Bump org.junit:junit-bom from 5.10.1 to 5.10.2 [maven]

2024-06-11 Thread via GitHub


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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



[PR] Remove commons-io dependency [maven]

2024-06-11 Thread via GitHub


gnodet opened a new pull request, #1578:
URL: https://github.com/apache/maven/pull/1578

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



Re: [PR] Bump resolverVersion from 1.4.1 to 1.9.20 [maven-surefire]

2024-06-11 Thread via GitHub


michael-o commented on PR #749:
URL: https://github.com/apache/maven-surefire/pull/749#issuecomment-2160114558

   @dependabot ignore this dependency


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



Re: [PR] Bump resolverVersion from 1.4.1 to 1.9.20 [maven-surefire]

2024-06-11 Thread via GitHub


dependabot[bot] closed pull request #749: Bump resolverVersion from 1.4.1 to 
1.9.20
URL: https://github.com/apache/maven-surefire/pull/749


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



Re: [PR] Bump resolverVersion from 1.4.1 to 1.9.20 [maven-surefire]

2024-06-11 Thread via GitHub


dependabot[bot] commented on PR #749:
URL: https://github.com/apache/maven-surefire/pull/749#issuecomment-2160114691

   OK, I won't notify you about any of these dependencies again, unless you 
re-open this PR.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



Re: [PR] Bump org.codehaus.plexus:plexus-component-annotations from 2.1.0 to 2.2.0 [maven-surefire]

2024-06-11 Thread via GitHub


michael-o commented on PR #747:
URL: https://github.com/apache/maven-surefire/pull/747#issuecomment-2160115917

   @cstamas Is this a safe upgrade from your PoV?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



Re: [PR] Bump commons-io:commons-io from 2.11.0 to 2.16.1 [maven]

2024-06-11 Thread via GitHub


gnodet closed pull request #1534: Bump commons-io:commons-io from 2.11.0 to 
2.16.1
URL: https://github.com/apache/maven/pull/1534


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



Re: [PR] Bump commons-io:commons-io from 2.11.0 to 2.16.1 [maven]

2024-06-11 Thread via GitHub


dependabot[bot] commented on PR #1534:
URL: https://github.com/apache/maven/pull/1534#issuecomment-2160152356

   OK, I won't notify you again about this release, but will get in touch when 
a new version is available. If you'd rather skip all updates until the next 
major or minor version, let me know by commenting `@dependabot ignore this 
major version` or `@dependabot ignore this minor version`. You can also ignore 
all major, minor, or patch releases for a dependency by adding an [`ignore` 
condition](https://docs.github.com/en/code-security/supply-chain-security/configuration-options-for-dependency-updates#ignore)
 with the desired `update_types` to your config file.
   
   If you change your mind, just re-open this PR and I'll resolve any conflicts 
on it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



Re: [PR] Bump commons-io:commons-io from 2.11.0 to 2.16.1 [maven]

2024-06-11 Thread via GitHub


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

   See #1578 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



Re: [PR] [SUREFIRE-2232] StatelessXmlReporter: handle failed test result without a throwable [maven-surefire]

2024-06-11 Thread via GitHub


michael-o commented on PR #716:
URL: https://github.com/apache/maven-surefire/pull/716#issuecomment-2160165869

   @dr29bart I took the liberty to change your PR.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



[jira] [Commented] (SUREFIRE-2232) [REGRESSION] StatelessXmlReporter fails to process failed result without a throwable

2024-06-11 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on SUREFIRE-2232:
--

michael-o commented on PR #716:
URL: https://github.com/apache/maven-surefire/pull/716#issuecomment-2160165869

   @dr29bart I took the liberty to change your PR.




> [REGRESSION] StatelessXmlReporter fails to process failed result without a 
> throwable
> 
>
> Key: SUREFIRE-2232
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2232
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 3.0.0-M6, 3.2.3, 3.2.5
>Reporter: Artem Yak
>Assignee: Michael Osipov
>Priority: Minor
> Fix For: 3.3.0
>
>
>  
> A regression bug appeared in 3.0.0-M6:
> A testNG test class has a listener which updates results from SUCCESS to 
> FAILURE:
>  
> {noformat}
> @Override
> public void onTestSuccess(ITestResult result) {
>     result.setStatus(ITestResult.FAILURE);
> result.getTestContext().getPassedTests().removeResult(result);
> result.getTestContext().getFailedTests().addResult(result);
> }{noformat}
>  
> Surefire fails to process a failed test result without a throwable and 
> reports 0 total tests. 
> {code:java}
> ForkStarter IOException: java.util.NoSuchElementException.
> org.apache.maven.plugin.surefire.booterclient.output.MultipleFailureException:
>  java.util.NoSuchElementException
>   at 
> org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumper.(ThreadedStreamConsumer.java:59)
>   at 
> org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer.(ThreadedStreamConsumer.java:107)
>   at 
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:546)
>   at 
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:285)
>   at 
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:250)
>  {code}
>  
> Reproducible unit test.
> {code:java}
> package org.apache.maven.plugin.surefire.report;
> import java.io.File;
> import java.util.HashMap;
> import java.util.concurrent.atomic.AtomicInteger;
> import junit.framework.TestCase;
> import 
> org.apache.maven.plugin.surefire.booterclient.output.DeserializedStacktraceWriter;
> import org.apache.maven.surefire.api.report.SimpleReportEntry;
> import org.apache.maven.surefire.api.report.StackTraceWriter;
> import static org.apache.maven.plugin.surefire.report.ReportEntryType.ERROR;
> import static org.apache.maven.surefire.api.report.RunMode.NORMAL_RUN;
> @SuppressWarnings({"ResultOfMethodCallIgnored", "checkstyle:magicnumber"})
> public class StatelessXmlReporter2Test extends TestCase {
> private static final String XSD =
> 
> "https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report-3.0.xsd";;
> private static final AtomicInteger FOLDER_POSTFIX = new AtomicInteger();
> private File reportDir;
> @Override
> protected void setUp() throws Exception {
> File basedir = new File(".");
> File target = new File(basedir.getCanonicalFile(), "target");
> target.mkdir();
> String reportRelDir = getClass().getSimpleName() + "-" + 
> FOLDER_POSTFIX.incrementAndGet();
> reportDir = new File(target, reportRelDir);
> reportDir.mkdir();
> }
> @Override
> protected void tearDown() {
> }
> public void testOutputFailedTestWithoutThrowable() {
> StackTraceWriter stackTraceWriterOne = new 
> DeserializedStacktraceWriter(null, null, "");
> WrappedReportEntry testReport = new WrappedReportEntry(
> new SimpleReportEntry(
> NORMAL_RUN, 1L, getClass().getName(), null, "a test name", 
> null, stackTraceWriterOne, 5),
> ERROR,
> 5,
> null,
> null);
> TestSetStats testSetStats = new TestSetStats(false, false);
> testSetStats.testError(testReport);
> StatelessXmlReporter reporter = new StatelessXmlReporter(
> reportDir, null, false, 1, new HashMap<>(), XSD, "3.0", false, 
> false, false, false);
> reporter.testSetCompleted(testReport, testSetStats);
> }
> }  {code}
>  
>  
>  
> {code:java}
> java.util.NoSuchElementException
>     at java.base/java.util.StringTokenizer.nextToken(StringTokenizer.java:349)
>     at 
> org.apache.maven.plugin.surefire.report.StatelessXmlReporter.getTestProblems(StatelessXmlReporter.java:454)
>     at 
> org.apache.maven.plugin.surefire.report.StatelessXmlReporter.serializeTestClassWithRerun(StatelessXmlReporter.java:256)
>     at 
> org.apache.maven.plugin.surefire.report.S

Re: [PR] Remove commons-io:commons-io dependency [maven]

2024-06-11 Thread via GitHub


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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



Re: [PR] Bump org.codehaus.plexus:plexus-testing from 1.0.0 to 1.3.0 [maven]

2024-06-11 Thread via GitHub


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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



Re: [PR] [MNG-7758] Report dependency problems for all repository [maven]

2024-06-11 Thread via GitHub


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

   @slawekjaranowski Should I try again?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



[jira] [Commented] (MNG-7758) o.e.aether.resolution.ArtifactResolutionException incorrectly examined when multiple repositories are involved

2024-06-11 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-7758:
-

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

   @slawekjaranowski Should I try again?




> o.e.aether.resolution.ArtifactResolutionException incorrectly examined when 
> multiple repositories are involved
> --
>
> Key: MNG-7758
> URL: https://issues.apache.org/jira/browse/MNG-7758
> Project: Maven
>  Issue Type: Bug
>  Components: Artifacts and Repositories, Dependencies, Performance
>Affects Versions: 3.8.8, 3.9.1, 4.0.0-alpha-5
>Reporter: Michael Osipov
>Assignee: Slawomir Jaranowski
>Priority: Critical
> Fix For: 4.0.0, 3.9.8, 4.0.0-beta-4
>
> Attachments: 1.png, 2.png, Exception hierarchy.png
>
>
> Consider you have three repos defined in your build (could be POM or 
> settings), evaluated in following order:
> 1. repo A: serves custom artifacts with group id {{com.example}}, due to repo 
> partitioning in Nexus rejects requests to all other group ids with 403
> 1. repo B: serves third party artifacts without any restriction from a Nexus 
> repo
> 1. repo C: serves Central mirror, last one quried, no restrictions
> Note that order is important! Now add a non-existing dependency to your  POM 
> and receive the following behavior:
> {{ArtifactResolutionException}} will contain an {{ArtifactResult}} with three 
> exceptions: 
>  - {{TransferException}} with nested {{AuthorizationException}}, 
>  - {{ArtifactNotFoundException}}, 
>  - {{ArtifactNotFoundException}}. 
> {{ArtifactResolutionException#getCause()}} will be populated with the 
> {{TransferException}} so will 
> {{org.eclipse.aether.resolution.ArtifactResult.isMissing()}} take the first 
> exception only into account. E.g., {{DefaultArtifactDescriptorReader}} will 
> do {{if (e.getCause() instanceof ArtifactNotFoundException)}} which is 
> deceiving.
> Here is a sample for a non-existing artifact:
> {noformat}
> [INFO] --- maven-site-plugin:4.0.0-M7-SNAPSHOT:site (default-site) @ 
> mskins-222 ---
> [INFO] Configuring report plugin 
> org.apache.maven.plugins:maven-project-info-reports-plugin:3.4.2
> [WARNING] index report is declared twice in default reportSet
> [INFO] 15 reports configured for maven-project-info-reports-plugin:3.4.2: 
> index, summary, dependency-info, modules, team, scm, issue-management, 
> mailing-lists, dependency-management, dependencies, dependency-convergence, 
> ci-management, plugin-management, plugins, distribution-management
> [INFO] Rendering site for default locale
> Downloading from lda-public: 
> https://deblndw011x.ad001.siemens.net/nexus/content/groups/lda-public/org/apache/apache/29/apache-29-site.xml
> [INFO] 
> 
> [INFO] BUILD FAILURE
> [INFO] 
> 
> [INFO] Total time:  3.214 s
> [INFO] Finished at: 2023-04-02T12:51:02+02:00
> [INFO] 
> 
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-site-plugin:4.0.0-M7-SNAPSHOT:site 
> (default-site) on project mskins-222: SiteToolException: The site descriptor 
> cannot be resolved from the repository: Unable to locate site descriptor: 
> Could not transfer artifact org.apache:apache:xml:site:29 from/to lda-public 
> (https://deblndw011x.ad001.siemens.net/nexus/content/groups/lda-public/): 
> authorization failed for 
> https://deblndw011x.ad001.siemens.net/nexus/content/groups/lda-public/org/apache/apache/29/apache-29-site.xml,
>  status: 403 Forbidden -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please 
> read the following articles:
> [ERROR] [Help 1] 
> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
> {noformat}
> for a dependency:
> {noformat}
> [INFO] org.apache.maven.cli.event.ExecutionEventLogger - 
> 
> [ERROR] org.apache.maven.cli.MavenCli - Failed to execute goal 
> org.apache.maven.plugins:maven-site-plugin:4.0.0-M7-SNAPSHOT:site 
> (default-site) on project mskins-222: Failed to get report for 
> org.apache.maven.plugins:maven-project-plugin: Plugin 
> org.apache.maven.plugins:maven-project-plugin:3.4.2 or one of its 
> dependencies could not be resolved: Failed to read artifact descript

Re: [PR] [MNG-7758] Report dependency problems for all repository [maven]

2024-06-11 Thread via GitHub


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

   > @slawekjaranowski Should I try again?
   
   you can - but result for connection problems will still show last / one repo
   I also changed reporting for missing plugins
   
   https://issues.apache.org/jira/browse/MRESOLVER-569


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



[jira] [Commented] (MNG-7758) o.e.aether.resolution.ArtifactResolutionException incorrectly examined when multiple repositories are involved

2024-06-11 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-7758:
-

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

   > @slawekjaranowski Should I try again?
   
   you can - but result for connection problems will still show last / one repo
   I also changed reporting for missing plugins
   
   https://issues.apache.org/jira/browse/MRESOLVER-569




> o.e.aether.resolution.ArtifactResolutionException incorrectly examined when 
> multiple repositories are involved
> --
>
> Key: MNG-7758
> URL: https://issues.apache.org/jira/browse/MNG-7758
> Project: Maven
>  Issue Type: Bug
>  Components: Artifacts and Repositories, Dependencies, Performance
>Affects Versions: 3.8.8, 3.9.1, 4.0.0-alpha-5
>Reporter: Michael Osipov
>Assignee: Slawomir Jaranowski
>Priority: Critical
> Fix For: 4.0.0, 3.9.8, 4.0.0-beta-4
>
> Attachments: 1.png, 2.png, Exception hierarchy.png
>
>
> Consider you have three repos defined in your build (could be POM or 
> settings), evaluated in following order:
> 1. repo A: serves custom artifacts with group id {{com.example}}, due to repo 
> partitioning in Nexus rejects requests to all other group ids with 403
> 1. repo B: serves third party artifacts without any restriction from a Nexus 
> repo
> 1. repo C: serves Central mirror, last one quried, no restrictions
> Note that order is important! Now add a non-existing dependency to your  POM 
> and receive the following behavior:
> {{ArtifactResolutionException}} will contain an {{ArtifactResult}} with three 
> exceptions: 
>  - {{TransferException}} with nested {{AuthorizationException}}, 
>  - {{ArtifactNotFoundException}}, 
>  - {{ArtifactNotFoundException}}. 
> {{ArtifactResolutionException#getCause()}} will be populated with the 
> {{TransferException}} so will 
> {{org.eclipse.aether.resolution.ArtifactResult.isMissing()}} take the first 
> exception only into account. E.g., {{DefaultArtifactDescriptorReader}} will 
> do {{if (e.getCause() instanceof ArtifactNotFoundException)}} which is 
> deceiving.
> Here is a sample for a non-existing artifact:
> {noformat}
> [INFO] --- maven-site-plugin:4.0.0-M7-SNAPSHOT:site (default-site) @ 
> mskins-222 ---
> [INFO] Configuring report plugin 
> org.apache.maven.plugins:maven-project-info-reports-plugin:3.4.2
> [WARNING] index report is declared twice in default reportSet
> [INFO] 15 reports configured for maven-project-info-reports-plugin:3.4.2: 
> index, summary, dependency-info, modules, team, scm, issue-management, 
> mailing-lists, dependency-management, dependencies, dependency-convergence, 
> ci-management, plugin-management, plugins, distribution-management
> [INFO] Rendering site for default locale
> Downloading from lda-public: 
> https://deblndw011x.ad001.siemens.net/nexus/content/groups/lda-public/org/apache/apache/29/apache-29-site.xml
> [INFO] 
> 
> [INFO] BUILD FAILURE
> [INFO] 
> 
> [INFO] Total time:  3.214 s
> [INFO] Finished at: 2023-04-02T12:51:02+02:00
> [INFO] 
> 
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-site-plugin:4.0.0-M7-SNAPSHOT:site 
> (default-site) on project mskins-222: SiteToolException: The site descriptor 
> cannot be resolved from the repository: Unable to locate site descriptor: 
> Could not transfer artifact org.apache:apache:xml:site:29 from/to lda-public 
> (https://deblndw011x.ad001.siemens.net/nexus/content/groups/lda-public/): 
> authorization failed for 
> https://deblndw011x.ad001.siemens.net/nexus/content/groups/lda-public/org/apache/apache/29/apache-29-site.xml,
>  status: 403 Forbidden -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please 
> read the following articles:
> [ERROR] [Help 1] 
> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
> {noformat}
> for a dependency:
> {noformat}
> [INFO] org.apache.maven.cli.event.ExecutionEventLogger - 
> 
> [ERROR] org.apache.maven.cli.MavenCli - Failed to execute goal 
> org.apache.maven.plugins:maven-site-plugin:4.0.0-M7-SNAPSHOT:site 
> (default-site) on project mskins-222: Failed to get report f

Re: [PR] [MNG-7758] Report dependency problems for all repository [maven]

2024-06-11 Thread via GitHub


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

   > > @slawekjaranowski Should I try again?
   > 
   > you can - but result for connection problems will still show last / one 
repo I also changed reporting for missing plugins
   > 
   > https://issues.apache.org/jira/browse/MRESOLVER-569
   
   @cstamas Is this a huge issue to fix in Resolver?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



[jira] [Commented] (MNG-7758) o.e.aether.resolution.ArtifactResolutionException incorrectly examined when multiple repositories are involved

2024-06-11 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-7758:
-

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

   > > @slawekjaranowski Should I try again?
   > 
   > you can - but result for connection problems will still show last / one 
repo I also changed reporting for missing plugins
   > 
   > https://issues.apache.org/jira/browse/MRESOLVER-569
   
   @cstamas Is this a huge issue to fix in Resolver?




> o.e.aether.resolution.ArtifactResolutionException incorrectly examined when 
> multiple repositories are involved
> --
>
> Key: MNG-7758
> URL: https://issues.apache.org/jira/browse/MNG-7758
> Project: Maven
>  Issue Type: Bug
>  Components: Artifacts and Repositories, Dependencies, Performance
>Affects Versions: 3.8.8, 3.9.1, 4.0.0-alpha-5
>Reporter: Michael Osipov
>Assignee: Slawomir Jaranowski
>Priority: Critical
> Fix For: 4.0.0, 3.9.8, 4.0.0-beta-4
>
> Attachments: 1.png, 2.png, Exception hierarchy.png
>
>
> Consider you have three repos defined in your build (could be POM or 
> settings), evaluated in following order:
> 1. repo A: serves custom artifacts with group id {{com.example}}, due to repo 
> partitioning in Nexus rejects requests to all other group ids with 403
> 1. repo B: serves third party artifacts without any restriction from a Nexus 
> repo
> 1. repo C: serves Central mirror, last one quried, no restrictions
> Note that order is important! Now add a non-existing dependency to your  POM 
> and receive the following behavior:
> {{ArtifactResolutionException}} will contain an {{ArtifactResult}} with three 
> exceptions: 
>  - {{TransferException}} with nested {{AuthorizationException}}, 
>  - {{ArtifactNotFoundException}}, 
>  - {{ArtifactNotFoundException}}. 
> {{ArtifactResolutionException#getCause()}} will be populated with the 
> {{TransferException}} so will 
> {{org.eclipse.aether.resolution.ArtifactResult.isMissing()}} take the first 
> exception only into account. E.g., {{DefaultArtifactDescriptorReader}} will 
> do {{if (e.getCause() instanceof ArtifactNotFoundException)}} which is 
> deceiving.
> Here is a sample for a non-existing artifact:
> {noformat}
> [INFO] --- maven-site-plugin:4.0.0-M7-SNAPSHOT:site (default-site) @ 
> mskins-222 ---
> [INFO] Configuring report plugin 
> org.apache.maven.plugins:maven-project-info-reports-plugin:3.4.2
> [WARNING] index report is declared twice in default reportSet
> [INFO] 15 reports configured for maven-project-info-reports-plugin:3.4.2: 
> index, summary, dependency-info, modules, team, scm, issue-management, 
> mailing-lists, dependency-management, dependencies, dependency-convergence, 
> ci-management, plugin-management, plugins, distribution-management
> [INFO] Rendering site for default locale
> Downloading from lda-public: 
> https://deblndw011x.ad001.siemens.net/nexus/content/groups/lda-public/org/apache/apache/29/apache-29-site.xml
> [INFO] 
> 
> [INFO] BUILD FAILURE
> [INFO] 
> 
> [INFO] Total time:  3.214 s
> [INFO] Finished at: 2023-04-02T12:51:02+02:00
> [INFO] 
> 
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-site-plugin:4.0.0-M7-SNAPSHOT:site 
> (default-site) on project mskins-222: SiteToolException: The site descriptor 
> cannot be resolved from the repository: Unable to locate site descriptor: 
> Could not transfer artifact org.apache:apache:xml:site:29 from/to lda-public 
> (https://deblndw011x.ad001.siemens.net/nexus/content/groups/lda-public/): 
> authorization failed for 
> https://deblndw011x.ad001.siemens.net/nexus/content/groups/lda-public/org/apache/apache/29/apache-29-site.xml,
>  status: 403 Forbidden -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please 
> read the following articles:
> [ERROR] [Help 1] 
> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
> {noformat}
> for a dependency:
> {noformat}
> [INFO] org.apache.maven.cli.event.ExecutionEventLogger - 
> 
> [ERROR] org.apache.maven.cli.MavenCli - Failed to execute goal 
> org.apache.maven.plugins:maven-site-plugin:4.0.0-M7-SNAPSHOT:site 
> (d

Re: [PR] [MNG-7758] Report dependency problems for all repository [maven]

2024-06-11 Thread via GitHub


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

   > @cstamas Is this a huge issue to fix in Resolver?
   
   Unsure, did not look yet, but IMHO is certainly something that would NOT 
happen in 1.9.x resolver but 2.0.0...


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



[jira] [Commented] (MNG-7758) o.e.aether.resolution.ArtifactResolutionException incorrectly examined when multiple repositories are involved

2024-06-11 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-7758:
-

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

   > @cstamas Is this a huge issue to fix in Resolver?
   
   Unsure, did not look yet, but IMHO is certainly something that would NOT 
happen in 1.9.x resolver but 2.0.0...




> o.e.aether.resolution.ArtifactResolutionException incorrectly examined when 
> multiple repositories are involved
> --
>
> Key: MNG-7758
> URL: https://issues.apache.org/jira/browse/MNG-7758
> Project: Maven
>  Issue Type: Bug
>  Components: Artifacts and Repositories, Dependencies, Performance
>Affects Versions: 3.8.8, 3.9.1, 4.0.0-alpha-5
>Reporter: Michael Osipov
>Assignee: Slawomir Jaranowski
>Priority: Critical
> Fix For: 4.0.0, 3.9.8, 4.0.0-beta-4
>
> Attachments: 1.png, 2.png, Exception hierarchy.png
>
>
> Consider you have three repos defined in your build (could be POM or 
> settings), evaluated in following order:
> 1. repo A: serves custom artifacts with group id {{com.example}}, due to repo 
> partitioning in Nexus rejects requests to all other group ids with 403
> 1. repo B: serves third party artifacts without any restriction from a Nexus 
> repo
> 1. repo C: serves Central mirror, last one quried, no restrictions
> Note that order is important! Now add a non-existing dependency to your  POM 
> and receive the following behavior:
> {{ArtifactResolutionException}} will contain an {{ArtifactResult}} with three 
> exceptions: 
>  - {{TransferException}} with nested {{AuthorizationException}}, 
>  - {{ArtifactNotFoundException}}, 
>  - {{ArtifactNotFoundException}}. 
> {{ArtifactResolutionException#getCause()}} will be populated with the 
> {{TransferException}} so will 
> {{org.eclipse.aether.resolution.ArtifactResult.isMissing()}} take the first 
> exception only into account. E.g., {{DefaultArtifactDescriptorReader}} will 
> do {{if (e.getCause() instanceof ArtifactNotFoundException)}} which is 
> deceiving.
> Here is a sample for a non-existing artifact:
> {noformat}
> [INFO] --- maven-site-plugin:4.0.0-M7-SNAPSHOT:site (default-site) @ 
> mskins-222 ---
> [INFO] Configuring report plugin 
> org.apache.maven.plugins:maven-project-info-reports-plugin:3.4.2
> [WARNING] index report is declared twice in default reportSet
> [INFO] 15 reports configured for maven-project-info-reports-plugin:3.4.2: 
> index, summary, dependency-info, modules, team, scm, issue-management, 
> mailing-lists, dependency-management, dependencies, dependency-convergence, 
> ci-management, plugin-management, plugins, distribution-management
> [INFO] Rendering site for default locale
> Downloading from lda-public: 
> https://deblndw011x.ad001.siemens.net/nexus/content/groups/lda-public/org/apache/apache/29/apache-29-site.xml
> [INFO] 
> 
> [INFO] BUILD FAILURE
> [INFO] 
> 
> [INFO] Total time:  3.214 s
> [INFO] Finished at: 2023-04-02T12:51:02+02:00
> [INFO] 
> 
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-site-plugin:4.0.0-M7-SNAPSHOT:site 
> (default-site) on project mskins-222: SiteToolException: The site descriptor 
> cannot be resolved from the repository: Unable to locate site descriptor: 
> Could not transfer artifact org.apache:apache:xml:site:29 from/to lda-public 
> (https://deblndw011x.ad001.siemens.net/nexus/content/groups/lda-public/): 
> authorization failed for 
> https://deblndw011x.ad001.siemens.net/nexus/content/groups/lda-public/org/apache/apache/29/apache-29-site.xml,
>  status: 403 Forbidden -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please 
> read the following articles:
> [ERROR] [Help 1] 
> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
> {noformat}
> for a dependency:
> {noformat}
> [INFO] org.apache.maven.cli.event.ExecutionEventLogger - 
> 
> [ERROR] org.apache.maven.cli.MavenCli - Failed to execute goal 
> org.apache.maven.plugins:maven-site-plugin:4.0.0-M7-SNAPSHOT:site 
> (default-site) on project mskins-222: Failed to get report for 
> org.apache.maven.plugins:maven-project-plugin: Plugin 
> org.ap

[jira] [Updated] (MRESOLVER-569) DependencyCollectionException.getResult().getExceptions() always returns one exception

2024-06-11 Thread Tamas Cservenak (Jira)


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

Tamas Cservenak updated MRESOLVER-569:
--
Summary: DependencyCollectionException.getResult().getExceptions() always 
returns one exception  (was: 
DependencyCollectionException.getResult().getExceptions() always return one 
exec)

> DependencyCollectionException.getResult().getExceptions() always returns one 
> exception
> --
>
> Key: MRESOLVER-569
> URL: https://issues.apache.org/jira/browse/MRESOLVER-569
> Project: Maven Resolver
>  Issue Type: Bug
>Reporter: Slawomir Jaranowski
>Priority: Major
>
> The problem is when we have more then one repository in configuration.
> We see only exception from last one.



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


Re: [PR] [MNG-7758] Report dependency problems for all repository [maven]

2024-06-11 Thread via GitHub


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

   @michael-o is it any objections from you to merge without resolver fix ...
   resolver can be fixed later


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



[jira] [Commented] (MNG-7758) o.e.aether.resolution.ArtifactResolutionException incorrectly examined when multiple repositories are involved

2024-06-11 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-7758:
-

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

   @michael-o is it any objections from you to merge without resolver fix ...
   resolver can be fixed later




> o.e.aether.resolution.ArtifactResolutionException incorrectly examined when 
> multiple repositories are involved
> --
>
> Key: MNG-7758
> URL: https://issues.apache.org/jira/browse/MNG-7758
> Project: Maven
>  Issue Type: Bug
>  Components: Artifacts and Repositories, Dependencies, Performance
>Affects Versions: 3.8.8, 3.9.1, 4.0.0-alpha-5
>Reporter: Michael Osipov
>Assignee: Slawomir Jaranowski
>Priority: Critical
> Fix For: 4.0.0, 3.9.8, 4.0.0-beta-4
>
> Attachments: 1.png, 2.png, Exception hierarchy.png
>
>
> Consider you have three repos defined in your build (could be POM or 
> settings), evaluated in following order:
> 1. repo A: serves custom artifacts with group id {{com.example}}, due to repo 
> partitioning in Nexus rejects requests to all other group ids with 403
> 1. repo B: serves third party artifacts without any restriction from a Nexus 
> repo
> 1. repo C: serves Central mirror, last one quried, no restrictions
> Note that order is important! Now add a non-existing dependency to your  POM 
> and receive the following behavior:
> {{ArtifactResolutionException}} will contain an {{ArtifactResult}} with three 
> exceptions: 
>  - {{TransferException}} with nested {{AuthorizationException}}, 
>  - {{ArtifactNotFoundException}}, 
>  - {{ArtifactNotFoundException}}. 
> {{ArtifactResolutionException#getCause()}} will be populated with the 
> {{TransferException}} so will 
> {{org.eclipse.aether.resolution.ArtifactResult.isMissing()}} take the first 
> exception only into account. E.g., {{DefaultArtifactDescriptorReader}} will 
> do {{if (e.getCause() instanceof ArtifactNotFoundException)}} which is 
> deceiving.
> Here is a sample for a non-existing artifact:
> {noformat}
> [INFO] --- maven-site-plugin:4.0.0-M7-SNAPSHOT:site (default-site) @ 
> mskins-222 ---
> [INFO] Configuring report plugin 
> org.apache.maven.plugins:maven-project-info-reports-plugin:3.4.2
> [WARNING] index report is declared twice in default reportSet
> [INFO] 15 reports configured for maven-project-info-reports-plugin:3.4.2: 
> index, summary, dependency-info, modules, team, scm, issue-management, 
> mailing-lists, dependency-management, dependencies, dependency-convergence, 
> ci-management, plugin-management, plugins, distribution-management
> [INFO] Rendering site for default locale
> Downloading from lda-public: 
> https://deblndw011x.ad001.siemens.net/nexus/content/groups/lda-public/org/apache/apache/29/apache-29-site.xml
> [INFO] 
> 
> [INFO] BUILD FAILURE
> [INFO] 
> 
> [INFO] Total time:  3.214 s
> [INFO] Finished at: 2023-04-02T12:51:02+02:00
> [INFO] 
> 
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-site-plugin:4.0.0-M7-SNAPSHOT:site 
> (default-site) on project mskins-222: SiteToolException: The site descriptor 
> cannot be resolved from the repository: Unable to locate site descriptor: 
> Could not transfer artifact org.apache:apache:xml:site:29 from/to lda-public 
> (https://deblndw011x.ad001.siemens.net/nexus/content/groups/lda-public/): 
> authorization failed for 
> https://deblndw011x.ad001.siemens.net/nexus/content/groups/lda-public/org/apache/apache/29/apache-29-site.xml,
>  status: 403 Forbidden -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please 
> read the following articles:
> [ERROR] [Help 1] 
> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
> {noformat}
> for a dependency:
> {noformat}
> [INFO] org.apache.maven.cli.event.ExecutionEventLogger - 
> 
> [ERROR] org.apache.maven.cli.MavenCli - Failed to execute goal 
> org.apache.maven.plugins:maven-site-plugin:4.0.0-M7-SNAPSHOT:site 
> (default-site) on project mskins-222: Failed to get report for 
> org.apache.maven.plugins:maven-project-plugin: Plugin 
> org.apache.maven.plugins:maven-project-plugin:3.4.2 or one of 

Re: [PR] [MNG-7758] Report dependency problems for all repository [maven]

2024-06-11 Thread via GitHub


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

   > @michael-o is it any objections from you to merge without resolver fix ... 
resolver can be fixed later
   
   Let me please review/test again today.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



[jira] [Commented] (MNG-7758) o.e.aether.resolution.ArtifactResolutionException incorrectly examined when multiple repositories are involved

2024-06-11 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-7758:
-

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

   > @michael-o is it any objections from you to merge without resolver fix ... 
resolver can be fixed later
   
   Let me please review/test again today.




> o.e.aether.resolution.ArtifactResolutionException incorrectly examined when 
> multiple repositories are involved
> --
>
> Key: MNG-7758
> URL: https://issues.apache.org/jira/browse/MNG-7758
> Project: Maven
>  Issue Type: Bug
>  Components: Artifacts and Repositories, Dependencies, Performance
>Affects Versions: 3.8.8, 3.9.1, 4.0.0-alpha-5
>Reporter: Michael Osipov
>Assignee: Slawomir Jaranowski
>Priority: Critical
> Fix For: 4.0.0, 3.9.8, 4.0.0-beta-4
>
> Attachments: 1.png, 2.png, Exception hierarchy.png
>
>
> Consider you have three repos defined in your build (could be POM or 
> settings), evaluated in following order:
> 1. repo A: serves custom artifacts with group id {{com.example}}, due to repo 
> partitioning in Nexus rejects requests to all other group ids with 403
> 1. repo B: serves third party artifacts without any restriction from a Nexus 
> repo
> 1. repo C: serves Central mirror, last one quried, no restrictions
> Note that order is important! Now add a non-existing dependency to your  POM 
> and receive the following behavior:
> {{ArtifactResolutionException}} will contain an {{ArtifactResult}} with three 
> exceptions: 
>  - {{TransferException}} with nested {{AuthorizationException}}, 
>  - {{ArtifactNotFoundException}}, 
>  - {{ArtifactNotFoundException}}. 
> {{ArtifactResolutionException#getCause()}} will be populated with the 
> {{TransferException}} so will 
> {{org.eclipse.aether.resolution.ArtifactResult.isMissing()}} take the first 
> exception only into account. E.g., {{DefaultArtifactDescriptorReader}} will 
> do {{if (e.getCause() instanceof ArtifactNotFoundException)}} which is 
> deceiving.
> Here is a sample for a non-existing artifact:
> {noformat}
> [INFO] --- maven-site-plugin:4.0.0-M7-SNAPSHOT:site (default-site) @ 
> mskins-222 ---
> [INFO] Configuring report plugin 
> org.apache.maven.plugins:maven-project-info-reports-plugin:3.4.2
> [WARNING] index report is declared twice in default reportSet
> [INFO] 15 reports configured for maven-project-info-reports-plugin:3.4.2: 
> index, summary, dependency-info, modules, team, scm, issue-management, 
> mailing-lists, dependency-management, dependencies, dependency-convergence, 
> ci-management, plugin-management, plugins, distribution-management
> [INFO] Rendering site for default locale
> Downloading from lda-public: 
> https://deblndw011x.ad001.siemens.net/nexus/content/groups/lda-public/org/apache/apache/29/apache-29-site.xml
> [INFO] 
> 
> [INFO] BUILD FAILURE
> [INFO] 
> 
> [INFO] Total time:  3.214 s
> [INFO] Finished at: 2023-04-02T12:51:02+02:00
> [INFO] 
> 
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-site-plugin:4.0.0-M7-SNAPSHOT:site 
> (default-site) on project mskins-222: SiteToolException: The site descriptor 
> cannot be resolved from the repository: Unable to locate site descriptor: 
> Could not transfer artifact org.apache:apache:xml:site:29 from/to lda-public 
> (https://deblndw011x.ad001.siemens.net/nexus/content/groups/lda-public/): 
> authorization failed for 
> https://deblndw011x.ad001.siemens.net/nexus/content/groups/lda-public/org/apache/apache/29/apache-29-site.xml,
>  status: 403 Forbidden -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please 
> read the following articles:
> [ERROR] [Help 1] 
> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
> {noformat}
> for a dependency:
> {noformat}
> [INFO] org.apache.maven.cli.event.ExecutionEventLogger - 
> 
> [ERROR] org.apache.maven.cli.MavenCli - Failed to execute goal 
> org.apache.maven.plugins:maven-site-plugin:4.0.0-M7-SNAPSHOT:site 
> (default-site) on project mskins-222: Failed to get report for 
> org.apache.maven.plugins:maven-project-plugin: Plugin 
> org.apache.maven.plugin

Re: [PR] [MNG-7758] Report dependency problems for all repository [maven]

2024-06-11 Thread via GitHub


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

   As I looked into, this is a problem that probably looks like this:
   Collector (CO, in resolver) -> ArtifactDescriptorReader (ADR, in maven) -> 
ArtifactResolver (AR, in resolver)
   
   What happens, is that CO during collecting, issues series of requests to ADR 
to build the graph, but ADR "forwards" these to AR (to resolve POM), and it 
fails.
   
   If you "rollback", you will see that AR throws ArtifactResolutionException 
that carries a list (repo, cause). So far all nice and dandy. But ADR loses 
them. Instead, it will create ArtifactDescriptorException w/o cause (so AR 
thrown ArtifactResolutionEx is lost), instead it uses result, and gets 1st 
exception from result as "cause". Finally, CO receives this exception and sets 
it as one single CollectionResult ex and throws DependencyCollectionException 
w/ result.
   
   The problem stems from here:
   
https://github.com/apache/maven-resolver/blob/master/maven-resolver-api/src/main/java/org/eclipse/aether/resolution/ArtifactDescriptorException.java#L35
   
   As ADR wants to reuse this message, but to do so, it simply leaves out cause 
(ArtifactResolutionEx), instead it does this: 
https://github.com/apache/maven-resolver/blob/master/maven-resolver-api/src/main/java/org/eclipse/aether/resolution/ArtifactDescriptorException.java#L76


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



[jira] [Commented] (MNG-7758) o.e.aether.resolution.ArtifactResolutionException incorrectly examined when multiple repositories are involved

2024-06-11 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-7758:
-

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

   As I looked into, this is a problem that probably looks like this:
   Collector (CO, in resolver) -> ArtifactDescriptorReader (ADR, in maven) -> 
ArtifactResolver (AR, in resolver)
   
   What happens, is that CO during collecting, issues series of requests to ADR 
to build the graph, but ADR "forwards" these to AR (to resolve POM), and it 
fails.
   
   If you "rollback", you will see that AR throws ArtifactResolutionException 
that carries a list (repo, cause). So far all nice and dandy. But ADR loses 
them. Instead, it will create ArtifactDescriptorException w/o cause (so AR 
thrown ArtifactResolutionEx is lost), instead it uses result, and gets 1st 
exception from result as "cause". Finally, CO receives this exception and sets 
it as one single CollectionResult ex and throws DependencyCollectionException 
w/ result.
   
   The problem stems from here:
   
https://github.com/apache/maven-resolver/blob/master/maven-resolver-api/src/main/java/org/eclipse/aether/resolution/ArtifactDescriptorException.java#L35
   
   As ADR wants to reuse this message, but to do so, it simply leaves out cause 
(ArtifactResolutionEx), instead it does this: 
https://github.com/apache/maven-resolver/blob/master/maven-resolver-api/src/main/java/org/eclipse/aether/resolution/ArtifactDescriptorException.java#L76




> o.e.aether.resolution.ArtifactResolutionException incorrectly examined when 
> multiple repositories are involved
> --
>
> Key: MNG-7758
> URL: https://issues.apache.org/jira/browse/MNG-7758
> Project: Maven
>  Issue Type: Bug
>  Components: Artifacts and Repositories, Dependencies, Performance
>Affects Versions: 3.8.8, 3.9.1, 4.0.0-alpha-5
>Reporter: Michael Osipov
>Assignee: Slawomir Jaranowski
>Priority: Critical
> Fix For: 4.0.0, 3.9.8, 4.0.0-beta-4
>
> Attachments: 1.png, 2.png, Exception hierarchy.png
>
>
> Consider you have three repos defined in your build (could be POM or 
> settings), evaluated in following order:
> 1. repo A: serves custom artifacts with group id {{com.example}}, due to repo 
> partitioning in Nexus rejects requests to all other group ids with 403
> 1. repo B: serves third party artifacts without any restriction from a Nexus 
> repo
> 1. repo C: serves Central mirror, last one quried, no restrictions
> Note that order is important! Now add a non-existing dependency to your  POM 
> and receive the following behavior:
> {{ArtifactResolutionException}} will contain an {{ArtifactResult}} with three 
> exceptions: 
>  - {{TransferException}} with nested {{AuthorizationException}}, 
>  - {{ArtifactNotFoundException}}, 
>  - {{ArtifactNotFoundException}}. 
> {{ArtifactResolutionException#getCause()}} will be populated with the 
> {{TransferException}} so will 
> {{org.eclipse.aether.resolution.ArtifactResult.isMissing()}} take the first 
> exception only into account. E.g., {{DefaultArtifactDescriptorReader}} will 
> do {{if (e.getCause() instanceof ArtifactNotFoundException)}} which is 
> deceiving.
> Here is a sample for a non-existing artifact:
> {noformat}
> [INFO] --- maven-site-plugin:4.0.0-M7-SNAPSHOT:site (default-site) @ 
> mskins-222 ---
> [INFO] Configuring report plugin 
> org.apache.maven.plugins:maven-project-info-reports-plugin:3.4.2
> [WARNING] index report is declared twice in default reportSet
> [INFO] 15 reports configured for maven-project-info-reports-plugin:3.4.2: 
> index, summary, dependency-info, modules, team, scm, issue-management, 
> mailing-lists, dependency-management, dependencies, dependency-convergence, 
> ci-management, plugin-management, plugins, distribution-management
> [INFO] Rendering site for default locale
> Downloading from lda-public: 
> https://deblndw011x.ad001.siemens.net/nexus/content/groups/lda-public/org/apache/apache/29/apache-29-site.xml
> [INFO] 
> 
> [INFO] BUILD FAILURE
> [INFO] 
> 
> [INFO] Total time:  3.214 s
> [INFO] Finished at: 2023-04-02T12:51:02+02:00
> [INFO] 
> 
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-site-plugin:4.0.0-M7-SNAPSHOT:site 
> (default-site) on project mskins-222: SiteToolException: The site descriptor 
> cannot be resolved from the repository: Unable to locate site descriptor: 
> Could not transfer artifact 

[jira] [Commented] (MNG-7758) o.e.aether.resolution.ArtifactResolutionException incorrectly examined when multiple repositories are involved

2024-06-11 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-7758:
-

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

   Went thru resolver cobase, and we have 5 copies of this method:
   ```java
   private static Throwable getCause(SomeType result) {
   Throwable cause = null;
   if (result != null && !result.getExceptions().isEmpty()) {
   cause = result.getExceptions().get(0);
   }
   return cause;
   }
   ```
   And these methods are bad, as they blindly choose 1st exception as "cause" 
in various scenarios. They are in classes:
   * VersionResolutionException
   * DependencyCollectionException
   * ArtifactDescriptorException
   * VersionRangeResolutionException
   * (fifth is in ArtifactResolutionException but it is modified, is not 
copy-pasta of this)




> o.e.aether.resolution.ArtifactResolutionException incorrectly examined when 
> multiple repositories are involved
> --
>
> Key: MNG-7758
> URL: https://issues.apache.org/jira/browse/MNG-7758
> Project: Maven
>  Issue Type: Bug
>  Components: Artifacts and Repositories, Dependencies, Performance
>Affects Versions: 3.8.8, 3.9.1, 4.0.0-alpha-5
>Reporter: Michael Osipov
>Assignee: Slawomir Jaranowski
>Priority: Critical
> Fix For: 4.0.0, 3.9.8, 4.0.0-beta-4
>
> Attachments: 1.png, 2.png, Exception hierarchy.png
>
>
> Consider you have three repos defined in your build (could be POM or 
> settings), evaluated in following order:
> 1. repo A: serves custom artifacts with group id {{com.example}}, due to repo 
> partitioning in Nexus rejects requests to all other group ids with 403
> 1. repo B: serves third party artifacts without any restriction from a Nexus 
> repo
> 1. repo C: serves Central mirror, last one quried, no restrictions
> Note that order is important! Now add a non-existing dependency to your  POM 
> and receive the following behavior:
> {{ArtifactResolutionException}} will contain an {{ArtifactResult}} with three 
> exceptions: 
>  - {{TransferException}} with nested {{AuthorizationException}}, 
>  - {{ArtifactNotFoundException}}, 
>  - {{ArtifactNotFoundException}}. 
> {{ArtifactResolutionException#getCause()}} will be populated with the 
> {{TransferException}} so will 
> {{org.eclipse.aether.resolution.ArtifactResult.isMissing()}} take the first 
> exception only into account. E.g., {{DefaultArtifactDescriptorReader}} will 
> do {{if (e.getCause() instanceof ArtifactNotFoundException)}} which is 
> deceiving.
> Here is a sample for a non-existing artifact:
> {noformat}
> [INFO] --- maven-site-plugin:4.0.0-M7-SNAPSHOT:site (default-site) @ 
> mskins-222 ---
> [INFO] Configuring report plugin 
> org.apache.maven.plugins:maven-project-info-reports-plugin:3.4.2
> [WARNING] index report is declared twice in default reportSet
> [INFO] 15 reports configured for maven-project-info-reports-plugin:3.4.2: 
> index, summary, dependency-info, modules, team, scm, issue-management, 
> mailing-lists, dependency-management, dependencies, dependency-convergence, 
> ci-management, plugin-management, plugins, distribution-management
> [INFO] Rendering site for default locale
> Downloading from lda-public: 
> https://deblndw011x.ad001.siemens.net/nexus/content/groups/lda-public/org/apache/apache/29/apache-29-site.xml
> [INFO] 
> 
> [INFO] BUILD FAILURE
> [INFO] 
> 
> [INFO] Total time:  3.214 s
> [INFO] Finished at: 2023-04-02T12:51:02+02:00
> [INFO] 
> 
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-site-plugin:4.0.0-M7-SNAPSHOT:site 
> (default-site) on project mskins-222: SiteToolException: The site descriptor 
> cannot be resolved from the repository: Unable to locate site descriptor: 
> Could not transfer artifact org.apache:apache:xml:site:29 from/to lda-public 
> (https://deblndw011x.ad001.siemens.net/nexus/content/groups/lda-public/): 
> authorization failed for 
> https://deblndw011x.ad001.siemens.net/nexus/content/groups/lda-public/org/apache/apache/29/apache-29-site.xml,
>  status: 403 Forbidden -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please 
> read the following articles:
> [ERROR] [

Re: [PR] [MNG-7758] Report dependency problems for all repository [maven]

2024-06-11 Thread via GitHub


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

   Went thru resolver cobase, and we have 5 copies of this method:
   ```java
   private static Throwable getCause(SomeType result) {
   Throwable cause = null;
   if (result != null && !result.getExceptions().isEmpty()) {
   cause = result.getExceptions().get(0);
   }
   return cause;
   }
   ```
   And these methods are bad, as they blindly choose 1st exception as "cause" 
in various scenarios. They are in classes:
   * VersionResolutionException
   * DependencyCollectionException
   * ArtifactDescriptorException
   * VersionRangeResolutionException
   * (fifth is in ArtifactResolutionException but it is modified, is not 
copy-pasta of this)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



Re: [PR] [MNG-7758] Report dependency problems for all repository [maven]

2024-06-11 Thread via GitHub


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

   My proposal: let's split the issues, have two: one for Maven 3.9 and one for 
master. Let's merge whatever improvement we have for 3.9 to make 3.9.8 rollin' 
and see about master branches of Resolver and Maven later down the road.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



[jira] [Commented] (MNG-7758) o.e.aether.resolution.ArtifactResolutionException incorrectly examined when multiple repositories are involved

2024-06-11 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-7758:
-

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

   My proposal: let's split the issues, have two: one for Maven 3.9 and one for 
master. Let's merge whatever improvement we have for 3.9 to make 3.9.8 rollin' 
and see about master branches of Resolver and Maven later down the road.




> o.e.aether.resolution.ArtifactResolutionException incorrectly examined when 
> multiple repositories are involved
> --
>
> Key: MNG-7758
> URL: https://issues.apache.org/jira/browse/MNG-7758
> Project: Maven
>  Issue Type: Bug
>  Components: Artifacts and Repositories, Dependencies, Performance
>Affects Versions: 3.8.8, 3.9.1, 4.0.0-alpha-5
>Reporter: Michael Osipov
>Assignee: Slawomir Jaranowski
>Priority: Critical
> Fix For: 4.0.0, 3.9.8, 4.0.0-beta-4
>
> Attachments: 1.png, 2.png, Exception hierarchy.png
>
>
> Consider you have three repos defined in your build (could be POM or 
> settings), evaluated in following order:
> 1. repo A: serves custom artifacts with group id {{com.example}}, due to repo 
> partitioning in Nexus rejects requests to all other group ids with 403
> 1. repo B: serves third party artifacts without any restriction from a Nexus 
> repo
> 1. repo C: serves Central mirror, last one quried, no restrictions
> Note that order is important! Now add a non-existing dependency to your  POM 
> and receive the following behavior:
> {{ArtifactResolutionException}} will contain an {{ArtifactResult}} with three 
> exceptions: 
>  - {{TransferException}} with nested {{AuthorizationException}}, 
>  - {{ArtifactNotFoundException}}, 
>  - {{ArtifactNotFoundException}}. 
> {{ArtifactResolutionException#getCause()}} will be populated with the 
> {{TransferException}} so will 
> {{org.eclipse.aether.resolution.ArtifactResult.isMissing()}} take the first 
> exception only into account. E.g., {{DefaultArtifactDescriptorReader}} will 
> do {{if (e.getCause() instanceof ArtifactNotFoundException)}} which is 
> deceiving.
> Here is a sample for a non-existing artifact:
> {noformat}
> [INFO] --- maven-site-plugin:4.0.0-M7-SNAPSHOT:site (default-site) @ 
> mskins-222 ---
> [INFO] Configuring report plugin 
> org.apache.maven.plugins:maven-project-info-reports-plugin:3.4.2
> [WARNING] index report is declared twice in default reportSet
> [INFO] 15 reports configured for maven-project-info-reports-plugin:3.4.2: 
> index, summary, dependency-info, modules, team, scm, issue-management, 
> mailing-lists, dependency-management, dependencies, dependency-convergence, 
> ci-management, plugin-management, plugins, distribution-management
> [INFO] Rendering site for default locale
> Downloading from lda-public: 
> https://deblndw011x.ad001.siemens.net/nexus/content/groups/lda-public/org/apache/apache/29/apache-29-site.xml
> [INFO] 
> 
> [INFO] BUILD FAILURE
> [INFO] 
> 
> [INFO] Total time:  3.214 s
> [INFO] Finished at: 2023-04-02T12:51:02+02:00
> [INFO] 
> 
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-site-plugin:4.0.0-M7-SNAPSHOT:site 
> (default-site) on project mskins-222: SiteToolException: The site descriptor 
> cannot be resolved from the repository: Unable to locate site descriptor: 
> Could not transfer artifact org.apache:apache:xml:site:29 from/to lda-public 
> (https://deblndw011x.ad001.siemens.net/nexus/content/groups/lda-public/): 
> authorization failed for 
> https://deblndw011x.ad001.siemens.net/nexus/content/groups/lda-public/org/apache/apache/29/apache-29-site.xml,
>  status: 403 Forbidden -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please 
> read the following articles:
> [ERROR] [Help 1] 
> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
> {noformat}
> for a dependency:
> {noformat}
> [INFO] org.apache.maven.cli.event.ExecutionEventLogger - 
> 
> [ERROR] org.apache.maven.cli.MavenCli - Failed to execute goal 
> org.apache.maven.plugins:maven-site-plugin:4.0.0-M7-SNAPSHOT:site 
> (default-site) on project mskins-222: Failed to get report for 
> org

Re: [PR] [MNG-8150] Handle absent source/target files in transfer listener [maven]

2024-06-11 Thread via GitHub


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


##
maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java:
##
@@ -35,7 +35,7 @@
  */
 public class ConsoleMavenTransferListener extends 
AbstractMavenTransferListener {
 
-private Map transfers = new LinkedHashMap<>();
+private Map transfers 
= new LinkedHashMap<>();
 private FileSizeFormat format = new FileSizeFormat(Locale.ENGLISH); // use 
in a synchronized fashion

Review Comment:
   We need to get rid of the `Locale.ENGLISH` parameter which is unused, though 
this can be done in a subsequent PR.



##
maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java:
##
@@ -35,7 +35,7 @@
  */
 public class ConsoleMavenTransferListener extends 
AbstractMavenTransferListener {
 
-private Map transfers = new LinkedHashMap<>();
+private Map transfers 
= new LinkedHashMap<>();

Review Comment:
   Those 3 fields should be `final`.



##
maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java:
##
@@ -35,7 +35,7 @@
  */
 public class ConsoleMavenTransferListener extends 
AbstractMavenTransferListener {

Review Comment:
   Can we add a comment specifying that this class is not thread safe and 
should only be used from a single thread, or wrapped in the 
`SimplexTransferListener` ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



[jira] [Commented] (MNG-8150) Make SimplexTransferListener handle absent source/target files

2024-06-11 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-8150:
-

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


##
maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java:
##
@@ -35,7 +35,7 @@
  */
 public class ConsoleMavenTransferListener extends 
AbstractMavenTransferListener {
 
-private Map transfers = new LinkedHashMap<>();
+private Map transfers 
= new LinkedHashMap<>();
 private FileSizeFormat format = new FileSizeFormat(Locale.ENGLISH); // use 
in a synchronized fashion

Review Comment:
   We need to get rid of the `Locale.ENGLISH` parameter which is unused, though 
this can be done in a subsequent PR.



##
maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java:
##
@@ -35,7 +35,7 @@
  */
 public class ConsoleMavenTransferListener extends 
AbstractMavenTransferListener {
 
-private Map transfers = new LinkedHashMap<>();
+private Map transfers 
= new LinkedHashMap<>();

Review Comment:
   Those 3 fields should be `final`.



##
maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java:
##
@@ -35,7 +35,7 @@
  */
 public class ConsoleMavenTransferListener extends 
AbstractMavenTransferListener {

Review Comment:
   Can we add a comment specifying that this class is not thread safe and 
should only be used from a single thread, or wrapped in the 
`SimplexTransferListener` ?





> Make SimplexTransferListener handle absent source/target files
> --
>
> Key: MNG-8150
> URL: https://issues.apache.org/jira/browse/MNG-8150
> Project: Maven
>  Issue Type: Improvement
>  Components: Core
>Affects Versions: 3.9.7
>Reporter: Pavlo Shevchenko
>Assignee: Tamas Cservenak
>Priority: Minor
> Fix For: 4.0.0, 3.9.8, 4.0.0-beta-4
>
>
> See the discussion: 
> [https://github.com/apache/maven/pull/1471/files#r1632930409]
> The `TransferResource#file` may be `null`. The current implementation of the 
> `SimplexTransferListener` cannot handle this case and will break with an NPE.
>  
> The fix should be merged to `master` and backported to `maven-3.9.x` branches.
>  
>  



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


Re: [PR] Build with Maven 4 [maven-install-plugin]

2024-06-11 Thread via GitHub


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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



Re: [PR] Build with Maven4 [maven-deploy-plugin]

2024-06-11 Thread via GitHub


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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



Re: [PR] [MNG-8150] Handle absent source/target files in transfer listener [maven]

2024-06-11 Thread via GitHub


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


##
maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java:
##
@@ -35,7 +35,7 @@
  */
 public class ConsoleMavenTransferListener extends 
AbstractMavenTransferListener {

Review Comment:
   Can we add a comment specifying that this class is not thread safe and 
should only be used from a single thread, or wrapped in the 
`SimplexTransferListener` ?
   It would avoid having to look why this class is not thread safe (the 
`StringBuffer` as a field makes that quite easy to spot).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



Re: [PR] [MNG-7758] Report dependency problems for all repository [maven]

2024-06-11 Thread via GitHub


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

   > My proposal: let's split the issues, have two: one for Maven 3.9 and one 
for master. Let's merge whatever improvement we have for 3.9 to make 3.9.8 
rollin' and see about master branches of Resolver and Maven later down the road.
   
   if we want it in 3.9 it is not necessary to split - after merge to master I 
simply cherry-pick it to 3.9.x branch
   when we have two PR we will have the same discussion twice


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



[jira] [Commented] (MNG-8150) Make SimplexTransferListener handle absent source/target files

2024-06-11 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-8150:
-

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


##
maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java:
##
@@ -35,7 +35,7 @@
  */
 public class ConsoleMavenTransferListener extends 
AbstractMavenTransferListener {

Review Comment:
   Can we add a comment specifying that this class is not thread safe and 
should only be used from a single thread, or wrapped in the 
`SimplexTransferListener` ?
   It would avoid having to look why this class is not thread safe (the 
`StringBuffer` as a field makes that quite easy to spot).





> Make SimplexTransferListener handle absent source/target files
> --
>
> Key: MNG-8150
> URL: https://issues.apache.org/jira/browse/MNG-8150
> Project: Maven
>  Issue Type: Improvement
>  Components: Core
>Affects Versions: 3.9.7
>Reporter: Pavlo Shevchenko
>Assignee: Tamas Cservenak
>Priority: Minor
> Fix For: 4.0.0, 3.9.8, 4.0.0-beta-4
>
>
> See the discussion: 
> [https://github.com/apache/maven/pull/1471/files#r1632930409]
> The `TransferResource#file` may be `null`. The current implementation of the 
> `SimplexTransferListener` cannot handle this case and will break with an NPE.
>  
> The fix should be merged to `master` and backported to `maven-3.9.x` branches.
>  
>  



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


[jira] [Commented] (MNG-7758) o.e.aether.resolution.ArtifactResolutionException incorrectly examined when multiple repositories are involved

2024-06-11 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-7758:
-

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

   > My proposal: let's split the issues, have two: one for Maven 3.9 and one 
for master. Let's merge whatever improvement we have for 3.9 to make 3.9.8 
rollin' and see about master branches of Resolver and Maven later down the road.
   
   if we want it in 3.9 it is not necessary to split - after merge to master I 
simply cherry-pick it to 3.9.x branch
   when we have two PR we will have the same discussion twice




> o.e.aether.resolution.ArtifactResolutionException incorrectly examined when 
> multiple repositories are involved
> --
>
> Key: MNG-7758
> URL: https://issues.apache.org/jira/browse/MNG-7758
> Project: Maven
>  Issue Type: Bug
>  Components: Artifacts and Repositories, Dependencies, Performance
>Affects Versions: 3.8.8, 3.9.1, 4.0.0-alpha-5
>Reporter: Michael Osipov
>Assignee: Slawomir Jaranowski
>Priority: Critical
> Fix For: 4.0.0, 3.9.8, 4.0.0-beta-4
>
> Attachments: 1.png, 2.png, Exception hierarchy.png
>
>
> Consider you have three repos defined in your build (could be POM or 
> settings), evaluated in following order:
> 1. repo A: serves custom artifacts with group id {{com.example}}, due to repo 
> partitioning in Nexus rejects requests to all other group ids with 403
> 1. repo B: serves third party artifacts without any restriction from a Nexus 
> repo
> 1. repo C: serves Central mirror, last one quried, no restrictions
> Note that order is important! Now add a non-existing dependency to your  POM 
> and receive the following behavior:
> {{ArtifactResolutionException}} will contain an {{ArtifactResult}} with three 
> exceptions: 
>  - {{TransferException}} with nested {{AuthorizationException}}, 
>  - {{ArtifactNotFoundException}}, 
>  - {{ArtifactNotFoundException}}. 
> {{ArtifactResolutionException#getCause()}} will be populated with the 
> {{TransferException}} so will 
> {{org.eclipse.aether.resolution.ArtifactResult.isMissing()}} take the first 
> exception only into account. E.g., {{DefaultArtifactDescriptorReader}} will 
> do {{if (e.getCause() instanceof ArtifactNotFoundException)}} which is 
> deceiving.
> Here is a sample for a non-existing artifact:
> {noformat}
> [INFO] --- maven-site-plugin:4.0.0-M7-SNAPSHOT:site (default-site) @ 
> mskins-222 ---
> [INFO] Configuring report plugin 
> org.apache.maven.plugins:maven-project-info-reports-plugin:3.4.2
> [WARNING] index report is declared twice in default reportSet
> [INFO] 15 reports configured for maven-project-info-reports-plugin:3.4.2: 
> index, summary, dependency-info, modules, team, scm, issue-management, 
> mailing-lists, dependency-management, dependencies, dependency-convergence, 
> ci-management, plugin-management, plugins, distribution-management
> [INFO] Rendering site for default locale
> Downloading from lda-public: 
> https://deblndw011x.ad001.siemens.net/nexus/content/groups/lda-public/org/apache/apache/29/apache-29-site.xml
> [INFO] 
> 
> [INFO] BUILD FAILURE
> [INFO] 
> 
> [INFO] Total time:  3.214 s
> [INFO] Finished at: 2023-04-02T12:51:02+02:00
> [INFO] 
> 
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-site-plugin:4.0.0-M7-SNAPSHOT:site 
> (default-site) on project mskins-222: SiteToolException: The site descriptor 
> cannot be resolved from the repository: Unable to locate site descriptor: 
> Could not transfer artifact org.apache:apache:xml:site:29 from/to lda-public 
> (https://deblndw011x.ad001.siemens.net/nexus/content/groups/lda-public/): 
> authorization failed for 
> https://deblndw011x.ad001.siemens.net/nexus/content/groups/lda-public/org/apache/apache/29/apache-29-site.xml,
>  status: 403 Forbidden -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please 
> read the following articles:
> [ERROR] [Help 1] 
> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
> {noformat}
> for a dependency:
> {noformat}
> [INFO] org.apache.maven.cli.event.ExecutionEventLogger - 
> 
> [ERROR] o

[jira] [Assigned] (MDEPLOY-318) version 3.1.2 is uploading jar files to wrong endpoints

2024-06-11 Thread Slawomir Jaranowski (Jira)


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

Slawomir Jaranowski reassigned MDEPLOY-318:
---

Assignee: Slawomir Jaranowski

> version 3.1.2 is uploading jar files to wrong endpoints
> ---
>
> Key: MDEPLOY-318
> URL: https://issues.apache.org/jira/browse/MDEPLOY-318
> Project: Maven Deploy Plugin
>  Issue Type: Bug
>Affects Versions: 3.1.2
> Environment: spring-boot, gitlab
>Reporter: Michaël
>Assignee: Slawomir Jaranowski
>Priority: Major
> Attachments: pom.xml, test-maven-deploy-0.0.1.zip, 
> test-maven-deploy-0.0.2.zip, test-maven-parent-0.0.1.pom, 
> test-maven-parent-0.0.2.pom
>
>
> hi, i'm using spring-boot, and upon updating to 3.2.6 i noticed that my 
> parent pom was uploaded corrupted.
> {{[FATAL] Non-parseable POM 
> ~/.m2/repository/nl/intractief/intr-parent/7.1.5/intr-parent-7.1.5.pom: only 
> whitespace content allowed before start tag and not P (position: 
> START_DOCUMENT seen P... @1:2)  @ 
> ~/.m2/repository/nl/intractief/intr-parent/7.1.5/intr-parent-7.1.5.pom, line 
> 1, column 2}}
>  
>  * the same parent pom was correctly published using spring-boot 3.2.5
>  * the parent pom is correct before publishing in the pipeline (manually 
> checked the target folder).
>  * after publishing i see binary stuff as pom (guess: zipped binary content)
>  * setting the maven-deploy-plugin.version in the project to 3.1.1 solves the 
> issue.
> in the spring-boot project i created an issue about this (see external issue 
> link) and found another similar issue with a functional workaround.
> we think there is an issue with the deployment endpoints in version 3.1.2 it 
> seems the jars end up at the pom endpoints
>  
>  



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


Re: [PR] [MNG-8150] Handle absent source/target files in transfer listener [maven]

2024-06-11 Thread via GitHub


pshevche commented on code in PR #1575:
URL: https://github.com/apache/maven/pull/1575#discussion_r1635035764


##
maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java:
##
@@ -35,7 +35,7 @@
  */
 public class ConsoleMavenTransferListener extends 
AbstractMavenTransferListener {

Review Comment:
   Done in 
https://github.com/apache/maven/pull/1575/commits/274f1807ab0fcef625efadb26aabcaa2be1fe31b



##
maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java:
##
@@ -35,7 +35,7 @@
  */
 public class ConsoleMavenTransferListener extends 
AbstractMavenTransferListener {
 
-private Map transfers = new LinkedHashMap<>();
+private Map transfers 
= new LinkedHashMap<>();

Review Comment:
   Done in 
https://github.com/apache/maven/pull/1575/commits/274f1807ab0fcef625efadb26aabcaa2be1fe31b



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



[jira] [Commented] (MNG-8150) Make SimplexTransferListener handle absent source/target files

2024-06-11 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-8150:
-

pshevche commented on code in PR #1575:
URL: https://github.com/apache/maven/pull/1575#discussion_r1635035764


##
maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java:
##
@@ -35,7 +35,7 @@
  */
 public class ConsoleMavenTransferListener extends 
AbstractMavenTransferListener {

Review Comment:
   Done in 
https://github.com/apache/maven/pull/1575/commits/274f1807ab0fcef625efadb26aabcaa2be1fe31b



##
maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java:
##
@@ -35,7 +35,7 @@
  */
 public class ConsoleMavenTransferListener extends 
AbstractMavenTransferListener {
 
-private Map transfers = new LinkedHashMap<>();
+private Map transfers 
= new LinkedHashMap<>();

Review Comment:
   Done in 
https://github.com/apache/maven/pull/1575/commits/274f1807ab0fcef625efadb26aabcaa2be1fe31b





> Make SimplexTransferListener handle absent source/target files
> --
>
> Key: MNG-8150
> URL: https://issues.apache.org/jira/browse/MNG-8150
> Project: Maven
>  Issue Type: Improvement
>  Components: Core
>Affects Versions: 3.9.7
>Reporter: Pavlo Shevchenko
>Assignee: Tamas Cservenak
>Priority: Minor
> Fix For: 4.0.0, 3.9.8, 4.0.0-beta-4
>
>
> See the discussion: 
> [https://github.com/apache/maven/pull/1471/files#r1632930409]
> The `TransferResource#file` may be `null`. The current implementation of the 
> `SimplexTransferListener` cannot handle this case and will break with an NPE.
>  
> The fix should be merged to `master` and backported to `maven-3.9.x` branches.
>  
>  



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


[PR] [MNG-8150] Remove unused locale argument from FileSizeFormat [maven]

2024-06-11 Thread via GitHub


pshevche opened a new pull request, #1579:
URL: https://github.com/apache/maven/pull/1579

   ## Summary
   
   Addressing https://github.com/apache/maven/pull/1575#discussion_r1634977808
   
- [x] I hereby declare this contribution to be licenced under the [Apache 
License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



[jira] [Commented] (MNG-8150) Make SimplexTransferListener handle absent source/target files

2024-06-11 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-8150:
-

pshevche opened a new pull request, #1579:
URL: https://github.com/apache/maven/pull/1579

   ## Summary
   
   Addressing https://github.com/apache/maven/pull/1575#discussion_r1634977808
   
- [x] I hereby declare this contribution to be licenced under the [Apache 
License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   
   




> Make SimplexTransferListener handle absent source/target files
> --
>
> Key: MNG-8150
> URL: https://issues.apache.org/jira/browse/MNG-8150
> Project: Maven
>  Issue Type: Improvement
>  Components: Core
>Affects Versions: 3.9.7
>Reporter: Pavlo Shevchenko
>Assignee: Tamas Cservenak
>Priority: Minor
> Fix For: 4.0.0, 3.9.8, 4.0.0-beta-4
>
>
> See the discussion: 
> [https://github.com/apache/maven/pull/1471/files#r1632930409]
> The `TransferResource#file` may be `null`. The current implementation of the 
> `SimplexTransferListener` cannot handle this case and will break with an NPE.
>  
> The fix should be merged to `master` and backported to `maven-3.9.x` branches.
>  
>  



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


Re: [PR] [MNG-8150] Handle absent source/target files in transfer listener [maven]

2024-06-11 Thread via GitHub


pshevche commented on code in PR #1575:
URL: https://github.com/apache/maven/pull/1575#discussion_r1635041449


##
maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java:
##
@@ -35,7 +35,7 @@
  */
 public class ConsoleMavenTransferListener extends 
AbstractMavenTransferListener {
 
-private Map transfers = new LinkedHashMap<>();
+private Map transfers 
= new LinkedHashMap<>();
 private FileSizeFormat format = new FileSizeFormat(Locale.ENGLISH); // use 
in a synchronized fashion

Review Comment:
   Addressed in https://github.com/apache/maven/pull/1579



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



[jira] [Commented] (MNG-8150) Make SimplexTransferListener handle absent source/target files

2024-06-11 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-8150:
-

pshevche commented on code in PR #1575:
URL: https://github.com/apache/maven/pull/1575#discussion_r1635041449


##
maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java:
##
@@ -35,7 +35,7 @@
  */
 public class ConsoleMavenTransferListener extends 
AbstractMavenTransferListener {
 
-private Map transfers = new LinkedHashMap<>();
+private Map transfers 
= new LinkedHashMap<>();
 private FileSizeFormat format = new FileSizeFormat(Locale.ENGLISH); // use 
in a synchronized fashion

Review Comment:
   Addressed in https://github.com/apache/maven/pull/1579





> Make SimplexTransferListener handle absent source/target files
> --
>
> Key: MNG-8150
> URL: https://issues.apache.org/jira/browse/MNG-8150
> Project: Maven
>  Issue Type: Improvement
>  Components: Core
>Affects Versions: 3.9.7
>Reporter: Pavlo Shevchenko
>Assignee: Tamas Cservenak
>Priority: Minor
> Fix For: 4.0.0, 3.9.8, 4.0.0-beta-4
>
>
> See the discussion: 
> [https://github.com/apache/maven/pull/1471/files#r1632930409]
> The `TransferResource#file` may be `null`. The current implementation of the 
> `SimplexTransferListener` cannot handle this case and will break with an NPE.
>  
> The fix should be merged to `master` and backported to `maven-3.9.x` branches.
>  
>  



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


Re: [PR] [MPIR-455] - add support for multi-release JARs. [maven-project-info-reports-plugin]

2024-06-11 Thread via GitHub


michael-o commented on code in PR #70:
URL: 
https://github.com/apache/maven-project-info-reports-plugin/pull/70#discussion_r1635269049


##
pom.xml:
##
@@ -511,11 +511,47 @@ under the License.
 pom.xml
   
   
${project.build.directory}/local-repo
+  
+
${repository.proxy.url}
+  
+  true
+
   
 site
   
 
   
+  
+org.codehaus.mojo
+mrm-maven-plugin
+1.6.0

Review Comment:
   Weird, I bet I have seen it. Must be something else where I bumped this 
plugin. Never mind



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



[jira] [Commented] (MPIR-455) dependencies goal: add support for multi-release JARs

2024-06-11 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MPIR-455:
-

michael-o commented on code in PR #70:
URL: 
https://github.com/apache/maven-project-info-reports-plugin/pull/70#discussion_r1635269049


##
pom.xml:
##
@@ -511,11 +511,47 @@ under the License.
 pom.xml
   
   
${project.build.directory}/local-repo
+  
+
${repository.proxy.url}
+  
+  true
+
   
 site
   
 
   
+  
+org.codehaus.mojo
+mrm-maven-plugin
+1.6.0

Review Comment:
   Weird, I bet I have seen it. Must be something else where I bumped this 
plugin. Never mind





> dependencies goal: add support for multi-release JARs
> -
>
> Key: MPIR-455
> URL: https://issues.apache.org/jira/browse/MPIR-455
> Project: Maven Project Info Reports Plugin
>  Issue Type: Bug
>  Components: dependencies
>Affects Versions: 3.4.5, 3.5.0
>Reporter: Gabriel Belingueres
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.6.0
>
> Attachments: image-2024-01-04-21-12-54-861.png, 
> image-2024-06-02-10-58-46-991.png, image-2024-06-02-11-01-26-148.png, 
> image-2024-06-08-11-11-22-722.png, screenshot-1.png
>
>
> dependencies goal reports dependencies with multi-release support with the 
> highest version supported in the jar file, instead of the base version.
> Example: plexus-utils 4.0.0 is reported as a Java 11 dependency, but their 
> base version is 1.8.
> !image-2024-01-04-21-12-54-861.png!
> Because of this the lower "Total" rows report a wrong java version too.
>  
> This depends on https://issues.apache.org/jira/browse/MSHARED-1256.
>  



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


Re: [PR] [MPIR-455] - add support for multi-release JARs. [maven-project-info-reports-plugin]

2024-06-11 Thread via GitHub


michael-o commented on code in PR #70:
URL: 
https://github.com/apache/maven-project-info-reports-plugin/pull/70#discussion_r1635270543


##
pom.xml:
##
@@ -511,11 +511,47 @@ under the License.
 pom.xml
   
   
${project.build.directory}/local-repo
+  
+
${repository.proxy.url}
+  
+  true
+
   
 site
   
 
   
+  
+org.codehaus.mojo
+mrm-maven-plugin
+1.6.0
+
+  repository.proxy.url
+  
+
+  src/it/mrm/repository
+  

[jira] [Commented] (MPIR-455) dependencies goal: add support for multi-release JARs

2024-06-11 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MPIR-455:
-

michael-o commented on code in PR #70:
URL: 
https://github.com/apache/maven-project-info-reports-plugin/pull/70#discussion_r1635270543


##
pom.xml:
##
@@ -511,11 +511,47 @@ under the License.
 pom.xml
   
   
${project.build.directory}/local-repo
+  
+
${repository.proxy.url}
+  
+  true
+
   
 site
   
 
   
+  
+org.codehaus.mojo
+mrm-maven-plugin
+1.6.0
+
+  repository.proxy.url
+  
+
+  src/it/mrm/repository
+  
> Key: MPIR-455
> URL: https://issues.apache.org/jira/browse/MPIR-455
> Project: Maven Project Info Reports Plugin
>  Issue Type: Bug
>  Components: dependencies
>Affects Versions: 3.4.5, 3.5.0
>Reporter: Gabriel Belingueres
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.6.0
>
> Attachments: image-2024-01-04-21-12-54-861.png, 
> image-2024-06-02-10-58-46-991.png, image-2024-06-02-11-01-26-148.png, 
> image-2024-06-08-11-11-22-722.png, screenshot-1.png
>
>
> dependencies goal reports dependencies with multi-release support with the 
> highest version supported in the jar file, instead of the base version.
> Example: plexus-utils 4.0.0 is reported as a Java 11 dependency, but their 
> base version is 1.8.
> !image-2024-01-04-21-12-54-861.png!
> Because of this the lower "Total" rows report a wrong java version too.
>  
> This depends on https://issues.apache.org/jira/browse/MSHARED-1256.
>  



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


Re: [PR] [MPIR-455] - add support for multi-release JARs. [maven-project-info-reports-plugin]

2024-06-11 Thread via GitHub


michael-o commented on PR #70:
URL: 
https://github.com/apache/maven-project-info-reports-plugin/pull/70#issuecomment-2161306930

   > Regarding the entry count, it seems to be a bug in the shared-jar library. 
The root version entries are not saved anywhere. However an easy workaround 
(until the next shared-jar version release with a fix) would be to take the 
difference between the total count and each version. In this case is 
37-(9+9)=19 in the root. The total of 37 can be in the first row (showing file 
attributes). WDYT?
   
   That sounds quite reasonable! Can you create an issue with the library 
first, then tacke in MPIR and then add a comment around the dep entry in the 
POM that we depend on issue and code needs to be changed? That would be a way 
forward until then.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



[jira] [Commented] (MPIR-455) dependencies goal: add support for multi-release JARs

2024-06-11 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MPIR-455:
-

michael-o commented on PR #70:
URL: 
https://github.com/apache/maven-project-info-reports-plugin/pull/70#issuecomment-2161306930

   > Regarding the entry count, it seems to be a bug in the shared-jar library. 
The root version entries are not saved anywhere. However an easy workaround 
(until the next shared-jar version release with a fix) would be to take the 
difference between the total count and each version. In this case is 
37-(9+9)=19 in the root. The total of 37 can be in the first row (showing file 
attributes). WDYT?
   
   That sounds quite reasonable! Can you create an issue with the library 
first, then tacke in MPIR and then add a comment around the dep entry in the 
POM that we depend on issue and code needs to be changed? That would be a way 
forward until then.




> dependencies goal: add support for multi-release JARs
> -
>
> Key: MPIR-455
> URL: https://issues.apache.org/jira/browse/MPIR-455
> Project: Maven Project Info Reports Plugin
>  Issue Type: Bug
>  Components: dependencies
>Affects Versions: 3.4.5, 3.5.0
>Reporter: Gabriel Belingueres
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.6.0
>
> Attachments: image-2024-01-04-21-12-54-861.png, 
> image-2024-06-02-10-58-46-991.png, image-2024-06-02-11-01-26-148.png, 
> image-2024-06-08-11-11-22-722.png, screenshot-1.png
>
>
> dependencies goal reports dependencies with multi-release support with the 
> highest version supported in the jar file, instead of the base version.
> Example: plexus-utils 4.0.0 is reported as a Java 11 dependency, but their 
> base version is 1.8.
> !image-2024-01-04-21-12-54-861.png!
> Because of this the lower "Total" rows report a wrong java version too.
>  
> This depends on https://issues.apache.org/jira/browse/MSHARED-1256.
>  



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


[jira] [Commented] (MPMD-399) Incorrect warning: The project X does not seem to be compiled. PMD results might be inaccurate.

2024-06-11 Thread Andreas Dangel (Jira)


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

Andreas Dangel commented on MPMD-399:
-

{quote}
[~adangel], shouldn't {{auxClasspath}} include main classpath as well when 
tests should be included? 
{quote}

Yes, when analyzing test code, the auxClasspath should contain both main+test 
dependencies.

> Incorrect warning: The project X does not seem to be compiled. PMD results 
> might be inaccurate.
> ---
>
> Key: MPMD-399
> URL: https://issues.apache.org/jira/browse/MPMD-399
> Project: Maven PMD Plugin
>  Issue Type: Bug
>  Components: PMD
>Affects Versions: 3.22.0
>Reporter: AB-xdev
>Priority: Major
>
> PMD plugin is reporting the following warnings on in a multi-maven project:
> "The project X does not seem to be compiled. PMD results might be inaccurate."
> This is caused by the fact that not all modules have a
>  * {{src/main/java}} or
>  * {{src/test/java}} folder
> and therefore no {{target/classes}} or {{target/test-classes}} folders are 
> generated.
> The affected code that causes the problem can be found here:
> [https://github.com/apache/maven-pmd-plugin/blob/1961d771ea585e9344c25dfde194ee64a1b9040b/src/main/java/org/apache/maven/plugins/pmd/PmdReport.java#L516-L532]
> h3. Reproduction example
>  * Create a maven multi-module project
>  * Leave {{src/main/java}} of one module empty
>  * Execute {{pmd:aggregate-pmd}} or {{test pmd:aggregate-pmd-no-fork 
> -DskipTests}}
> → (x) Warning is reported
> h3. Possible fixes
> * Make it possible to ignore this warning
> * Do not warn when at least {{target/classes}} or {{target/test-classes}} is 
> present
>  



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


[jira] [Commented] (MPMD-399) Incorrect warning: The project X does not seem to be compiled. PMD results might be inaccurate.

2024-06-11 Thread Michael Osipov (Jira)


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

Michael Osipov commented on MPMD-399:
-

...and it does. I verified by debugging it. The comment for the param is just 
confusing.

> Incorrect warning: The project X does not seem to be compiled. PMD results 
> might be inaccurate.
> ---
>
> Key: MPMD-399
> URL: https://issues.apache.org/jira/browse/MPMD-399
> Project: Maven PMD Plugin
>  Issue Type: Bug
>  Components: PMD
>Affects Versions: 3.22.0
>Reporter: AB-xdev
>Priority: Major
>
> PMD plugin is reporting the following warnings on in a multi-maven project:
> "The project X does not seem to be compiled. PMD results might be inaccurate."
> This is caused by the fact that not all modules have a
>  * {{src/main/java}} or
>  * {{src/test/java}} folder
> and therefore no {{target/classes}} or {{target/test-classes}} folders are 
> generated.
> The affected code that causes the problem can be found here:
> [https://github.com/apache/maven-pmd-plugin/blob/1961d771ea585e9344c25dfde194ee64a1b9040b/src/main/java/org/apache/maven/plugins/pmd/PmdReport.java#L516-L532]
> h3. Reproduction example
>  * Create a maven multi-module project
>  * Leave {{src/main/java}} of one module empty
>  * Execute {{pmd:aggregate-pmd}} or {{test pmd:aggregate-pmd-no-fork 
> -DskipTests}}
> → (x) Warning is reported
> h3. Possible fixes
> * Make it possible to ignore this warning
> * Do not warn when at least {{target/classes}} or {{target/test-classes}} is 
> present
>  



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


Re: [PR] [MPMD-399] Incorrect warning: The project X does not seem to be compi… [maven-pmd-plugin]

2024-06-11 Thread via GitHub


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


##
src/main/java/org/apache/maven/plugins/pmd/PmdReport.java:
##
@@ -513,23 +513,11 @@ private String determineAuxClasspath() throws 
MavenReportException {
 
resolvedArtifact.getArtifact().getFile().toString());
 }
 
-List projectClasspath = includeTests
-? localProject.getTestClasspathElements()
-: localProject.getCompileClasspathElements();
-
-// Add the project's target folder first
-classpath.addAll(projectClasspath);
-if (!localProject.isExecutionRoot()) {
-for (String path : projectClasspath) {
-File pathFile = new File(path);
-String[] children = pathFile.list();
-
-if (!pathFile.exists() || (children != null && 
children.length == 0)) {
-getLog().warn("The project " + 
localProject.getArtifactId()
-+ " does not seem to be compiled. PMD 
results might be inaccurate.");

Review Comment:
   I added this warning back then, because users were configuring pmd plugin in 
a multi-module project with `aggregate=true`, which has the following effect: 
PMD is run on the parent project first, then the modules are built - which is 
simply the wrong order. PMD needs to be run _after_ the project is build.
   
   See my comment here: 
https://issues.apache.org/jira/browse/MPMD-277?focusedCommentId=16814718&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16814718
   
   If we remove the warning, we should also remove it from the FAQ: 
https://github.com/apache/maven-pmd-plugin/blob/70fcdd048ca933253f374e3282e5af874a096aa5/src/site/fml/faq.fml#L102-L135
   
   Maybe the warning should only be output, when the executed goal is `pmd`? 
The problem is, users can run "mvn clean pmd:pmd" and get false 
positives/negatives. Alternatively PMD could throw/report errors, if it doesn't 
find any classes it needs during analysis. I think, currently we don't report 
these.
   
   On another note: the parameter `typeResolution` should probably be 
deprecated as PMD doesn't make sense anymore without typeresolution. There was 
a time, when this was a new feature and not widely used by rules, but today 
most rules depend on that (and the feature is always enabled in PMD but doesn't 
work correctly if the auxclasspath is not provided or empty).
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



[jira] [Commented] (MPMD-399) Incorrect warning: The project X does not seem to be compiled. PMD results might be inaccurate.

2024-06-11 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MPMD-399:
-

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


##
src/main/java/org/apache/maven/plugins/pmd/PmdReport.java:
##
@@ -513,23 +513,11 @@ private String determineAuxClasspath() throws 
MavenReportException {
 
resolvedArtifact.getArtifact().getFile().toString());
 }
 
-List projectClasspath = includeTests
-? localProject.getTestClasspathElements()
-: localProject.getCompileClasspathElements();
-
-// Add the project's target folder first
-classpath.addAll(projectClasspath);
-if (!localProject.isExecutionRoot()) {
-for (String path : projectClasspath) {
-File pathFile = new File(path);
-String[] children = pathFile.list();
-
-if (!pathFile.exists() || (children != null && 
children.length == 0)) {
-getLog().warn("The project " + 
localProject.getArtifactId()
-+ " does not seem to be compiled. PMD 
results might be inaccurate.");

Review Comment:
   I added this warning back then, because users were configuring pmd plugin in 
a multi-module project with `aggregate=true`, which has the following effect: 
PMD is run on the parent project first, then the modules are built - which is 
simply the wrong order. PMD needs to be run _after_ the project is build.
   
   See my comment here: 
https://issues.apache.org/jira/browse/MPMD-277?focusedCommentId=16814718&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16814718
   
   If we remove the warning, we should also remove it from the FAQ: 
https://github.com/apache/maven-pmd-plugin/blob/70fcdd048ca933253f374e3282e5af874a096aa5/src/site/fml/faq.fml#L102-L135
   
   Maybe the warning should only be output, when the executed goal is `pmd`? 
The problem is, users can run "mvn clean pmd:pmd" and get false 
positives/negatives. Alternatively PMD could throw/report errors, if it doesn't 
find any classes it needs during analysis. I think, currently we don't report 
these.
   
   On another note: the parameter `typeResolution` should probably be 
deprecated as PMD doesn't make sense anymore without typeresolution. There was 
a time, when this was a new feature and not widely used by rules, but today 
most rules depend on that (and the feature is always enabled in PMD but doesn't 
work correctly if the auxclasspath is not provided or empty).
   





> Incorrect warning: The project X does not seem to be compiled. PMD results 
> might be inaccurate.
> ---
>
> Key: MPMD-399
> URL: https://issues.apache.org/jira/browse/MPMD-399
> Project: Maven PMD Plugin
>  Issue Type: Bug
>  Components: PMD
>Affects Versions: 3.22.0
>Reporter: AB-xdev
>Priority: Major
>
> PMD plugin is reporting the following warnings on in a multi-maven project:
> "The project X does not seem to be compiled. PMD results might be inaccurate."
> This is caused by the fact that not all modules have a
>  * {{src/main/java}} or
>  * {{src/test/java}} folder
> and therefore no {{target/classes}} or {{target/test-classes}} folders are 
> generated.
> The affected code that causes the problem can be found here:
> [https://github.com/apache/maven-pmd-plugin/blob/1961d771ea585e9344c25dfde194ee64a1b9040b/src/main/java/org/apache/maven/plugins/pmd/PmdReport.java#L516-L532]
> h3. Reproduction example
>  * Create a maven multi-module project
>  * Leave {{src/main/java}} of one module empty
>  * Execute {{pmd:aggregate-pmd}} or {{test pmd:aggregate-pmd-no-fork 
> -DskipTests}}
> → (x) Warning is reported
> h3. Possible fixes
> * Make it possible to ignore this warning
> * Do not warn when at least {{target/classes}} or {{target/test-classes}} is 
> present
>  



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


[jira] [Commented] (MNG-8148) DefaultProjectDependenciesResolver takes up to several minutes for some modules of the project

2024-06-11 Thread Tamas Cservenak (Jira)


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

Tamas Cservenak commented on MNG-8148:
--

Any chance to get some reproducer for this? Am getting curious...

> DefaultProjectDependenciesResolver takes up to several minutes for some 
> modules of the project
> --
>
> Key: MNG-8148
> URL: https://issues.apache.org/jira/browse/MNG-8148
> Project: Maven
>  Issue Type: Bug
>Reporter: Sergey Nuyanzin
>Priority: Major
>
> The project is relatively small (5 modules and maybe about 1k classes in 
> total)
> unfortunately it is private so I couldn't share the source
> 1 thing that may be makes sense to mention is that some modules generates 
> code for protobuf integration.
> also I was able to take thread dump of maven build 
> and this is the thing which I faced. most of the times when the build was 
> hanging
> {noformat}
> "main" #1 prio=5 os_prio=31 cpu=394695.18ms elapsed=448.93s 
> tid=0x00015d80a800 nid=0x2403 runnable  [0x00016dec4000]
>java.lang.Thread.State: RUNNABLE
>   at 
> org.eclipse.aether.util.graph.transformer.ConflictMarker.analyze(ConflictMarker.java:133)
>   at 
> org.eclipse.aether.util.graph.transformer.ConflictMarker.analyze(ConflictMarker.java:133)
>   at 
> org.eclipse.aether.util.graph.transformer.ConflictMarker.analyze(ConflictMarker.java:133)
>   at 
> org.eclipse.aether.util.graph.transformer.ConflictMarker.analyze(ConflictMarker.java:133)
>   at 
> org.eclipse.aether.util.graph.transformer.ConflictMarker.analyze(ConflictMarker.java:133)
>   at 
> org.eclipse.aether.util.graph.transformer.ConflictMarker.transformGraph(ConflictMarker.java:63)
>   at 
> org.eclipse.aether.util.graph.transformer.ConflictIdSorter.transformGraph(ConflictIdSorter.java:58)
>   at 
> org.eclipse.aether.util.graph.transformer.ConflictResolver.transformGraph(ConflictResolver.java:172)
>   at 
> org.eclipse.aether.util.graph.transformer.ChainedDependencyGraphTransformer.transformGraph(ChainedDependencyGraphTransformer.java:71)
>   at 
> org.eclipse.aether.internal.impl.collect.DependencyCollectorDelegate.collectDependencies(DependencyCollectorDelegate.java:246)
>   at 
> org.eclipse.aether.internal.impl.collect.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:87)
>   at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:306)
>   at 
> org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:151)
>   at 
> org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:224)
>   at 
> org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:136)
>   at 
> org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:355)
>   at 
> org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:313)
> {noformat}
> and
> {noformat}
> "main" #1 prio=5 os_prio=31 cpu=456718.35ms elapsed=518.34s 
> tid=0x000127811000 nid=0x2403 runnable  [0x00016b3ac000]
>java.lang.Thread.State: RUNNABLE
>   at java.util.HashMap.hash(java.base@11.0.23/HashMap.java:340)
>   at java.util.LinkedHashMap.get(java.base@11.0.23/LinkedHashMap.java:440)
>   at 
> org.eclipse.aether.util.graph.transformer.ConflictIdSorter.buildConflitIdDAG(ConflictIdSorter.java:110)
>   at 
> org.eclipse.aether.util.graph.transformer.ConflictIdSorter.buildConflitIdDAG(ConflictIdSorter.java:122)
>   at 
> org.eclipse.aether.util.graph.transformer.ConflictIdSorter.buildConflitIdDAG(ConflictIdSorter.java:122)
>   at 
> org.eclipse.aether.util.graph.transformer.ConflictIdSorter.buildConflitIdDAG(ConflictIdSorter.java:122)
>   at 
> org.eclipse.aether.util.graph.transformer.ConflictIdSorter.transformGraph(ConflictIdSorter.java:78)
>   at 
> org.eclipse.aether.util.graph.transformer.ConflictResolver.transformGraph(ConflictResolver.java:172)
>   at 
> org.eclipse.aether.util.graph.transformer.ChainedDependencyGraphTransformer.transformGraph(ChainedDependencyGraphTransformer.java:71)
>   at 
> org.eclipse.aether.internal.impl.collect.DependencyCollectorDelegate.collectDependencies(DependencyCollectorDelegate.java:246)
>   at 
> org.eclipse.aether.internal.impl.collect.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:87)
>   at 
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:306)
>   at 
> org.apache.maven.project.Defaul

Re: [PR] [MPMD-399] Incorrect warning: The project X does not seem to be compi… [maven-pmd-plugin]

2024-06-11 Thread via GitHub


michael-o commented on code in PR #154:
URL: https://github.com/apache/maven-pmd-plugin/pull/154#discussion_r1635302700


##
src/main/java/org/apache/maven/plugins/pmd/PmdReport.java:
##
@@ -513,23 +513,11 @@ private String determineAuxClasspath() throws 
MavenReportException {
 
resolvedArtifact.getArtifact().getFile().toString());
 }
 
-List projectClasspath = includeTests
-? localProject.getTestClasspathElements()
-: localProject.getCompileClasspathElements();
-
-// Add the project's target folder first
-classpath.addAll(projectClasspath);
-if (!localProject.isExecutionRoot()) {
-for (String path : projectClasspath) {
-File pathFile = new File(path);
-String[] children = pathFile.list();
-
-if (!pathFile.exists() || (children != null && 
children.length == 0)) {
-getLog().warn("The project " + 
localProject.getArtifactId()
-+ " does not seem to be compiled. PMD 
results might be inaccurate.");

Review Comment:
   I see. Maybe this goal should fork `compile` or ` test-compile`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



[jira] [Commented] (MPMD-399) Incorrect warning: The project X does not seem to be compiled. PMD results might be inaccurate.

2024-06-11 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MPMD-399:
-

michael-o commented on code in PR #154:
URL: https://github.com/apache/maven-pmd-plugin/pull/154#discussion_r1635302081


##
src/main/java/org/apache/maven/plugins/pmd/PmdReport.java:
##
@@ -513,23 +513,11 @@ private String determineAuxClasspath() throws 
MavenReportException {
 
resolvedArtifact.getArtifact().getFile().toString());
 }
 
-List projectClasspath = includeTests
-? localProject.getTestClasspathElements()
-: localProject.getCompileClasspathElements();
-
-// Add the project's target folder first
-classpath.addAll(projectClasspath);
-if (!localProject.isExecutionRoot()) {
-for (String path : projectClasspath) {
-File pathFile = new File(path);
-String[] children = pathFile.list();
-
-if (!pathFile.exists() || (children != null && 
children.length == 0)) {
-getLog().warn("The project " + 
localProject.getArtifactId()
-+ " does not seem to be compiled. PMD 
results might be inaccurate.");

Review Comment:
   Let's deprecate `typeResolution` first with an explanation. That is cheap to 
do.





> Incorrect warning: The project X does not seem to be compiled. PMD results 
> might be inaccurate.
> ---
>
> Key: MPMD-399
> URL: https://issues.apache.org/jira/browse/MPMD-399
> Project: Maven PMD Plugin
>  Issue Type: Bug
>  Components: PMD
>Affects Versions: 3.22.0
>Reporter: AB-xdev
>Priority: Major
>
> PMD plugin is reporting the following warnings on in a multi-maven project:
> "The project X does not seem to be compiled. PMD results might be inaccurate."
> This is caused by the fact that not all modules have a
>  * {{src/main/java}} or
>  * {{src/test/java}} folder
> and therefore no {{target/classes}} or {{target/test-classes}} folders are 
> generated.
> The affected code that causes the problem can be found here:
> [https://github.com/apache/maven-pmd-plugin/blob/1961d771ea585e9344c25dfde194ee64a1b9040b/src/main/java/org/apache/maven/plugins/pmd/PmdReport.java#L516-L532]
> h3. Reproduction example
>  * Create a maven multi-module project
>  * Leave {{src/main/java}} of one module empty
>  * Execute {{pmd:aggregate-pmd}} or {{test pmd:aggregate-pmd-no-fork 
> -DskipTests}}
> → (x) Warning is reported
> h3. Possible fixes
> * Make it possible to ignore this warning
> * Do not warn when at least {{target/classes}} or {{target/test-classes}} is 
> present
>  



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


[jira] [Commented] (MPMD-399) Incorrect warning: The project X does not seem to be compiled. PMD results might be inaccurate.

2024-06-11 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MPMD-399:
-

michael-o commented on code in PR #154:
URL: https://github.com/apache/maven-pmd-plugin/pull/154#discussion_r1635302700


##
src/main/java/org/apache/maven/plugins/pmd/PmdReport.java:
##
@@ -513,23 +513,11 @@ private String determineAuxClasspath() throws 
MavenReportException {
 
resolvedArtifact.getArtifact().getFile().toString());
 }
 
-List projectClasspath = includeTests
-? localProject.getTestClasspathElements()
-: localProject.getCompileClasspathElements();
-
-// Add the project's target folder first
-classpath.addAll(projectClasspath);
-if (!localProject.isExecutionRoot()) {
-for (String path : projectClasspath) {
-File pathFile = new File(path);
-String[] children = pathFile.list();
-
-if (!pathFile.exists() || (children != null && 
children.length == 0)) {
-getLog().warn("The project " + 
localProject.getArtifactId()
-+ " does not seem to be compiled. PMD 
results might be inaccurate.");

Review Comment:
   I see. Maybe this goal should fork `compile` or ` test-compile`?





> Incorrect warning: The project X does not seem to be compiled. PMD results 
> might be inaccurate.
> ---
>
> Key: MPMD-399
> URL: https://issues.apache.org/jira/browse/MPMD-399
> Project: Maven PMD Plugin
>  Issue Type: Bug
>  Components: PMD
>Affects Versions: 3.22.0
>Reporter: AB-xdev
>Priority: Major
>
> PMD plugin is reporting the following warnings on in a multi-maven project:
> "The project X does not seem to be compiled. PMD results might be inaccurate."
> This is caused by the fact that not all modules have a
>  * {{src/main/java}} or
>  * {{src/test/java}} folder
> and therefore no {{target/classes}} or {{target/test-classes}} folders are 
> generated.
> The affected code that causes the problem can be found here:
> [https://github.com/apache/maven-pmd-plugin/blob/1961d771ea585e9344c25dfde194ee64a1b9040b/src/main/java/org/apache/maven/plugins/pmd/PmdReport.java#L516-L532]
> h3. Reproduction example
>  * Create a maven multi-module project
>  * Leave {{src/main/java}} of one module empty
>  * Execute {{pmd:aggregate-pmd}} or {{test pmd:aggregate-pmd-no-fork 
> -DskipTests}}
> → (x) Warning is reported
> h3. Possible fixes
> * Make it possible to ignore this warning
> * Do not warn when at least {{target/classes}} or {{target/test-classes}} is 
> present
>  



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


Re: [PR] [MPMD-399] Incorrect warning: The project X does not seem to be compi… [maven-pmd-plugin]

2024-06-11 Thread via GitHub


michael-o commented on code in PR #154:
URL: https://github.com/apache/maven-pmd-plugin/pull/154#discussion_r1635331936


##
src/main/java/org/apache/maven/plugins/pmd/PmdReport.java:
##
@@ -513,23 +513,11 @@ private String determineAuxClasspath() throws 
MavenReportException {
 
resolvedArtifact.getArtifact().getFile().toString());
 }
 
-List projectClasspath = includeTests
-? localProject.getTestClasspathElements()
-: localProject.getCompileClasspathElements();
-
-// Add the project's target folder first
-classpath.addAll(projectClasspath);
-if (!localProject.isExecutionRoot()) {
-for (String path : projectClasspath) {
-File pathFile = new File(path);
-String[] children = pathFile.list();
-
-if (!pathFile.exists() || (children != null && 
children.length == 0)) {
-getLog().warn("The project " + 
localProject.getArtifactId()
-+ " does not seem to be compiled. PMD 
results might be inaccurate.");

Review Comment:
   I have the feeling that the goals need a logical cleanup with 
non-agggregate/aggregate compared to other plugins which need to for 
something...



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



[jira] [Commented] (MPMD-399) Incorrect warning: The project X does not seem to be compiled. PMD results might be inaccurate.

2024-06-11 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MPMD-399:
-

michael-o commented on code in PR #154:
URL: https://github.com/apache/maven-pmd-plugin/pull/154#discussion_r1635331936


##
src/main/java/org/apache/maven/plugins/pmd/PmdReport.java:
##
@@ -513,23 +513,11 @@ private String determineAuxClasspath() throws 
MavenReportException {
 
resolvedArtifact.getArtifact().getFile().toString());
 }
 
-List projectClasspath = includeTests
-? localProject.getTestClasspathElements()
-: localProject.getCompileClasspathElements();
-
-// Add the project's target folder first
-classpath.addAll(projectClasspath);
-if (!localProject.isExecutionRoot()) {
-for (String path : projectClasspath) {
-File pathFile = new File(path);
-String[] children = pathFile.list();
-
-if (!pathFile.exists() || (children != null && 
children.length == 0)) {
-getLog().warn("The project " + 
localProject.getArtifactId()
-+ " does not seem to be compiled. PMD 
results might be inaccurate.");

Review Comment:
   I have the feeling that the goals need a logical cleanup with 
non-agggregate/aggregate compared to other plugins which need to for 
something...





> Incorrect warning: The project X does not seem to be compiled. PMD results 
> might be inaccurate.
> ---
>
> Key: MPMD-399
> URL: https://issues.apache.org/jira/browse/MPMD-399
> Project: Maven PMD Plugin
>  Issue Type: Bug
>  Components: PMD
>Affects Versions: 3.22.0
>Reporter: AB-xdev
>Priority: Major
>
> PMD plugin is reporting the following warnings on in a multi-maven project:
> "The project X does not seem to be compiled. PMD results might be inaccurate."
> This is caused by the fact that not all modules have a
>  * {{src/main/java}} or
>  * {{src/test/java}} folder
> and therefore no {{target/classes}} or {{target/test-classes}} folders are 
> generated.
> The affected code that causes the problem can be found here:
> [https://github.com/apache/maven-pmd-plugin/blob/1961d771ea585e9344c25dfde194ee64a1b9040b/src/main/java/org/apache/maven/plugins/pmd/PmdReport.java#L516-L532]
> h3. Reproduction example
>  * Create a maven multi-module project
>  * Leave {{src/main/java}} of one module empty
>  * Execute {{pmd:aggregate-pmd}} or {{test pmd:aggregate-pmd-no-fork 
> -DskipTests}}
> → (x) Warning is reported
> h3. Possible fixes
> * Make it possible to ignore this warning
> * Do not warn when at least {{target/classes}} or {{target/test-classes}} is 
> present
>  



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


Re: [PR] [MPMD-399] Incorrect warning: The project X does not seem to be compi… [maven-pmd-plugin]

2024-06-11 Thread via GitHub


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


##
src/main/java/org/apache/maven/plugins/pmd/PmdReport.java:
##
@@ -513,23 +513,11 @@ private String determineAuxClasspath() throws 
MavenReportException {
 
resolvedArtifact.getArtifact().getFile().toString());
 }
 
-List projectClasspath = includeTests
-? localProject.getTestClasspathElements()
-: localProject.getCompileClasspathElements();
-
-// Add the project's target folder first
-classpath.addAll(projectClasspath);
-if (!localProject.isExecutionRoot()) {
-for (String path : projectClasspath) {
-File pathFile = new File(path);
-String[] children = pathFile.list();
-
-if (!pathFile.exists() || (children != null && 
children.length == 0)) {
-getLog().warn("The project " + 
localProject.getArtifactId()
-+ " does not seem to be compiled. PMD 
results might be inaccurate.");

Review Comment:
   I don't know if that's possible without breaking anything... I _think_ it 
has to do, that the goal `pmd` is also a reporting mojo (that was probably the 
very first feature) as well as creating the pmd.xml file with the report, that 
is used by the goal `verify` to maybe fail the build (`verify` forks `pmd`) 
(and this feature was probably added on top just reusing the reporting 
mojo...). Not sure how other plugins deal with this (e.g. checkstyle, spotbugs, 
...). What I've seen is, that m-pmd-p tries to avoid being called multiple 
times (which makes sense, it needs to run only once; see the 
`canGenerateReport` method which actually executes PMD, and `executeReport` 
only renders the result).
   
   If we would add the fork to `compile` or `test-compile`, would the compile 
phase be called multiple times? e.g. mvn verify -> compile -> pmd:check >> 
pmd:pmd >> compile?
   
   For the concrete issue MPMD-399, I would either remove the warning message 
(and ignore this whole discussion: if m-pmd-p is used correctly, there are no 
problems). Or try to improve the logic, when we issue the warning (we can 
easily fix the target/classes and/or target/test-classes is missing/empty - but 
there might be other cases. Maybe there is a different way to figure out, if 
the project has been compiled already).
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



[jira] [Commented] (MPMD-399) Incorrect warning: The project X does not seem to be compiled. PMD results might be inaccurate.

2024-06-11 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MPMD-399:
-

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


##
src/main/java/org/apache/maven/plugins/pmd/PmdReport.java:
##
@@ -513,23 +513,11 @@ private String determineAuxClasspath() throws 
MavenReportException {
 
resolvedArtifact.getArtifact().getFile().toString());
 }
 
-List projectClasspath = includeTests
-? localProject.getTestClasspathElements()
-: localProject.getCompileClasspathElements();
-
-// Add the project's target folder first
-classpath.addAll(projectClasspath);
-if (!localProject.isExecutionRoot()) {
-for (String path : projectClasspath) {
-File pathFile = new File(path);
-String[] children = pathFile.list();
-
-if (!pathFile.exists() || (children != null && 
children.length == 0)) {
-getLog().warn("The project " + 
localProject.getArtifactId()
-+ " does not seem to be compiled. PMD 
results might be inaccurate.");

Review Comment:
   I don't know if that's possible without breaking anything... I _think_ it 
has to do, that the goal `pmd` is also a reporting mojo (that was probably the 
very first feature) as well as creating the pmd.xml file with the report, that 
is used by the goal `verify` to maybe fail the build (`verify` forks `pmd`) 
(and this feature was probably added on top just reusing the reporting 
mojo...). Not sure how other plugins deal with this (e.g. checkstyle, spotbugs, 
...). What I've seen is, that m-pmd-p tries to avoid being called multiple 
times (which makes sense, it needs to run only once; see the 
`canGenerateReport` method which actually executes PMD, and `executeReport` 
only renders the result).
   
   If we would add the fork to `compile` or `test-compile`, would the compile 
phase be called multiple times? e.g. mvn verify -> compile -> pmd:check >> 
pmd:pmd >> compile?
   
   For the concrete issue MPMD-399, I would either remove the warning message 
(and ignore this whole discussion: if m-pmd-p is used correctly, there are no 
problems). Or try to improve the logic, when we issue the warning (we can 
easily fix the target/classes and/or target/test-classes is missing/empty - but 
there might be other cases. Maybe there is a different way to figure out, if 
the project has been compiled already).
   





> Incorrect warning: The project X does not seem to be compiled. PMD results 
> might be inaccurate.
> ---
>
> Key: MPMD-399
> URL: https://issues.apache.org/jira/browse/MPMD-399
> Project: Maven PMD Plugin
>  Issue Type: Bug
>  Components: PMD
>Affects Versions: 3.22.0
>Reporter: AB-xdev
>Priority: Major
>
> PMD plugin is reporting the following warnings on in a multi-maven project:
> "The project X does not seem to be compiled. PMD results might be inaccurate."
> This is caused by the fact that not all modules have a
>  * {{src/main/java}} or
>  * {{src/test/java}} folder
> and therefore no {{target/classes}} or {{target/test-classes}} folders are 
> generated.
> The affected code that causes the problem can be found here:
> [https://github.com/apache/maven-pmd-plugin/blob/1961d771ea585e9344c25dfde194ee64a1b9040b/src/main/java/org/apache/maven/plugins/pmd/PmdReport.java#L516-L532]
> h3. Reproduction example
>  * Create a maven multi-module project
>  * Leave {{src/main/java}} of one module empty
>  * Execute {{pmd:aggregate-pmd}} or {{test pmd:aggregate-pmd-no-fork 
> -DskipTests}}
> → (x) Warning is reported
> h3. Possible fixes
> * Make it possible to ignore this warning
> * Do not warn when at least {{target/classes}} or {{target/test-classes}} is 
> present
>  



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


[jira] [Commented] (MPMD-399) Incorrect warning: The project X does not seem to be compiled. PMD results might be inaccurate.

2024-06-11 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MPMD-399:
-

michael-o commented on code in PR #154:
URL: https://github.com/apache/maven-pmd-plugin/pull/154#discussion_r1635351234


##
src/main/java/org/apache/maven/plugins/pmd/PmdReport.java:
##
@@ -513,23 +513,11 @@ private String determineAuxClasspath() throws 
MavenReportException {
 
resolvedArtifact.getArtifact().getFile().toString());
 }
 
-List projectClasspath = includeTests
-? localProject.getTestClasspathElements()
-: localProject.getCompileClasspathElements();
-
-// Add the project's target folder first
-classpath.addAll(projectClasspath);
-if (!localProject.isExecutionRoot()) {
-for (String path : projectClasspath) {
-File pathFile = new File(path);
-String[] children = pathFile.list();
-
-if (!pathFile.exists() || (children != null && 
children.length == 0)) {
-getLog().warn("The project " + 
localProject.getArtifactId()
-+ " does not seem to be compiled. PMD 
results might be inaccurate.");

Review Comment:
   I doubt that the goals can be made right without breaking something. We also 
should split report and validation goals. We should move this to a separate 
dicussion. Too broad for now.
   
   > If we would add the fork to compile or test-compile, would the compile 
phase be called multiple times? e.g. mvn verify -> compile -> pmd:check >> 
pmd:pmd >> compile?
   
   Could be the case w/o an analysis.
   
   > For the concrete issue 
[MPMD-399](https://issues.apache.org/jira/browse/MPMD-399), I would either 
remove the warning message (and ignore this whole discussion: if m-pmd-p is 
used correctly, there are no problems). Or try to improve the logic, when we 
issue the warning (we can easily fix the target/classes and/or 
target/test-classes is missing/empty - but there might be other cases. Maybe 
there is a different way to figure out, if the project has been compiled 
already).
   
   One the problems, as layed out in MPMD-399, is that if the param is set in 
the parent and not all plugins have either/proper combo there will be always a 
warning. For now, I would not put too much logic into it. You know PMD best. If 
you think that the warning should stay as a safe guard I am fine with that. I 
trust you, if you think that the confusion is not worth the warning, we should 
remove mit.
   



##
src/main/java/org/apache/maven/plugins/pmd/PmdReport.java:
##
@@ -513,23 +513,11 @@ private String determineAuxClasspath() throws 
MavenReportException {
 
resolvedArtifact.getArtifact().getFile().toString());
 }
 
-List projectClasspath = includeTests
-? localProject.getTestClasspathElements()
-: localProject.getCompileClasspathElements();
-
-// Add the project's target folder first
-classpath.addAll(projectClasspath);
-if (!localProject.isExecutionRoot()) {
-for (String path : projectClasspath) {
-File pathFile = new File(path);
-String[] children = pathFile.list();
-
-if (!pathFile.exists() || (children != null && 
children.length == 0)) {
-getLog().warn("The project " + 
localProject.getArtifactId()
-+ " does not seem to be compiled. PMD 
results might be inaccurate.");

Review Comment:
   I doubt that the goals can be made right without breaking something. We also 
should split report and validation goals. We should move this to a separate 
dicussion. Too broad for now.
   
   > If we would add the fork to compile or test-compile, would the compile 
phase be called multiple times? e.g. mvn verify -> compile -> pmd:check >> 
pmd:pmd >> compile?
   
   Could be the case w/o an analysis.
   
   > For the concrete issue 
[MPMD-399](https://issues.apache.org/jira/browse/MPMD-399), I would either 
remove the warning message (and ignore this whole discussion: if m-pmd-p is 
used correctly, there are no problems). Or try to improve the logic, when we 
issue the warning (we can easily fix the target/classes and/or 
target/test-classes is missing/empty - but there might be other cases. Maybe 
there is a different way to figure out, if the project has been compiled 
already).
   
   One the problems, as laye

Re: [PR] [SUREFIRE-2232] StatelessXmlReporter: handle failed test result without a throwable [maven-surefire]

2024-06-11 Thread via GitHub


michael-o commented on code in PR #716:
URL: https://github.com/apache/maven-surefire/pull/716#discussion_r1635380077


##
maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporterTest.java:
##
@@ -522,6 +522,23 @@ public void testSyncOnDeferredFile() throws Exception {
 assertThat((boolean) getInternalState(out, "closed")).isTrue();
 }
 
+public void testReporterHandlesATestWithoutMessageAndWithEmptyStackTrace() 
{
+StackTraceWriter stackTraceWriterOne = new 
DeserializedStacktraceWriter(null, null, "");
+
+WrappedReportEntry testReport = new WrappedReportEntry(
+new SimpleReportEntry(
+NORMAL_RUN, 1L, getClass().getName(), null, "a test 
name", null, stackTraceWriterOne, 5),
+ERROR,
+5,
+null,
+null);
+
+StatelessXmlReporter reporter = new StatelessXmlReporter(
+reportDir, null, false, 1, new HashMap<>(), XSD, "3.0", false, 
false, false, false);

Review Comment:
   This needs to be updated to 3.0.1.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



[jira] [Commented] (SUREFIRE-2232) [REGRESSION] StatelessXmlReporter fails to process failed result without a throwable

2024-06-11 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on SUREFIRE-2232:
--

michael-o commented on code in PR #716:
URL: https://github.com/apache/maven-surefire/pull/716#discussion_r1635380077


##
maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporterTest.java:
##
@@ -522,6 +522,23 @@ public void testSyncOnDeferredFile() throws Exception {
 assertThat((boolean) getInternalState(out, "closed")).isTrue();
 }
 
+public void testReporterHandlesATestWithoutMessageAndWithEmptyStackTrace() 
{
+StackTraceWriter stackTraceWriterOne = new 
DeserializedStacktraceWriter(null, null, "");
+
+WrappedReportEntry testReport = new WrappedReportEntry(
+new SimpleReportEntry(
+NORMAL_RUN, 1L, getClass().getName(), null, "a test 
name", null, stackTraceWriterOne, 5),
+ERROR,
+5,
+null,
+null);
+
+StatelessXmlReporter reporter = new StatelessXmlReporter(
+reportDir, null, false, 1, new HashMap<>(), XSD, "3.0", false, 
false, false, false);

Review Comment:
   This needs to be updated to 3.0.1.





> [REGRESSION] StatelessXmlReporter fails to process failed result without a 
> throwable
> 
>
> Key: SUREFIRE-2232
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2232
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 3.0.0-M6, 3.2.3, 3.2.5
>Reporter: Artem Yak
>Assignee: Michael Osipov
>Priority: Minor
> Fix For: 3.3.0
>
>
>  
> A regression bug appeared in 3.0.0-M6:
> A testNG test class has a listener which updates results from SUCCESS to 
> FAILURE:
>  
> {noformat}
> @Override
> public void onTestSuccess(ITestResult result) {
>     result.setStatus(ITestResult.FAILURE);
> result.getTestContext().getPassedTests().removeResult(result);
> result.getTestContext().getFailedTests().addResult(result);
> }{noformat}
>  
> Surefire fails to process a failed test result without a throwable and 
> reports 0 total tests. 
> {code:java}
> ForkStarter IOException: java.util.NoSuchElementException.
> org.apache.maven.plugin.surefire.booterclient.output.MultipleFailureException:
>  java.util.NoSuchElementException
>   at 
> org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumper.(ThreadedStreamConsumer.java:59)
>   at 
> org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer.(ThreadedStreamConsumer.java:107)
>   at 
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:546)
>   at 
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:285)
>   at 
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:250)
>  {code}
>  
> Reproducible unit test.
> {code:java}
> package org.apache.maven.plugin.surefire.report;
> import java.io.File;
> import java.util.HashMap;
> import java.util.concurrent.atomic.AtomicInteger;
> import junit.framework.TestCase;
> import 
> org.apache.maven.plugin.surefire.booterclient.output.DeserializedStacktraceWriter;
> import org.apache.maven.surefire.api.report.SimpleReportEntry;
> import org.apache.maven.surefire.api.report.StackTraceWriter;
> import static org.apache.maven.plugin.surefire.report.ReportEntryType.ERROR;
> import static org.apache.maven.surefire.api.report.RunMode.NORMAL_RUN;
> @SuppressWarnings({"ResultOfMethodCallIgnored", "checkstyle:magicnumber"})
> public class StatelessXmlReporter2Test extends TestCase {
> private static final String XSD =
> 
> "https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report-3.0.xsd";;
> private static final AtomicInteger FOLDER_POSTFIX = new AtomicInteger();
> private File reportDir;
> @Override
> protected void setUp() throws Exception {
> File basedir = new File(".");
> File target = new File(basedir.getCanonicalFile(), "target");
> target.mkdir();
> String reportRelDir = getClass().getSimpleName() + "-" + 
> FOLDER_POSTFIX.incrementAndGet();
> reportDir = new File(target, reportRelDir);
> reportDir.mkdir();
> }
> @Override
> protected void tearDown() {
> }
> public void testOutputFailedTestWithoutThrowable() {
> StackTraceWriter stackTraceWriterOne = new 
> DeserializedStacktraceWriter(null, null, "");
> WrappedReportEntry testReport = new WrappedReportEntry(
> new SimpleReportEntry(
> NORMAL_RUN, 1L, get

[jira] [Assigned] (MSITE-988) Documentation

2024-06-11 Thread Michael Osipov (Jira)


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

Michael Osipov reassigned MSITE-988:


Assignee: (was: Michael Osipov)

> Documentation
> -
>
> Key: MSITE-988
> URL: https://issues.apache.org/jira/browse/MSITE-988
> Project: Maven Site Plugin
>  Issue Type: Bug
>  Components: documentation
>Affects Versions: 4.0.0-M9
>Reporter: Ernst Reissner
>Priority: Major
>
> Create old pre-version 2.0.0 model. 
> If using newer versions, 4.0.0-M9 to the current M11, 
> then an error occurs: 
> ```
> Site model of 
> 'eu.simuline.m2latex:latex-maven-plugin:maven-plugin:2.0-SNAPSHOT' 
> for locale 'en' is still using the old pre-version 2.0.0 model. 
> You MUST migrate to the new model as soon as possible 
> otherwise your build will break in the future!
> ```
> This is due to an old form of `site.xml` 
> The first problem is the documentation, 
> `https://maven.apache.org/plugins/maven-site-plugin/examples/sitedescriptor.html`
>  
> which describes the old form and refers to the new one only in a link. 
> What would be needed is a clear statement on the mapping of the version to 
> the form. 
> Also the new form is not completely supported: 
> ```
>xmlns="http://maven.apache.org/SITE/2.0.0";
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>   xsi:schemaLocation="http://maven.apache.org/SITE/2.0.0 
> https://maven.apache.org/xsd/site-2.0.0.xsd";> 
> ...
> 
> ```
> well, the link `https://maven.apache.org/xsd/site-2.0.0.xsd` does not exist, 
> resulting in a warning in my IDE. 



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


Re: [PR] [SUREFIRE-2232] StatelessXmlReporter: handle failed test result without a throwable [maven-surefire]

2024-06-11 Thread via GitHub


dr29bart commented on PR #716:
URL: https://github.com/apache/maven-surefire/pull/716#issuecomment-2161484463

   > For me, this is fine now. Are you OK as well?
   
   yes, I am OK to merge.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



[jira] [Commented] (SUREFIRE-2232) [REGRESSION] StatelessXmlReporter fails to process failed result without a throwable

2024-06-11 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on SUREFIRE-2232:
--

dr29bart commented on PR #716:
URL: https://github.com/apache/maven-surefire/pull/716#issuecomment-2161484463

   > For me, this is fine now. Are you OK as well?
   
   yes, I am OK to merge.




> [REGRESSION] StatelessXmlReporter fails to process failed result without a 
> throwable
> 
>
> Key: SUREFIRE-2232
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2232
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 3.0.0-M6, 3.2.3, 3.2.5
>Reporter: Artem Yak
>Assignee: Michael Osipov
>Priority: Minor
> Fix For: 3.3.0
>
>
>  
> A regression bug appeared in 3.0.0-M6:
> A testNG test class has a listener which updates results from SUCCESS to 
> FAILURE:
>  
> {noformat}
> @Override
> public void onTestSuccess(ITestResult result) {
>     result.setStatus(ITestResult.FAILURE);
> result.getTestContext().getPassedTests().removeResult(result);
> result.getTestContext().getFailedTests().addResult(result);
> }{noformat}
>  
> Surefire fails to process a failed test result without a throwable and 
> reports 0 total tests. 
> {code:java}
> ForkStarter IOException: java.util.NoSuchElementException.
> org.apache.maven.plugin.surefire.booterclient.output.MultipleFailureException:
>  java.util.NoSuchElementException
>   at 
> org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumper.(ThreadedStreamConsumer.java:59)
>   at 
> org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer.(ThreadedStreamConsumer.java:107)
>   at 
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:546)
>   at 
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:285)
>   at 
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:250)
>  {code}
>  
> Reproducible unit test.
> {code:java}
> package org.apache.maven.plugin.surefire.report;
> import java.io.File;
> import java.util.HashMap;
> import java.util.concurrent.atomic.AtomicInteger;
> import junit.framework.TestCase;
> import 
> org.apache.maven.plugin.surefire.booterclient.output.DeserializedStacktraceWriter;
> import org.apache.maven.surefire.api.report.SimpleReportEntry;
> import org.apache.maven.surefire.api.report.StackTraceWriter;
> import static org.apache.maven.plugin.surefire.report.ReportEntryType.ERROR;
> import static org.apache.maven.surefire.api.report.RunMode.NORMAL_RUN;
> @SuppressWarnings({"ResultOfMethodCallIgnored", "checkstyle:magicnumber"})
> public class StatelessXmlReporter2Test extends TestCase {
> private static final String XSD =
> 
> "https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report-3.0.xsd";;
> private static final AtomicInteger FOLDER_POSTFIX = new AtomicInteger();
> private File reportDir;
> @Override
> protected void setUp() throws Exception {
> File basedir = new File(".");
> File target = new File(basedir.getCanonicalFile(), "target");
> target.mkdir();
> String reportRelDir = getClass().getSimpleName() + "-" + 
> FOLDER_POSTFIX.incrementAndGet();
> reportDir = new File(target, reportRelDir);
> reportDir.mkdir();
> }
> @Override
> protected void tearDown() {
> }
> public void testOutputFailedTestWithoutThrowable() {
> StackTraceWriter stackTraceWriterOne = new 
> DeserializedStacktraceWriter(null, null, "");
> WrappedReportEntry testReport = new WrappedReportEntry(
> new SimpleReportEntry(
> NORMAL_RUN, 1L, getClass().getName(), null, "a test name", 
> null, stackTraceWriterOne, 5),
> ERROR,
> 5,
> null,
> null);
> TestSetStats testSetStats = new TestSetStats(false, false);
> testSetStats.testError(testReport);
> StatelessXmlReporter reporter = new StatelessXmlReporter(
> reportDir, null, false, 1, new HashMap<>(), XSD, "3.0", false, 
> false, false, false);
> reporter.testSetCompleted(testReport, testSetStats);
> }
> }  {code}
>  
>  
>  
> {code:java}
> java.util.NoSuchElementException
>     at java.base/java.util.StringTokenizer.nextToken(StringTokenizer.java:349)
>     at 
> org.apache.maven.plugin.surefire.report.StatelessXmlReporter.getTestProblems(StatelessXmlReporter.java:454)
>     at 
> org.apache.maven.plugin.surefire.report.StatelessXmlReporter.serializeTestClassWithRerun(StatelessXmlReporter.java:256)
>     at 
> org.apache.m

Re: [PR] [SUREFIRE-2232] StatelessXmlReporter: handle failed test result without a throwable [maven-surefire]

2024-06-11 Thread via GitHub


asfgit closed pull request #716: [SUREFIRE-2232] StatelessXmlReporter: handle 
failed test result without a throwable
URL: https://github.com/apache/maven-surefire/pull/716


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



[jira] [Commented] (SUREFIRE-2232) [REGRESSION] StatelessXmlReporter fails to process failed result without a throwable

2024-06-11 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on SUREFIRE-2232:
--

asfgit closed pull request #716: [SUREFIRE-2232] StatelessXmlReporter: handle 
failed test result without a throwable
URL: https://github.com/apache/maven-surefire/pull/716




> [REGRESSION] StatelessXmlReporter fails to process failed result without a 
> throwable
> 
>
> Key: SUREFIRE-2232
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2232
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 3.0.0-M6, 3.2.3, 3.2.5
>Reporter: Artem Yak
>Assignee: Michael Osipov
>Priority: Minor
> Fix For: 3.3.0
>
>
>  
> A regression bug appeared in 3.0.0-M6:
> A testNG test class has a listener which updates results from SUCCESS to 
> FAILURE:
>  
> {noformat}
> @Override
> public void onTestSuccess(ITestResult result) {
>     result.setStatus(ITestResult.FAILURE);
> result.getTestContext().getPassedTests().removeResult(result);
> result.getTestContext().getFailedTests().addResult(result);
> }{noformat}
>  
> Surefire fails to process a failed test result without a throwable and 
> reports 0 total tests. 
> {code:java}
> ForkStarter IOException: java.util.NoSuchElementException.
> org.apache.maven.plugin.surefire.booterclient.output.MultipleFailureException:
>  java.util.NoSuchElementException
>   at 
> org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumper.(ThreadedStreamConsumer.java:59)
>   at 
> org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer.(ThreadedStreamConsumer.java:107)
>   at 
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:546)
>   at 
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:285)
>   at 
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:250)
>  {code}
>  
> Reproducible unit test.
> {code:java}
> package org.apache.maven.plugin.surefire.report;
> import java.io.File;
> import java.util.HashMap;
> import java.util.concurrent.atomic.AtomicInteger;
> import junit.framework.TestCase;
> import 
> org.apache.maven.plugin.surefire.booterclient.output.DeserializedStacktraceWriter;
> import org.apache.maven.surefire.api.report.SimpleReportEntry;
> import org.apache.maven.surefire.api.report.StackTraceWriter;
> import static org.apache.maven.plugin.surefire.report.ReportEntryType.ERROR;
> import static org.apache.maven.surefire.api.report.RunMode.NORMAL_RUN;
> @SuppressWarnings({"ResultOfMethodCallIgnored", "checkstyle:magicnumber"})
> public class StatelessXmlReporter2Test extends TestCase {
> private static final String XSD =
> 
> "https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report-3.0.xsd";;
> private static final AtomicInteger FOLDER_POSTFIX = new AtomicInteger();
> private File reportDir;
> @Override
> protected void setUp() throws Exception {
> File basedir = new File(".");
> File target = new File(basedir.getCanonicalFile(), "target");
> target.mkdir();
> String reportRelDir = getClass().getSimpleName() + "-" + 
> FOLDER_POSTFIX.incrementAndGet();
> reportDir = new File(target, reportRelDir);
> reportDir.mkdir();
> }
> @Override
> protected void tearDown() {
> }
> public void testOutputFailedTestWithoutThrowable() {
> StackTraceWriter stackTraceWriterOne = new 
> DeserializedStacktraceWriter(null, null, "");
> WrappedReportEntry testReport = new WrappedReportEntry(
> new SimpleReportEntry(
> NORMAL_RUN, 1L, getClass().getName(), null, "a test name", 
> null, stackTraceWriterOne, 5),
> ERROR,
> 5,
> null,
> null);
> TestSetStats testSetStats = new TestSetStats(false, false);
> testSetStats.testError(testReport);
> StatelessXmlReporter reporter = new StatelessXmlReporter(
> reportDir, null, false, 1, new HashMap<>(), XSD, "3.0", false, 
> false, false, false);
> reporter.testSetCompleted(testReport, testSetStats);
> }
> }  {code}
>  
>  
>  
> {code:java}
> java.util.NoSuchElementException
>     at java.base/java.util.StringTokenizer.nextToken(StringTokenizer.java:349)
>     at 
> org.apache.maven.plugin.surefire.report.StatelessXmlReporter.getTestProblems(StatelessXmlReporter.java:454)
>     at 
> org.apache.maven.plugin.surefire.report.StatelessXmlReporter.serializeTestClassWithRerun(StatelessXmlReporter.java:256)
>     at 
> org.apache.maven.plugin.surefir

[jira] [Closed] (SUREFIRE-2232) [REGRESSION] StatelessXmlReporter fails to process failed result without a throwable

2024-06-11 Thread Michael Osipov (Jira)


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

Michael Osipov closed SUREFIRE-2232.

Resolution: Fixed

Fixed with 
[e6287ddbda7bf89ba370759af6164cbf925eebd1|https://gitbox.apache.org/repos/asf?p=maven-surefire.git;a=commit;h=e6287ddbda7bf89ba370759af6164cbf925eebd1].

> [REGRESSION] StatelessXmlReporter fails to process failed result without a 
> throwable
> 
>
> Key: SUREFIRE-2232
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2232
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Surefire Plugin
>Affects Versions: 3.0.0-M6, 3.2.3, 3.2.5
>Reporter: Artem Yak
>Assignee: Michael Osipov
>Priority: Minor
> Fix For: 3.3.0
>
>
>  
> A regression bug appeared in 3.0.0-M6:
> A testNG test class has a listener which updates results from SUCCESS to 
> FAILURE:
>  
> {noformat}
> @Override
> public void onTestSuccess(ITestResult result) {
>     result.setStatus(ITestResult.FAILURE);
> result.getTestContext().getPassedTests().removeResult(result);
> result.getTestContext().getFailedTests().addResult(result);
> }{noformat}
>  
> Surefire fails to process a failed test result without a throwable and 
> reports 0 total tests. 
> {code:java}
> ForkStarter IOException: java.util.NoSuchElementException.
> org.apache.maven.plugin.surefire.booterclient.output.MultipleFailureException:
>  java.util.NoSuchElementException
>   at 
> org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumper.(ThreadedStreamConsumer.java:59)
>   at 
> org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer.(ThreadedStreamConsumer.java:107)
>   at 
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:546)
>   at 
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:285)
>   at 
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:250)
>  {code}
>  
> Reproducible unit test.
> {code:java}
> package org.apache.maven.plugin.surefire.report;
> import java.io.File;
> import java.util.HashMap;
> import java.util.concurrent.atomic.AtomicInteger;
> import junit.framework.TestCase;
> import 
> org.apache.maven.plugin.surefire.booterclient.output.DeserializedStacktraceWriter;
> import org.apache.maven.surefire.api.report.SimpleReportEntry;
> import org.apache.maven.surefire.api.report.StackTraceWriter;
> import static org.apache.maven.plugin.surefire.report.ReportEntryType.ERROR;
> import static org.apache.maven.surefire.api.report.RunMode.NORMAL_RUN;
> @SuppressWarnings({"ResultOfMethodCallIgnored", "checkstyle:magicnumber"})
> public class StatelessXmlReporter2Test extends TestCase {
> private static final String XSD =
> 
> "https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report-3.0.xsd";;
> private static final AtomicInteger FOLDER_POSTFIX = new AtomicInteger();
> private File reportDir;
> @Override
> protected void setUp() throws Exception {
> File basedir = new File(".");
> File target = new File(basedir.getCanonicalFile(), "target");
> target.mkdir();
> String reportRelDir = getClass().getSimpleName() + "-" + 
> FOLDER_POSTFIX.incrementAndGet();
> reportDir = new File(target, reportRelDir);
> reportDir.mkdir();
> }
> @Override
> protected void tearDown() {
> }
> public void testOutputFailedTestWithoutThrowable() {
> StackTraceWriter stackTraceWriterOne = new 
> DeserializedStacktraceWriter(null, null, "");
> WrappedReportEntry testReport = new WrappedReportEntry(
> new SimpleReportEntry(
> NORMAL_RUN, 1L, getClass().getName(), null, "a test name", 
> null, stackTraceWriterOne, 5),
> ERROR,
> 5,
> null,
> null);
> TestSetStats testSetStats = new TestSetStats(false, false);
> testSetStats.testError(testReport);
> StatelessXmlReporter reporter = new StatelessXmlReporter(
> reportDir, null, false, 1, new HashMap<>(), XSD, "3.0", false, 
> false, false, false);
> reporter.testSetCompleted(testReport, testSetStats);
> }
> }  {code}
>  
>  
>  
> {code:java}
> java.util.NoSuchElementException
>     at java.base/java.util.StringTokenizer.nextToken(StringTokenizer.java:349)
>     at 
> org.apache.maven.plugin.surefire.report.StatelessXmlReporter.getTestProblems(StatelessXmlReporter.java:454)
>     at 
> org.apache.maven.plugin.surefire.report.StatelessXmlReporter.serializeTestClassWithRerun(StatelessXmlReporter.java:256)
>     at 
> org.apache.maven.plugin.surefire.report.StatelessXmlReporter.serializeTestClass

Re: [PR] Bump org.codehaus.plexus:plexus-interpolation from 1.25 to 1.27 [maven-surefire]

2024-06-11 Thread via GitHub


michael-o commented on PR #748:
URL: https://github.com/apache/maven-surefire/pull/748#issuecomment-2161489813

   @dependabot rebase


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



Re: [PR] Bump org.codehaus.plexus:plexus-interpolation from 1.25 to 1.27 [maven-surefire]

2024-06-11 Thread via GitHub


asfgit merged PR #748:
URL: https://github.com/apache/maven-surefire/pull/748


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



Re: [PR] Bump org.codehaus.plexus:plexus-component-annotations from 2.1.0 to 2.2.0 [maven-surefire]

2024-06-11 Thread via GitHub


michael-o commented on PR #747:
URL: https://github.com/apache/maven-surefire/pull/747#issuecomment-2161491398

   @dependabot rebase


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



Re: [PR] Bump org.codehaus.plexus:plexus-component-annotations from 2.1.0 to 2.2.0 [maven-surefire]

2024-06-11 Thread via GitHub


asfgit merged PR #747:
URL: https://github.com/apache/maven-surefire/pull/747


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



[PR] New feature custom plugin configuration [maven]

2024-06-11 Thread via GitHub


yuehcw opened a new pull request, #1580:
URL: https://github.com/apache/maven/pull/1580

   **Introduction**
   This PR introduces the "Custom Plugin Configuration Profiles" feature, which 
enhances the flexibility and maintainability of plugin management in Maven 
projects. By enabling users to define multiple configurations for a single 
plugin within the POM file, this feature caters to different environments or 
use cases without duplicating the entire POM file.
   
   **Motivation**
   Current Maven configurations apply globally and statically to projects, 
lacking the flexibility needed for different build environments or specific use 
cases. This limitation makes it cumbersome to manage builds that require 
different configurations for the same project.
   
   **Changes Proposed**
   
   - Profiles Section: Addition of a new  section in the POM file for 
defining custom plugin configurations.
   - Profile Activation: Implementation of a mechanism to activate profiles 
based on conditions such as environment variables or system properties. This 
allows for dynamic configuration changes at build time without altering the POM 
structure for different scenarios.
   
   **Detailed Design**
   
   1. POM File Changes: Introduce a  section within the POM file. 
Each profile will have a unique ID and specified activation conditions.
   2. Activation Mechanism: Users can activate a profile using the Maven 
command line, for example: mvn clean install -Denv=dev.
   
   **Benefits**
   
   - Flexibility: Enables tailored plugin configurations for different 
environments directly within the POM file.
   - Maintainability: Reduces complexity and enhances clarity by isolating 
environment-specific configurations.
   - Backward Compatibility: Ensures existing projects remain unaffected. 
Profiles are optional and only processed if defined.
   
   **Compatibility**
   This feature is designed to be backward compatible. Existing projects 
without defined profiles will operate as usual without any modification to 
their current behavior.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



Re: [PR] [MNG-8150] Backport TransferListener improvements for Maven 3.9.x [maven]

2024-06-11 Thread via GitHub


cstamas merged PR #1576:
URL: https://github.com/apache/maven/pull/1576


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



Re: [PR] [MNG-8150] Handle absent source/target files in transfer listener [maven]

2024-06-11 Thread via GitHub


cstamas merged PR #1575:
URL: https://github.com/apache/maven/pull/1575


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



[jira] [Commented] (MNG-8150) Make SimplexTransferListener handle absent source/target files

2024-06-11 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-8150:
-

cstamas merged PR #1576:
URL: https://github.com/apache/maven/pull/1576




> Make SimplexTransferListener handle absent source/target files
> --
>
> Key: MNG-8150
> URL: https://issues.apache.org/jira/browse/MNG-8150
> Project: Maven
>  Issue Type: Improvement
>  Components: Core
>Affects Versions: 3.9.7
>Reporter: Pavlo Shevchenko
>Assignee: Tamas Cservenak
>Priority: Minor
> Fix For: 4.0.0, 3.9.8, 4.0.0-beta-4
>
>
> See the discussion: 
> [https://github.com/apache/maven/pull/1471/files#r1632930409]
> The `TransferResource#file` may be `null`. The current implementation of the 
> `SimplexTransferListener` cannot handle this case and will break with an NPE.
>  
> The fix should be merged to `master` and backported to `maven-3.9.x` branches.
>  
>  



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


Re: [PR] [MNG-8150] Remove unused locale argument from FileSizeFormat [maven]

2024-06-11 Thread via GitHub


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

   @pshevche can you resolve the conflicts please? Thanks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



[jira] [Commented] (MNG-8150) Make SimplexTransferListener handle absent source/target files

2024-06-11 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-8150:
-

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

   @pshevche can you resolve the conflicts please? Thanks




> Make SimplexTransferListener handle absent source/target files
> --
>
> Key: MNG-8150
> URL: https://issues.apache.org/jira/browse/MNG-8150
> Project: Maven
>  Issue Type: Improvement
>  Components: Core
>Affects Versions: 3.9.7
>Reporter: Pavlo Shevchenko
>Assignee: Tamas Cservenak
>Priority: Minor
> Fix For: 4.0.0, 3.9.8, 4.0.0-beta-4
>
>
> See the discussion: 
> [https://github.com/apache/maven/pull/1471/files#r1632930409]
> The `TransferResource#file` may be `null`. The current implementation of the 
> `SimplexTransferListener` cannot handle this case and will break with an NPE.
>  
> The fix should be merged to `master` and backported to `maven-3.9.x` branches.
>  
>  



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


[jira] [Commented] (MNG-8150) Make SimplexTransferListener handle absent source/target files

2024-06-11 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-8150:
-

cstamas merged PR #1575:
URL: https://github.com/apache/maven/pull/1575




> Make SimplexTransferListener handle absent source/target files
> --
>
> Key: MNG-8150
> URL: https://issues.apache.org/jira/browse/MNG-8150
> Project: Maven
>  Issue Type: Improvement
>  Components: Core
>Affects Versions: 3.9.7
>Reporter: Pavlo Shevchenko
>Assignee: Tamas Cservenak
>Priority: Minor
> Fix For: 4.0.0, 3.9.8, 4.0.0-beta-4
>
>
> See the discussion: 
> [https://github.com/apache/maven/pull/1471/files#r1632930409]
> The `TransferResource#file` may be `null`. The current implementation of the 
> `SimplexTransferListener` cannot handle this case and will break with an NPE.
>  
> The fix should be merged to `master` and backported to `maven-3.9.x` branches.
>  
>  



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


Re: [PR] [MNG-8150] Remove unused locale argument from FileSizeFormat [maven]

2024-06-11 Thread via GitHub


cstamas merged PR #1579:
URL: https://github.com/apache/maven/pull/1579


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

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



[jira] [Closed] (MNG-8150) Make SimplexTransferListener handle absent source/target files

2024-06-11 Thread Tamas Cservenak (Jira)


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

Tamas Cservenak closed MNG-8150.

Resolution: Fixed

> Make SimplexTransferListener handle absent source/target files
> --
>
> Key: MNG-8150
> URL: https://issues.apache.org/jira/browse/MNG-8150
> Project: Maven
>  Issue Type: Improvement
>  Components: Core
>Affects Versions: 3.9.7
>Reporter: Pavlo Shevchenko
>Assignee: Tamas Cservenak
>Priority: Minor
> Fix For: 4.0.0, 3.9.8, 4.0.0-beta-4
>
>
> See the discussion: 
> [https://github.com/apache/maven/pull/1471/files#r1632930409]
> The `TransferResource#file` may be `null`. The current implementation of the 
> `SimplexTransferListener` cannot handle this case and will break with an NPE.
>  
> The fix should be merged to `master` and backported to `maven-3.9.x` branches.
>  
>  



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


[jira] [Commented] (MNG-8150) Make SimplexTransferListener handle absent source/target files

2024-06-11 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-8150:
-

cstamas merged PR #1579:
URL: https://github.com/apache/maven/pull/1579




> Make SimplexTransferListener handle absent source/target files
> --
>
> Key: MNG-8150
> URL: https://issues.apache.org/jira/browse/MNG-8150
> Project: Maven
>  Issue Type: Improvement
>  Components: Core
>Affects Versions: 3.9.7
>Reporter: Pavlo Shevchenko
>Assignee: Tamas Cservenak
>Priority: Minor
> Fix For: 4.0.0, 3.9.8, 4.0.0-beta-4
>
>
> See the discussion: 
> [https://github.com/apache/maven/pull/1471/files#r1632930409]
> The `TransferResource#file` may be `null`. The current implementation of the 
> `SimplexTransferListener` cannot handle this case and will break with an NPE.
>  
> The fix should be merged to `master` and backported to `maven-3.9.x` branches.
>  
>  



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


  1   2   >