Re: [PR] Bump org.apache.groovy:groovy from 4.0.18 to 4.0.20 [maven-script-interpreter]

2024-03-21 Thread via GitHub


dependabot[bot] merged PR #108:
URL: https://github.com/apache/maven-script-interpreter/pull/108


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

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

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



[jira] [Commented] (MJAR-62) Build-Jdk in Manifest.mf does not reflect which compiler version actually compiled the classes in the jar

2024-03-21 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MJAR-62:


elharo commented on code in PR #73:
URL: https://github.com/apache/maven-jar-plugin/pull/73#discussion_r1534812073


##
src/main/java/org/apache/maven/plugins/jar/ToolchainsJdkSpecification.java:
##
@@ -0,0 +1,93 @@
+/*
+ * 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.jar;
+
+import javax.inject.Named;
+import javax.inject.Singleton;
+
+import java.io.IOException;
+import java.io.UncheckedIOException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Optional;
+
+import org.apache.maven.toolchain.Toolchain;
+import org.codehaus.plexus.util.cli.CommandLineException;
+import org.codehaus.plexus.util.cli.CommandLineUtils;
+import org.codehaus.plexus.util.cli.Commandline;
+
+/**
+ * Component provided JDK specification based on toolchains.
+ */
+@Named
+@Singleton
+class ToolchainsJdkSpecification {
+
+private final Map cache = new HashMap<>();
+
+public synchronized Optional getJDKSpecification(Toolchain 
toolchain) {
+Optional javaCPath = getJavaCPath(toolchain);
+return javaCPath.map(path -> cache.computeIfAbsent(path, 
this::getSpecForPath));
+}
+
+private Optional getJavaCPath(Toolchain toolchain) {
+return 
Optional.ofNullable(toolchain.findTool("javac")).map(Paths::get).map(this::getCanonicalPath);
+}
+
+private Path getCanonicalPath(Path path) {
+try {
+return path.toRealPath();
+} catch (IOException e) {
+if (path.getParent() != null) {
+return 
getCanonicalPath(path.getParent()).resolve(path.getFileName());
+} else {
+throw new UncheckedIOException(e);
+}
+}
+}
+
+private String getSpecForPath(Path path) {
+try {
+Commandline cl = new Commandline(path.toString());
+cl.createArg().setValue("-version");
+CommandLineUtils.StringStreamConsumer out = new 
CommandLineUtils.StringStreamConsumer();
+CommandLineUtils.StringStreamConsumer err = new 
CommandLineUtils.StringStreamConsumer();
+CommandLineUtils.executeCommandLine(cl, out, err);
+String version = out.getOutput().trim();
+if (version.isEmpty()) {
+version = err.getOutput().trim();
+}
+if (version.startsWith("javac ")) {
+version = version.substring(6);
+if (version.startsWith("1.")) {
+version = version.substring(0, 3);
+} else {
+version = version.substring(0, 2);
+}
+return version;
+} else {
+return null;
+}
+} catch (CommandLineException e) {
+throw new RuntimeException(e);

Review Comment:
   The tail is wagging the dog. If this needs to be a checked exception, then 
it should be a checked exception. You don't have to use lambdas.
   
   If it should be a runtime exception, it should still be a subclass, not 
java.lang.RuntimeException, though in this case it really does look like 
checked exception is the way to go. 





> Build-Jdk in Manifest.mf does not reflect which compiler version actually 
> compiled the classes in the jar
> -
>
> Key: MJAR-62
> URL: https://issues.apache.org/jira/browse/MJAR-62
> Project: Maven JAR Plugin
>  Issue Type: Bug
>Reporter: Stefan Magnus Landrø
>Assignee: Slawomir Jaranowski
>Priority: Major
> Fix For: 3.4.0
>
> Attachments: example-app.zip
>
>
> Manifest.mf does not reflect the version of the compiler that built the jar, 
> but defaults to the version that maven runs under:  Build-Jdk: 
> ${java.version}.
> I believe this makes 

Re: [PR] [MJAR-62] Set Build-Jdk according to used toolchain [maven-jar-plugin]

2024-03-21 Thread via GitHub


elharo commented on code in PR #73:
URL: https://github.com/apache/maven-jar-plugin/pull/73#discussion_r1534812073


##
src/main/java/org/apache/maven/plugins/jar/ToolchainsJdkSpecification.java:
##
@@ -0,0 +1,93 @@
+/*
+ * 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.jar;
+
+import javax.inject.Named;
+import javax.inject.Singleton;
+
+import java.io.IOException;
+import java.io.UncheckedIOException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Optional;
+
+import org.apache.maven.toolchain.Toolchain;
+import org.codehaus.plexus.util.cli.CommandLineException;
+import org.codehaus.plexus.util.cli.CommandLineUtils;
+import org.codehaus.plexus.util.cli.Commandline;
+
+/**
+ * Component provided JDK specification based on toolchains.
+ */
+@Named
+@Singleton
+class ToolchainsJdkSpecification {
+
+private final Map cache = new HashMap<>();
+
+public synchronized Optional getJDKSpecification(Toolchain 
toolchain) {
+Optional javaCPath = getJavaCPath(toolchain);
+return javaCPath.map(path -> cache.computeIfAbsent(path, 
this::getSpecForPath));
+}
+
+private Optional getJavaCPath(Toolchain toolchain) {
+return 
Optional.ofNullable(toolchain.findTool("javac")).map(Paths::get).map(this::getCanonicalPath);
+}
+
+private Path getCanonicalPath(Path path) {
+try {
+return path.toRealPath();
+} catch (IOException e) {
+if (path.getParent() != null) {
+return 
getCanonicalPath(path.getParent()).resolve(path.getFileName());
+} else {
+throw new UncheckedIOException(e);
+}
+}
+}
+
+private String getSpecForPath(Path path) {
+try {
+Commandline cl = new Commandline(path.toString());
+cl.createArg().setValue("-version");
+CommandLineUtils.StringStreamConsumer out = new 
CommandLineUtils.StringStreamConsumer();
+CommandLineUtils.StringStreamConsumer err = new 
CommandLineUtils.StringStreamConsumer();
+CommandLineUtils.executeCommandLine(cl, out, err);
+String version = out.getOutput().trim();
+if (version.isEmpty()) {
+version = err.getOutput().trim();
+}
+if (version.startsWith("javac ")) {
+version = version.substring(6);
+if (version.startsWith("1.")) {
+version = version.substring(0, 3);
+} else {
+version = version.substring(0, 2);
+}
+return version;
+} else {
+return null;
+}
+} catch (CommandLineException e) {
+throw new RuntimeException(e);

Review Comment:
   The tail is wagging the dog. If this needs to be a checked exception, then 
it should be a checked exception. You don't have to use lambdas.
   
   If it should be a runtime exception, it should still be a subclass, not 
java.lang.RuntimeException, though in this case it really does look like 
checked exception is the way to go. 



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

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

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



[jira] [Created] (MDEP-912) Use version for plexus-utils/plexus-xml from parent

2024-03-21 Thread Slawomir Jaranowski (Jira)
Slawomir Jaranowski created MDEP-912:


 Summary: Use version for plexus-utils/plexus-xml  from parent
 Key: MDEP-912
 URL: https://issues.apache.org/jira/browse/MDEP-912
 Project: Maven Dependency Plugin
  Issue Type: Dependency upgrade
Reporter: Slawomir Jaranowski
Assignee: Slawomir Jaranowski
 Fix For: 3.6.2






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


[jira] [Commented] (MDEP-912) Use version for plexus-utils/plexus-xml from parent

2024-03-21 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MDEP-912:
-

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

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




> Use version for plexus-utils/plexus-xml  from parent
> 
>
> Key: MDEP-912
> URL: https://issues.apache.org/jira/browse/MDEP-912
> Project: Maven Dependency Plugin
>  Issue Type: Task
>Reporter: Slawomir Jaranowski
>Assignee: Slawomir Jaranowski
>Priority: Major
> Fix For: 3.6.2
>
>




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


[jira] [Updated] (MDEP-912) Use version for plexus-utils/plexus-xml from parent

2024-03-21 Thread Slawomir Jaranowski (Jira)


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

Slawomir Jaranowski updated MDEP-912:
-
Issue Type: Task  (was: Dependency upgrade)

> Use version for plexus-utils/plexus-xml  from parent
> 
>
> Key: MDEP-912
> URL: https://issues.apache.org/jira/browse/MDEP-912
> Project: Maven Dependency Plugin
>  Issue Type: Task
>Reporter: Slawomir Jaranowski
>Assignee: Slawomir Jaranowski
>Priority: Major
> Fix For: 3.6.2
>
>




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


[jira] [Closed] (MDEP-911) Bump org.codehaus.plexus:plexus-archiver from 4.8.0 to 4.9.2

2024-03-21 Thread Slawomir Jaranowski (Jira)


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

Slawomir Jaranowski closed MDEP-911.

  Assignee: Slawomir Jaranowski
Resolution: Fixed

> Bump org.codehaus.plexus:plexus-archiver from 4.8.0 to 4.9.2
> 
>
> Key: MDEP-911
> URL: https://issues.apache.org/jira/browse/MDEP-911
> Project: Maven Dependency Plugin
>  Issue Type: Dependency upgrade
>Reporter: Slawomir Jaranowski
>Assignee: Slawomir Jaranowski
>Priority: Major
> Fix For: 3.6.2
>
>




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


[jira] [Created] (MDEP-911) Bump org.codehaus.plexus:plexus-archiver from 4.8.0 to 4.9.2

2024-03-21 Thread Slawomir Jaranowski (Jira)
Slawomir Jaranowski created MDEP-911:


 Summary: Bump org.codehaus.plexus:plexus-archiver from 4.8.0 to 
4.9.2
 Key: MDEP-911
 URL: https://issues.apache.org/jira/browse/MDEP-911
 Project: Maven Dependency Plugin
  Issue Type: Dependency upgrade
Reporter: Slawomir Jaranowski
 Fix For: 3.6.2






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


Re: [PR] Bump org.codehaus.plexus:plexus-archiver from 4.9.1 to 4.9.2 [maven-dependency-plugin]

2024-03-21 Thread via GitHub


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


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

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

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



Re: [PR] [MDEP-317] - add mojo to analyze invalid exclusions [maven-dependency-plugin]

2024-03-21 Thread via GitHub


vbreivik commented on PR #362:
URL: 
https://github.com/apache/maven-dependency-plugin/pull/362#issuecomment-2013903045

   > @vbreivik thanks for idea and PR ... I will try to review in a few days
   
   I cannot take credit for the idea. I just saw it in Jira and was a bit 
bored. :) 


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

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

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



Re: [PR] [MDEP-317] - add mojo to analyze invalid exclusions [maven-dependency-plugin]

2024-03-21 Thread via GitHub


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

   @vbreivik thanks for idea and PR ... I will try to review in a few days


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

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

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



Re: [PR] Remove Java 5 references and clean up [maven-toolchains-plugin]

2024-03-21 Thread via GitHub


slawekjaranowski commented on code in PR #24:
URL: 
https://github.com/apache/maven-toolchains-plugin/pull/24#discussion_r1534716255


##
src/site/apt/toolchains/custom.apt:
##
@@ -25,22 +25,22 @@
 
 Custom Toolchains
 
-  You can create your own custom toolchains with plugins using them.
+  You can create your own custom toolchains for plugins to use.

Review Comment:
   agree with @hboutemy - old sentence was more accurate for me also



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

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

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



[jira] [Assigned] (MCLEAN-116) Create interface method to catch exceptions

2024-03-21 Thread Slawomir Jaranowski (Jira)


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

Slawomir Jaranowski reassigned MCLEAN-116:
--

Assignee: Slawomir Jaranowski

> Create interface method to catch exceptions
> ---
>
> Key: MCLEAN-116
> URL: https://issues.apache.org/jira/browse/MCLEAN-116
> Project: Maven Clean Plugin
>  Issue Type: Improvement
>Affects Versions: 3.3.2
>Reporter: Matthias Bünger
>Assignee: Slawomir Jaranowski
>Priority: Minor
>
> As stated multiple times in the {{Cleaner}} class, the {{Logger}} interface 
> of this class does not provide a method to log exceptions and needs a 
> refactoring
> {code:java}
> // ...
> if (logDebug != null) {
> // TODO: this Logger interface cannot log exceptions and 
> needs refactoring
> logDebug.log("Unable to fast delete directory: " + e);
> }
> // ...
> private interface Logger {
> void log(CharSequence message);
> }
> {code}
> However: Many plugins, e.g. the javadoc-plugin or the pmg-plugin use the 
> {{org.apache.maven.plugin.logging.Log}} interface. Therefor using this 
> interface instead an own could be a better solution than adding a new method 
> to the interface in the {{Cleaner}} class.
> _This ticket was created to have this task in the issue tracker_



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


[jira] [Closed] (MPOM-474) Bump org.codehaus.mojo:extra-enforcer-rules from 1.7.0 to 1.8.0

2024-03-21 Thread Slawomir Jaranowski (Jira)


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

Slawomir Jaranowski closed MPOM-474.

Resolution: Fixed

> Bump org.codehaus.mojo:extra-enforcer-rules from 1.7.0 to 1.8.0
> ---
>
> Key: MPOM-474
> URL: https://issues.apache.org/jira/browse/MPOM-474
> Project: Maven POMs
>  Issue Type: Dependency upgrade
>  Components: maven
>Reporter: Slawomir Jaranowski
>Priority: Major
> Fix For: MAVEN-42
>
>




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


Re: [PR] [MPOM-474] Bump org.codehaus.mojo:extra-enforcer-rules from 1.7.0 to 1.8.0 [maven-parent]

2024-03-21 Thread via GitHub


slawekjaranowski merged PR #166:
URL: https://github.com/apache/maven-parent/pull/166


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

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

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



[jira] [Created] (MPOM-474) Bump org.codehaus.mojo:extra-enforcer-rules from 1.7.0 to 1.8.0

2024-03-21 Thread Slawomir Jaranowski (Jira)
Slawomir Jaranowski created MPOM-474:


 Summary: Bump org.codehaus.mojo:extra-enforcer-rules from 1.7.0 to 
1.8.0
 Key: MPOM-474
 URL: https://issues.apache.org/jira/browse/MPOM-474
 Project: Maven POMs
  Issue Type: Dependency upgrade
  Components: maven
Reporter: Slawomir Jaranowski
 Fix For: MAVEN-42






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


[jira] [Closed] (MPOM-473) Bump org.cyclonedx:cyclonedx-maven-plugin from 2.7.10 to 2.7.11

2024-03-21 Thread Slawomir Jaranowski (Jira)


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

Slawomir Jaranowski closed MPOM-473.

Resolution: Fixed

> Bump org.cyclonedx:cyclonedx-maven-plugin from 2.7.10 to 2.7.11
> ---
>
> Key: MPOM-473
> URL: https://issues.apache.org/jira/browse/MPOM-473
> Project: Maven POMs
>  Issue Type: Dependency upgrade
>  Components: maven
>Reporter: Slawomir Jaranowski
>Priority: Major
> Fix For: MAVEN-42
>
>




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


Re: [PR] [MPOM-473] Bump org.cyclonedx:cyclonedx-maven-plugin from 2.7.10 to 2.7.11 [maven-parent]

2024-03-21 Thread via GitHub


slawekjaranowski merged PR #159:
URL: https://github.com/apache/maven-parent/pull/159


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

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

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



[jira] [Created] (MPOM-473) Bump org.cyclonedx:cyclonedx-maven-plugin from 2.7.10 to 2.7.11

2024-03-21 Thread Slawomir Jaranowski (Jira)
Slawomir Jaranowski created MPOM-473:


 Summary: Bump org.cyclonedx:cyclonedx-maven-plugin from 2.7.10 to 
2.7.11
 Key: MPOM-473
 URL: https://issues.apache.org/jira/browse/MPOM-473
 Project: Maven POMs
  Issue Type: Dependency upgrade
  Components: maven
Reporter: Slawomir Jaranowski
 Fix For: MAVEN-42






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


[jira] [Closed] (MPOM-472) Bump org.apache.maven.plugins:maven-gpg-plugin from 3.1.0 to 3.2.1

2024-03-21 Thread Slawomir Jaranowski (Jira)


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

Slawomir Jaranowski closed MPOM-472.

Resolution: Fixed

> Bump org.apache.maven.plugins:maven-gpg-plugin from 3.1.0 to 3.2.1
> --
>
> Key: MPOM-472
> URL: https://issues.apache.org/jira/browse/MPOM-472
> Project: Maven POMs
>  Issue Type: Dependency upgrade
>  Components: asf
>Reporter: Slawomir Jaranowski
>Priority: Major
> Fix For: ASF-32
>
>




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


Re: [PR] [MPOM-472] Bump org.apache.maven.plugins:maven-gpg-plugin from 3.1.0 to 3.2.1 [maven-apache-parent]

2024-03-21 Thread via GitHub


slawekjaranowski merged PR #200:
URL: https://github.com/apache/maven-apache-parent/pull/200


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

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

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



[PR] [MPOM-467] Remove old property maven.plugin.tools.version [maven-apache-parent]

2024-03-21 Thread via GitHub


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

   (no comment)


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

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

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



Re: [PR] - Removed negative logic [maven-invoker-plugin]

2024-03-21 Thread via GitHub


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


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

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

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



[jira] [Created] (MPOM-472) Bump org.apache.maven.plugins:maven-gpg-plugin from 3.1.0 to 3.2.1

2024-03-21 Thread Slawomir Jaranowski (Jira)
Slawomir Jaranowski created MPOM-472:


 Summary: Bump org.apache.maven.plugins:maven-gpg-plugin from 3.1.0 
to 3.2.1
 Key: MPOM-472
 URL: https://issues.apache.org/jira/browse/MPOM-472
 Project: Maven POMs
  Issue Type: Dependency upgrade
  Components: asf
Reporter: Slawomir Jaranowski
 Fix For: ASF-32






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


[jira] [Closed] (MPOM-471) Bump org.apache.maven.plugins:maven-assembly-plugin from 3.6.0 to 3.7.1

2024-03-21 Thread Slawomir Jaranowski (Jira)


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

Slawomir Jaranowski closed MPOM-471.

Resolution: Fixed

> Bump org.apache.maven.plugins:maven-assembly-plugin from 3.6.0 to 3.7.1
> ---
>
> Key: MPOM-471
> URL: https://issues.apache.org/jira/browse/MPOM-471
> Project: Maven POMs
>  Issue Type: Dependency upgrade
>  Components: asf
>Reporter: Slawomir Jaranowski
>Assignee: Slawomir Jaranowski
>Priority: Major
> Fix For: ASF-32
>
>




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


Re: [PR] [MPOM-471] Bump org.apache.maven.plugins:maven-assembly-plugin from 3.6.0 to 3.7.1 [maven-apache-parent]

2024-03-21 Thread via GitHub


slawekjaranowski merged PR #199:
URL: https://github.com/apache/maven-apache-parent/pull/199


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

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

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



[jira] [Commented] (MJAR-62) Build-Jdk in Manifest.mf does not reflect which compiler version actually compiled the classes in the jar

2024-03-21 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MJAR-62:


slawekjaranowski commented on code in PR #73:
URL: https://github.com/apache/maven-jar-plugin/pull/73#discussion_r1534663246


##
src/main/java/org/apache/maven/plugins/jar/ToolchainsJdkSpecification.java:
##
@@ -0,0 +1,93 @@
+/*
+ * 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.jar;
+
+import javax.inject.Named;
+import javax.inject.Singleton;
+
+import java.io.IOException;
+import java.io.UncheckedIOException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Optional;
+
+import org.apache.maven.toolchain.Toolchain;
+import org.codehaus.plexus.util.cli.CommandLineException;
+import org.codehaus.plexus.util.cli.CommandLineUtils;
+import org.codehaus.plexus.util.cli.Commandline;
+
+/**
+ * Component provided JDK specification based on toolchains.
+ */
+@Named
+@Singleton
+class ToolchainsJdkSpecification {
+
+private final Map cache = new HashMap<>();
+
+public synchronized Optional getJDKSpecification(Toolchain 
toolchain) {
+Optional javaCPath = getJavaCPath(toolchain);
+return javaCPath.map(path -> cache.computeIfAbsent(path, 
this::getSpecForPath));
+}
+
+private Optional getJavaCPath(Toolchain toolchain) {
+return 
Optional.ofNullable(toolchain.findTool("javac")).map(Paths::get).map(this::getCanonicalPath);
+}
+
+private Path getCanonicalPath(Path path) {
+try {
+return path.toRealPath();
+} catch (IOException e) {
+if (path.getParent() != null) {
+return 
getCanonicalPath(path.getParent()).resolve(path.getFileName());
+} else {
+throw new UncheckedIOException(e);
+}
+}
+}
+
+private String getSpecForPath(Path path) {
+try {
+Commandline cl = new Commandline(path.toString());
+cl.createArg().setValue("-version");
+CommandLineUtils.StringStreamConsumer out = new 
CommandLineUtils.StringStreamConsumer();
+CommandLineUtils.StringStreamConsumer err = new 
CommandLineUtils.StringStreamConsumer();
+CommandLineUtils.executeCommandLine(cl, out, err);
+String version = out.getOutput().trim();
+if (version.isEmpty()) {
+version = err.getOutput().trim();
+}
+if (version.startsWith("javac ")) {
+version = version.substring(6);
+if (version.startsWith("1.")) {
+version = version.substring(0, 3);
+} else {
+version = version.substring(0, 2);
+}
+return version;
+} else {
+return null;
+}
+} catch (CommandLineException e) {
+throw new RuntimeException(e);

Review Comment:
   method `getSpecForPath` is used in lambda so some of runtime exception is 
easier to handle it





> Build-Jdk in Manifest.mf does not reflect which compiler version actually 
> compiled the classes in the jar
> -
>
> Key: MJAR-62
> URL: https://issues.apache.org/jira/browse/MJAR-62
> Project: Maven JAR Plugin
>  Issue Type: Bug
>Reporter: Stefan Magnus Landrø
>Assignee: Slawomir Jaranowski
>Priority: Major
> Fix For: 3.4.0
>
> Attachments: example-app.zip
>
>
> Manifest.mf does not reflect the version of the compiler that built the jar, 
> but defaults to the version that maven runs under:  Build-Jdk: 
> ${java.version}.
> I believe this makes users uncertain of which compiler was actually used to 
> build the classes.



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


Re: [PR] [MJAR-62] Set Build-Jdk according to used toolchain [maven-jar-plugin]

2024-03-21 Thread via GitHub


slawekjaranowski commented on code in PR #73:
URL: https://github.com/apache/maven-jar-plugin/pull/73#discussion_r1534663246


##
src/main/java/org/apache/maven/plugins/jar/ToolchainsJdkSpecification.java:
##
@@ -0,0 +1,93 @@
+/*
+ * 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.jar;
+
+import javax.inject.Named;
+import javax.inject.Singleton;
+
+import java.io.IOException;
+import java.io.UncheckedIOException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Optional;
+
+import org.apache.maven.toolchain.Toolchain;
+import org.codehaus.plexus.util.cli.CommandLineException;
+import org.codehaus.plexus.util.cli.CommandLineUtils;
+import org.codehaus.plexus.util.cli.Commandline;
+
+/**
+ * Component provided JDK specification based on toolchains.
+ */
+@Named
+@Singleton
+class ToolchainsJdkSpecification {
+
+private final Map cache = new HashMap<>();
+
+public synchronized Optional getJDKSpecification(Toolchain 
toolchain) {
+Optional javaCPath = getJavaCPath(toolchain);
+return javaCPath.map(path -> cache.computeIfAbsent(path, 
this::getSpecForPath));
+}
+
+private Optional getJavaCPath(Toolchain toolchain) {
+return 
Optional.ofNullable(toolchain.findTool("javac")).map(Paths::get).map(this::getCanonicalPath);
+}
+
+private Path getCanonicalPath(Path path) {
+try {
+return path.toRealPath();
+} catch (IOException e) {
+if (path.getParent() != null) {
+return 
getCanonicalPath(path.getParent()).resolve(path.getFileName());
+} else {
+throw new UncheckedIOException(e);
+}
+}
+}
+
+private String getSpecForPath(Path path) {
+try {
+Commandline cl = new Commandline(path.toString());
+cl.createArg().setValue("-version");
+CommandLineUtils.StringStreamConsumer out = new 
CommandLineUtils.StringStreamConsumer();
+CommandLineUtils.StringStreamConsumer err = new 
CommandLineUtils.StringStreamConsumer();
+CommandLineUtils.executeCommandLine(cl, out, err);
+String version = out.getOutput().trim();
+if (version.isEmpty()) {
+version = err.getOutput().trim();
+}
+if (version.startsWith("javac ")) {
+version = version.substring(6);
+if (version.startsWith("1.")) {
+version = version.substring(0, 3);
+} else {
+version = version.substring(0, 2);
+}
+return version;
+} else {
+return null;
+}
+} catch (CommandLineException e) {
+throw new RuntimeException(e);

Review Comment:
   method `getSpecForPath` is used in lambda so some of runtime exception is 
easier to handle it



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

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

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



[jira] [Commented] (MJAR-62) Build-Jdk in Manifest.mf does not reflect which compiler version actually compiled the classes in the jar

2024-03-21 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MJAR-62:


slawekjaranowski commented on code in PR #73:
URL: https://github.com/apache/maven-jar-plugin/pull/73#discussion_r1534660928


##
src/test/java/org/apache/maven/plugins/jar/ToolchainsJdkVersionTest.java:
##
@@ -0,0 +1,88 @@
+/*
+ * 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.jar;
+
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Locale;
+import java.util.Optional;
+
+import org.apache.maven.toolchain.Toolchain;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Assumptions;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.mockito.Mock;
+import org.mockito.junit.jupiter.MockitoExtension;
+
+import static org.mockito.Mockito.when;
+
+@ExtendWith(MockitoExtension.class)
+class ToolchainsJdkVersionTest {
+
+@Mock
+private Toolchain toolchain;
+
+private final ToolchainsJdkSpecification toolchainsJdkSpecification = new 
ToolchainsJdkSpecification();
+
+@Test
+void shouldReturnCorrectSpec() {
+
+Path javaCPath = getJavaCPath();

Review Comment:
   done





> Build-Jdk in Manifest.mf does not reflect which compiler version actually 
> compiled the classes in the jar
> -
>
> Key: MJAR-62
> URL: https://issues.apache.org/jira/browse/MJAR-62
> Project: Maven JAR Plugin
>  Issue Type: Bug
>Reporter: Stefan Magnus Landrø
>Assignee: Slawomir Jaranowski
>Priority: Major
> Fix For: 3.4.0
>
> Attachments: example-app.zip
>
>
> Manifest.mf does not reflect the version of the compiler that built the jar, 
> but defaults to the version that maven runs under:  Build-Jdk: 
> ${java.version}.
> I believe this makes users uncertain of which compiler was actually used to 
> build the classes.



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


Re: [PR] [MJAR-62] Set Build-Jdk according to used toolchain [maven-jar-plugin]

2024-03-21 Thread via GitHub


slawekjaranowski commented on code in PR #73:
URL: https://github.com/apache/maven-jar-plugin/pull/73#discussion_r1534660928


##
src/test/java/org/apache/maven/plugins/jar/ToolchainsJdkVersionTest.java:
##
@@ -0,0 +1,88 @@
+/*
+ * 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.jar;
+
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Locale;
+import java.util.Optional;
+
+import org.apache.maven.toolchain.Toolchain;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Assumptions;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.mockito.Mock;
+import org.mockito.junit.jupiter.MockitoExtension;
+
+import static org.mockito.Mockito.when;
+
+@ExtendWith(MockitoExtension.class)
+class ToolchainsJdkVersionTest {
+
+@Mock
+private Toolchain toolchain;
+
+private final ToolchainsJdkSpecification toolchainsJdkSpecification = new 
ToolchainsJdkSpecification();
+
+@Test
+void shouldReturnCorrectSpec() {
+
+Path javaCPath = getJavaCPath();

Review Comment:
   done



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

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

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



[jira] [Commented] (MJAR-62) Build-Jdk in Manifest.mf does not reflect which compiler version actually compiled the classes in the jar

2024-03-21 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MJAR-62:


slawekjaranowski commented on code in PR #73:
URL: https://github.com/apache/maven-jar-plugin/pull/73#discussion_r1534659142


##
src/main/java/org/apache/maven/plugins/jar/ToolchainsJdkSpecification.java:
##
@@ -0,0 +1,93 @@
+/*
+ * 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.jar;
+
+import javax.inject.Named;
+import javax.inject.Singleton;
+
+import java.io.IOException;
+import java.io.UncheckedIOException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Optional;
+
+import org.apache.maven.toolchain.Toolchain;
+import org.codehaus.plexus.util.cli.CommandLineException;
+import org.codehaus.plexus.util.cli.CommandLineUtils;
+import org.codehaus.plexus.util.cli.Commandline;
+
+/**
+ * Component provided JDK specification based on toolchains.
+ */
+@Named
+@Singleton
+class ToolchainsJdkSpecification {
+
+private final Map cache = new HashMap<>();
+
+public synchronized Optional getJDKSpecification(Toolchain 
toolchain) {
+Optional javaCPath = getJavaCPath(toolchain);
+return javaCPath.map(path -> cache.computeIfAbsent(path, 
this::getSpecForPath));
+}
+
+private Optional getJavaCPath(Toolchain toolchain) {
+return 
Optional.ofNullable(toolchain.findTool("javac")).map(Paths::get).map(this::getCanonicalPath);
+}
+
+private Path getCanonicalPath(Path path) {
+try {
+return path.toRealPath();
+} catch (IOException e) {
+if (path.getParent() != null) {
+return 
getCanonicalPath(path.getParent()).resolve(path.getFileName());
+} else {
+throw new UncheckedIOException(e);
+}
+}
+}
+
+private String getSpecForPath(Path path) {
+try {
+Commandline cl = new Commandline(path.toString());
+cl.createArg().setValue("-version");
+CommandLineUtils.StringStreamConsumer out = new 
CommandLineUtils.StringStreamConsumer();
+CommandLineUtils.StringStreamConsumer err = new 
CommandLineUtils.StringStreamConsumer();
+CommandLineUtils.executeCommandLine(cl, out, err);
+String version = out.getOutput().trim();
+if (version.isEmpty()) {
+version = err.getOutput().trim();
+}
+if (version.startsWith("javac ")) {
+version = version.substring(6);
+if (version.startsWith("1.")) {
+version = version.substring(0, 3);
+} else {
+version = version.substring(0, 2);
+}
+return version;
+} else {
+return null;
+}
+} catch (CommandLineException e) {
+throw new RuntimeException(e);

Review Comment:
   can be thrown from `executeCommandLine` - what is your proposition here?





> Build-Jdk in Manifest.mf does not reflect which compiler version actually 
> compiled the classes in the jar
> -
>
> Key: MJAR-62
> URL: https://issues.apache.org/jira/browse/MJAR-62
> Project: Maven JAR Plugin
>  Issue Type: Bug
>Reporter: Stefan Magnus Landrø
>Assignee: Slawomir Jaranowski
>Priority: Major
> Fix For: 3.4.0
>
> Attachments: example-app.zip
>
>
> Manifest.mf does not reflect the version of the compiler that built the jar, 
> but defaults to the version that maven runs under:  Build-Jdk: 
> ${java.version}.
> I believe this makes users uncertain of which compiler was actually used to 
> build the classes.



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


Re: [PR] [MJAR-62] Set Build-Jdk according to used toolchain [maven-jar-plugin]

2024-03-21 Thread via GitHub


slawekjaranowski commented on code in PR #73:
URL: https://github.com/apache/maven-jar-plugin/pull/73#discussion_r1534659142


##
src/main/java/org/apache/maven/plugins/jar/ToolchainsJdkSpecification.java:
##
@@ -0,0 +1,93 @@
+/*
+ * 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.jar;
+
+import javax.inject.Named;
+import javax.inject.Singleton;
+
+import java.io.IOException;
+import java.io.UncheckedIOException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Optional;
+
+import org.apache.maven.toolchain.Toolchain;
+import org.codehaus.plexus.util.cli.CommandLineException;
+import org.codehaus.plexus.util.cli.CommandLineUtils;
+import org.codehaus.plexus.util.cli.Commandline;
+
+/**
+ * Component provided JDK specification based on toolchains.
+ */
+@Named
+@Singleton
+class ToolchainsJdkSpecification {
+
+private final Map cache = new HashMap<>();
+
+public synchronized Optional getJDKSpecification(Toolchain 
toolchain) {
+Optional javaCPath = getJavaCPath(toolchain);
+return javaCPath.map(path -> cache.computeIfAbsent(path, 
this::getSpecForPath));
+}
+
+private Optional getJavaCPath(Toolchain toolchain) {
+return 
Optional.ofNullable(toolchain.findTool("javac")).map(Paths::get).map(this::getCanonicalPath);
+}
+
+private Path getCanonicalPath(Path path) {
+try {
+return path.toRealPath();
+} catch (IOException e) {
+if (path.getParent() != null) {
+return 
getCanonicalPath(path.getParent()).resolve(path.getFileName());
+} else {
+throw new UncheckedIOException(e);
+}
+}
+}
+
+private String getSpecForPath(Path path) {
+try {
+Commandline cl = new Commandline(path.toString());
+cl.createArg().setValue("-version");
+CommandLineUtils.StringStreamConsumer out = new 
CommandLineUtils.StringStreamConsumer();
+CommandLineUtils.StringStreamConsumer err = new 
CommandLineUtils.StringStreamConsumer();
+CommandLineUtils.executeCommandLine(cl, out, err);
+String version = out.getOutput().trim();
+if (version.isEmpty()) {
+version = err.getOutput().trim();
+}
+if (version.startsWith("javac ")) {
+version = version.substring(6);
+if (version.startsWith("1.")) {
+version = version.substring(0, 3);
+} else {
+version = version.substring(0, 2);
+}
+return version;
+} else {
+return null;
+}
+} catch (CommandLineException e) {
+throw new RuntimeException(e);

Review Comment:
   can be thrown from `executeCommandLine` - what is your proposition here?



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

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

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



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

2024-03-21 Thread Konrad Windszus (Jira)


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

Konrad Windszus reassigned MENFORCER-500:
-

Assignee: Konrad Windszus

> 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: Improvement
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
>
> 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] (MENFORCER-496) Add rule to enforce a specific repository id

2024-03-21 Thread Konrad Windszus (Jira)


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

Konrad Windszus commented on MENFORCER-496:
---

This is already possible via {{requireNoRepositories}} 
(https://maven.apache.org/enforcer/enforcer-rules/requireNoRepositories.html) 
with parameter {{allowedRepositories}}.

> Add rule to enforce a specific repository id
> 
>
> Key: MENFORCER-496
> URL: https://issues.apache.org/jira/browse/MENFORCER-496
> Project: Maven Enforcer Plugin
>  Issue Type: Improvement
>  Components: Standard Rules
>Reporter: Konrad Windszus
>Priority: Major
>
> Very often in corporate environments a MRM is used which requires certain 
> credentials (maintained per id in {{settings.xml}}) both for uploading as 
> well as for downloading artifacts. It is crucial that both the repository 
> within [distribution managment|https://maven.apache.org/pom.html#Repository] 
> as well as the [repository for downloading 
> dependencies|https://maven.apache.org/pom.html#Repositories] from that MRM 
> uses a certain id.
> It would be beneficial to be able to enforce a certain id for repository URLs 
> matching a certain pattern.



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


[jira] [Resolved] (MENFORCER-496) Add rule to enforce a specific repository id

2024-03-21 Thread Konrad Windszus (Jira)


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

Konrad Windszus resolved MENFORCER-496.
---
Resolution: Invalid

> Add rule to enforce a specific repository id
> 
>
> Key: MENFORCER-496
> URL: https://issues.apache.org/jira/browse/MENFORCER-496
> Project: Maven Enforcer Plugin
>  Issue Type: Improvement
>  Components: Standard Rules
>Reporter: Konrad Windszus
>Priority: Major
>
> Very often in corporate environments a MRM is used which requires certain 
> credentials (maintained per id in {{settings.xml}}) both for uploading as 
> well as for downloading artifacts. It is crucial that both the repository 
> within [distribution managment|https://maven.apache.org/pom.html#Repository] 
> as well as the [repository for downloading 
> dependencies|https://maven.apache.org/pom.html#Repositories] from that MRM 
> uses a certain id.
> It would be beneficial to be able to enforce a certain id for repository URLs 
> matching a certain pattern.



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


[jira] [Commented] (MNG-8050) Same repositories IDs in settings.xml and POM are not detected

2024-03-21 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-8050:
-

kwin commented on PR #1412:
URL: https://github.com/apache/maven/pull/1412#issuecomment-2013546796

   @gnodet I think we should also warn if the URL is equal but the `` 
flags for either `` or `` differ. Otherwise this might lead 
to subtle issues which are hard to debug.




> Same repositories IDs in settings.xml and POM are not detected
> --
>
> Key: MNG-8050
> URL: https://issues.apache.org/jira/browse/MNG-8050
> Project: Maven
>  Issue Type: Improvement
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
>
> When the same repository ID is used in repositories defined in 
>  # {{settings.xml}} and
>  # POM
> the one from the POM is just silently ignored and no ERROR is emitted.
> OTOH when defining repositories with the same ID in POM the following error 
> is emitted:
> {code}
> [ERROR] Some problems were encountered while processing the POMs:
> [ERROR] 'repositories.repository.id' must be unique 
> {code}
> A similar error should be emitted for repository ID clashes in 
> {{settings.xml}} (both local and global) and POM
>  



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


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

2024-03-21 Thread Konrad Windszus (Jira)
Konrad Windszus created MENFORCER-500:
-

 Summary: 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: Improvement
Reporter: Konrad Windszus


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] [Closed] (MENFORCER-356) Please support m2e lifecycle management

2024-03-21 Thread Konrad Windszus (Jira)


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

Konrad Windszus closed MENFORCER-356.
-
Resolution: Won't Fix

> Please support m2e lifecycle management
> ---
>
> Key: MENFORCER-356
> URL: https://issues.apache.org/jira/browse/MENFORCER-356
> Project: Maven Enforcer Plugin
>  Issue Type: New Feature
> Environment: Linux
>Reporter: Luke Hutchison
>Priority: Minor
> Fix For: waiting-for-feedback, wontfix-candidate
>
>
> The maven-enforcer-plugin does not work with m2e without configuration using 
> the `lifecyleManagement` tag. However, that tag causes numerous bad 
> interactions between m2e and commandline mvn.
> Recently m2e added a new configuration mechanism for specifying the lifecycle 
> management configuration:
> [https://www.eclipse.org/m2e/documentation/release-notes-17.html#new-syntax-for-specifying-lifecycle-mapping-metadata]
> The directive that works for me to get maven-enforcer-plugin to work with m2e 
> is:
> 
> However, this style of directive, , breaks numerous tools, including 
> Sonatype's artifact publishing framework, and the Scrutinizer CI / static 
> code analyzer, because they use custom XML parsers that can't yet handle this 
> syntax. That means I have to leave the directive in the pom.xml while 
> developing, so that I can use Eclipse, and then I have to remove it before 
> publishing or analyzing any built jar.
> It would be very helpful if maven-enforcer-plugin could make use of the m2e 
> lifecycle management API internally to configure itself to work with m2e, so 
> that this directive is not needed.



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


[jira] [Commented] (MENFORCER-356) Please support m2e lifecycle management

2024-03-21 Thread Konrad Windszus (Jira)


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

Konrad Windszus commented on MENFORCER-356:
---

As enforcer is tackled in the default mapping of m2e: 
https://github.com/eclipse-m2e/m2e-core/blob/master/org.eclipse.m2e.core/lifecycle-mapping-metadata.xml#L130
 there is nothing to be done from the plugin side.

> Please support m2e lifecycle management
> ---
>
> Key: MENFORCER-356
> URL: https://issues.apache.org/jira/browse/MENFORCER-356
> Project: Maven Enforcer Plugin
>  Issue Type: New Feature
> Environment: Linux
>Reporter: Luke Hutchison
>Priority: Minor
> Fix For: waiting-for-feedback, wontfix-candidate
>
>
> The maven-enforcer-plugin does not work with m2e without configuration using 
> the `lifecyleManagement` tag. However, that tag causes numerous bad 
> interactions between m2e and commandline mvn.
> Recently m2e added a new configuration mechanism for specifying the lifecycle 
> management configuration:
> [https://www.eclipse.org/m2e/documentation/release-notes-17.html#new-syntax-for-specifying-lifecycle-mapping-metadata]
> The directive that works for me to get maven-enforcer-plugin to work with m2e 
> is:
> 
> However, this style of directive, , breaks numerous tools, including 
> Sonatype's artifact publishing framework, and the Scrutinizer CI / static 
> code analyzer, because they use custom XML parsers that can't yet handle this 
> syntax. That means I have to leave the directive in the pom.xml while 
> developing, so that I can use Eclipse, and then I have to remove it before 
> publishing or analyzing any built jar.
> It would be very helpful if maven-enforcer-plugin could make use of the m2e 
> lifecycle management API internally to configure itself to work with m2e, so 
> that this directive is not needed.



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


[jira] [Commented] (MNG-8082) Exceptions of proxied SessionScoped components are not working correctly

2024-03-21 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-8082:
-

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

   Simple fix to handle the exception case correctly.
   
   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)
   




> Exceptions of proxied SessionScoped components are not working correctly
> 
>
> Key: MNG-8082
> URL: https://issues.apache.org/jira/browse/MNG-8082
> Project: Maven
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 4.0.0-alpha-13
>Reporter: Jonas Rutishauser
>Priority: Major
>
> As the {{InvocationTargetException}} is not handled in the proxy a runtime 
> exception will be wrapped by an {{InvocationTargetException}} and an 
> application exception is additional wrapped by an 
> {{UndeclaredThrowableException}}.



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


[PR] [MNG-8082] - Exceptions of proxied SessionScoped components are not working correctly [maven]

2024-03-21 Thread via GitHub


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

   Simple fix to handle the exception case correctly.
   
   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)
   


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

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

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



[jira] [Created] (MNG-8082) Exceptions of proxied SessionScoped components are not working correctly

2024-03-21 Thread Jonas Rutishauser (Jira)
Jonas Rutishauser created MNG-8082:
--

 Summary: Exceptions of proxied SessionScoped components are not 
working correctly
 Key: MNG-8082
 URL: https://issues.apache.org/jira/browse/MNG-8082
 Project: Maven
  Issue Type: Bug
  Components: Core
Affects Versions: 4.0.0-alpha-13
Reporter: Jonas Rutishauser


As the {{InvocationTargetException}} is not handled in the proxy a runtime 
exception will be wrapped by an {{InvocationTargetException}} and an 
application exception is additional wrapped by an 
{{UndeclaredThrowableException}}.



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


[jira] [Commented] (MPMD-379) Support PMD 7.0.0

2024-03-21 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MPMD-379:
-

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


##
pom.xml:
##
@@ -83,7 +83,7 @@ under the License.
   
 3.2.5
 8
-6.55.0
+7.0.0-rc4

Review Comment:
   I'm going to release PMD 7.0.0 tomorrow. After that, we can use directly 
7.0.0 here.
   Note, that there will be a few more changes required...
   
   Also, please add a new row in 
https://github.com/apache/maven-pmd-plugin/blob/master/src/site/apt/examples/upgrading-PMD-at-runtime.apt.vm#L91
 
   This should document the default pmd version, that is used by 
maven-pmd-plugin - and this is determined by this property here.



##
src/it/MPMD-244-logging/verify.groovy:
##
@@ -20,12 +20,13 @@
 File buildLog = new File( basedir, 'build.log' )
 assert buildLog.exists()
 assert buildLog.text.contains( "PMD processing errors" )
-assert buildLog.text.contains( "Error while parsing" )
+assert buildLog.text.contains( "Parse exception in file" )
 
 String disabledPath = new File( basedir, 
'logging-disabled/src/main/java/BrokenFile.java' ).getCanonicalPath()
 String enabledPath = new File( basedir, 
'logging-enabled/src/main/java/BrokenFile.java' ).getCanonicalPath()
 
 // logging disabled: the pmd exception is only output through the processing 
error reporting (since MPMD-246)
-assert 1 == buildLog.text.count( "net.sourceforge.pmd.PMDException: Error 
while parsing ${disabledPath}" )
+assert 1 == buildLog.text.count( "net.sourceforge.pmd.lang.ast.ParseException: 
Parse exception in file \'${disabledPath}\'" )
 // logging enabled: the pmd exception is output twice: through the processing 
error reporting (since MPMD-246) and through PMD's own logging
-assert 2 == buildLog.text.count( "net.sourceforge.pmd.PMDException: Error 
while parsing ${enabledPath}" )
+// not true anymore, logged always once
+assert 1 == buildLog.text.count( "net.sourceforge.pmd.lang.ast.ParseException: 
Parse exception in file \'${enabledPath}\'" )

Review Comment:
   I think, this deserves a little bit more work. I noted in my personal branch:
   
   ```
   // build.log contains the logging from the two PMD executions
   // only one execution has logging enabled, so we expect only one log output
   // TODO assert 1 == buildLog.text.count( "[DEBUG] Rules loaded from" )
   // TODO logging is always enabled and can't be disabled, because PMD 7 
switched to slf4j
   ```
   
   Which essentially means, that the property 
[showPmdLog](https://maven.apache.org/plugins/maven-pmd-plugin/pmd-mojo.html#showPmdLog)
 is broken now. Either we need to deprecate it and eventually remove it, or we 
need to fix it.
   



##
src/main/java/org/apache/maven/plugins/pmd/ExcludeViolationsFromFile.java:
##
@@ -84,8 +84,10 @@ public boolean isExcludedFromFailure(final Violation 
errorDetail) {
  * @return true if the violation should be excluded, 
false otherwise.
  */
 public boolean isExcludedFromFailure(final RuleViolation errorDetail) {
-final String className =
-extractClassName(errorDetail.getPackageName(), 
errorDetail.getClassName(), errorDetail.getFilename());
+final String className = extractClassName(
+errorDetail.getPackageName(),
+errorDetail.getClassName(),
+errorDetail.getFileId().getAbsolutePath());

Review Comment:
   This will change in final PMD 7.0.0, see here for the needed change:
   
   
https://github.com/apache/maven-pmd-plugin/blob/02910c902b168ce14ef948d65db7b239a5ee56c4/src/main/java/org/apache/maven/plugins/pmd/ExcludeViolationsFromFile.java#L87-L92
   



##
src/main/java/org/apache/maven/plugins/pmd/exec/PmdExecutor.java:
##
@@ -190,7 +189,7 @@ private PmdResult run() throws MavenReportException {
 configuration.setRuleSets(request.getRulesets());
 
configuration.setMinimumPriority(RulePriority.valueOf(request.getMinimumPriority()));
 if (request.getBenchmarkOutputLocation() != null) {
-configuration.setBenchmark(true);
+TimeTracker.startGlobalTracking();

Review Comment:
   Does this feature still work? It is enabled with the property 
[benchmark](https://maven.apache.org/plugins/maven-pmd-plugin/pmd-mojo.html#benchmark)



##
src/it/MPMD-258-multiple-executions/invoker.properties:
##
@@ -15,5 +15,6 @@
 # specific language governing permissions and limitations
 # under the License.
 
+invoker.debug = true

Review Comment:
   this might not be needed?
   
   Update: ok, yes it is needed. Can you please update verify.groovy for this 
test to explain it, similar what I have done here:
   
   

Re: [PR] [MPMD-379] PMD 7.0.0 support [maven-pmd-plugin]

2024-03-21 Thread via GitHub


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


##
pom.xml:
##
@@ -83,7 +83,7 @@ under the License.
   
 3.2.5
 8
-6.55.0
+7.0.0-rc4

Review Comment:
   I'm going to release PMD 7.0.0 tomorrow. After that, we can use directly 
7.0.0 here.
   Note, that there will be a few more changes required...
   
   Also, please add a new row in 
https://github.com/apache/maven-pmd-plugin/blob/master/src/site/apt/examples/upgrading-PMD-at-runtime.apt.vm#L91
 
   This should document the default pmd version, that is used by 
maven-pmd-plugin - and this is determined by this property here.



##
src/it/MPMD-244-logging/verify.groovy:
##
@@ -20,12 +20,13 @@
 File buildLog = new File( basedir, 'build.log' )
 assert buildLog.exists()
 assert buildLog.text.contains( "PMD processing errors" )
-assert buildLog.text.contains( "Error while parsing" )
+assert buildLog.text.contains( "Parse exception in file" )
 
 String disabledPath = new File( basedir, 
'logging-disabled/src/main/java/BrokenFile.java' ).getCanonicalPath()
 String enabledPath = new File( basedir, 
'logging-enabled/src/main/java/BrokenFile.java' ).getCanonicalPath()
 
 // logging disabled: the pmd exception is only output through the processing 
error reporting (since MPMD-246)
-assert 1 == buildLog.text.count( "net.sourceforge.pmd.PMDException: Error 
while parsing ${disabledPath}" )
+assert 1 == buildLog.text.count( "net.sourceforge.pmd.lang.ast.ParseException: 
Parse exception in file \'${disabledPath}\'" )
 // logging enabled: the pmd exception is output twice: through the processing 
error reporting (since MPMD-246) and through PMD's own logging
-assert 2 == buildLog.text.count( "net.sourceforge.pmd.PMDException: Error 
while parsing ${enabledPath}" )
+// not true anymore, logged always once
+assert 1 == buildLog.text.count( "net.sourceforge.pmd.lang.ast.ParseException: 
Parse exception in file \'${enabledPath}\'" )

Review Comment:
   I think, this deserves a little bit more work. I noted in my personal branch:
   
   ```
   // build.log contains the logging from the two PMD executions
   // only one execution has logging enabled, so we expect only one log output
   // TODO assert 1 == buildLog.text.count( "[DEBUG] Rules loaded from" )
   // TODO logging is always enabled and can't be disabled, because PMD 7 
switched to slf4j
   ```
   
   Which essentially means, that the property 
[showPmdLog](https://maven.apache.org/plugins/maven-pmd-plugin/pmd-mojo.html#showPmdLog)
 is broken now. Either we need to deprecate it and eventually remove it, or we 
need to fix it.
   



##
src/main/java/org/apache/maven/plugins/pmd/ExcludeViolationsFromFile.java:
##
@@ -84,8 +84,10 @@ public boolean isExcludedFromFailure(final Violation 
errorDetail) {
  * @return true if the violation should be excluded, 
false otherwise.
  */
 public boolean isExcludedFromFailure(final RuleViolation errorDetail) {
-final String className =
-extractClassName(errorDetail.getPackageName(), 
errorDetail.getClassName(), errorDetail.getFilename());
+final String className = extractClassName(
+errorDetail.getPackageName(),
+errorDetail.getClassName(),
+errorDetail.getFileId().getAbsolutePath());

Review Comment:
   This will change in final PMD 7.0.0, see here for the needed change:
   
   
https://github.com/apache/maven-pmd-plugin/blob/02910c902b168ce14ef948d65db7b239a5ee56c4/src/main/java/org/apache/maven/plugins/pmd/ExcludeViolationsFromFile.java#L87-L92
   



##
src/main/java/org/apache/maven/plugins/pmd/exec/PmdExecutor.java:
##
@@ -190,7 +189,7 @@ private PmdResult run() throws MavenReportException {
 configuration.setRuleSets(request.getRulesets());
 
configuration.setMinimumPriority(RulePriority.valueOf(request.getMinimumPriority()));
 if (request.getBenchmarkOutputLocation() != null) {
-configuration.setBenchmark(true);
+TimeTracker.startGlobalTracking();

Review Comment:
   Does this feature still work? It is enabled with the property 
[benchmark](https://maven.apache.org/plugins/maven-pmd-plugin/pmd-mojo.html#benchmark)



##
src/it/MPMD-258-multiple-executions/invoker.properties:
##
@@ -15,5 +15,6 @@
 # specific language governing permissions and limitations
 # under the License.
 
+invoker.debug = true

Review Comment:
   this might not be needed?
   
   Update: ok, yes it is needed. Can you please update verify.groovy for this 
test to explain it, similar what I have done here:
   
   
https://github.com/apache/maven-pmd-plugin/blob/02910c902b168ce14ef948d65db7b239a5ee56c4/src/it/MPMD-258-multiple-executions/verify.groovy#L24
   
   and
   
   

[jira] [Commented] (MNG-5668) post- should always be executed after

2024-03-21 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-5668:
-

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

   - **Lifecycle API**
   - **[MNG-5668] Proof of concept implementation of dynamic phases (wip)**
   




> post- should always be executed after 
> 
>
> Key: MNG-5668
> URL: https://issues.apache.org/jira/browse/MNG-5668
> Project: Maven
>  Issue Type: Sub-task
>  Components: FDPFC, Plugins and Lifecycle
>Reporter: Robert Scholte
>Assignee: Robert Scholte
>Priority: Major
>
> Original proposal:
> {quote}
> There are right now 3 phases which also have a pre- and post-, 
> namely integration-test, clean and site. However, even if one has bound goals 
> to the post-phases, they're probably never called.
> When there's an integration-test starting up some server, you'd probably 
> always want to kill it no matter what happens during the IT (let say a NPE).
> The proposal is to execute the post- as the finally block in Java. If 
> you really want to execute only the integration-test without the post, the 
> phase should be marked, e.g. 'mvn [integration-test]', where the brackets 
> lock the phase.
> {quote}



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


[jira] [Commented] (MNG-8050) Same repositories IDs in settings.xml and POM are not detected

2024-03-21 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-8050:
-

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

   Sadly nope.
   
   IMHO the best we can do is to accept the facts:
   * repository ID is the "key" (so assume URL is "just" an attribute) and 
limit ourselves onto ID clash checking
   * maybe as improvement, warn (optionally fail) the build, if there are two 
different IDs with _same_ URLs?
   * cases when same ID may be used for different reposes (or when different 
IDs are used for same repository) mostly stands for us, people that check out 
various project, applying various "repo naming conventions" (as for example, 
ideally within one company or even forge, this should be unified) is we simply 
cannot handle.




> Same repositories IDs in settings.xml and POM are not detected
> --
>
> Key: MNG-8050
> URL: https://issues.apache.org/jira/browse/MNG-8050
> Project: Maven
>  Issue Type: Improvement
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
>
> When the same repository ID is used in repositories defined in 
>  # {{settings.xml}} and
>  # POM
> the one from the POM is just silently ignored and no ERROR is emitted.
> OTOH when defining repositories with the same ID in POM the following error 
> is emitted:
> {code}
> [ERROR] Some problems were encountered while processing the POMs:
> [ERROR] 'repositories.repository.id' must be unique 
> {code}
> A similar error should be emitted for repository ID clashes in 
> {{settings.xml}} (both local and global) and POM
>  



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


Re: [PR] [MNG-8050] emit warn in case of repo id clashes between settings and POM [maven]

2024-03-21 Thread via GitHub


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

   Sadly nope.
   
   IMHO the best we can do is to accept the facts:
   * repository ID is the "key" (so assume URL is "just" an attribute) and 
limit ourselves onto ID clash checking
   * maybe as improvement, warn (optionally fail) the build, if there are two 
different IDs with _same_ URLs?
   * cases when same ID may be used for different reposes (or when different 
IDs are used for same repository) mostly stands for us, people that check out 
various project, applying various "repo naming conventions" (as for example, 
ideally within one company or even forge, this should be unified) is we simply 
cannot handle.


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

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

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



[jira] [Commented] (MNG-8081) default profile activation should consider available system and user properties

2024-03-21 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-8081:
-

mbenson commented on PR #1446:
URL: https://github.com/apache/maven/pull/1446#issuecomment-2012419183

   From email thread:
   
   Guillaume Nodet  wrote:
   > I thought you were referring to having a small language in the
   property activation...
   
   I hadn't noted the discussion when it took place before, but fwiw I also 
lean in the direction that an embedded language might be going too far. At the 
same time EL, as in the extension you mentioned, seems a fine choice, but feels 
fine to leave that as an extension.
   
   Matt
   




> default profile activation should consider available system and user 
> properties
> ---
>
> Key: MNG-8081
> URL: https://issues.apache.org/jira/browse/MNG-8081
> Project: Maven
>  Issue Type: Improvement
>  Components: Profiles
>Affects Versions: 3.9.6, 4.0.0
>Reporter: Matthew Jason Benson
>Priority: Minor
>
> As discussed in my open PR, my use case is to compare between environment 
> variables e.g.:
> {code:java}
> 
>   
> env.FOO
> ${env.BAR}
>   
> {code}
> Limiting the interpolation to user/system properties means that there is no 
> mindf*ck resulting from profile activation order, etc., and keeps this 
> request nonthreatening.



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


Re: [PR] [MNG-8081] interpolate available properties during default profile selection (Maven 4.x) [maven]

2024-03-21 Thread via GitHub


mbenson commented on PR #1446:
URL: https://github.com/apache/maven/pull/1446#issuecomment-2012419183

   From email thread:
   
   Guillaume Nodet  wrote:
   > I thought you were referring to having a small language in the
   property activation...
   
   I hadn't noted the discussion when it took place before, but fwiw I also 
lean in the direction that an embedded language might be going too far. At the 
same time EL, as in the extension you mentioned, seems a fine choice, but feels 
fine to leave that as an extension.
   
   Matt
   


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

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

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



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

2024-03-21 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MPLUGIN-508:


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

   > > > The plugin currently supports building either a Maven 3 or a Maven 4 
plugin.
   > > 
   > > 
   > > sorry, I still need some explanations because I can't guess from this PR 
touching 75 files described as "Upgrade to Maven 4.0.0-alpha-12"
   > 
   > Most of the 75 files are just a renaming of the `mavenVersion` to 
`maven3Version` to make it more intuitive which one is used.
   > 
   > > is this PR about adding support for Maven 4 specific plugins in addition 
to classical Maven 3 plugins? or just upgrading such a support added before 
that I overlooked?
   > 
   > The support was added quite some time ago 
([50482ba](https://github.com/apache/maven-plugin-tools/commit/50482ba4695f2e3efe710a583a639fa53dbabb64)).
 This PR is just to upgrade to alpha-13 (and needs to be adjusted with the 
release)
   > 
   > > Is there a Maven 4 plugin IT to look at such a Maven 4 plugin?
   > 
   > Yes, there's one at 
https://github.com/apache/maven-plugin-tools/tree/5297a91a8f8b4df54c96566b0629bb72944c2047/maven-plugin-plugin/src/it/v4api
   > 
   > > and key question: is this PR intended for 3.12.0 release, as noted in 
Jira?
   > 
   > Yes
   
   FWIW, I think the plugin supporting Maven 4 would be better located inside 
maven-core colocated with the API (and maybe soon the implementation extracted 
with https://github.com/apache/maven/pull/1441).  Same for the plugin-testing 
framework also contains support for both Maven 3 and Maven 4 in the same 
library, which is not really clean imho.




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




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


Re: [PR] [MPLUGIN-508] Upgrade to Maven 4.0.0-alpha-13 [maven-plugin-tools]

2024-03-21 Thread via GitHub


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

   > > > The plugin currently supports building either a Maven 3 or a Maven 4 
plugin.
   > > 
   > > 
   > > sorry, I still need some explanations because I can't guess from this PR 
touching 75 files described as "Upgrade to Maven 4.0.0-alpha-12"
   > 
   > Most of the 75 files are just a renaming of the `mavenVersion` to 
`maven3Version` to make it more intuitive which one is used.
   > 
   > > is this PR about adding support for Maven 4 specific plugins in addition 
to classical Maven 3 plugins? or just upgrading such a support added before 
that I overlooked?
   > 
   > The support was added quite some time ago 
([50482ba](https://github.com/apache/maven-plugin-tools/commit/50482ba4695f2e3efe710a583a639fa53dbabb64)).
 This PR is just to upgrade to alpha-13 (and needs to be adjusted with the 
release)
   > 
   > > Is there a Maven 4 plugin IT to look at such a Maven 4 plugin?
   > 
   > Yes, there's one at 
https://github.com/apache/maven-plugin-tools/tree/5297a91a8f8b4df54c96566b0629bb72944c2047/maven-plugin-plugin/src/it/v4api
   > 
   > > and key question: is this PR intended for 3.12.0 release, as noted in 
Jira?
   > 
   > Yes
   
   FWIW, I think the plugin supporting Maven 4 would be better located inside 
maven-core colocated with the API (and maybe soon the implementation extracted 
with https://github.com/apache/maven/pull/1441).  Same for the plugin-testing 
framework also contains support for both Maven 3 and Maven 4 in the same 
library, which is not really clean imho.


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

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

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



Re: [I] `Could not acquire write lock for…` errors [maven-mvnd]

2024-03-21 Thread via GitHub


cstamas commented on issue #836:
URL: https://github.com/apache/maven-mvnd/issues/836#issuecomment-2012184678

   The point of "diagnostic" is exactly that, please paste it into gist and put 
it here


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

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

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



[jira] [Updated] (MGPG-113) Upgrading from 3.1.0 to 3.2.1 with no other changes causes "gpg:sign-and-deploy-file failed: 401 Unauthorized

2024-03-21 Thread Tim Tim (Jira)


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

Tim Tim updated MGPG-113:
-
Description: 
After upgrading to Maven GPG plugin from 3.1.0 to 3.2.0/3.2.1, the deploy 
command "{*}gpg:sign-and-deploy-file{*} " failed with the message "Failed to 
execute goal 
org.apache.maven.plugins:maven-gpg-plugin:{*}3.2.1:{*}sign-and-deploy-file : 
401 Unauthorized"

 

NOTE: *3.1.0* and below version of *gpg:sign-and-deploy-file* works well for 
below CLI

 

Deploy CLI with plugin *gpg:sign-and-deploy-file*

```

mvn -B -Dmaven.wagon.http.retryHandler.count=3 -DretryFailedDeploymentCount=3 \

-s utils/settings.xml gpg:sign-and-deploy-file -Dgpg.passphrase=xxx \

-Durl=[*https://oss.sonatype.org/service/local/staging/deploy/maven2*|https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Foss.sonatype.org%2Fservice%2Flocal%2Fstaging%2Fdeploy%2Fmaven2=05%7C02%7Ctiml%40nvidia.com%7C5e0d0557577441c1496308dc45d023b3%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C638462007478125085%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C=Rlst6EEorq8QFEyvFrypYO5KOOw1Qrtr5hJigYlaxKg%3D=0]
 -DrepositoryId=ossrh \

-DgrouId=com.nvidia -DartifactId=test -Dversion=0.1.0 -Dfile=test.jar

```

 

 

SONATYPE_USR/PSW defined as env, utils/settings.xml as below

```

http://maven.apache.org/SETTINGS/1.1.0 
http://maven.apache.org/xsd/settings-1.1.0.xsd|https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmaven.apache.org%2FSETTINGS%2F1.1.0%2520http%3A%2Fmaven.apache.org%2Fxsd%2Fsettings-1.1.0.xsd=05%7C02%7Ctiml%40nvidia.com%7C5e0d0557577441c1496308dc45d023b3%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C638462007478130933%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C=AwpWIvI2UECpcvWcFD16CHlYCEjRPYgyXuHW07LbQ7M%3D=0]
 
xmlns=[http://maven.apache.org/SETTINGS/1.1.0|https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmaven.apache.org%2FSETTINGS%2F1.1.0=05%7C02%7Ctiml%40nvidia.com%7C5e0d0557577441c1496308dc45d023b3%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C638462007478137093%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C=5985h8YTeXELVjevO0BRSih2SMD8NQeAJnbiBmSEjMI%3D=0]
  
xmlns:xsi=[http://www.w3.org/2001/XMLSchema-instance|https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance=05%7C02%7Ctiml%40nvidia.com%7C5e0d0557577441c1496308dc45d023b3%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C638462007478142757%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C=o0V%2Flpv4yqHaYZPv4etTINHsQIzU09ZQAV2vBDjvz%2BE%3D=0]>

    

    

    ossrh

    ${env.SONATYPE_USR}

    ${env.SONATYPE_PSW}

    

   

.. 

```

 

Error Logs

 

```

*20:03:52* + mvn -B -Dmaven.wagon.http.retryHandler.count=3 
-DretryFailedDeploymentCount=3 -s utils/settings.xml 
-Durl=[https://oss.sonatype.org/service/local/staging/deploy/maven2] 
-DrepositoryId=ossrh 
org.apache.maven.plugins:maven-gpg-plugin:3.2.1:sign-and-deploy-file 
-Dgpg.executable=nvsec_sign -DgroupId=com.nvidia -DartifactId=test 
-Dversion=0.1.0 -Dfile=test.jar *20:03:52* [INFO] Scanning for projects... 

*20:04:15  [INFO] Uploading to ossrh: 
[https://oss.sonatype.org/service/local/staging/deploy/maven2/com/nvidia/test/0.1.0/test-0.1.0.jar*]

 

*20:04:15  [ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-gpg-plugin:3.2.1:sign-and-deploy-file 
(default-cli) on project standalone-pom: Error deploying attached artifacts 
[com.nvidia:test:jar:0.1.0, com.nvidia:test:pom:0.1.0, 
com.nvidia:test:jar.asc:0.1.0, com.nvidia:test:pom.asc:0.1.0]: Failed to deploy 
artifacts: Could not transfer artifact com.nvidia:test:jar:0.1.0 from/to ossrh 
([https://oss.sonatype.org/service/local/staging/deploy/maven2):] Transfer 
failed for 
[https://oss.sonatype.org/service/local/staging/deploy/maven2/com/nvidia/test/0.1.0/test-0.1.0.jar]
 401 Unauthorized -> [Help 1]*

 

 

```

  was:
After upgrading to Maven GPG plugin from 3.1.0 to 3.2.0/3.2.1, the deploy 
command "mvn gpg:sign-and-deploy-file " failed with the message "Failed to 
execute goal 
org.apache.maven.plugins:maven-gpg-plugin:3.2.1:sign-and-deploy-file : 401 
Unauthorized"

 

 

 

Deploy CLI with plugin *gpg:sign-and-deploy-file*

```

mvn -B -Dmaven.wagon.http.retryHandler.count=3 -DretryFailedDeploymentCount=3 \

-s utils/settings.xml gpg:sign-and-deploy-file -Dgpg.passphrase=xxx \


[jira] [Created] (MGPG-113) Upgrading from 3.1.0 to 3.2.1 with no other changes causes "gpg:sign-and-deploy-file failed: 401 Unauthorized

2024-03-21 Thread Tim Tim (Jira)
Tim Tim created MGPG-113:


 Summary: Upgrading from 3.1.0 to 3.2.1 with no other changes 
causes "gpg:sign-and-deploy-file failed: 401 Unauthorized
 Key: MGPG-113
 URL: https://issues.apache.org/jira/browse/MGPG-113
 Project: Maven GPG Plugin
  Issue Type: Bug
Affects Versions: 3.2.1
 Environment: ubuntu-22.04 (Ubuntu 22.04 LTS) image
Reporter: Tim Tim


After upgrading to Maven GPG plugin from 3.1.0 to 3.2.0/3.2.1, the deploy 
command "mvn gpg:sign-and-deploy-file " failed with the message "Failed to 
execute goal 
org.apache.maven.plugins:maven-gpg-plugin:3.2.1:sign-and-deploy-file : 401 
Unauthorized"

 

 

 

Deploy CLI with plugin *gpg:sign-and-deploy-file*

```

mvn -B -Dmaven.wagon.http.retryHandler.count=3 -DretryFailedDeploymentCount=3 \

-s utils/settings.xml gpg:sign-and-deploy-file -Dgpg.passphrase=xxx \

-Durl=[*https://oss.sonatype.org/service/local/staging/deploy/maven2*|https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Foss.sonatype.org%2Fservice%2Flocal%2Fstaging%2Fdeploy%2Fmaven2=05%7C02%7Ctiml%40nvidia.com%7C5e0d0557577441c1496308dc45d023b3%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C638462007478125085%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C=Rlst6EEorq8QFEyvFrypYO5KOOw1Qrtr5hJigYlaxKg%3D=0]
 -DrepositoryId=ossrh \

-DgrouId=com.nvidia -DartifactId=test -Dversion=0.1.0 -Dfile=test.jar

```

 

 

SONATYPE_USR/PSW defined as env, utils/settings.xml as below

```

http://maven.apache.org/SETTINGS/1.1.0 
http://maven.apache.org/xsd/settings-1.1.0.xsd|https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmaven.apache.org%2FSETTINGS%2F1.1.0%2520http%3A%2Fmaven.apache.org%2Fxsd%2Fsettings-1.1.0.xsd=05%7C02%7Ctiml%40nvidia.com%7C5e0d0557577441c1496308dc45d023b3%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C638462007478130933%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C=AwpWIvI2UECpcvWcFD16CHlYCEjRPYgyXuHW07LbQ7M%3D=0]
 
xmlns=[http://maven.apache.org/SETTINGS/1.1.0|https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmaven.apache.org%2FSETTINGS%2F1.1.0=05%7C02%7Ctiml%40nvidia.com%7C5e0d0557577441c1496308dc45d023b3%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C638462007478137093%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C=5985h8YTeXELVjevO0BRSih2SMD8NQeAJnbiBmSEjMI%3D=0]
  
xmlns:xsi=[http://www.w3.org/2001/XMLSchema-instance|https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance=05%7C02%7Ctiml%40nvidia.com%7C5e0d0557577441c1496308dc45d023b3%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C638462007478142757%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C=o0V%2Flpv4yqHaYZPv4etTINHsQIzU09ZQAV2vBDjvz%2BE%3D=0]>

    

    

    ossrh

    ${env.SONATYPE_USR}

    ${env.SONATYPE_PSW}

    

   

.. 

```

 

Error Logs

 

```

*20:03:52*  + mvn -B -Dmaven.wagon.http.retryHandler.count=3 
-DretryFailedDeploymentCount=3 -s utils/settings.xml 
-Durl=[https://oss.sonatype.org/service/local/staging/deploy/maven2] 
-DrepositoryId=ossrh 
org.apache.maven.plugins:maven-gpg-plugin:3.2.1:sign-and-deploy-file 
-Dgpg.executable=nvsec_sign -DgroupId=com.nvidia -DartifactId=test 
-Dversion=0.1.0 -Dfile=test.jar *20:03:52*  [INFO] Scanning for projects... 

*20:04:15  [INFO] Uploading to ossrh: 
https://oss.sonatype.org/service/local/staging/deploy/maven2/com/nvidia/test/0.1.0/test-0.1.0.jar*

 

*20:04:15  [ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-gpg-plugin:3.2.1:sign-and-deploy-file 
(default-cli) on project standalone-pom: Error deploying attached artifacts 
[com.nvidia:test:jar:0.1.0, com.nvidia:test:pom:0.1.0, 
com.nvidia:test:jar.asc:0.1.0, com.nvidia:test:pom.asc:0.1.0]: Failed to deploy 
artifacts: Could not transfer artifact com.nvidia:test:jar:0.1.0 from/to ossrh 
(https://oss.sonatype.org/service/local/staging/deploy/maven2): Transfer failed 
for 
https://oss.sonatype.org/service/local/staging/deploy/maven2/com/nvidia/test/0.1.0/test-0.1.0.jar
 401 Unauthorized -> [Help 1]*

 

 

```



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


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

2024-03-21 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MPLUGIN-508:


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

   > > The plugin currently supports building either a Maven 3 or a Maven 4 
plugin.
   > 
   > sorry, I still need some explanations because I can't guess from this PR 
touching 75 files described as "Upgrade to Maven 4.0.0-alpha-12"
   
   Most of the 75 files are just a renaming of the `mavenVersion` to 
`maven3Version` to make it more intuitive which one is used.
   
   > 
   > is this PR about adding support for Maven 4 specific plugins in addition 
to classical Maven 3 plugins? or just upgrading such a support added before 
that I overlooked?
   
   The support was added quite some time ago 
(https://github.com/apache/maven-plugin-tools/commit/50482ba4695f2e3efe710a583a639fa53dbabb64).
  This PR is just to upgrade to alpha-13 (and needs to be adjusted with the 
release)
   
   > Is there a Maven 4 plugin IT to look at such a Maven 4 plugin?
   
   Yes, there's one at 
https://github.com/apache/maven-plugin-tools/tree/5297a91a8f8b4df54c96566b0629bb72944c2047/maven-plugin-plugin/src/it/v4api
   
   > and key question: is this PR intended for 3.12.0 release, as noted in Jira?
   
   Yes
   




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




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


Re: [PR] [MPLUGIN-508] Upgrade to Maven 4.0.0-alpha-12 [maven-plugin-tools]

2024-03-21 Thread via GitHub


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

   > > The plugin currently supports building either a Maven 3 or a Maven 4 
plugin.
   > 
   > sorry, I still need some explanations because I can't guess from this PR 
touching 75 files described as "Upgrade to Maven 4.0.0-alpha-12"
   
   Most of the 75 files are just a renaming of the `mavenVersion` to 
`maven3Version` to make it more intuitive which one is used.
   
   > 
   > is this PR about adding support for Maven 4 specific plugins in addition 
to classical Maven 3 plugins? or just upgrading such a support added before 
that I overlooked?
   
   The support was added quite some time ago 
(https://github.com/apache/maven-plugin-tools/commit/50482ba4695f2e3efe710a583a639fa53dbabb64).
  This PR is just to upgrade to alpha-13 (and needs to be adjusted with the 
release)
   
   > Is there a Maven 4 plugin IT to look at such a Maven 4 plugin?
   
   Yes, there's one at 
https://github.com/apache/maven-plugin-tools/tree/5297a91a8f8b4df54c96566b0629bb72944c2047/maven-plugin-plugin/src/it/v4api
   
   > and key question: is this PR intended for 3.12.0 release, as noted in Jira?
   
   Yes
   


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

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

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



Re: [I] `Could not acquire write lock for…` errors [maven-mvnd]

2024-03-21 Thread via GitHub


eliasbalasis commented on issue #836:
URL: https://github.com/apache/maven-mvnd/issues/836#issuecomment-2011984873

   `semaphore-redisson` named locks factory did not work either.
   
   I will try with Hazelcast name locks factory.


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

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

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



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

2024-03-21 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MPLUGIN-508:


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

   > The plugin currently supports building either a Maven 3 or a Maven 4 
plugin.
   
   sorry, I still need some explanations because I can't guess from this PR 
touching 75 files described as "Upgrade to Maven 4.0.0-alpha-12"
   
   is this PR about adding support for Maven 4 specific plugins in addition to 
classical Maven 3 plugins? or just upgrading such a support added before that I 
overlooked?
   
   Is there a Maven 4 plugin IT to look at such a Maven 4 plugin?
   
   and key question: is this PR intended for 3.12.0 release, as noted in Jira?




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




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


Re: [PR] [MPLUGIN-508] Upgrade to Maven 4.0.0-alpha-12 [maven-plugin-tools]

2024-03-21 Thread via GitHub


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

   > The plugin currently supports building either a Maven 3 or a Maven 4 
plugin.
   
   sorry, I still need some explanations because I can't guess from this PR 
touching 75 files described as "Upgrade to Maven 4.0.0-alpha-12"
   
   is this PR about adding support for Maven 4 specific plugins in addition to 
classical Maven 3 plugins? or just upgrading such a support added before that I 
overlooked?
   
   Is there a Maven 4 plugin IT to look at such a Maven 4 plugin?
   
   and key question: is this PR intended for 3.12.0 release, as noted in Jira?


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

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

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



[jira] [Created] (MPLUGIN-514) switch dependency schema from png + imagemap to svg, and update

2024-03-21 Thread Herve Boutemy (Jira)
Herve Boutemy created MPLUGIN-514:
-

 Summary: switch dependency schema from png + imagemap to svg, and 
update
 Key: MPLUGIN-514
 URL: https://issues.apache.org/jira/browse/MPLUGIN-514
 Project: Maven Plugin Tools
  Issue Type: Improvement
Affects Versions: 3.11.0
Reporter: Herve Boutemy
Assignee: Herve Boutemy
 Fix For: 3.12.0


makes updates much easier: hyperlink can be added to source .odf file
then export to svg (select all then limit export to selection) in root directory
then run ./prepare-svg.sh

requires install of svgo to rework the svg exported by LibreOffice: 
https://svgo.dev/

result published to 
https://maven.apache.org/plugin-tools-archives/plugin-tools-LATEST/
vs initial png 
https://maven.apache.org/plugin-tools-archives/plugin-tools-3.11.0/

also updating for part changes: introduction of maven-plugin-report-plugin, 
removal of javadoc doclet, deprecation of script



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


Re: [I] `Could not acquire write lock for…` errors [maven-mvnd]

2024-03-21 Thread via GitHub


eliasbalasis commented on issue #836:
URL: https://github.com/apache/maven-mvnd/issues/836#issuecomment-2011917775

   `-Daether.named.diagnostic.enabled=true` did not reveal much, except 
detailed list of the active locks.
   
   However, I was using the `rwlock-redisson` named locks factory.
   
   I will try with other named lock factories.
   


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

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

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



[jira] [Updated] (MJAVADOC-787) Automatic detection of release option for JDK < 9

2024-03-21 Thread Jira


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

Jorge Solórzano updated MJAVADOC-787:
-
Description: 
The maven-compiler-plugin 3.13.0 now has detection of the release option:
 * https://issues.apache.org/jira/browse/MCOMPILER-582

But this should be expanded to maven-javadoc-plugin as well; this will allow 
the use of a global property like:
{code:xml}
${javaVersion}
{code}
and not fail if the javadoc is generated on JDK 8.

  was:
The maven-compiler-plugin 3.13.0 now has detection of the release option:
* https://issues.apache.org/jira/browse/MCOMPILER-582

But this should be expanded to maven-javadoc-plugin as well, this will allow to 
use a global property like:

{code:xml}
${javaVersion}
{code}

and not fail if the javadoc is generated on JDK 8.


> Automatic detection of release option for JDK < 9
> -
>
> Key: MJAVADOC-787
> URL: https://issues.apache.org/jira/browse/MJAVADOC-787
> Project: Maven Javadoc Plugin
>  Issue Type: New Feature
>  Components: javadoc
>Affects Versions: 3.6.3
>Reporter: Jorge Solórzano
>Priority: Major
>
> The maven-compiler-plugin 3.13.0 now has detection of the release option:
>  * https://issues.apache.org/jira/browse/MCOMPILER-582
> But this should be expanded to maven-javadoc-plugin as well; this will allow 
> the use of a global property like:
> {code:xml}
> ${javaVersion}
> {code}
> and not fail if the javadoc is generated on JDK 8.



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


[jira] [Created] (MJAVADOC-787) Automatic detection of release option for JDK < 9

2024-03-21 Thread Jira
Jorge Solórzano created MJAVADOC-787:


 Summary: Automatic detection of release option for JDK < 9
 Key: MJAVADOC-787
 URL: https://issues.apache.org/jira/browse/MJAVADOC-787
 Project: Maven Javadoc Plugin
  Issue Type: New Feature
  Components: javadoc
Affects Versions: 3.6.3
Reporter: Jorge Solórzano


The maven-compiler-plugin 3.13.0 now has detection of the release option:
* https://issues.apache.org/jira/browse/MCOMPILER-582

But this should be expanded to maven-javadoc-plugin as well, this will allow to 
use a global property like:

{code:xml}
${javaVersion}
{code}

and not fail if the javadoc is generated on JDK 8.



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


Re: [I] `Could not acquire write lock for…` errors [maven-mvnd]

2024-03-21 Thread via GitHub


eliasbalasis commented on issue #836:
URL: https://github.com/apache/maven-mvnd/issues/836#issuecomment-2011705857

   Unfortunately, after a little while the problem is still present.
   
   `Could not acquire lock(s)`
   
   I am switching back to `-Daether.syncContext.named.factory=file-lock 
-Daether.syncContext.named.nameMapper=file-gav`
   
   This is not perfect but at least it hasn't reproduced the problem for a 
considerably long period of time.
   


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

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

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



[jira] [Commented] (MNG-4840) Prerequisites is not working on m3

2024-03-21 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-4840:
-

kwin commented on PR #1444:
URL: https://github.com/apache/maven/pull/1444#issuecomment-2011397677

   @hboutemy I am confused by this PR. MNG-4840 iss not about plugin 
descriptors but about POMs. The required Maven version in plugin descriptors 
has been added in just recently and is only evaluated in Maven4+.




> Prerequisites is not working on m3
> --
>
> Key: MNG-4840
> URL: https://issues.apache.org/jira/browse/MNG-4840
> Project: Maven
>  Issue Type: Bug
>  Components: POM
>Affects Versions: 3.0-alpha-6, 3.0-alpha-7, 3.0-beta-1, 3.0-beta-2, 
> 3.0-beta-3
>Reporter: velo
>Assignee: Benjamin Bentmann
>Priority: Major
> Fix For: 3.0.2
>
> Attachments: mng-001.zip, testapp.tar
>
>
> I set my plugin to prerequisite on maven 4 (ok, it doesn't exists yet), but 
> the build just passed =/
> Sample attached



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


Re: [PR] [MNG-4840] document requiredMavenVersion in plugin descriptor [maven]

2024-03-21 Thread via GitHub


kwin commented on PR #1444:
URL: https://github.com/apache/maven/pull/1444#issuecomment-2011397677

   @hboutemy I am confused by this PR. MNG-4840 iss not about plugin 
descriptors but about POMs. The required Maven version in plugin descriptors 
has been added in just recently and is only evaluated in Maven4+.


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

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

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



Re: [I] `Could not acquire write lock for…` errors [maven-mvnd]

2024-03-21 Thread via GitHub


eliasbalasis commented on issue #836:
URL: https://github.com/apache/maven-mvnd/issues/836#issuecomment-2011385660

   As promised, I am now transforming our build systems to make use of Maven 
3.9.6 and named locks for our parallel builds.
   
   The first indications are promising, using a remote Redisson cache.
   However, it will take a while to observe the system under heavy load.
   
   I will be reporting findings here.
   


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

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

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