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

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


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

ASF GitHub Bot commented on MPMD-395:
-

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


##
src/main/java/org/apache/maven/plugins/pmd/exec/CpdReportConsumer.java:
##
@@ -0,0 +1,119 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.plugins.pmd.exec;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.util.function.Consumer;
+import java.util.function.Predicate;
+
+import net.sourceforge.pmd.cpd.CPDReport;
+import net.sourceforge.pmd.cpd.CPDReportRenderer;
+import net.sourceforge.pmd.cpd.Match;
+import net.sourceforge.pmd.cpd.XMLRenderer;
+import org.apache.maven.plugins.pmd.ExcludeDuplicationsFromFile;
+import org.apache.maven.reporting.MavenReportException;
+import org.codehaus.plexus.util.FileUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+class CpdReportConsumer implements Consumer {
+private static final Logger LOG = 
LoggerFactory.getLogger(CpdReportConsumer.class);
+
+private final CpdRequest request;
+private final ExcludeDuplicationsFromFile excludeDuplicationsFromFile;
+
+CpdReportConsumer(CpdRequest request, ExcludeDuplicationsFromFile 
excludeDuplicationsFromFile) {
+this.request = request;
+this.excludeDuplicationsFromFile = excludeDuplicationsFromFile;
+}
+
+@Override
+public void accept(CPDReport report) {
+try {
+// always create XML format. we need to output it even if the file 
list is empty or we have no
+// duplications so that the "check" goals can check for violations
+writeXmlReport(report);
+
+// html format is handled by maven site report, xml format has 
already been rendered
+// a renderer is only needed for other formats
+String format = request.getFormat();
+if (!"html".equals(format) && !"xml".equals(format)) {
+writeFormattedReport(report);
+}
+} catch (MavenReportException e) {
+// Exceptions happening during this consumer are logged by PMD
+// through the CPDConfiguration's reporter, which is in this case 
PmdErrorMessageReporter.
+throw new RuntimeException(e);
+}
+}
+
+private void writeXmlReport(CPDReport cpd) throws MavenReportException {
+File targetFile = writeReport(cpd, new 
XMLRenderer(request.getOutputEncoding()), "xml");
+if (request.isIncludeXmlInSite()) {
+File siteDir = new File(request.getReportOutputDirectory());
+siteDir.mkdirs();
+try {
+FileUtils.copyFile(targetFile, new File(siteDir, "cpd.xml"));
+} catch (IOException e) {
+throw new MavenReportException("Error while copying cpd.xml 
report to site dir", e);
+}
+}
+}
+
+private void writeFormattedReport(CPDReport cpd) throws 
MavenReportException {
+CPDReportRenderer r = CpdExecutor.createRenderer(request.getFormat(), 
request.getOutputEncoding());
+writeReport(cpd, r, request.getFormat());
+}
+
+private File writeReport(CPDReport cpd, CPDReportRenderer r, String 
extension) throws MavenReportException {

Review Comment:
   r --> renderer



##
src/main/java/org/apache/maven/plugins/pmd/exec/CpdExecutor.java:
##
@@ -167,66 +163,20 @@ private CpdResult run() throws MavenReportException {
 request.getFiles().forEach(f -> 
cpdConfiguration.addInputPath(f.toPath()));
 
 LOG.debug("Executing CPD...");
-
-// always create XML format. we need to output it even if the file 
list is empty or we have no duplications
-// so the "check" goals can check for violations
 try (CpdAnalysis cpd = CpdAnalysis.create(cpdConfiguration)) {
-cpd.performAnalysis(report -> {
-try {
- 

[jira] [Commented] (MCHECKSTYLE-448) Upgrade to Parent 42 and Maven 3.6.3

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


[ 
https://issues.apache.org/jira/browse/MCHECKSTYLE-448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17851204#comment-17851204
 ] 

ASF GitHub Bot commented on MCHECKSTYLE-448:


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

   This closes #137
   
   Following this checklist to help us incorporate your 
   contribution quickly and easily:
   
- [ ] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/MCHECKSTYLE) filed 
  for the change (usually before you start working on it).  Trivial 
changes like typos do not 
  require a JIRA issue.  Your pull request should address just this 
issue, without 
  pulling in other changes.
- [ ] Each commit in the pull request should have a meaningful subject line 
and body.
- [ ] Format the pull request title like `[MCHECKSTYLE-XXX] - Fixes bug in 
ApproximateQuantiles`,
  where you replace `MCHECKSTYLE-XXX` with the appropriate JIRA issue. 
Best practice
  is to use the JIRA issue title in the pull request title and in the 
first line of the 
  commit message.
- [ ] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
- [ ] Run `mvn clean verify` to make sure basic checks pass. A more 
thorough check will 
  be performed on your pull request automatically.
- [ ] You have run the integration tests successfully (`mvn -Prun-its clean 
verify`).
   
   If your pull request is about ~20 lines of code you don't need to sign an
   [Individual Contributor License 
Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
   please ask on the developers list.
   
   To make clear that you license your contribution under 
   the [Apache License Version 2.0, January 
2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
- [ ] I hereby declare this contribution to be licenced under the [Apache 
License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   
- [ ] In any other case, please file an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   




> Upgrade to Parent 42 and Maven 3.6.3
> 
>
> Key: MCHECKSTYLE-448
> URL: https://issues.apache.org/jira/browse/MCHECKSTYLE-448
> Project: Maven Checkstyle Plugin
>  Issue Type: Dependency upgrade
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: next-release
>
>




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


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

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


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

ASF GitHub Bot commented on MPMD-395:
-

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


##
src/main/java/org/apache/maven/plugins/pmd/exec/PmdErrorMessageReporter.java:
##
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.plugins.pmd.exec;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import net.sourceforge.pmd.util.log.PmdReporter;
+import org.apache.maven.reporting.MavenReportException;
+import org.checkerframework.checker.nullness.qual.Nullable;
+import org.slf4j.event.Level;
+
+class PmdErrorMessageReporter implements PmdReporter {
+private final PmdReporter delegate;
+private List errors = new ArrayList<>();
+
+PmdErrorMessageReporter(PmdReporter delegate) {
+this.delegate = delegate;
+}
+
+@Override
+public boolean isLoggable(Level level) {
+return delegate.isLoggable(level);
+}
+
+@Override
+public void logEx(Level level, @Nullable String message, Object[] 
formatArgs, @Nullable Throwable error) {
+if (error != null) {
+if (error instanceof RuntimeException && error.getCause() 
instanceof MavenReportException) {
+errors.add(error.getCause());
+} else {
+errors.add(error);
+}
+}
+
+delegate.logEx(level, message, formatArgs, error);
+}
+
+@Override
+public int numErrors() {
+return delegate.numErrors();
+}
+
+public void rethrowErrorsAsMavenReportException() throws 
MavenReportException {
+if (errors.isEmpty()) {
+return;
+}
+
+final MavenReportException exception;
+
+Throwable firstError = errors.get(0);

Review Comment:
   I am bit confused, you log multiple issue 

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



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


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

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


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

ASF GitHub Bot commented on MPMD-395:
-

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


##
src/main/java/org/apache/maven/plugins/pmd/exec/CpdExecutor.java:
##
@@ -161,13 +163,15 @@ private CpdResult run() throws MavenReportException {
 request.getFiles().forEach(f -> 
cpdConfiguration.addInputPath(f.toPath()));
 
 LOG.debug("Executing CPD...");
-CpdReportConsumer reportConsumer = new CpdReportConsumer(request, 
excludeDuplicationsFromFile);
 try (CpdAnalysis cpd = CpdAnalysis.create(cpdConfiguration)) {
+CpdReportConsumer reportConsumer = new CpdReportConsumer(request, 
excludeDuplicationsFromFile);
 cpd.performAnalysis(reportConsumer);
 } catch (IOException e) {
 throw new MavenReportException("Error while executing CPD", e);
 }
-reportConsumer.rethrowAnyMavenReportException();
+// in constrast to pmd goal, we don't have a parameter for cpd like 
"skipPmdError" - if there
+// are any errors during CPD analysis, the maven build will be failed.

Review Comment:
   .. the Maven build will fail.



##
src/main/java/org/apache/maven/plugins/pmd/exec/CpdReportConsumer.java:
##
@@ -0,0 +1,133 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.plugins.pmd.exec;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.util.function.Consumer;
+import java.util.function.Predicate;
+
+import net.sourceforge.pmd.cpd.CPDReport;
+import net.sourceforge.pmd.cpd.CPDReportRenderer;
+import net.sourceforge.pmd.cpd.Match;
+import net.sourceforge.pmd.cpd.XMLRenderer;
+import org.apache.maven.plugins.pmd.ExcludeDuplicationsFromFile;
+import org.apache.maven.reporting.MavenReportException;
+import org.codehaus.plexus.util.FileUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+class CpdReportConsumer implements Consumer {
+private static final Logger LOG = 
LoggerFactory.getLogger(CpdReportConsumer.class);
+
+private final CpdRequest request;
+private final ExcludeDuplicationsFromFile excludeDuplicationsFromFile;
+private MavenReportException reportException;
+
+CpdReportConsumer(CpdRequest request, ExcludeDuplicationsFromFile 
excludeDuplicationsFromFile) {
+this.request = request;
+this.excludeDuplicationsFromFile = excludeDuplicationsFromFile;
+}
+
+@Override
+public void accept(CPDReport report) {
+try {
+// always create XML format. we need to output it even if the file 
list is empty or we have no
+// duplications so that the "check" goals can check for violations
+writeXmlReport(report);
+
+// html format is handled by maven site report, xml format has 
already been rendered
+// a renderer is only needed for other formats
+String format = request.getFormat();
+if (!"html".equals(format) && !"xml".equals(format)) {
+writeFormattedReport(report);
+}
+} catch (MavenReportException e) {
+// Exceptions happening during this consumer are only logged by 
PMD.
+// Remembering the exception here, so that we can rethrow it later 
to fail the build.
+reportException = e;
+throw new RuntimeException(e);

Review Comment:
   OK, I see. Let me review that again.





> Build doesn't fail for invalid CPD format
> -
>
> Key: MPMD-395
> URL: https://issues.apache.org/jira/browse/MPMD-395
> Project: Maven PMD Plugin
>  Issue Type: Bug
>  Components: CPD
>Affects Versions: 3.22.0
>Reporter: Andreas Dangel
>Assignee: Andreas Dangel
>Priority: Major
>
> See 
> 

[jira] [Commented] (JXR-191) Upgrade to Parent 42 and Maven 3.6.3

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


[ 
https://issues.apache.org/jira/browse/JXR-191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17851190#comment-17851190
 ] 

ASF GitHub Bot commented on JXR-191:


michael-o opened a new pull request, #114:
URL: https://github.com/apache/maven-jxr/pull/114

   This closes #114
   
   Following this checklist to help us incorporate your 
   contribution quickly and easily:
   
- [ ] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/JXR) filed 
  for the change (usually before you start working on it).  Trivial 
changes like typos do not 
  require a JIRA issue.  Your pull request should address just this 
issue, without 
  pulling in other changes.
- [ ] Each commit in the pull request should have a meaningful subject line 
and body.
- [ ] Format the pull request title like `[JXR-XXX] - Fixes bug in 
ApproximateQuantiles`,
  where you replace `JXR-XXX` with the appropriate JIRA issue. Best 
practice
  is to use the JIRA issue title in the pull request title and in the 
first line of the 
  commit message.
- [ ] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
- [ ] Run `mvn clean verify` to make sure basic checks pass. A more 
thorough check will 
  be performed on your pull request automatically.
- [ ] You have run the integration tests successfully (`mvn -Prun-its clean 
verify`).
   
   If your pull request is about ~20 lines of code you don't need to sign an
   [Individual Contributor License 
Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
   please ask on the developers list.
   
   To make clear that you license your contribution under 
   the [Apache License Version 2.0, January 
2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
- [ ] I hereby declare this contribution to be licenced under the [Apache 
License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   
- [ ] In any other case, please file an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   




> Upgrade to Parent 42 and Maven 3.6.3
> 
>
> Key: JXR-191
> URL: https://issues.apache.org/jira/browse/JXR-191
> Project: Maven JXR
>  Issue Type: Dependency upgrade
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: next-release
>
>




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


[jira] [Commented] (SUREFIRE-2240) Using JUnit BOM prevents upgrading the engine version via plugin dependency

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


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

ASF GitHub Bot commented on SUREFIRE-2240:
--

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

   This might be related to the upgrade issues I have in #737.




> Using JUnit BOM prevents upgrading the engine version via plugin dependency
> ---
>
> Key: SUREFIRE-2240
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2240
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: JUnit 5.x support
>Affects Versions: 3.2.1
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
> Fix For: 3.3.0
>
>
> The change being introduced in SUREFIRE-2177 prevents updating the 
> {{junit-jupiter-engine}} through explicit plugin dependencies as outlined in 
> https://maven.apache.org/surefire/maven-surefire-plugin/examples/junit-platform.html#select-engine-and-use-multiple-apis:
> {code}
> 
>   maven-surefire-plugin
>   
> 
>   org.junit.jupiter
>   junit-jupiter-engine
>   5.10.2
> 
>   
> 
> {code}
> The following classpath is then used in m-surefire-p
> {code}
> [INFO] --- surefire:3.2.2:test (default-test) @ doxia-converter ---
> [DEBUG] Dependency collection stats {ConflictMarker.analyzeTime=62708, 
> ConflictMarker.markTime=28792, ConflictMarker.nodeCount=94, 
> ConflictIdSorter.graphTime=19292, ConflictIdSorter.topsortTime=17458, 
> ConflictIdSorter.conflictIdCount=48, ConflictIdSorter.conflictIdCycleCount=0, 
> ConflictResolver.totalTime=382250, ConflictResolver.conflictItemCount=92, 
> DfDependencyCollector.collectTime=35588250, 
> DfDependencyCollector.transformTime=530209}
> [DEBUG] org.apache.maven.plugins:maven-surefire-plugin:jar:3.2.2
> [DEBUG]org.junit.jupiter:junit-jupiter-engine:jar:5.10.2:runtime
> [DEBUG]   org.junit.platform:junit-platform-engine:jar:1.9.3:runtime 
> (version managed from default)
> ...
> {code}
> The managed {{junit-platform-engine}} version is incompatible (as being 
> downgraded via 
> https://github.com/apache/maven-surefire/blob/2fed802397f8c7de4cfc72f49ab4565e72f7aab7/pom.xml#L311-L318)
> For this reason there shouldn't be any depMgmt used in surefire.



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


[jira] [Commented] (MPIR-457) Upgrade to Parent 42 and Maven 3.6.3

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


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

ASF GitHub Bot commented on MPIR-457:
-

asfgit closed pull request #66: [MPIR-457] Upgrade to Parent 42 and Maven 3.6.3
URL: https://github.com/apache/maven-project-info-reports-plugin/pull/66




> Upgrade to Parent 42 and Maven 3.6.3
> 
>
> Key: MPIR-457
> URL: https://issues.apache.org/jira/browse/MPIR-457
> Project: Maven Project Info Reports Plugin
>  Issue Type: Dependency upgrade
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.6.0
>
>




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


[jira] [Commented] (MSHARED-1407) Track dependency usage by referencing classes

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


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

ASF GitHub Bot commented on MSHARED-1407:
-

jaredstehler opened a new pull request, #125:
URL: https://github.com/apache/maven-dependency-analyzer/pull/125

   This enhances the functionality which shows specific classes in use per 
dependency, by mapping those uses to classes which are referencing them.
   
   The resulting API addition is:
   
   ```java
   Set analyzeUsages(URL url, ClassesPatterns excludeClasses)
   ```
   
   which I plan on adding a PR to `maven-dependency-plugin` to show how we use 
this feature in practice.
   
   This was originally proposed via this PR 
https://github.com/apache/maven-dependency-analyzer/pull/20 which was closed 
due to lack of support for default interface methods prior to JDK8.
   
   Following this checklist to help us incorporate your 
   contribution quickly and easily:
   
- [x] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/MSHARED) filed 
  for the change (usually before you start working on it).  Trivial 
changes like typos do not 
  require a JIRA issue.  Your pull request should address just this 
issue, without 
  pulling in other changes. Also be sure having selected the correct 
component.
- [x] Each commit in the pull request should have a meaningful subject line 
and body.
- [x] Format the pull request title like `[MSHARED-XXX] - Fixes bug in 
ApproximateQuantiles`,
  where you replace `MSHARED-XXX` with the appropriate JIRA issue. Best 
practice
  is to use the JIRA issue title in the pull request title and in the 
first line of the 
  commit message.
- [x] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
- [x] Run `mvn clean verify` to make sure basic checks pass. A more 
thorough check will 
  be performed on your pull request automatically.
- [x] You have run the integration tests successfully (`mvn -Prun-its clean 
verify`).
   
   If your pull request is about ~20 lines of code you don't need to sign an
   [Individual Contributor License 
Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
   please ask on the developers list.
   
   To make clear that you license your contribution under 
   the [Apache License Version 2.0, January 
2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
- [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)
   
- [ ] In any other case, please file an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   




> Track dependency usage by referencing classes
> -
>
> Key: MSHARED-1407
> URL: https://issues.apache.org/jira/browse/MSHARED-1407
> Project: Maven Shared Components
>  Issue Type: Improvement
>  Components: maven-dependency-analyzer
>Reporter: Jared Stehler
>Priority: Minor
>
> Improve upon the existing functionality which tracks which specific classes 
> in a given dependency are used, by mapping those uses to which classes are 
> using them.
> This is a resurrection of an older issue 
> (https://issues.apache.org/jira/browse/MSHARED-632) / PR 
> (https://github.com/apache/maven-dependency-analyzer/pull/20), which was 
> closed due to lack of support for default interface methods prior to JDK8.
>  



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


[jira] [Commented] (MSHARED-1407) Track dependency usage by referencing classes

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


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

ASF GitHub Bot commented on MSHARED-1407:
-

jaredstehler closed pull request #124: [MSHARED-1407] Track dependency usage by 
referencing classes
URL: https://github.com/apache/maven-dependency-analyzer/pull/124




> Track dependency usage by referencing classes
> -
>
> Key: MSHARED-1407
> URL: https://issues.apache.org/jira/browse/MSHARED-1407
> Project: Maven Shared Components
>  Issue Type: Improvement
>  Components: maven-dependency-analyzer
>Reporter: Jared Stehler
>Priority: Minor
>
> Improve upon the existing functionality which tracks which specific classes 
> in a given dependency are used, by mapping those uses to which classes are 
> using them.
> This is a resurrection of an older issue 
> (https://issues.apache.org/jira/browse/MSHARED-632) / PR 
> (https://github.com/apache/maven-dependency-analyzer/pull/20), which was 
> closed due to lack of support for default interface methods prior to JDK8.
>  



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


[jira] [Commented] (MSHARED-1407) Track dependency usage by referencing classes

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


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

ASF GitHub Bot commented on MSHARED-1407:
-

jaredstehler opened a new pull request, #124:
URL: https://github.com/apache/maven-dependency-analyzer/pull/124

   This enhances the functionality which shows specific classes in use per 
dependency, by mapping those uses to classes which are referencing them.
   
   The resulting API addition is:
   
   ```java
   Set analyzeUsages(URL url, ClassesPatterns excludeClasses)
   ```
   
   which I plan on adding a PR to `maven-dependency-plugin` to show how we use 
this feature in practice.
   
   This was originally proposed via this PR 
https://github.com/apache/maven-dependency-analyzer/pull/20 which was closed 
due to lack of support for default interface methods prior to JDK8.
   
   Following this checklist to help us incorporate your 
   contribution quickly and easily:
   
- [x] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/MSHARED) filed 
  for the change (usually before you start working on it).  Trivial 
changes like typos do not 
  require a JIRA issue.  Your pull request should address just this 
issue, without 
  pulling in other changes. Also be sure having selected the correct 
component.
- [ ] Each commit in the pull request should have a meaningful subject line 
and body.
- [x] Format the pull request title like `[MSHARED-XXX] - Fixes bug in 
ApproximateQuantiles`,
  where you replace `MSHARED-XXX` with the appropriate JIRA issue. Best 
practice
  is to use the JIRA issue title in the pull request title and in the 
first line of the 
  commit message.
- [x] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
- [x] Run `mvn clean verify` to make sure basic checks pass. A more 
thorough check will 
  be performed on your pull request automatically.
- [x] You have run the integration tests successfully (`mvn -Prun-its clean 
verify`).
   
   If your pull request is about ~20 lines of code you don't need to sign an
   [Individual Contributor License 
Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
   please ask on the developers list.
   
   To make clear that you license your contribution under 
   the [Apache License Version 2.0, January 
2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
- [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)
   
- [ ] In any other case, please file an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   




> Track dependency usage by referencing classes
> -
>
> Key: MSHARED-1407
> URL: https://issues.apache.org/jira/browse/MSHARED-1407
> Project: Maven Shared Components
>  Issue Type: Improvement
>  Components: maven-dependency-analyzer
>Reporter: Jared Stehler
>Priority: Minor
>
> Improve upon the existing functionality which tracks which specific classes 
> in a given dependency are used, by mapping those uses to which classes are 
> using them.
> This is a resurrection of an older issue 
> (https://issues.apache.org/jira/browse/MSHARED-632) / PR 
> (https://github.com/apache/maven-dependency-analyzer/pull/20), which was 
> closed due to lack of support for default interface methods prior to JDK8.
>  



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


[jira] [Commented] (SUREFIRE-2246) Clean up dependencies reported by dependencies:analyze

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


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

ASF GitHub Bot commented on SUREFIRE-2246:
--

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

   This requires #737 first...




> Clean up dependencies reported by dependencies:analyze
> --
>
> Key: SUREFIRE-2246
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2246
> Project: Maven Surefire
>  Issue Type: Task
>Affects Versions: 3.2.5
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.3.0
>
>
> A lot of output from {{dependencies:analyze}}. 



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


[jira] [Commented] (MNG-5693) Change logging of MojoExceptions to console

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


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

ASF GitHub Bot commented on MNG-5693:
-

elharo commented on PR #1545:
URL: https://github.com/apache/maven/pull/1545#issuecomment-2142050136

   Is the MacOS CI borked?




> Change logging of MojoExceptions to console
> ---
>
> Key: MNG-5693
> URL: https://issues.apache.org/jira/browse/MNG-5693
> Project: Maven
>  Issue Type: Improvement
>  Components: FDPFC, Plugin API
>Reporter: Robert Scholte
>Priority: Major
> Fix For: 4.0.x-candidate
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> If a plugin fails for any reason, a general message is logged with a 
> reference to a wiki page, which never contains the real reason why the plugin 
> failed. For users this is very confusing. Even when they finally see a link, 
> it's quite frustrating for them that they still don't know what happened.
> {{MojoExecutionException}} and {{MojoFailureException}} should never refer to 
> a wikipage anymore.
> Plugin writers should get more control over the message written to the 
> console.



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


[jira] [Commented] (MNG-5693) Change logging of MojoExceptions to console

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


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

ASF GitHub Bot commented on MNG-5693:
-

elharo commented on PR #1545:
URL: https://github.com/apache/maven/pull/1545#issuecomment-2141909545

   Error:  Failures: 
   Error:
MavenITmng5482AetherNotFoundTest.testPluginDependency:47->check:82->AbstractMavenIntegrationTestCase.assertTrue:359
 Url to ClassNotFoundAether was not found in output. ==> expected:  but 
was: 
   Error:
MavenITmng5482AetherNotFoundTest.testPluginSite:52->check:82->AbstractMavenIntegrationTestCase.assertTrue:359
 Url to ClassNotFoundAether was not found in output. ==> expected:  but 
was: 




> Change logging of MojoExceptions to console
> ---
>
> Key: MNG-5693
> URL: https://issues.apache.org/jira/browse/MNG-5693
> Project: Maven
>  Issue Type: Improvement
>  Components: FDPFC, Plugin API
>Reporter: Robert Scholte
>Priority: Major
> Fix For: 4.0.x-candidate
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> If a plugin fails for any reason, a general message is logged with a 
> reference to a wiki page, which never contains the real reason why the plugin 
> failed. For users this is very confusing. Even when they finally see a link, 
> it's quite frustrating for them that they still don't know what happened.
> {{MojoExecutionException}} and {{MojoFailureException}} should never refer to 
> a wikipage anymore.
> Plugin writers should get more control over the message written to the 
> console.



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


[jira] [Commented] (MNG-5693) Change logging of MojoExceptions to console

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


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

ASF GitHub Bot commented on MNG-5693:
-

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

   Following this checklist to help us incorporate your
   contribution quickly and easily:
   
- [ ] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/MNG) filed
  for the change (usually before you start working on it).  Trivial 
changes like typos do not
  require a JIRA issue. Your pull request should address just this 
issue, without
  pulling in other changes.
- [ ] Each commit in the pull request should have a meaningful subject line 
and body.
- [ ] Format the pull request title like `[MNG-XXX] SUMMARY`,
  where you replace `MNG-XXX` and `SUMMARY` with the appropriate JIRA 
issue.
- [ ] Also format the first line of the commit message like `[MNG-XXX] 
SUMMARY`.
  Best practice is to use the JIRA issue title in both the pull request 
title and in the first line of the commit message.
- [ ] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
- [ ] Run `mvn clean verify` to make sure basic checks pass. A more 
thorough check will
  be performed on your pull request automatically.
- [ ] You have run the [Core IT][core-its] successfully.
   
   If your pull request is about ~20 lines of code you don't need to sign an
   [Individual Contributor License 
Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
   please ask on the developers list.
   
   To make clear that you license your contribution under
   the [Apache License Version 2.0, January 
2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
- [ ] I hereby declare this contribution to be licenced under the [Apache 
License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   
- [ ] In any other case, please file an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   [core-its]: https://maven.apache.org/core-its/core-it-suite/
   




> Change logging of MojoExceptions to console
> ---
>
> Key: MNG-5693
> URL: https://issues.apache.org/jira/browse/MNG-5693
> Project: Maven
>  Issue Type: Improvement
>  Components: FDPFC, Plugin API
>Reporter: Robert Scholte
>Priority: Major
> Fix For: 4.0.x-candidate
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> If a plugin fails for any reason, a general message is logged with a 
> reference to a wiki page, which never contains the real reason why the plugin 
> failed.
> For new users this is very confusing. Even when we teach them to read, and 
> they finally see a link, it's quite frustrating for them that they still 
> don't know what happened.
> {{MojoExecutionException}} and {{MojoFailureException}} should never refer to 
> a wikipage anymore.
> Plugin writers should get more control over the message written to the 
> console.



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


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

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


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

ASF GitHub Bot commented on MPLUGIN-508:


gnodet commented on code in PR #286:
URL: 
https://github.com/apache/maven-plugin-tools/pull/286#discussion_r1622214652


##
maven-plugin-plugin/src/it/skip/src/main/java/org/apache/maven/plugin/coreit/FirstMojo.java:
##
@@ -18,47 +18,15 @@
  */
 package org.apache.maven.plugin.coreit;
 
-import java.io.File;
-
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Mojo;
 
 /**
  * Touches a test file.
- *
- * @goal first
- * @requiresDependencyResolution test
- * @phase integration-test
- * @execute phase="generate-sources" lifecycle="cobertura"
- * @deprecated Don't use!
- * @since 1.2
  */
+@Mojo(name = "test")
 public class FirstMojo extends AbstractMojo {

Review Comment:
   Those mojos are just built and used to verify a few specific things 
depending on each test.  The annotations are usually not used or tested.





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




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


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

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


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

ASF GitHub Bot commented on MPLUGIN-508:


gnodet commented on code in PR #286:
URL: 
https://github.com/apache/maven-plugin-tools/pull/286#discussion_r1622213397


##
maven-plugin-report-plugin/src/it/mplugin-319_report-since/src/main/java/org/MyMojo.java:
##
@@ -19,41 +19,32 @@
 package org;
 
 import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
 
 /**
  * Does nothing.
  *
- * @goal noop
- * @phase process-sources
- * @requiresDependencyResolution test
- * @requiresDirectInvocation true
- * @requiresOnline
- * @inheritByDefault false
- * @execute phase="compile"
- * @aggregator
  * @since 1.0
  *
  * @deprecated You don't use test goals, do you?
  */
+@Mojo(name = "noop")
 public class MyMojo extends AbstractMojo {

Review Comment:
   No, but again, those are not tested.  I think the one creating the original 
test just copy/pasted an existing one.





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




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


[jira] [Commented] (MCOMPILER-592) IndexOutOfBoundsException when project.build.outputTimestamp is empty

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


[ 
https://issues.apache.org/jira/browse/MCOMPILER-592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17851013#comment-17851013
 ] 

ASF GitHub Bot commented on MCOMPILER-592:
--

thijsrijpert commented on code in PR #244:
URL: 
https://github.com/apache/maven-compiler-plugin/pull/244#discussion_r1622040960


##
src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java:
##
@@ -1239,7 +1239,9 @@ public void execute() throws MojoExecutionException, 
CompilationFailureException
 }
 }
 
-if (outputTimestamp != null && (outputTimestamp.length() > 1 || 
Character.isDigit(outputTimestamp.charAt(0 {
+if (outputTimestamp != null
+&& !outputTimestamp.isEmpty()

Review Comment:
   I will look into it.





> IndexOutOfBoundsException when project.build.outputTimestamp is empty
> -
>
> Key: MCOMPILER-592
> URL: https://issues.apache.org/jira/browse/MCOMPILER-592
> Project: Maven Compiler Plugin
>  Issue Type: Bug
>Affects Versions: 3.12.0, 3.12.1, 3.13.0
>Reporter: Thijs Rijpert
>Priority: Minor
>
> Due to a combination of plugins, it is possible for the 
> project.build.outputTimestamp property to have an empty string as a value. 
> This causes an IndexOutOfBoundsException on line 1242 when it tries to access 
> the first character in the string. 
> This can be fixed by doing an isEmpty check before doing the charAt check. I 
> will create an PR for this.
> While this bug is caused by another plugin, I think this should be fixed in 
> the compiler because the error returned (IndexOutOfBoundsException), is vague 
> and hard to debug.
> The workaround for this issue is setting the project.build.outputTimestamp 
> property with an arbitrary value.



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


[jira] [Commented] (MCOMPILER-592) IndexOutOfBoundsException when project.build.outputTimestamp is empty

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


[ 
https://issues.apache.org/jira/browse/MCOMPILER-592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17851010#comment-17851010
 ] 

ASF GitHub Bot commented on MCOMPILER-592:
--

michael-o commented on code in PR #244:
URL: 
https://github.com/apache/maven-compiler-plugin/pull/244#discussion_r1622036071


##
src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java:
##
@@ -1239,7 +1239,9 @@ public void execute() throws MojoExecutionException, 
CompilationFailureException
 }
 }
 
-if (outputTimestamp != null && (outputTimestamp.length() > 1 || 
Character.isDigit(outputTimestamp.charAt(0 {
+if (outputTimestamp != null
+&& !outputTimestamp.isEmpty()

Review Comment:
   While I consider your fix as reasonable, I'd prefer to see the actual cause 
to be addressed as well...





> IndexOutOfBoundsException when project.build.outputTimestamp is empty
> -
>
> Key: MCOMPILER-592
> URL: https://issues.apache.org/jira/browse/MCOMPILER-592
> Project: Maven Compiler Plugin
>  Issue Type: Bug
>Affects Versions: 3.12.0, 3.12.1, 3.13.0
>Reporter: Thijs Rijpert
>Priority: Minor
>
> Due to a combination of plugins, it is possible for the 
> project.build.outputTimestamp property to have an empty string as a value. 
> This causes an IndexOutOfBoundsException on line 1242 when it tries to access 
> the first character in the string. 
> This can be fixed by doing an isEmpty check before doing the charAt check. I 
> will create an PR for this.
> While this bug is caused by another plugin, I think this should be fixed in 
> the compiler because the error returned (IndexOutOfBoundsException), is vague 
> and hard to debug.
> The workaround for this issue is setting the project.build.outputTimestamp 
> property with an arbitrary value.



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


[jira] [Commented] (MCOMPILER-592) IndexOutOfBoundsException when project.build.outputTimestamp is empty

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


[ 
https://issues.apache.org/jira/browse/MCOMPILER-592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17851009#comment-17851009
 ] 

ASF GitHub Bot commented on MCOMPILER-592:
--

thijsrijpert commented on code in PR #244:
URL: 
https://github.com/apache/maven-compiler-plugin/pull/244#discussion_r1622033060


##
src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java:
##
@@ -1239,7 +1239,9 @@ public void execute() throws MojoExecutionException, 
CompilationFailureException
 }
 }
 
-if (outputTimestamp != null && (outputTimestamp.length() > 1 || 
Character.isDigit(outputTimestamp.charAt(0 {
+if (outputTimestamp != null
+&& !outputTimestamp.isEmpty()

Review Comment:
   Yes, I think it would be set by another plugin. The project I was working on 
has a lot of plugins, so I would not know which plugin exactly sets this value. 
When I encountered this issue, the value was not set in the projects pom, but 
it was a non-null empty string when this line was run, indicating it was set 
somewhere in the compilation process.





> IndexOutOfBoundsException when project.build.outputTimestamp is empty
> -
>
> Key: MCOMPILER-592
> URL: https://issues.apache.org/jira/browse/MCOMPILER-592
> Project: Maven Compiler Plugin
>  Issue Type: Bug
>Affects Versions: 3.12.0, 3.12.1, 3.13.0
>Reporter: Thijs Rijpert
>Priority: Minor
>
> Due to a combination of plugins, it is possible for the 
> project.build.outputTimestamp property to have an empty string as a value. 
> This causes an IndexOutOfBoundsException on line 1242 when it tries to access 
> the first character in the string. 
> This can be fixed by doing an isEmpty check before doing the charAt check. I 
> will create an PR for this.
> While this bug is caused by another plugin, I think this should be fixed in 
> the compiler because the error returned (IndexOutOfBoundsException), is vague 
> and hard to debug.
> The workaround for this issue is setting the project.build.outputTimestamp 
> property with an arbitrary value.



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


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

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


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

ASF GitHub Bot commented on MPLUGIN-508:


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


##
maven-plugin-report-plugin/src/it/mplugin-319_report-since/src/main/java/org/MyMojo.java:
##
@@ -19,41 +19,32 @@
 package org;
 
 import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
 
 /**
  * Does nothing.
  *
- * @goal noop
- * @phase process-sources
- * @requiresDependencyResolution test
- * @requiresDirectInvocation true
- * @requiresOnline
- * @inheritByDefault false
- * @execute phase="compile"
- * @aggregator
  * @since 1.0
  *
  * @deprecated You don't use test goals, do you?
  */
+@Mojo(name = "noop")
 public class MyMojo extends AbstractMojo {

Review Comment:
   The previous config had a lot of stuff:
   ```
* @goal noop
* @phase process-sources
* @requiresDependencyResolution test
* @requiresDirectInvocation true
* @requiresOnline
* @inheritByDefault false
* @execute phase="compile"
* @aggregator
```
   
   Plain `@Mojo` isn't an equivalent, is it?





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




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


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

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


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

ASF GitHub Bot commented on MPLUGIN-508:


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


##
maven-plugin-report-plugin/src/main/java/org/apache/maven/plugins/plugin/descriptor/EnhancedPluginDescriptorBuilder.java:
##
@@ -43,7 +42,7 @@
  * Reads enhanced plugin.xml files as generated by
  * {@link PluginDescriptorFilesGenerator} and used by {@link PluginReport}.
  * Populates the slightly extended {@link Parameter} object {@link 
EnhancedParameterWrapper}.
- * In addition populates all (optional) elements added after Maven Plugin API 
3.2.5.
+ * In addition, populates all (optional) elements added after Maven Plugin API 
3.2.5.

Review Comment:
   Alright, let's keep the wording as-is.





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




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


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

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


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

ASF GitHub Bot commented on MPLUGIN-508:


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


##
maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/DescriptorGeneratorMojo.java:
##
@@ -48,8 +54,14 @@
 import org.apache.maven.tools.plugin.scanner.MojoScanner;
 import org.codehaus.plexus.component.repository.ComponentDependency;
 import org.codehaus.plexus.util.ReaderFactory;
+import org.codehaus.plexus.util.io.CachingOutputStream;
+import org.codehaus.plexus.util.io.CachingWriter;
+import org.objectweb.asm.*;

Review Comment:
   Accepted.





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




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


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

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


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

ASF GitHub Bot commented on MPLUGIN-508:


gnodet commented on code in PR #286:
URL: 
https://github.com/apache/maven-plugin-tools/pull/286#discussion_r1622016198


##
maven-plugin-report-plugin/src/it/mplugin-319_report-since/src/main/java/org/MyMojo.java:
##
@@ -19,41 +19,32 @@
 package org;
 
 import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
 
 /**
  * Does nothing.
  *
- * @goal noop
- * @phase process-sources
- * @requiresDependencyResolution test
- * @requiresDirectInvocation true
- * @requiresOnline
- * @inheritByDefault false
- * @execute phase="compile"
- * @aggregator
  * @since 1.0
  *
  * @deprecated You don't use test goals, do you?
  */
+@Mojo(name = "noop")
 public class MyMojo extends AbstractMojo {

Review Comment:
   Why ? if not specified, the plugin won't have a default phase, but that's 
not a problem here.  We don't even use this plugin, we're only building it.





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




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


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

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


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

ASF GitHub Bot commented on MPLUGIN-508:


gnodet commented on code in PR #286:
URL: 
https://github.com/apache/maven-plugin-tools/pull/286#discussion_r1622012613


##
maven-plugin-report-plugin/src/main/java/org/apache/maven/plugins/plugin/descriptor/EnhancedPluginDescriptorBuilder.java:
##
@@ -43,7 +42,7 @@
  * Reads enhanced plugin.xml files as generated by
  * {@link PluginDescriptorFilesGenerator} and used by {@link PluginReport}.
  * Populates the slightly extended {@link Parameter} object {@link 
EnhancedParameterWrapper}.
- * In addition populates all (optional) elements added after Maven Plugin API 
3.2.5.
+ * In addition, populates all (optional) elements added after Maven Plugin API 
3.2.5.

Review Comment:
   Unfortunately, the `requiredJavaVersion` has been added in this plugin more 
recently, but has not been added in the  descriptor API in maven...   Even if 
we add it, we'll then raise the requirement to latest 3.9.x.
   However, this field is available in the v4 api, so we will be able to get 
rid of those when we fully switch to Maven 4.





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




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


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

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


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

ASF GitHub Bot commented on MPLUGIN-508:


gnodet commented on code in PR #286:
URL: 
https://github.com/apache/maven-plugin-tools/pull/286#discussion_r1622007268


##
maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/DescriptorGeneratorMojo.java:
##
@@ -48,8 +54,14 @@
 import org.apache.maven.tools.plugin.scanner.MojoScanner;
 import org.codehaus.plexus.component.repository.ComponentDependency;
 import org.codehaus.plexus.util.ReaderFactory;
+import org.codehaus.plexus.util.io.CachingOutputStream;
+import org.codehaus.plexus.util.io.CachingWriter;
+import org.objectweb.asm.*;

Review Comment:
   The imports are used to generate the factories for Maven 4.x mojos.  They 
are not using plexus, as they are booted by the new DI framework in Maven.  But 
this framework recognises beans annotated with 
`@org.apache.maven.api.di.Named`, which is not the case for mojos.  To avoid 
forcing the user to add this annotation, a factory (annotated with the needed 
annotation) is generated by the plugin.  And to avoid having to do another 
compile phase, the byte code is directly generated instead of generating source 
code.  Those new imports are needed for this feature.





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




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


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

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


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

ASF GitHub Bot commented on MPLUGIN-508:


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


##
maven-plugin-plugin/src/it/v4api/invoker.properties:
##
@@ -15,4 +15,5 @@
 # specific language governing permissions and limitations
 # under the License.
 
+invoker.java.version = 17+

Review Comment:
   Ah, OK. This makes sense. My oversight.





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




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


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

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


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

ASF GitHub Bot commented on MPLUGIN-508:


gnodet commented on code in PR #286:
URL: 
https://github.com/apache/maven-plugin-tools/pull/286#discussion_r1621998036


##
maven-plugin-plugin/src/it/v4api/invoker.properties:
##
@@ -15,4 +15,5 @@
 # specific language governing permissions and limitations
 # under the License.
 
+invoker.java.version = 17+

Review Comment:
   The entire project is JDK 8.  The mojos run on Maven 3.x + JDK 8 if you want 
to build Maven 3.x plugins.  If you build a Maven 4.x plugin, you'll need JDK 
17.  That's the case for this IT.  Other ITs are unchanged.
   
   The migration to Maven 4 only should imho happen at the same time as 
m-plugin-p is migrated to be a Maven 4 plugin.  





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




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


[jira] [Commented] (MCOMPILER-592) IndexOutOfBoundsException when project.build.outputTimestamp is empty

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


[ 
https://issues.apache.org/jira/browse/MCOMPILER-592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17850997#comment-17850997
 ] 

ASF GitHub Bot commented on MCOMPILER-592:
--

michael-o commented on code in PR #244:
URL: 
https://github.com/apache/maven-compiler-plugin/pull/244#discussion_r1621995663


##
src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java:
##
@@ -1239,7 +1239,9 @@ public void execute() throws MojoExecutionException, 
CompilationFailureException
 }
 }
 
-if (outputTimestamp != null && (outputTimestamp.length() > 1 || 
Character.isDigit(outputTimestamp.charAt(0 {
+if (outputTimestamp != null
+&& !outputTimestamp.isEmpty()

Review Comment:
   I'd like to understand how the value can be empty: ``? This basically 
can happen in any plugin using this value, no?





> IndexOutOfBoundsException when project.build.outputTimestamp is empty
> -
>
> Key: MCOMPILER-592
> URL: https://issues.apache.org/jira/browse/MCOMPILER-592
> Project: Maven Compiler Plugin
>  Issue Type: Bug
>Affects Versions: 3.12.0, 3.12.1, 3.13.0
>Reporter: Thijs Rijpert
>Priority: Minor
>
> Due to a combination of plugins, it is possible for the 
> project.build.outputTimestamp property to have an empty string as a value. 
> This causes an IndexOutOfBoundsException on line 1242 when it tries to access 
> the first character in the string. 
> This can be fixed by doing an isEmpty check before doing the charAt check. I 
> will create an PR for this.
> While this bug is caused by another plugin, I think this should be fixed in 
> the compiler because the error returned (IndexOutOfBoundsException), is vague 
> and hard to debug.
> The workaround for this issue is setting the project.build.outputTimestamp 
> property with an arbitrary value.



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


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

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


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

ASF GitHub Bot commented on MPLUGIN-508:


gnodet commented on code in PR #286:
URL: 
https://github.com/apache/maven-plugin-tools/pull/286#discussion_r1621991740


##
maven-plugin-plugin/src/it/v4api/src/main/java/org/apache/maven/its/v4api/FirstMojo.java:
##
@@ -38,15 +37,12 @@
  * Test mojo for the v4 api plugin descriptor generation.
  * This mojo is not actually runnable because:
  *  - it's using a custom lifecycle which is not defined
- *  - it has a @Component dependency on ArtifactInstaller (hint=test) which 
does not exist
+ *  - it has a @Inject dependency on ArtifactInstaller (hint=test) which does 
not exist
  *
  * @since 1.2
  */
-@Mojo(
-name = "first",
-requiresDependencyResolution = ResolutionScope.TEST,
-defaultPhase = LifecyclePhase.INTEGRATION_TEST)
-@Execute(phase = LifecyclePhase.GENERATE_SOURCES, lifecycle = "cobertura")
+@Mojo(name = "first", defaultPhase = "integration-test")
+@Execute(phase = "generate-sources", lifecycle = "cobertura")
 public class FirstMojo implements org.apache.maven.api.plugin.Mojo {

Review Comment:
   > > Maven 4 mojos have to be thread safe, so that annotation is gone.
   > 
   > You cannot enforce that, right? Only by contract...
   
   Right.





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




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


[jira] [Commented] (MCOMPILER-592) IndexOutOfBoundsException when project.build.outputTimestamp is empty

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


[ 
https://issues.apache.org/jira/browse/MCOMPILER-592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17850995#comment-17850995
 ] 

ASF GitHub Bot commented on MCOMPILER-592:
--

thijsrijpert commented on PR #244:
URL: 
https://github.com/apache/maven-compiler-plugin/pull/244#issuecomment-2141522932

   From JIRA issue:
   
   Due to a combination of plugins, it is possible for the 
project.build.outputTimestamp property to have an empty string as a value. This 
causes an IndexOutOfBoundsException on line 1242 when it tries to access the 
first character in the string.
   
   This can be fixed by doing an isEmpty check before doing the charAt check. I 
will create an PR for this.
   
   While this bug is caused by another plugin, I think this should be fixed in 
the compiler because the error returned (IndexOutOfBoundsException), is vague 
and hard to debug.
   
   The workaround for this issue is setting the project.build.outputTimestamp 
property with an arbitrary value.




> IndexOutOfBoundsException when project.build.outputTimestamp is empty
> -
>
> Key: MCOMPILER-592
> URL: https://issues.apache.org/jira/browse/MCOMPILER-592
> Project: Maven Compiler Plugin
>  Issue Type: Bug
>Affects Versions: 3.12.0, 3.12.1, 3.13.0
>Reporter: Thijs Rijpert
>Priority: Minor
>
> Due to a combination of plugins, it is possible for the 
> project.build.outputTimestamp property to have an empty string as a value. 
> This causes an IndexOutOfBoundsException on line 1242 when it tries to access 
> the first character in the string. 
> This can be fixed by doing an isEmpty check before doing the charAt check. I 
> will create an PR for this.
> While this bug is caused by another plugin, I think this should be fixed in 
> the compiler because the error returned (IndexOutOfBoundsException), is vague 
> and hard to debug.
> The workaround for this issue is setting the project.build.outputTimestamp 
> property with an arbitrary value.



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


[jira] [Commented] (MCOMPILER-592) IndexOutOfBoundsException when project.build.outputTimestamp is empty

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


[ 
https://issues.apache.org/jira/browse/MCOMPILER-592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17850991#comment-17850991
 ] 

ASF GitHub Bot commented on MCOMPILER-592:
--

thijsrijpert opened a new pull request, #244:
URL: https://github.com/apache/maven-compiler-plugin/pull/244

   …Timestamp is empty
   
   Following this checklist to help us incorporate your 
   contribution quickly and easily:
   
- [ ] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/MCOMPILER) filed 
  for the change (usually before you start working on it).  Trivial 
changes like typos do not 
  require a JIRA issue.  Your pull request should address just this 
issue, without 
  pulling in other changes.
- [ ] Each commit in the pull request should have a meaningful subject line 
and body.
- [ ] Format the pull request title like `[MCOMPILER-XXX] - Fixes bug in 
ApproximateQuantiles`,
  where you replace `MCOMPILER-XXX` with the appropriate JIRA issue. 
Best practice
  is to use the JIRA issue title in the pull request title and in the 
first line of the 
  commit message.
- [ ] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
- [ ] Run `mvn clean verify` to make sure basic checks pass. A more 
thorough check will 
  be performed on your pull request automatically.
- [ ] You have run the integration tests successfully (`mvn -Prun-its clean 
verify`).
   
   If your pull request is about ~20 lines of code you don't need to sign an
   [Individual Contributor License 
Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
   please ask on the developers list.
   
   To make clear that you license your contribution under 
   the [Apache License Version 2.0, January 
2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
- [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)
   
- [ ] In any other case, please file an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   




> IndexOutOfBoundsException when project.build.outputTimestamp is empty
> -
>
> Key: MCOMPILER-592
> URL: https://issues.apache.org/jira/browse/MCOMPILER-592
> Project: Maven Compiler Plugin
>  Issue Type: Bug
>Affects Versions: 3.12.0, 3.12.1, 3.13.0
>Reporter: Thijs Rijpert
>Priority: Minor
>
> Due to a combination of plugins, it is possible for the 
> project.build.outputTimestamp property to have an empty string as a value. 
> This causes an IndexOutOfBoundsException on line 1242 when it tries to access 
> the first character in the string. 
> This can be fixed by doing an isEmpty check before doing the charAt check. I 
> will create an PR for this.
> While this bug is caused by another plugin, I think this should be fixed in 
> the compiler because the error returned (IndexOutOfBoundsException), is vague 
> and hard to debug.
> The workaround for this issue is setting the project.build.outputTimestamp 
> property with an arbitrary value.



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


[jira] [Commented] (MENFORCER-500) New rule: Maven coordinates must match pattern

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


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

ASF GitHub Bot commented on MENFORCER-500:
--

Bananeweizen commented on code in PR #309:
URL: https://github.com/apache/maven-enforcer/pull/309#discussion_r1621974649


##
enforcer-rules/src/site/apt/requireMatchingCoordinates.apt.vm:
##
@@ -0,0 +1,75 @@
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
+  --
+  Require Matching Coordinates
+  --
+  Konrad Windszus
+  --
+  2024-03-22
+  --
+
+Require Matching Coordinates
+
+  This rule checks that the Maven coordinates (i.e. the project's 
<<>> and <<>>) each match a given pattern. 
+  Optionally one can also enforce that in a multi-module build the module 
directory name is always equal to the module's <<>>.
+
+   The following parameters are supported by this rule:
+
+   * <> - an optional message to the user if the rule fails. If not 
set a default message will be used.
+
+   * <> - an optional 
{{{https://docs.oracle.com/javase/tutorial/essential/regex/}regular 
expression}}, which must match the project's <<>>. If not set there is 
no check on the <<>>.
+
+   * <> - an optional 
{{{https://docs.oracle.com/javase/tutorial/essential/regex/}regular 
expression}}, which must match the project's <<>>. If not set there 
is no check on the <<>>.
+
+   * <> - boolean flag to enforce that the the 
module's directory name is always equal to the module's <<>>. By 
default <<>>.
+
+   []
+
+
+  Sample Plugin Configuration:
+
++---+
+
+  [...]
+  
+
+  
+org.apache.maven.plugins
+maven-enforcer-plugin
+${project.version}
+
+  
+enforce-group-id
+
+  enforce
+
+
+  
+
+  com\.example.\namespace\..*
+

Review Comment:
   copy paste error, see https://issues.apache.org/jira/browse/MENFORCER-505





> New rule: Maven coordinates must match pattern
> --
>
> Key: MENFORCER-500
> URL: https://issues.apache.org/jira/browse/MENFORCER-500
> Project: Maven Enforcer Plugin
>  Issue Type: New Feature
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
> Fix For: 3.5.0
>
>
> Sometimes it is crucial that the {{groupId}} and/or the {{artifactId}} match 
> a certain pattern (e.g. because it is reserved namespace prefix for deploying 
> to Maven Central). It would be beneficial to enforce that with a standard 
> rule.
> The pattern should be a configurable regex pattern (independently for 
> {{artifactId}} and {{groupId}})



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


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

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


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

ASF GitHub Bot commented on MPLUGIN-508:


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


##
maven-plugin-report-plugin/src/it/mplugin-319_report-since/src/main/java/org/MyMojo.java:
##
@@ -19,41 +19,32 @@
 package org;
 
 import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
 
 /**
  * Does nothing.
  *
- * @goal noop
- * @phase process-sources
- * @requiresDependencyResolution test
- * @requiresDirectInvocation true
- * @requiresOnline
- * @inheritByDefault false
- * @execute phase="compile"
- * @aggregator
  * @since 1.0
  *
  * @deprecated You don't use test goals, do you?
  */
+@Mojo(name = "noop")
 public class MyMojo extends AbstractMojo {

Review Comment:
   Phases?



##
maven-plugin-report-plugin/src/main/java/org/apache/maven/plugins/plugin/descriptor/EnhancedPluginDescriptorBuilder.java:
##
@@ -43,7 +42,7 @@
  * Reads enhanced plugin.xml files as generated by
  * {@link PluginDescriptorFilesGenerator} and used by {@link PluginReport}.
  * Populates the slightly extended {@link Parameter} object {@link 
EnhancedParameterWrapper}.
- * In addition populates all (optional) elements added after Maven Plugin API 
3.2.5.
+ * In addition, populates all (optional) elements added after Maven Plugin API 
3.2.5.

Review Comment:
   I think this can be simplified because 3.2.5 is long gone...





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




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


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

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


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

ASF GitHub Bot commented on MPLUGIN-508:


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


##
maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/DescriptorGeneratorMojo.java:
##
@@ -48,8 +54,14 @@
 import org.apache.maven.tools.plugin.scanner.MojoScanner;
 import org.codehaus.plexus.component.repository.ComponentDependency;
 import org.codehaus.plexus.util.ReaderFactory;
+import org.codehaus.plexus.util.io.CachingOutputStream;
+import org.codehaus.plexus.util.io.CachingWriter;
+import org.objectweb.asm.*;

Review Comment:
   Is this necessary?





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




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


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

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


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

ASF GitHub Bot commented on MPLUGIN-508:


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


##
maven-plugin-plugin/src/it/v4api/invoker.properties:
##
@@ -15,4 +15,5 @@
 # specific language governing permissions and limitations
 # under the License.
 
+invoker.java.version = 17+

Review Comment:
   Confusing if the entire project require Java 17, why here especially?



##
maven-plugin-plugin/src/it/v4api/invoker.properties:
##
@@ -15,4 +15,5 @@
 # specific language governing permissions and limitations
 # under the License.
 
+invoker.java.version = 17+

Review Comment:
   Confusing if the entire project requires Java 17, why here especially?





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




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


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

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


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

ASF GitHub Bot commented on MPLUGIN-508:


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


##
maven-plugin-plugin/src/it/skip/src/main/java/org/apache/maven/plugin/coreit/FirstMojo.java:
##
@@ -18,47 +18,15 @@
  */
 package org.apache.maven.plugin.coreit;
 
-import java.io.File;
-
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Mojo;
 
 /**
  * Touches a test file.
- *
- * @goal first
- * @requiresDependencyResolution test
- * @phase integration-test
- * @execute phase="generate-sources" lifecycle="cobertura"
- * @deprecated Don't use!
- * @since 1.2
  */
+@Mojo(name = "test")
 public class FirstMojo extends AbstractMojo {

Review Comment:
   This is now completely different, how?





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




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


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

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


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

ASF GitHub Bot commented on MPLUGIN-508:


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


##
maven-plugin-plugin/src/it/v4api/src/main/java/org/apache/maven/its/v4api/FirstMojo.java:
##
@@ -38,15 +37,12 @@
  * Test mojo for the v4 api plugin descriptor generation.
  * This mojo is not actually runnable because:
  *  - it's using a custom lifecycle which is not defined
- *  - it has a @Component dependency on ArtifactInstaller (hint=test) which 
does not exist
+ *  - it has a @Inject dependency on ArtifactInstaller (hint=test) which does 
not exist
  *
  * @since 1.2
  */
-@Mojo(
-name = "first",
-requiresDependencyResolution = ResolutionScope.TEST,
-defaultPhase = LifecyclePhase.INTEGRATION_TEST)
-@Execute(phase = LifecyclePhase.GENERATE_SOURCES, lifecycle = "cobertura")
+@Mojo(name = "first", defaultPhase = "integration-test")
+@Execute(phase = "generate-sources", lifecycle = "cobertura")
 public class FirstMojo implements org.apache.maven.api.plugin.Mojo {

Review Comment:
   > Maven 4 mojos have to be thread safe, so that annotation is gone.
   
   You cannot enforce that right? Only by contract...



##
maven-plugin-plugin/src/it/v4api/src/main/java/org/apache/maven/its/v4api/FirstMojo.java:
##
@@ -38,15 +37,12 @@
  * Test mojo for the v4 api plugin descriptor generation.
  * This mojo is not actually runnable because:
  *  - it's using a custom lifecycle which is not defined
- *  - it has a @Component dependency on ArtifactInstaller (hint=test) which 
does not exist
+ *  - it has a @Inject dependency on ArtifactInstaller (hint=test) which does 
not exist
  *
  * @since 1.2
  */
-@Mojo(
-name = "first",
-requiresDependencyResolution = ResolutionScope.TEST,
-defaultPhase = LifecyclePhase.INTEGRATION_TEST)
-@Execute(phase = LifecyclePhase.GENERATE_SOURCES, lifecycle = "cobertura")
+@Mojo(name = "first", defaultPhase = "integration-test")
+@Execute(phase = "generate-sources", lifecycle = "cobertura")
 public class FirstMojo implements org.apache.maven.api.plugin.Mojo {

Review Comment:
   > Maven 4 mojos have to be thread safe, so that annotation is gone.
   
   You cannot enforce that, right? Only by contract...





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




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


[jira] [Commented] (MDEP-935) Improvement ITs for dependency:tree

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


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

ASF GitHub Bot commented on MDEP-935:
-

slawekjaranowski opened a new pull request, #399:
URL: https://github.com/apache/maven-dependency-plugin/pull/399

   - add tests for excludes and scope
   
   https://issues.apache.org/jira/browse/MDEP-935




> Improvement ITs for dependency:tree
> ---
>
> Key: MDEP-935
> URL: https://issues.apache.org/jira/browse/MDEP-935
> Project: Maven Dependency Plugin
>  Issue Type: Task
>Reporter: Slawomir Jaranowski
>Assignee: Slawomir Jaranowski
>Priority: Major
> Fix For: 3.7.0
>
>
> Before refactor it will be good to have more test



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


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

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


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

ASF GitHub Bot commented on MPLUGIN-508:


gnodet commented on code in PR #286:
URL: 
https://github.com/apache/maven-plugin-tools/pull/286#discussion_r162130


##
maven-plugin-plugin/src/it/v4api/src/main/java/org/apache/maven/its/v4api/FirstMojo.java:
##
@@ -38,15 +37,12 @@
  * Test mojo for the v4 api plugin descriptor generation.
  * This mojo is not actually runnable because:
  *  - it's using a custom lifecycle which is not defined
- *  - it has a @Component dependency on ArtifactInstaller (hint=test) which 
does not exist
+ *  - it has a @Inject dependency on ArtifactInstaller (hint=test) which does 
not exist
  *
  * @since 1.2
  */
-@Mojo(
-name = "first",
-requiresDependencyResolution = ResolutionScope.TEST,
-defaultPhase = LifecyclePhase.INTEGRATION_TEST)
-@Execute(phase = LifecyclePhase.GENERATE_SOURCES, lifecycle = "cobertura")
+@Mojo(name = "first", defaultPhase = "integration-test")
+@Execute(phase = "generate-sources", lifecycle = "cobertura")
 public class FirstMojo implements org.apache.maven.api.plugin.Mojo {

Review Comment:
   I raised https://issues.apache.org/jira/browse/MNG-8134





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




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


[jira] [Commented] (SUREFIRE-2245) Upgrade to Parent 42 and Maven 3.6.3

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


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

ASF GitHub Bot commented on SUREFIRE-2245:
--

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

   > This works:
   > 
   > ```
   > $ git diff
   > diff --git a/surefire-its/src/test/resources/junit-4-5/pom.xml 
b/surefire-its/src/test/resources/junit-4-5/pom.xml
   > index 9a9d69c27..e55fd9b4e 100644
   > -

> Upgrade to Parent 42 and Maven 3.6.3
> 
>
> Key: SUREFIRE-2245
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2245
> Project: Maven Surefire
>  Issue Type: Dependency upgrade
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.3.0
>
>




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


[jira] [Commented] (SUREFIRE-2245) Upgrade to Parent 42 and Maven 3.6.3

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


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

ASF GitHub Bot commented on SUREFIRE-2245:
--

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

   This works:
   ```
   $ git diff
   diff --git a/surefire-its/src/test/resources/junit-4-5/pom.xml 
b/surefire-its/src/test/resources/junit-4-5/pom.xml
   index 9a9d69c27..e55fd9b4e 100644
   -

> Upgrade to Parent 42 and Maven 3.6.3
> 
>
> Key: SUREFIRE-2245
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2245
> Project: Maven Surefire
>  Issue Type: Dependency upgrade
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.3.0
>
>




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


[jira] [Commented] (SUREFIRE-2245) Upgrade to Parent 42 and Maven 3.6.3

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


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

ASF GitHub Bot commented on SUREFIRE-2245:
--

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

   > > Outdated in terms of what?
   > 
   > In lacking a line for `args.add(new Object[] {"1.10.2", "5.10.2", "1.3.0", 
"1.1.2"});`
   > 
   > > Tried to following:
   > 
   > Going from `junit-jupiter-api` to 
`junit-jupiter` does not help either?
   
   Did, no change. fails with:
   ```
   Caused by: org.apache.maven.surefire.booter.SurefireBooterForkException: 
There was an error in the forked process
   org.junit.platform.engine.TestDescriptor.getAncestors()Ljava/util/Set;
   java.lang.NoSuchMethodError: 
org.junit.platform.engine.TestDescriptor.getAncestors()Ljava/util/Set;
   at 
org.junit.platform.launcher.core.StackTracePruningEngineExecutionListener.getTestClassNames(StackTracePruningEngineExecutionListener.java:50)
   at 
org.junit.platform.launcher.core.StackTracePruningEngineExecutionListener.executionFinished(StackTracePruningEngineExecutionListener.java:39)
   ```




> Upgrade to Parent 42 and Maven 3.6.3
> 
>
> Key: SUREFIRE-2245
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2245
> Project: Maven Surefire
>  Issue Type: Dependency upgrade
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.3.0
>
>




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


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

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


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

ASF GitHub Bot commented on MPLUGIN-508:


gnodet commented on code in PR #286:
URL: 
https://github.com/apache/maven-plugin-tools/pull/286#discussion_r1621196292


##
maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/DescriptorGeneratorMojo.java:
##
@@ -367,6 +390,141 @@ public void generate() throws MojoExecutionException {
 }
 }
 
+private void generateIndex() throws GeneratorException {
+try {
+Set diBeans = new TreeSet<>();
+try (Stream paths = 
Files.walk(classOutputDirectory.toPath())) {
+List classes = paths.filter(
+p -> 
p.getFileName().toString().endsWith(".class"))
+.collect(Collectors.toList());
+for (Path classFile : classes) {
+String fileString = classFile.toString();
+String className = fileString
+.substring(0, fileString.length() - 
".class".length())
+.replace('/', '.');
+try (InputStream is = Files.newInputStream(classFile)) {
+ClassReader rdr = new ClassReader(is);
+rdr.accept(
+new ClassVisitor(Opcodes.ASM9) {
+String className;
+
+@Override
+public void visit(
+int version,
+int access,
+String name,
+String signature,
+String superName,
+String[] interfaces) {
+super.visit(version, access, name, 
signature, superName, interfaces);
+className = name;
+}
+
+@Override
+public AnnotationVisitor 
visitAnnotation(String descriptor, boolean visible) {
+if 
("Lorg/apache/maven/api/di/Named;".equals(descriptor)) {
+diBeans.add(className.replace('/', 
'.'));
+}
+return null;
+}
+},
+ClassReader.SKIP_FRAMES | 
ClassReader.SKIP_CODE | ClassReader.SKIP_DEBUG);
+}
+
+//Class clazz = 
project.getClassRealm().loadClass(className);
+//boolean hasQualifier = 
Stream.of(clazz.getAnnotations())
+//.flatMap(ann -> 
Stream.of(ann.getClass().getAnnotations()))
+//.anyMatch(ann -> 
"org.apache.maven.api.di.Qualifier"
+//
.equals(ann.annotationType().getName()));
+//if (hasQualifier) {
+//diBeans.add(className);
+//}
+}
+}
+Path path = 
outputDirectory.toPath().resolve("org.apache.maven.api.di.Inject");
+if (diBeans.isEmpty()) {
+Files.deleteIfExists(path);
+} else {
+try (CachingWriter w = new CachingWriter(path, 
StandardCharsets.UTF_8)) {
+String content = 
diBeans.stream().collect(Collectors.joining("\n", "", "\n"));

Review Comment:
   Fixed



##
maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/DescriptorGeneratorMojo.java:
##
@@ -78,6 +90,12 @@ public class DescriptorGeneratorMojo extends 
AbstractGeneratorMojo {
 @Parameter(defaultValue = 
"${project.build.outputDirectory}/META-INF/maven", readonly = true)
 private File outputDirectory;
 
+/**
+ * The directory where the generated class files will be put.
+ */
+@Parameter(defaultValue = "${project.build.outputDirectory}", readonly = 
true)
+private File classOutputDirectory;

Review Comment:
   Fixed





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

[jira] [Commented] (SUREFIRE-2245) Upgrade to Parent 42 and Maven 3.6.3

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


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

ASF GitHub Bot commented on SUREFIRE-2245:
--

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

   > IIRC there's some mapping magic in Surefire code that tries to find the 
correct Platform version based on the Jupiter version used in tests. Perhaps, 
that magic is outdated too? 樂
   
   That maybe true, but that is out of scope for this issue.




> Upgrade to Parent 42 and Maven 3.6.3
> 
>
> Key: SUREFIRE-2245
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2245
> Project: Maven Surefire
>  Issue Type: Dependency upgrade
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.3.0
>
>




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


[jira] [Commented] (SUREFIRE-2245) Upgrade to Parent 42 and Maven 3.6.3

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


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

ASF GitHub Bot commented on SUREFIRE-2245:
--

sormuras commented on PR #737:
URL: https://github.com/apache/maven-surefire/pull/737#issuecomment-2140177155

   IIRC there's some mapping magic in Surefire code that tries to find the 
correct Platform version based on the Jupiter version used in tests. Perhaps, 
that magic is outdated too? 樂 




> Upgrade to Parent 42 and Maven 3.6.3
> 
>
> Key: SUREFIRE-2245
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2245
> Project: Maven Surefire
>  Issue Type: Dependency upgrade
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.3.0
>
>




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


[jira] [Commented] (SUREFIRE-2245) Upgrade to Parent 42 and Maven 3.6.3

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


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

ASF GitHub Bot commented on SUREFIRE-2245:
--

sormuras commented on PR #737:
URL: https://github.com/apache/maven-surefire/pull/737#issuecomment-2140171588

   > Outdated in terms of what?
   In lacking a line for `args.add(new Object[] {"1.10.2", "5.10.2", "1.3.0", 
"1.1.2"});`
   
   > Tried to following:
   
   Going from `junit-jupiter-api` to 
`junit-jupiter` does not help either?
   




> Upgrade to Parent 42 and Maven 3.6.3
> 
>
> Key: SUREFIRE-2245
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2245
> Project: Maven Surefire
>  Issue Type: Dependency upgrade
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.3.0
>
>




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


[jira] [Commented] (SUREFIRE-2245) Upgrade to Parent 42 and Maven 3.6.3

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


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

ASF GitHub Bot commented on SUREFIRE-2245:
--

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

   > According to 
https://junit.org/junit5/docs/current/user-guide/#running-tests-build-maven "it 
is recommended to use the JUnit Platform BOM to align the versions of all JUnit 
5 artifacts." Perhaps the Surefire ITs should follow this advice.
   > 
   > Reading on [it 
says](https://junit.org/junit5/docs/current/user-guide/#running-tests-build-maven-engines-configure):
   > 
   > > To configure support for JUnit Jupiter based tests, configure test 
scoped dependencies on the JUnit Jupiter API and the JUnit Jupiter TestEngine 
implementation similar to the following.
   > 
   > ```
   > 
   > org.junit.jupiter
   > junit-jupiter
   > 5.10.2  Upgrade to Parent 42 and Maven 3.6.3
> 
>
> Key: SUREFIRE-2245
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2245
> Project: Maven Surefire
>  Issue Type: Dependency upgrade
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.3.0
>
>




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


[jira] [Commented] (SUREFIRE-2245) Upgrade to Parent 42 and Maven 3.6.3

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


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

ASF GitHub Bot commented on SUREFIRE-2245:
--

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

   > Just found another outdated IT:
   > 
   > 
https://github.com/apache/maven-surefire/blob/19b16d9b457fca387ef24fdb27a52eeb8970f711/surefire-its/src/test/java/org/apache/maven/surefire/its/JUnitPlatformEnginesIT.java#L82
   
   Outdated in terms of what?




> Upgrade to Parent 42 and Maven 3.6.3
> 
>
> Key: SUREFIRE-2245
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2245
> Project: Maven Surefire
>  Issue Type: Dependency upgrade
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.3.0
>
>




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


[jira] [Commented] (SUREFIRE-2245) Upgrade to Parent 42 and Maven 3.6.3

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


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

ASF GitHub Bot commented on SUREFIRE-2245:
--

sormuras commented on PR #737:
URL: https://github.com/apache/maven-surefire/pull/737#issuecomment-2140123639

   Just found another outdated IT: 
https://github.com/apache/maven-surefire/blob/19b16d9b457fca387ef24fdb27a52eeb8970f711/surefire-its/src/test/java/org/apache/maven/surefire/its/JUnitPlatformEnginesIT.java#L82




> Upgrade to Parent 42 and Maven 3.6.3
> 
>
> Key: SUREFIRE-2245
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2245
> Project: Maven Surefire
>  Issue Type: Dependency upgrade
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.3.0
>
>




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


[jira] [Commented] (SUREFIRE-2245) Upgrade to Parent 42 and Maven 3.6.3

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


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

ASF GitHub Bot commented on SUREFIRE-2245:
--

sormuras commented on PR #737:
URL: https://github.com/apache/maven-surefire/pull/737#issuecomment-2140097468

   According to 
https://junit.org/junit5/docs/current/user-guide/#running-tests-build-maven "it 
is recommended to use the JUnit Platform BOM to align the versions of all JUnit 
5 artifacts." Perhaps the Surefire ITs should follow this advice.
   
   Reading on [it 
says](https://junit.org/junit5/docs/current/user-guide/#running-tests-build-maven-engines-configure):
   > To configure support for JUnit Jupiter based tests, configure test scoped 
dependencies on the JUnit Jupiter API and the JUnit Jupiter TestEngine 
implementation similar to the following.
   
   ```xml
   
   org.junit.jupiter
   junit-jupiter
   5.10.2  Upgrade to Parent 42 and Maven 3.6.3
> 
>
> Key: SUREFIRE-2245
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2245
> Project: Maven Surefire
>  Issue Type: Dependency upgrade
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.3.0
>
>




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


[jira] [Commented] (SUREFIRE-2245) Upgrade to Parent 42 and Maven 3.6.3

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


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

ASF GitHub Bot commented on SUREFIRE-2245:
--

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

   > This IT should include a 5.10.2/1.8.5 row for JUnit 5.10.2 and JQwik 1.8.5:
   > 
   > 
https://github.com/apache/maven-surefire/blob/19b16d9b457fca387ef24fdb27a52eeb8970f711/surefire-its/src/test/java/org/apache/maven/surefire/its/JUnitPlatformIT.java#L58
   > 
   > And soon one for JUnit 5.11.0 (could already inserted as `5.11.0-M2`) too.
   
   Will do.
   
   > > Maven Parent 42 updated to latest JUnit 1.10.x/5.10.x the use case 
started to fail because of 
[junit-team/junit5@b41ae69](https://github.com/junit-team/junit5/commit/b41ae69659e8dc3fa230f97d8a751d81e69d06d7).
 Mixed dependencies, ABI incompat.
   > 
   > I don't see the "Mixed dependencies, ABI incompat." in the linked commit. 
Can you please expound?
   
   When you run the ITs manually from the dir to analyze the failure you see 
this classpath:
   ```
   common-java5-3.2.6-SNAPSHOT.jar
   junit-jupiter-engine-5.9.3.jar
   junit-platform-engine-1.10.2.jar
   junit-platform-launcher-1.10.2.jar
   junit-platform-suite-1.9.3.jar
   junit-platform-suite-commons-1.9.3.jar
   junit-platform-suite-engine-1.9.3.jar
   maven-surefire-common-3.2.6-SNAPSHOT.jar
   surefire-api-3.2.6-SNAPSHOT.jar
   surefire-booter-3.2.6-SNAPSHOT.jar
   surefire-extensions-api-3.2.6-SNAPSHOT.jar
   surefire-extensions-spi-3.2.6-SNAPSHOT.jar
   surefire-junit-platform-3.2.6-SNAPSHOT.jar
   surefire-logger-api-3.2.6-SNAPSHOT.jar
   surefire-shared-utils-3.2.6-SNAPSHOT.jar
   ```
   
   The mix of 1.10.2 and 1.9.3/5.9.3 don't play nice together, if you want I 
can procude the error for you. I had this signature missing due to the broken 
CP: 
`org.junit.platform.commons.util.ExceptionUtils.findNestedThrowables(Ljava/lang/Throwable;)Ljava/util/List;`




> Upgrade to Parent 42 and Maven 3.6.3
> 
>
> Key: SUREFIRE-2245
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2245
> Project: Maven Surefire
>  Issue Type: Dependency upgrade
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.3.0
>
>




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


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

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


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

ASF GitHub Bot commented on MPLUGIN-508:


gnodet commented on code in PR #286:
URL: 
https://github.com/apache/maven-plugin-tools/pull/286#discussion_r1620871349


##
maven-plugin-plugin/src/it/v4api/src/main/java/org/apache/maven/its/v4api/FirstMojo.java:
##
@@ -38,15 +37,12 @@
  * Test mojo for the v4 api plugin descriptor generation.
  * This mojo is not actually runnable because:
  *  - it's using a custom lifecycle which is not defined
- *  - it has a @Component dependency on ArtifactInstaller (hint=test) which 
does not exist
+ *  - it has a @Inject dependency on ArtifactInstaller (hint=test) which does 
not exist
  *
  * @since 1.2
  */
-@Mojo(
-name = "first",
-requiresDependencyResolution = ResolutionScope.TEST,
-defaultPhase = LifecyclePhase.INTEGRATION_TEST)
-@Execute(phase = LifecyclePhase.GENERATE_SOURCES, lifecycle = "cobertura")
+@Mojo(name = "first", defaultPhase = "integration-test")
+@Execute(phase = "generate-sources", lifecycle = "cobertura")
 public class FirstMojo implements org.apache.maven.api.plugin.Mojo {

Review Comment:
   Maven 4 mojos have to be thread safe, so that annotation is gone.
   
   In maven 3, the `requiresDependencyResolution` and 
`requiresDependencyCollection` are currently used to collect or resolve the 
project dependencies in a given scope.  Those artifacts are then made available 
by Maven by `MavenProject.getArtifacts()`.  This brings several problems: for a 
single project, two mojos can not be run concurrently, and as we've seen, some 
mojos even require runtime + test scope resolution, and that cannot be 
provided.   In 4.x, mojos will have to use the API to retrieve collect/resolve 
the dependencies.  Hopefully the result can be cached in the session.  So the 
latest 4.x release did remove those two bits.  However, not having this 
information sounds wrong, as this would be needed in at least two scenarii:
* it would be nice to be able to eagerly download dependencies at the 
beginning of a given build, and we'd need to know which scopes are needed for a 
given project, this could be done by analysing the build plan
* if we experiment a bit more with the [fully concurrent 
builder](https://github.com/apache/maven/pull/1429), we need this information 
in order to know which goals depend on which projects in the reactor, so that 
the goals can be scheduled correctly
   
   So I think we'll need to add those back somehow, but they would be 
informational.  Another possibility would be to allow injecting the 
resolution/collection result in the mojo, this may require a new specific 
annotation, but that may be the best solution.






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




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


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

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


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

ASF GitHub Bot commented on MPLUGIN-508:


gnodet commented on code in PR #286:
URL: 
https://github.com/apache/maven-plugin-tools/pull/286#discussion_r1620871349


##
maven-plugin-plugin/src/it/v4api/src/main/java/org/apache/maven/its/v4api/FirstMojo.java:
##
@@ -38,15 +37,12 @@
  * Test mojo for the v4 api plugin descriptor generation.
  * This mojo is not actually runnable because:
  *  - it's using a custom lifecycle which is not defined
- *  - it has a @Component dependency on ArtifactInstaller (hint=test) which 
does not exist
+ *  - it has a @Inject dependency on ArtifactInstaller (hint=test) which does 
not exist
  *
  * @since 1.2
  */
-@Mojo(
-name = "first",
-requiresDependencyResolution = ResolutionScope.TEST,
-defaultPhase = LifecyclePhase.INTEGRATION_TEST)
-@Execute(phase = LifecyclePhase.GENERATE_SOURCES, lifecycle = "cobertura")
+@Mojo(name = "first", defaultPhase = "integration-test")
+@Execute(phase = "generate-sources", lifecycle = "cobertura")
 public class FirstMojo implements org.apache.maven.api.plugin.Mojo {

Review Comment:
   Maven 4 mojos have to be thread safe, so that annotation is gone.
   
   In maven 3, the `requiresDependencyResolution` and 
`requiresDependencyCollection` are currently used to collect or resolve the 
project dependencies in a given scope.  Those artifacts are then made available 
by Maven by `MavenProject.getArtifacts()`.  This brings several problems: for a 
single project, two mojos can not be run concurrently, and as we've seen, some 
mojos even require runtime + test scope resolution, and that cannot be 
provided.   In 4.x, mojos will have to use the API to retrieve collect/resolve 
the dependencies.  Hopefully the result can be cached in the session.  So the 
latest 4.x release did remove those two bits.  However, not having this 
information sounds wrong, as this would be needed in at least two scenarii:
* it would be nice to be able to eagerly download dependencies at the 
beginning of a given build, and we'd need to know which scopes are needed for a 
given project, this could be done by analysing the build plan
* if we experiment a bit more with the [fully concurrent 
builder](https://github.com/apache/maven/pull/1429), we need this information 
in order to know which goals depend on which projects in the reactor, so that 
the goals can be scheduled correctly
   So I think we'll need to add those back somehow, but they would be 
informational.  Another possibility would be to allow injecting the 
resolution/collection result in the mojo, this may require a new specific 
annotation, but that may be the best solution.






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




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


[jira] [Commented] (SUREFIRE-2245) Upgrade to Parent 42 and Maven 3.6.3

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


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

ASF GitHub Bot commented on SUREFIRE-2245:
--

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

   @sormuras and @juliette-derancourt: Can you have a look at my changes in:
   * surefire-its/src/test/resources/junit-4-5/pom.xml
   * surefire-its/src/test/resources/junit5-suite/pom.xml
   
   Maven Parent 42 updated to latest JUnit 1.10.x/5.10.x the use case started 
to fail because of 
https://github.com/junit-team/junit5/commit/b41ae69659e8dc3fa230f97d8a751d81e69d06d7.
 Mixed dependencies, ABI incompat.
   
   My questions to you both:
   * Is that correct to do so in that case?
   * We have documented in 
`./maven-surefire-plugin/src/site/apt/examples/jpms.apt.vm`, 
`./maven-surefire-plugin/src/site/apt/examples/junit-platform.apt.vm`, 
`./maven-surefire-plugin/src/site/apt/usage.apt.vm` that only two deps need to 
be supplied, in contrast to that what I have in those ITs. Should we modify 
docs and require `junit-platform-engine` to be set as well?




> Upgrade to Parent 42 and Maven 3.6.3
> 
>
> Key: SUREFIRE-2245
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2245
> Project: Maven Surefire
>  Issue Type: Dependency upgrade
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.3.0
>
>




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


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

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


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

ASF GitHub Bot commented on MPLUGIN-508:


gnodet commented on code in PR #286:
URL: 
https://github.com/apache/maven-plugin-tools/pull/286#discussion_r1620871349


##
maven-plugin-plugin/src/it/v4api/src/main/java/org/apache/maven/its/v4api/FirstMojo.java:
##
@@ -38,15 +37,12 @@
  * Test mojo for the v4 api plugin descriptor generation.
  * This mojo is not actually runnable because:
  *  - it's using a custom lifecycle which is not defined
- *  - it has a @Component dependency on ArtifactInstaller (hint=test) which 
does not exist
+ *  - it has a @Inject dependency on ArtifactInstaller (hint=test) which does 
not exist
  *
  * @since 1.2
  */
-@Mojo(
-name = "first",
-requiresDependencyResolution = ResolutionScope.TEST,
-defaultPhase = LifecyclePhase.INTEGRATION_TEST)
-@Execute(phase = LifecyclePhase.GENERATE_SOURCES, lifecycle = "cobertura")
+@Mojo(name = "first", defaultPhase = "integration-test")
+@Execute(phase = "generate-sources", lifecycle = "cobertura")
 public class FirstMojo implements org.apache.maven.api.plugin.Mojo {

Review Comment:
   Maven 4 mojos have to be thread safe.
   In maven 3, the `requiresDependencyResolution` and 
`requiresDependencyCollection` are currently used to collect or resolve the 
project dependencies in a given scope.  Those artifacts are then made available 
by Maven by `MavenProject.getArtifacts()`.  This brings several problems: for a 
single project, two mojos can not be run concurrently, and as we've seen, some 
mojos even require runtime + test scope resolution, and that cannot be 
provided.   In 4.x, mojos will have to use the API to retrieve collect/resolve 
the dependencies.  Hopefully the result can be cached in the session.  So the 
latest 4.x release did remove those two bits.  However, not having this 
information sounds wrong, as this would be needed in at least two scenarii:
* it would be nice to be able to eagerly download dependencies at the 
beginning of a given build, and we'd need to know which scopes are needed for a 
given project, this could be done by analysing the build plan
* if we experiment a bit more with the [fully concurrent 
builder](https://github.com/apache/maven/pull/1429), we need this information 
in order to know which goals depend on which projects in the reactor, so that 
the goals can be scheduled correctly
   So I think we'll need to add those back somehow, but they would be 
informational.  Another possibility would be to allow injecting the 
resolution/collection result in the mojo.






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




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


[jira] [Commented] (SUREFIRE-2245) Upgrade to Parent 42 and Maven 3.6.3

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


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

ASF GitHub Bot commented on SUREFIRE-2245:
--

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


##
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java:
##
@@ -935,31 +932,17 @@ protected final PluginConsoleLogger getConsoleLogger() {
 return consoleLogger;
 }
 
-private static  Toolchain getToolchainMaven33x(
-Class toolchainManagerType, T toolchainManager, MavenSession 
session, Map toolchainArgs)
-throws MojoFailureException {
-Method getToolchainsMethod =
-tryGetMethod(toolchainManagerType, "getToolchains", 
MavenSession.class, String.class, Map.class);
-if (getToolchainsMethod != null) {
-//noinspection unchecked
-List tcs =
-invokeMethodWithArray(toolchainManager, 
getToolchainsMethod, session, "jdk", toolchainArgs);
-if (tcs.isEmpty()) {
-throw new MojoFailureException(
-"Requested toolchain specification did not match any 
configured toolchain: " + toolchainArgs);
-}
-return tcs.get(0);
-}
-return null;
-}
-
-// TODO remove the part with ToolchainManager lookup once we depend on
-// 3.0.9 (have it as prerequisite). Define as regular component field then.
 private Toolchain getToolchain() throws MojoFailureException {
 Toolchain tc = null;
 
 if (getJdkToolchain() != null) {
-tc = getToolchainMaven33x(ToolchainManager.class, 
getToolchainManager(), getSession(), getJdkToolchain());
+List tcs = 
getToolchainManager().getToolchains(getSession(), "jdk", getJdkToolchain());
+if (tcs.isEmpty()) {
+throw new MojoFailureException(
+"Requested toolchain specification did not match any 
configured toolchain: "
++ getJdkToolchain());
+}
+tc = tcs.get(0);

Review Comment:
   Guys, please check wether this is correct logically...





> Upgrade to Parent 42 and Maven 3.6.3
> 
>
> Key: SUREFIRE-2245
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2245
> Project: Maven Surefire
>  Issue Type: Dependency upgrade
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.3.0
>
>




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


[jira] [Commented] (SUREFIRE-2245) Upgrade to Parent 42 and Maven 3.6.3

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


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

ASF GitHub Bot commented on SUREFIRE-2245:
--

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


##
maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/AbstractSurefireMojoToolchainsTest.java:
##
@@ -106,39 +94,17 @@ public void shouldFallthroughToBuildContextWhenNoSpecSet() 
throws Exception {
 assertThat(actual).isSameAs(expectedFromContext);
 }
 
-@Test
-public void shouldReturnNoToolchainInMaven32() throws Exception {
-Toolchain toolchain = invokeMethod(
-AbstractSurefireMojo.class,
-"getToolchainMaven33x",
-MockToolchainManagerMaven32.class,
-new MockToolchainManagerMaven32(null),
-mock(MavenSession.class),
-emptyMap());
-assertNull(toolchain);
-}
-
 @Test(expected = MojoFailureException.class)
-public void shouldThrowMaven33xToolchain() throws Exception {
-invokeMethod(
-AbstractSurefireMojo.class,
-"getToolchainMaven33x",
-MockToolchainManager.class,
-new MockToolchainManager(null, null),
-mock(MavenSession.class),
-emptyMap());
+@Ignore
+public void shouldThrowToolchain() throws Exception {
+invokeMethod(AbstractSurefireMojo.class, "getToolchain");
 }
 
 @Test
-public void shouldGetMaven33xToolchain() throws Exception {
+@Ignore
+public void shouldGetToolchain() throws Exception {
 Toolchain expected = mock(Toolchain.class);
-Toolchain actual = invokeMethod(
-AbstractSurefireMojo.class,
-"getToolchainMaven33x",
-MockToolchainManager.class,
-new MockToolchainManager(expected, null),
-mock(MavenSession.class),
-emptyMap());
+Toolchain actual = invokeMethod(AbstractSurefireMojo.class, 
"getToolchain");

Review Comment:
   I have disabled a few tests because they do not work, but I believe that 
they are redundant now because we don't use any reflection. I am inclined to 
delete all disabled ones. WDYT?





> Upgrade to Parent 42 and Maven 3.6.3
> 
>
> Key: SUREFIRE-2245
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2245
> Project: Maven Surefire
>  Issue Type: Dependency upgrade
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.3.0
>
>




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


[jira] [Commented] (MPIR-457) Upgrade to Parent 42 and Maven 3.6.3

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


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

ASF GitHub Bot commented on MPIR-457:
-

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


##
pom.xml:
##
@@ -184,7 +177,7 @@ under the License.
 
   org.apache.maven.shared
   maven-dependency-tree
-  3.2.1
+  3.3.0

Review Comment:
   Done: https://issues.apache.org/jira/browse/MPIR-458





> Upgrade to Parent 42 and Maven 3.6.3
> 
>
> Key: MPIR-457
> URL: https://issues.apache.org/jira/browse/MPIR-457
> Project: Maven Project Info Reports Plugin
>  Issue Type: Dependency upgrade
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.6.0
>
>




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


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

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


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

ASF GitHub Bot commented on MPLUGIN-508:


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


##
maven-plugin-plugin/src/it/v4api/src/main/java/org/apache/maven/its/v4api/FirstMojo.java:
##
@@ -38,15 +37,12 @@
  * Test mojo for the v4 api plugin descriptor generation.
  * This mojo is not actually runnable because:
  *  - it's using a custom lifecycle which is not defined
- *  - it has a @Component dependency on ArtifactInstaller (hint=test) which 
does not exist
+ *  - it has a @Inject dependency on ArtifactInstaller (hint=test) which does 
not exist
  *
  * @since 1.2
  */
-@Mojo(
-name = "first",
-requiresDependencyResolution = ResolutionScope.TEST,
-defaultPhase = LifecyclePhase.INTEGRATION_TEST)
-@Execute(phase = LifecyclePhase.GENERATE_SOURCES, lifecycle = "cobertura")
+@Mojo(name = "first", defaultPhase = "integration-test")
+@Execute(phase = "generate-sources", lifecycle = "cobertura")
 public class FirstMojo implements org.apache.maven.api.plugin.Mojo {

Review Comment:
   Is there a reason why other args to `@Mojo` are gone?



##
maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/DescriptorGeneratorMojo.java:
##
@@ -367,6 +390,141 @@ public void generate() throws MojoExecutionException {
 }
 }
 
+private void generateIndex() throws GeneratorException {
+try {
+Set diBeans = new TreeSet<>();
+try (Stream paths = 
Files.walk(classOutputDirectory.toPath())) {
+List classes = paths.filter(
+p -> 
p.getFileName().toString().endsWith(".class"))
+.collect(Collectors.toList());
+for (Path classFile : classes) {
+String fileString = classFile.toString();
+String className = fileString
+.substring(0, fileString.length() - 
".class".length())
+.replace('/', '.');
+try (InputStream is = Files.newInputStream(classFile)) {
+ClassReader rdr = new ClassReader(is);
+rdr.accept(
+new ClassVisitor(Opcodes.ASM9) {
+String className;
+
+@Override
+public void visit(
+int version,
+int access,
+String name,
+String signature,
+String superName,
+String[] interfaces) {
+super.visit(version, access, name, 
signature, superName, interfaces);
+className = name;
+}
+
+@Override
+public AnnotationVisitor 
visitAnnotation(String descriptor, boolean visible) {
+if 
("Lorg/apache/maven/api/di/Named;".equals(descriptor)) {
+diBeans.add(className.replace('/', 
'.'));
+}
+return null;
+}
+},
+ClassReader.SKIP_FRAMES | 
ClassReader.SKIP_CODE | ClassReader.SKIP_DEBUG);
+}
+
+//Class clazz = 
project.getClassRealm().loadClass(className);
+//boolean hasQualifier = 
Stream.of(clazz.getAnnotations())
+//.flatMap(ann -> 
Stream.of(ann.getClass().getAnnotations()))
+//.anyMatch(ann -> 
"org.apache.maven.api.di.Qualifier"
+//
.equals(ann.annotationType().getName()));
+//if (hasQualifier) {
+//diBeans.add(className);
+//}
+}
+}
+Path path = 
outputDirectory.toPath().resolve("org.apache.maven.api.di.Inject");
+if (diBeans.isEmpty()) {
+Files.deleteIfExists(path);
+} else {
+try (CachingWriter w = new CachingWriter(path, 
StandardCharsets.UTF_8)) {
+String content = 

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

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


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

ASF GitHub Bot commented on MDEP-799:
-

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


##
src/main/java/org/apache/maven/plugins/dependency/tree/TreeMojo.java:
##
@@ -86,30 +84,6 @@ public class TreeMojo extends AbstractMojo {
 @Parameter(property = "outputEncoding", defaultValue = 
"${project.reporting.outputEncoding}")
 private String outputEncoding;
 
-/**
- * Contains the full list of projects in the reactor.
- */
-@Parameter(defaultValue = "${reactorProjects}", readonly = true, required 
= true)

Review Comment:
   no problem ... like unused variables are





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



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


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

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


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

ASF GitHub Bot commented on MDEP-799:
-

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


##
src/main/java/org/apache/maven/plugins/dependency/tree/TreeMojo.java:
##
@@ -86,30 +84,6 @@ public class TreeMojo extends AbstractMojo {
 @Parameter(property = "outputEncoding", defaultValue = 
"${project.reporting.outputEncoding}")
 private String outputEncoding;
 
-/**
- * Contains the full list of projects in the reactor.
- */
-@Parameter(defaultValue = "${reactorProjects}", readonly = true, required 
= true)

Review Comment:
   does this cause problems for existing projects that set these?



##
src/main/java/org/apache/maven/plugins/dependency/tree/TreeMojo.java:
##
@@ -133,7 +107,8 @@ public class TreeMojo extends AbstractMojo {
 
 /**
  * If specified, this parameter will cause the dependency tree to be 
written using the specified format. Currently
- * supported format are: text (default), dot, 
graphml and tgf.
+ * supported format are: text (default), dot, 
graphml, tgf

Review Comment:
   format --> formats





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



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


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

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


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

ASF GitHub Bot commented on MDEP-799:
-

slawekjaranowski opened a new pull request, #398:
URL: https://github.com/apache/maven-dependency-plugin/pull/398

   (no comment)




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



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


[jira] [Commented] (MDEP-920) Bump org.assertj:assertj-core from 3.24.2 to 3.26.0

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


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

ASF GitHub Bot commented on MDEP-920:
-

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




> Bump org.assertj:assertj-core from 3.24.2 to 3.26.0
> ---
>
> Key: MDEP-920
> URL: https://issues.apache.org/jira/browse/MDEP-920
> Project: Maven Dependency Plugin
>  Issue Type: Dependency upgrade
>Reporter: Slawomir Jaranowski
>Assignee: Slawomir Jaranowski
>Priority: Major
> Fix For: 3.7.0
>
>




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


[jira] [Commented] (MPIR-457) Upgrade to Parent 42 and Maven 3.6.3

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


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

ASF GitHub Bot commented on MPIR-457:
-

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


##
pom.xml:
##
@@ -184,7 +177,7 @@ under the License.
 
   org.apache.maven.shared
   maven-dependency-tree
-  3.2.1
+  3.3.0

Review Comment:
   Yes, i know, but that is a separate issue and I have no clue how to do that. 
I'd appreciate a PR for it.





> Upgrade to Parent 42 and Maven 3.6.3
> 
>
> Key: MPIR-457
> URL: https://issues.apache.org/jira/browse/MPIR-457
> Project: Maven Project Info Reports Plugin
>  Issue Type: Dependency upgrade
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.6.0
>
>




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


[jira] [Commented] (MPIR-457) Upgrade to Parent 42 and Maven 3.6.3

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


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

ASF GitHub Bot commented on MPIR-457:
-

slawekjaranowski commented on code in PR #66:
URL: 
https://github.com/apache/maven-project-info-reports-plugin/pull/66#discussion_r1620118429


##
pom.xml:
##
@@ -184,7 +177,7 @@ under the License.
 
   org.apache.maven.shared
   maven-dependency-tree
-  3.2.1
+  3.3.0

Review Comment:
   We should drop it and use Resolver ... but can be done as separate issue





> Upgrade to Parent 42 and Maven 3.6.3
> 
>
> Key: MPIR-457
> URL: https://issues.apache.org/jira/browse/MPIR-457
> Project: Maven Project Info Reports Plugin
>  Issue Type: Dependency upgrade
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.6.0
>
>




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


[jira] [Commented] (MDEP-710) reenable TestTreeMojo

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


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

ASF GitHub Bot commented on MDEP-710:
-

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




> reenable TestTreeMojo
> -
>
> Key: MDEP-710
> URL: https://issues.apache.org/jira/browse/MDEP-710
> Project: Maven Dependency Plugin
>  Issue Type: Test
>  Components: tree
>Reporter: Elliotte Rusty Harold
>Assignee: Slawomir Jaranowski
>Priority: Major
>  Labels: up-for-grabs
>
> comment says " tests disabled during MDEP-339 work, to be reactivated" but 
> MDEP-339 is closed



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


[jira] [Commented] (SUREFIRE-2244) Make IT for SUREFIRE-1295 reliable

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


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

ASF GitHub Bot commented on SUREFIRE-2244:
--

michael-o merged PR #741:
URL: https://github.com/apache/maven-surefire/pull/741




> Make IT for SUREFIRE-1295 reliable
> --
>
> Key: SUREFIRE-2244
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2244
> Project: Maven Surefire
>  Issue Type: Task
>Affects Versions: 3.2.5
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.2.6
>
>
> The IT in SUREFIRE-1295 uses 
> [this|https://github.com/michaeltandy/crashjvm/blob/master/src/main/java/uk/me/mjt/FindLibrary.java]
>  small native library to perform checking, but this lib is only availabe for 
> Windows/amd64, Linux/amd64 and macOS/amd64. While there is an assume for the 
> OS, it does not check the arch at all. {{macos-latest}} in GH Actions now 
> uses arm64 only: https://github.com/actions/runner-images/issues/9741. Thus, 
> the IT fails for an incomplete assumption. We should remove the assumption, 
> run the test and check for:
> * java.lang.RuntimeException: Unrecognised OS
> * java.lang.RuntimeException: Unrecognised arch
> and the verify tha actual output/crash.



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


[jira] [Commented] (SUREFIRE-2244) Make IT for SUREFIRE-1295 reliable

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


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

ASF GitHub Bot commented on SUREFIRE-2244:
--

michael-o merged PR #741:
URL: https://github.com/apache/maven-surefire/pull/741




> Make IT for SUREFIRE-1295 reliable
> --
>
> Key: SUREFIRE-2244
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2244
> Project: Maven Surefire
>  Issue Type: Task
>Affects Versions: 3.2.5
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.2.6
>
>
> The IT in SUREFIRE-1295 uses 
> [this|https://github.com/michaeltandy/crashjvm/blob/master/src/main/java/uk/me/mjt/FindLibrary.java]
>  small native library to perform checking, but this lib is only availabe for 
> Windows/amd64, Linux/amd64 and macOS/amd64. While there is an assume for the 
> OS, it does not check the arch at all. {{macos-latest}} in GH Actions now 
> uses arm64 only: https://github.com/actions/runner-images/issues/9741. Thus, 
> the IT fails for an incomplete assumption. We should remove the assumption, 
> run the test and check for:
> * java.lang.RuntimeException: Unrecognised OS
> * java.lang.RuntimeException: Unrecognised arch
> and the verify tha actual output/crash.



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


[jira] [Commented] (MDEP-710) reenable TestTreeMojo

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


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

ASF GitHub Bot commented on MDEP-710:
-

slawekjaranowski opened a new pull request, #396:
URL: https://github.com/apache/maven-dependency-plugin/pull/396

   https://issues.apache.org/jira/browse/MDEP-710




> reenable TestTreeMojo
> -
>
> Key: MDEP-710
> URL: https://issues.apache.org/jira/browse/MDEP-710
> Project: Maven Dependency Plugin
>  Issue Type: Test
>  Components: tree
>Reporter: Elliotte Rusty Harold
>Assignee: Slawomir Jaranowski
>Priority: Major
>  Labels: up-for-grabs
>
> comment says " tests disabled during MDEP-339 work, to be reactivated" but 
> MDEP-339 is closed



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


[jira] [Commented] (MPIR-457) Upgrade to Parent 42 and Maven 3.6.3

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


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

ASF GitHub Bot commented on MPIR-457:
-

michael-o opened a new pull request, #66:
URL: https://github.com/apache/maven-project-info-reports-plugin/pull/66

   This closes #66
   
   Following this checklist to help us incorporate your 
   contribution quickly and easily:
   
- [ ] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/MPIR) filed 
  for the change (usually before you start working on it).  Trivial 
changes like typos do not 
  require a JIRA issue.  Your pull request should address just this 
issue, without 
  pulling in other changes.
- [ ] Each commit in the pull request should have a meaningful subject line 
and body.
- [ ] Format the pull request title like `[MPIR-XXX] - Fixes bug in 
ApproximateQuantiles`,
  where you replace `MPIR-XXX` with the appropriate JIRA issue. Best 
practice
  is to use the JIRA issue title in the pull request title and in the 
first line of the 
  commit message.
- [ ] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
- [ ] Run `mvn clean verify` to make sure basic checks pass. A more 
thorough check will 
  be performed on your pull request automatically.
- [ ] You have run the integration tests successfully (`mvn -Prun-its clean 
verify`).
   
   If your pull request is about ~20 lines of code you don't need to sign an
   [Individual Contributor License 
Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
   please ask on the developers list.
   
   To make clear that you license your contribution under 
   the [Apache License Version 2.0, January 
2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
- [ ] I hereby declare this contribution to be licenced under the [Apache 
License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   
- [ ] In any other case, please file an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   




> Upgrade to Parent 42 and Maven 3.6.3
> 
>
> Key: MPIR-457
> URL: https://issues.apache.org/jira/browse/MPIR-457
> Project: Maven Project Info Reports Plugin
>  Issue Type: Dependency upgrade
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 3.6.0
>
>




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


[jira] [Commented] (SUREFIRE-2244) Make IT for SUREFIRE-1295 reliable

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


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

ASF GitHub Bot commented on SUREFIRE-2244:
--

michael-o opened a new pull request, #741:
URL: https://github.com/apache/maven-surefire/pull/741

   Following this checklist to help us incorporate your 
   contribution quickly and easily:
   
- [ ] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/SUREFIRE) filed 
  for the change (usually before you start working on it).  Trivial 
changes like typos do not 
  require a JIRA issue.  Your pull request should address just this 
issue, without 
  pulling in other changes.
- [ ] Each commit in the pull request should have a meaningful subject line 
and body.
- [ ] Format the pull request title like `[SUREFIRE-XXX] - Fixes bug in 
ApproximateQuantiles`,
  where you replace `SUREFIRE-XXX` with the appropriate JIRA issue. 
Best practice
  is to use the JIRA issue title in the pull request title and in the 
first line of the 
  commit message.
- [ ] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
- [ ] Run `mvn clean install` to make sure basic checks pass. A more 
thorough check will 
  be performed on your pull request automatically.
- [ ] You have run the integration tests successfully (`mvn -Prun-its clean 
install`).
   
   If your pull request is about ~20 lines of code you don't need to sign an
   [Individual Contributor License 
Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
   please ask on the developers list.
   
   To make clear that you license your contribution under 
   the [Apache License Version 2.0, January 
2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
- [ ] I hereby declare this contribution to be licenced under the [Apache 
License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   
- [ ] In any other case, please file an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).
   




> Make IT for SUREFIRE-1295 reliable
> --
>
> Key: SUREFIRE-2244
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2244
> Project: Maven Surefire
>  Issue Type: Task
>Affects Versions: 3.2.5
>Reporter: Michael Osipov
>Priority: Major
>
> The IT in SUREFIRE-1295 uses 
> [this|https://github.com/michaeltandy/crashjvm/blob/master/src/main/java/uk/me/mjt/FindLibrary.java]
>  small native library to perform checking, but this lib is only availabe for 
> Windows/amd64, Linux/amd64 and macOS/amd64. While there is an assume for the 
> OS, it does not check the arch at all. {{macos-latest}} in GH Actions now 
> uses arm64 only: https://github.com/actions/runner-images/issues/9741. Thus, 
> the IT fails for an incomplete assumption. We should remove the assumption, 
> run the test and check for:
> * java.lang.RuntimeException: Unrecognised OS
> * java.lang.RuntimeException: Unrecognised arch
> and the verify tha actual output/crash.



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


[jira] [Commented] (MBUILDCACHE-87) Checksum should consider plugin dependencies

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


[ 
https://issues.apache.org/jira/browse/MBUILDCACHE-87?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17850420#comment-17850420
 ] 

ASF GitHub Bot commented on MBUILDCACHE-87:
---

reda-alaoui commented on PR #146:
URL: 
https://github.com/apache/maven-build-cache-extension/pull/146#issuecomment-2137792088

   @AlexanderAshitkin can you take a look again?




> Checksum should consider plugin dependencies
> 
>
> Key: MBUILDCACHE-87
> URL: https://issues.apache.org/jira/browse/MBUILDCACHE-87
> Project: Maven Build Cache Extension
>  Issue Type: Improvement
>Reporter: Réda Housni Alaoui
>Priority: Major
>  Labels: pull-request-available
>
> I have a multi module project where module A is used as a dependency of 
> maven-dependency-plugin:unpack declared in module B.
> {{buildinfo.xml}} of module B does not consider module A as a dependency.
> Maybe something similar to 
> https://github.com/apache/maven-build-cache-extension/blob/6eb05e61fdfa7be1ad44cf6afc13958b0c6ea4a6/src/main/java/org/apache/maven/buildcache/checksum/MavenProjectInput.java#L602
>  should be added for plugin dependencies?



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


[jira] [Commented] (MNGSITE-393) Remove references to Maven 2.x

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


[ 
https://issues.apache.org/jira/browse/MNGSITE-393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17850377#comment-17850377
 ] 

ASF GitHub Bot commented on MNGSITE-393:


elharo merged PR #533:
URL: https://github.com/apache/maven-site/pull/533




> Remove references to Maven 2.x
> --
>
> Key: MNGSITE-393
> URL: https://issues.apache.org/jira/browse/MNGSITE-393
> Project: Maven Project Web Site
>  Issue Type: Improvement
>Reporter: Elliotte Rusty Harold
>Assignee: Elliotte Rusty Harold
>Priority: Major
>  Time Spent: 4h
>  Remaining Estimate: 0h
>
> Maven 3.x is over a decade old now and we're talking about Maven 4. It's time 
> to clean out all the random discussion here and there about how Maven 2.x did 
> things, differences between Maven 2 and 3, what works in Maven 3 but not 2, 
> etc. 
> Assume Maven 3.0 as the minimum, probably Maven 3.1.



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


[jira] [Commented] (MNGSITE-393) Remove references to Maven 2.x

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


[ 
https://issues.apache.org/jira/browse/MNGSITE-393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17850376#comment-17850376
 ] 

ASF GitHub Bot commented on MNGSITE-393:


elharo merged PR #534:
URL: https://github.com/apache/maven-site/pull/534




> Remove references to Maven 2.x
> --
>
> Key: MNGSITE-393
> URL: https://issues.apache.org/jira/browse/MNGSITE-393
> Project: Maven Project Web Site
>  Issue Type: Improvement
>Reporter: Elliotte Rusty Harold
>Assignee: Elliotte Rusty Harold
>Priority: Major
>  Time Spent: 4h
>  Remaining Estimate: 0h
>
> Maven 3.x is over a decade old now and we're talking about Maven 4. It's time 
> to clean out all the random discussion here and there about how Maven 2.x did 
> things, differences between Maven 2 and 3, what works in Maven 3 but not 2, 
> etc. 
> Assume Maven 3.0 as the minimum, probably Maven 3.1.



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


[jira] [Commented] (MNGSITE-393) Remove references to Maven 2.x

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


[ 
https://issues.apache.org/jira/browse/MNGSITE-393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17850358#comment-17850358
 ] 

ASF GitHub Bot commented on MNGSITE-393:


elharo opened a new pull request, #534:
URL: https://github.com/apache/maven-site/pull/534

   also, subject verb agreement




> Remove references to Maven 2.x
> --
>
> Key: MNGSITE-393
> URL: https://issues.apache.org/jira/browse/MNGSITE-393
> Project: Maven Project Web Site
>  Issue Type: Improvement
>Reporter: Elliotte Rusty Harold
>Assignee: Elliotte Rusty Harold
>Priority: Major
>  Time Spent: 4h
>  Remaining Estimate: 0h
>
> Maven 3.x is over a decade old now and we're talking about Maven 4. It's time 
> to clean out all the random discussion here and there about how Maven 2.x did 
> things, differences between Maven 2 and 3, what works in Maven 3 but not 2, 
> etc. 
> Assume Maven 3.0 as the minimum, probably Maven 3.1.



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


[jira] [Commented] (MNGSITE-393) Remove references to Maven 2.x

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


[ 
https://issues.apache.org/jira/browse/MNGSITE-393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17850352#comment-17850352
 ] 

ASF GitHub Bot commented on MNGSITE-393:


elharo opened a new pull request, #533:
URL: https://github.com/apache/maven-site/pull/533

   (no comment)




> Remove references to Maven 2.x
> --
>
> Key: MNGSITE-393
> URL: https://issues.apache.org/jira/browse/MNGSITE-393
> Project: Maven Project Web Site
>  Issue Type: Improvement
>Reporter: Elliotte Rusty Harold
>Assignee: Elliotte Rusty Harold
>Priority: Major
>  Time Spent: 4h
>  Remaining Estimate: 0h
>
> Maven 3.x is over a decade old now and we're talking about Maven 4. It's time 
> to clean out all the random discussion here and there about how Maven 2.x did 
> things, differences between Maven 2 and 3, what works in Maven 3 but not 2, 
> etc. 
> Assume Maven 3.0 as the minimum, probably Maven 3.1.



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


[jira] [Commented] (MNG-8097) Validate that each dependency->type is a type registered in an artifact handler

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


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

ASF GitHub Bot commented on MNG-8097:
-

kwin commented on code in PR #529:
URL: https://github.com/apache/maven-site/pull/529#discussion_r1617266482


##
content/apt/pom.apt.vm:
##
@@ -271,13 +271,20 @@ mvn install:install-file -Dfile=non-maven-proj.jar 
-DgroupId=some.group -Dartifa
   you browse the Maven central repository, you will notice that the 
classifiers <<>> and <<>> are used
   to deploy the project source code and API docs along with the packaged class 
files.
 
+  The classifier may also be derived from the <> in case the related 
{{{/ref/current/maven-core/artifact-handlers.html} artifact handler}} defines 
one.
+
   * <>:\
   Corresponds to the chosen dependency type. This defaults to <<>>. While 
it usually represents
-  the extension on the filename of the dependency, that is not always the 
case: a type can be mapped to a
+  the extension of the referenced artifact, that is not always the case: a 
type can be mapped to a
   different extension and a classifier. The type often corresponds to the 
packaging used, though this is
   also not always the case. Some examples are <<>>, <<>> and 
<<>>:
   see {{{/ref/current/maven-core/artifact-handlers.html}default artifact 
handlers}} for a list. New types can be
   defined by plugins that set <<>> to true, so this is not a 
complete list.
+  
+  In case there is an artifact handler defined there are  different ways 
of referencing the same dependency:

Review Comment:
   > by removal of "filename", the term "extension" is suddenly changing it's 
meaning (maven extension? this was my first thought while trying to comprehend 
the message)
   
   you kind of said the opposite in 
https://github.com/apache/maven/pull/1466#issuecomment-2054144734. This is the 
extension of the artifact which is not necessarily the extension of the 
filename!
   
   >> The depensency extension is told by type. Deoendency is never "anywhere 
on disk", it may come from repo only.
   
   or in https://github.com/apache/maven/pull/1466#issuecomment-2054145589
   
   >> It is artifact that you need to inspect, not the backing file.
   yes, good catch will fix.
   
   > I find this very confusing all in all. Type is type, why do you want to 
mixin here file extension
   
   First of all, there was a mention of file extension before this PR, with 
this PR I only refer to artifact extension (do you find this part 
confusing???). This PR rather clarifies that there may be two ways to reference 
the same artifact, examples:
   
   1.  ```
   
 org.project
 reusable-test-support
 1.0
 tests
   
   ```
   vs.
   ```
   
 org.project
 reusable-test-support
 1.0
 test-jar
   
   2.  ```
   
 org.project
 my-osgi-bundle
 1.0
   
   ```
   vs.
   ```
   
 org.project
 my-osgi-bundle
 1.0
 bundle  Validate that each dependency->type is a type registered in an artifact 
> handler
> ---
>
> Key: MNG-8097
> URL: https://issues.apache.org/jira/browse/MNG-8097
> Project: Maven
>  Issue Type: New Feature
>Reporter: Konrad Windszus
>Priority: Major
>
> Currently often the dependency's type is being set to the extension and the 
> resolution is lenient, i.e. if there is no artifact handler defining the 
> value given in {{dependency->type}} resolution transparently uses the type as 
> extension.
> That can potentially lead to two issues:
> 1. Resolution might fail with surprising error messages like
> {code}
> Could not resolve dependencies for project : The following artifacts 
> could not be resolved: : Could not transfer artifact 
> ::: from/to ...
> {code}
> This is an issue for all types not defined by Maven Core itself, e.g. for 
> https://jackrabbit.apache.org/filevault-package-maven-plugin/index.html which 
> registers an artifact handler for type {{content-package}} with extension 
> {{zip}}.
> 2. The information {{addedToClasspath}}, {{includesDependencies}} and 
> {{classifier}} from the artifact handler is not evaluated
> Compare with 
> https://maven.apache.org/repositories/artifacts.html#but-where-do-i-set-artifact-extension



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


[jira] [Commented] (MNG-8097) Validate that each dependency->type is a type registered in an artifact handler

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


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

ASF GitHub Bot commented on MNG-8097:
-

kwin commented on code in PR #529:
URL: https://github.com/apache/maven-site/pull/529#discussion_r1617266482


##
content/apt/pom.apt.vm:
##
@@ -271,13 +271,20 @@ mvn install:install-file -Dfile=non-maven-proj.jar 
-DgroupId=some.group -Dartifa
   you browse the Maven central repository, you will notice that the 
classifiers <<>> and <<>> are used
   to deploy the project source code and API docs along with the packaged class 
files.
 
+  The classifier may also be derived from the <> in case the related 
{{{/ref/current/maven-core/artifact-handlers.html} artifact handler}} defines 
one.
+
   * <>:\
   Corresponds to the chosen dependency type. This defaults to <<>>. While 
it usually represents
-  the extension on the filename of the dependency, that is not always the 
case: a type can be mapped to a
+  the extension of the referenced artifact, that is not always the case: a 
type can be mapped to a
   different extension and a classifier. The type often corresponds to the 
packaging used, though this is
   also not always the case. Some examples are <<>>, <<>> and 
<<>>:
   see {{{/ref/current/maven-core/artifact-handlers.html}default artifact 
handlers}} for a list. New types can be
   defined by plugins that set <<>> to true, so this is not a 
complete list.
+  
+  In case there is an artifact handler defined there are  different ways 
of referencing the same dependency:

Review Comment:
   > by removal of "filename", the term "extension" is suddenly changing it's 
meaning (maven extension? this was my first thought while trying to comprehend 
the message)
   
   you kind of said the opposite in 
https://github.com/apache/maven/pull/1466#issuecomment-2054144734. This is the 
extension of the artifact which is not necessarily the extension of the 
filename!
   
   >> The depensency extension is told by type. Deoendency is never "anywhere 
on disk", it may come from repo only.
   
   > did you maybe mix up the "former and latter"?
   
   yes, good catch will fix.
   
   > I find this very confusing all in all. Type is type, why do you want to 
mixin here file extension
   
   First of all, there was a mention of file extension before this PR, with 
this PR I only refer to artifact extension (do you find this part 
confusing???). This PR rather clarifies that there may be two ways to reference 
the same artifact, examples:
   
   1.  ```
   
 org.project
 reusable-test-support
 1.0
 tests
   
   ```
   vs.
   ```
   
 org.project
 reusable-test-support
 1.0
 test-jar
   
   2.  ```
   
 org.project
 my-osgi-bundle
 1.0
   
   ```
   vs.
   ```
   
 org.project
 my-osgi-bundle
 1.0
 bundle  Validate that each dependency->type is a type registered in an artifact 
> handler
> ---
>
> Key: MNG-8097
> URL: https://issues.apache.org/jira/browse/MNG-8097
> Project: Maven
>  Issue Type: New Feature
>Reporter: Konrad Windszus
>Priority: Major
>
> Currently often the dependency's type is being set to the extension and the 
> resolution is lenient, i.e. if there is no artifact handler defining the 
> value given in {{dependency->type}} resolution transparently uses the type as 
> extension.
> That can potentially lead to two issues:
> 1. Resolution might fail with surprising error messages like
> {code}
> Could not resolve dependencies for project : The following artifacts 
> could not be resolved: : Could not transfer artifact 
> ::: from/to ...
> {code}
> This is an issue for all types not defined by Maven Core itself, e.g. for 
> https://jackrabbit.apache.org/filevault-package-maven-plugin/index.html which 
> registers an artifact handler for type {{content-package}} with extension 
> {{zip}}.
> 2. The information {{addedToClasspath}}, {{includesDependencies}} and 
> {{classifier}} from the artifact handler is not evaluated
> Compare with 
> https://maven.apache.org/repositories/artifacts.html#but-where-do-i-set-artifact-extension



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


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

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


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

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

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




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



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


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

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


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

ASF GitHub Bot commented on MPLUGIN-526:


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

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




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



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


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

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


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

ASF GitHub Bot commented on MPLUGIN-526:


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

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




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



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


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

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


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

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

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

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




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



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


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

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


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

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

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




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



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


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

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


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

ASF GitHub Bot commented on MPLUGIN-526:


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

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




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



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


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

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


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

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

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


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

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





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



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


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

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


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

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

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


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

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





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



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


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

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


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

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

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


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

Review Comment:
   pushed update



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

Review Comment:
   pushed update





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



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


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

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


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

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

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


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

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





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



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


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

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


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

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

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


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

Review Comment:
   Yes, these are files.





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



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


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

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


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

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

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


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

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





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



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


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

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


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

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

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


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

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





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



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


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

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


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

ASF GitHub Bot commented on MPLUGIN-526:


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

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




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



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


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

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


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

ASF GitHub Bot commented on MPLUGIN-526:


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




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



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


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

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


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

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

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




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



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


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

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


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

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

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

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




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



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


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

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


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

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

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

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




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



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


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

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


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

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

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

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




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



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


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

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


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

ASF GitHub Bot commented on MJAVADOC-795:
-

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




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




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


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

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


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

ASF GitHub Bot commented on MDEP-923:
-

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




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



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


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

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


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

ASF GitHub Bot commented on MPLUGIN-526:


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

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

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



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


  1   2   3   4   5   6   7   8   9   10   >