[jira] [Assigned] (MRESOLVER-382) Define local outgoing (bind) address

2023-07-05 Thread Benjamin Marwell (Jira)

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

Benjamin Marwell reassigned MRESOLVER-382:
--

Assignee: Benjamin Marwell

> Define local outgoing (bind) address
> 
>
> Key: MRESOLVER-382
> URL: https://issues.apache.org/jira/browse/MRESOLVER-382
> Project: Maven Resolver
>  Issue Type: Improvement
>  Components: Resolver
>Reporter: Benjamin Marwell
>Assignee: Benjamin Marwell
>Priority: Major
>
> Currently, outgoing PUT connections (or download from central for that 
> matter) will be resolved over the default route.
> However, this is not always feasible.
>  h2. Expected behaviour
> A new property {{aether.connector.http.bind.address}} is defined for outgoing 
> requests, so that other routes (other interfaces) can be used.
> h2. Actual behaviour
> Certain systems cannot be reached when a firewall is only opened on a 
> non-default interface.
> h2. User Story
> Builds on servers with multiple interfaces: 
> * The default route is defined poorly
> * Other interfaces are available and have the requested firewall rules
> * User defines -Daether.connector.http.bind.address=${myotherip} (or local 
> address) to make outgoing connections to bind to another interface than the 
> default one.



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


[jira] [Commented] (MRESOLVER-382) Define local outgoing (bind) address

2023-07-05 Thread ASF GitHub Bot (Jira)

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

ASF GitHub Bot commented on MRESOLVER-382:
--

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

   fixes MRESOLVER-382




> Define local outgoing (bind) address
> 
>
> Key: MRESOLVER-382
> URL: https://issues.apache.org/jira/browse/MRESOLVER-382
> Project: Maven Resolver
>  Issue Type: Improvement
>  Components: Resolver
>Reporter: Benjamin Marwell
>Assignee: Benjamin Marwell
>Priority: Major
>
> Currently, outgoing PUT connections (or download from central for that 
> matter) will be resolved over the default route.
> However, this is not always feasible.
>  h2. Expected behaviour
> A new property {{aether.connector.http.bind.address}} is defined for outgoing 
> requests, so that other routes (other interfaces) can be used.
> h2. Actual behaviour
> Certain systems cannot be reached when a firewall is only opened on a 
> non-default interface.
> h2. User Story
> Builds on servers with multiple interfaces: 
> * The default route is defined poorly
> * Other interfaces are available and have the requested firewall rules
> * User defines -Daether.connector.http.bind.address=${myotherip} (or local 
> address) to make outgoing connections to bind to another interface than the 
> default one.



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


[GitHub] [maven-resolver] michael-o commented on a diff in pull request #315: [MRESOLVER-382] allow setting outgoing interface

2023-07-05 Thread via GitHub

michael-o commented on code in PR #315:
URL: https://github.com/apache/maven-resolver/pull/315#discussion_r1252657965


##
maven-resolver-transport-http/src/main/java/org/eclipse/aether/transport/http/HttpTransporter.java:
##
@@ -295,6 +300,20 @@ final class HttpTransporter extends AbstractTransporter {
 this.client = builder.build();
 }
 
+private InetAddress getBindAddress(RepositorySystemSession session) {
+String bindAddress = ConfigUtils.getString(session, null, 
BIND_ADDRESS);
+return 
Optional.ofNullable(bindAddress).map(this::resolveAddressOrNull).orElse(null);
+}
+
+private InetAddress resolveAddressOrNull(String hostOrIp) {
+try {
+return InetAddress.getByName(hostOrIp);
+} catch (UnknownHostException uhe) {
+LOGGER.warn("Given bind host (" + hostOrIp + ") cannot be 
resolved. Reverting to default route.");

Review Comment:
   I'd use `address` throughout and consistently...



-- 
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] (MRESOLVER-382) Define local outgoing (bind) address

2023-07-05 Thread ASF GitHub Bot (Jira)

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

ASF GitHub Bot commented on MRESOLVER-382:
--

michael-o commented on code in PR #315:
URL: https://github.com/apache/maven-resolver/pull/315#discussion_r1252657965


##
maven-resolver-transport-http/src/main/java/org/eclipse/aether/transport/http/HttpTransporter.java:
##
@@ -295,6 +300,20 @@ final class HttpTransporter extends AbstractTransporter {
 this.client = builder.build();
 }
 
+private InetAddress getBindAddress(RepositorySystemSession session) {
+String bindAddress = ConfigUtils.getString(session, null, 
BIND_ADDRESS);
+return 
Optional.ofNullable(bindAddress).map(this::resolveAddressOrNull).orElse(null);
+}
+
+private InetAddress resolveAddressOrNull(String hostOrIp) {
+try {
+return InetAddress.getByName(hostOrIp);
+} catch (UnknownHostException uhe) {
+LOGGER.warn("Given bind host (" + hostOrIp + ") cannot be 
resolved. Reverting to default route.");

Review Comment:
   I'd use `address` throughout and consistently...





> Define local outgoing (bind) address
> 
>
> Key: MRESOLVER-382
> URL: https://issues.apache.org/jira/browse/MRESOLVER-382
> Project: Maven Resolver
>  Issue Type: Improvement
>  Components: Resolver
>Reporter: Benjamin Marwell
>Assignee: Benjamin Marwell
>Priority: Major
>
> Currently, outgoing PUT connections (or download from central for that 
> matter) will be resolved over the default route.
> However, this is not always feasible.
>  h2. Expected behaviour
> A new property {{aether.connector.http.bind.address}} is defined for outgoing 
> requests, so that other routes (other interfaces) can be used.
> h2. Actual behaviour
> Certain systems cannot be reached when a firewall is only opened on a 
> non-default interface.
> h2. User Story
> Builds on servers with multiple interfaces: 
> * The default route is defined poorly
> * Other interfaces are available and have the requested firewall rules
> * User defines -Daether.connector.http.bind.address=${myotherip} (or local 
> address) to make outgoing connections to bind to another interface than the 
> default one.



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


[GitHub] [maven-resolver] bmarwell commented on a diff in pull request #315: [MRESOLVER-382] allow setting outgoing interface

2023-07-05 Thread via GitHub

bmarwell commented on code in PR #315:
URL: https://github.com/apache/maven-resolver/pull/315#discussion_r1252667551


##
maven-resolver-transport-http/src/main/java/org/eclipse/aether/transport/http/HttpTransporter.java:
##
@@ -295,6 +300,20 @@ final class HttpTransporter extends AbstractTransporter {
 this.client = builder.build();
 }
 
+private InetAddress getBindAddress(RepositorySystemSession session) {
+String bindAddress = ConfigUtils.getString(session, null, 
BIND_ADDRESS);
+return 
Optional.ofNullable(bindAddress).map(this::resolveAddressOrNull).orElse(null);
+}
+
+private InetAddress resolveAddressOrNull(String hostOrIp) {
+try {
+return InetAddress.getByName(hostOrIp);
+} catch (UnknownHostException uhe) {
+LOGGER.warn("Given bind host (" + hostOrIp + ") cannot be 
resolved. Reverting to default route.");

Review Comment:
   Thanks!
   I just saw I swallowed the UHE. Maybe add a debug logging?



-- 
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] (MRESOLVER-382) Define local outgoing (bind) address

2023-07-05 Thread ASF GitHub Bot (Jira)

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

ASF GitHub Bot commented on MRESOLVER-382:
--

bmarwell commented on code in PR #315:
URL: https://github.com/apache/maven-resolver/pull/315#discussion_r1252667551


##
maven-resolver-transport-http/src/main/java/org/eclipse/aether/transport/http/HttpTransporter.java:
##
@@ -295,6 +300,20 @@ final class HttpTransporter extends AbstractTransporter {
 this.client = builder.build();
 }
 
+private InetAddress getBindAddress(RepositorySystemSession session) {
+String bindAddress = ConfigUtils.getString(session, null, 
BIND_ADDRESS);
+return 
Optional.ofNullable(bindAddress).map(this::resolveAddressOrNull).orElse(null);
+}
+
+private InetAddress resolveAddressOrNull(String hostOrIp) {
+try {
+return InetAddress.getByName(hostOrIp);
+} catch (UnknownHostException uhe) {
+LOGGER.warn("Given bind host (" + hostOrIp + ") cannot be 
resolved. Reverting to default route.");

Review Comment:
   Thanks!
   I just saw I swallowed the UHE. Maybe add a debug logging?





> Define local outgoing (bind) address
> 
>
> Key: MRESOLVER-382
> URL: https://issues.apache.org/jira/browse/MRESOLVER-382
> Project: Maven Resolver
>  Issue Type: Improvement
>  Components: Resolver
>Reporter: Benjamin Marwell
>Assignee: Benjamin Marwell
>Priority: Major
>
> Currently, outgoing PUT connections (or download from central for that 
> matter) will be resolved over the default route.
> However, this is not always feasible.
>  h2. Expected behaviour
> A new property {{aether.connector.http.bind.address}} is defined for outgoing 
> requests, so that other routes (other interfaces) can be used.
> h2. Actual behaviour
> Certain systems cannot be reached when a firewall is only opened on a 
> non-default interface.
> h2. User Story
> Builds on servers with multiple interfaces: 
> * The default route is defined poorly
> * Other interfaces are available and have the requested firewall rules
> * User defines -Daether.connector.http.bind.address=${myotherip} (or local 
> address) to make outgoing connections to bind to another interface than the 
> default one.



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


[GitHub] [maven-resolver] michael-o commented on a diff in pull request #315: [MRESOLVER-382] allow setting outgoing interface

2023-07-05 Thread via GitHub

michael-o commented on code in PR #315:
URL: https://github.com/apache/maven-resolver/pull/315#discussion_r1252670683


##
maven-resolver-transport-http/src/main/java/org/eclipse/aether/transport/http/HttpTransporter.java:
##
@@ -295,6 +300,20 @@ final class HttpTransporter extends AbstractTransporter {
 this.client = builder.build();
 }
 
+private InetAddress getBindAddress(RepositorySystemSession session) {
+String bindAddress = ConfigUtils.getString(session, null, 
BIND_ADDRESS);
+return 
Optional.ofNullable(bindAddress).map(this::resolveAddressOrNull).orElse(null);
+}
+
+private InetAddress resolveAddressOrNull(String bindAddress) {
+try {
+return InetAddress.getByName(bindAddress);
+} catch (UnknownHostException uhe) {
+LOGGER.warn("Given bind address (" + bindAddress + ") cannot be 
resolved. Reverting to default route.");

Review Comment:
   Shouldn't this really fail with IAE? I mean, if you provide invalid values 
the system should fail no? If you want default, don't provide 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] (MRESOLVER-382) Define local outgoing (bind) address

2023-07-05 Thread ASF GitHub Bot (Jira)

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

ASF GitHub Bot commented on MRESOLVER-382:
--

michael-o commented on code in PR #315:
URL: https://github.com/apache/maven-resolver/pull/315#discussion_r1252670683


##
maven-resolver-transport-http/src/main/java/org/eclipse/aether/transport/http/HttpTransporter.java:
##
@@ -295,6 +300,20 @@ final class HttpTransporter extends AbstractTransporter {
 this.client = builder.build();
 }
 
+private InetAddress getBindAddress(RepositorySystemSession session) {
+String bindAddress = ConfigUtils.getString(session, null, 
BIND_ADDRESS);
+return 
Optional.ofNullable(bindAddress).map(this::resolveAddressOrNull).orElse(null);
+}
+
+private InetAddress resolveAddressOrNull(String bindAddress) {
+try {
+return InetAddress.getByName(bindAddress);
+} catch (UnknownHostException uhe) {
+LOGGER.warn("Given bind address (" + bindAddress + ") cannot be 
resolved. Reverting to default route.");

Review Comment:
   Shouldn't this really fail with IAE? I mean, if you provide invalid values 
the system should fail no? If you want default, don't provide it.





> Define local outgoing (bind) address
> 
>
> Key: MRESOLVER-382
> URL: https://issues.apache.org/jira/browse/MRESOLVER-382
> Project: Maven Resolver
>  Issue Type: Improvement
>  Components: Resolver
>Reporter: Benjamin Marwell
>Assignee: Benjamin Marwell
>Priority: Major
>
> Currently, outgoing PUT connections (or download from central for that 
> matter) will be resolved over the default route.
> However, this is not always feasible.
>  h2. Expected behaviour
> A new property {{aether.connector.http.bind.address}} is defined for outgoing 
> requests, so that other routes (other interfaces) can be used.
> h2. Actual behaviour
> Certain systems cannot be reached when a firewall is only opened on a 
> non-default interface.
> h2. User Story
> Builds on servers with multiple interfaces: 
> * The default route is defined poorly
> * Other interfaces are available and have the requested firewall rules
> * User defines -Daether.connector.http.bind.address=${myotherip} (or local 
> address) to make outgoing connections to bind to another interface than the 
> default one.



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


[GitHub] [maven-resolver] bmarwell commented on a diff in pull request #315: [MRESOLVER-382] allow setting outgoing interface

2023-07-05 Thread via GitHub

bmarwell commented on code in PR #315:
URL: https://github.com/apache/maven-resolver/pull/315#discussion_r1252673255


##
maven-resolver-transport-http/src/main/java/org/eclipse/aether/transport/http/HttpTransporter.java:
##
@@ -295,6 +300,20 @@ final class HttpTransporter extends AbstractTransporter {
 this.client = builder.build();
 }
 
+private InetAddress getBindAddress(RepositorySystemSession session) {
+String bindAddress = ConfigUtils.getString(session, null, 
BIND_ADDRESS);
+return 
Optional.ofNullable(bindAddress).map(this::resolveAddressOrNull).orElse(null);
+}
+
+private InetAddress resolveAddressOrNull(String bindAddress) {
+try {
+return InetAddress.getByName(bindAddress);
+} catch (UnknownHostException uhe) {
+LOGGER.warn("Given bind address (" + bindAddress + ") cannot be 
resolved. Reverting to default route.");

Review Comment:
   Yes, that would be less surprising. I agree. Will change this, too. This 
also answers my question about the swallowed log message.



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

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

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



[GitHub] [maven] gnodet commented on a diff in pull request #1193: Improve API doc for ArtifactHandler

2023-07-05 Thread via GitHub

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


##
maven-artifact/src/main/java/org/apache/maven/artifact/handler/ArtifactHandler.java:
##
@@ -41,7 +42,7 @@ public interface ArtifactHandler {
 String getDirectory();
 
 /**
- * Get the classifier associated to the dependency type.
+ * Returns the classifier of the dependency.

Review Comment:
   Note that the v4 api provides 
[`Type`](https://github.com/apache/maven/blob/master/api/maven-api-core/src/main/java/org/apache/maven/api/Type.java)
 as an equivalent to v3 `ArtifactHandler`, directly accessible using 
[`Dependency#getType()`](https://github.com/apache/maven/blob/master/api/maven-api-core/src/main/java/org/apache/maven/api/Dependency.java#L25-L31).
  Maybe the api could be improved at the same time (replace _artifact type_ 
with _dependency type_ as a first step for example).



-- 
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] (MRESOLVER-382) Define local outgoing (bind) address

2023-07-05 Thread ASF GitHub Bot (Jira)

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

ASF GitHub Bot commented on MRESOLVER-382:
--

bmarwell commented on code in PR #315:
URL: https://github.com/apache/maven-resolver/pull/315#discussion_r1252673255


##
maven-resolver-transport-http/src/main/java/org/eclipse/aether/transport/http/HttpTransporter.java:
##
@@ -295,6 +300,20 @@ final class HttpTransporter extends AbstractTransporter {
 this.client = builder.build();
 }
 
+private InetAddress getBindAddress(RepositorySystemSession session) {
+String bindAddress = ConfigUtils.getString(session, null, 
BIND_ADDRESS);
+return 
Optional.ofNullable(bindAddress).map(this::resolveAddressOrNull).orElse(null);
+}
+
+private InetAddress resolveAddressOrNull(String bindAddress) {
+try {
+return InetAddress.getByName(bindAddress);
+} catch (UnknownHostException uhe) {
+LOGGER.warn("Given bind address (" + bindAddress + ") cannot be 
resolved. Reverting to default route.");

Review Comment:
   Yes, that would be less surprising. I agree. Will change this, too. This 
also answers my question about the swallowed log message.





> Define local outgoing (bind) address
> 
>
> Key: MRESOLVER-382
> URL: https://issues.apache.org/jira/browse/MRESOLVER-382
> Project: Maven Resolver
>  Issue Type: Improvement
>  Components: Resolver
>Reporter: Benjamin Marwell
>Assignee: Benjamin Marwell
>Priority: Major
>
> Currently, outgoing PUT connections (or download from central for that 
> matter) will be resolved over the default route.
> However, this is not always feasible.
>  h2. Expected behaviour
> A new property {{aether.connector.http.bind.address}} is defined for outgoing 
> requests, so that other routes (other interfaces) can be used.
> h2. Actual behaviour
> Certain systems cannot be reached when a firewall is only opened on a 
> non-default interface.
> h2. User Story
> Builds on servers with multiple interfaces: 
> * The default route is defined poorly
> * Other interfaces are available and have the requested firewall rules
> * User defines -Daether.connector.http.bind.address=${myotherip} (or local 
> address) to make outgoing connections to bind to another interface than the 
> default one.



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


[GitHub] [maven-resolver] michael-o commented on a diff in pull request #315: [MRESOLVER-382] allow setting outgoing interface

2023-07-05 Thread via GitHub

michael-o commented on code in PR #315:
URL: https://github.com/apache/maven-resolver/pull/315#discussion_r1252684740


##
maven-resolver-transport-http/src/main/java/org/eclipse/aether/transport/http/HttpTransporter.java:
##
@@ -295,6 +300,20 @@ final class HttpTransporter extends AbstractTransporter {
 this.client = builder.build();
 }
 
+private InetAddress getBindAddress(RepositorySystemSession session) {
+String bindAddress = ConfigUtils.getString(session, null, 
BIND_ADDRESS);
+return 
Optional.ofNullable(bindAddress).map(this::resolveAddressOrNull).orElse(null);
+}
+
+private InetAddress resolveAddressOrNull(String bindAddress) {

Review Comment:
   It is not null anymore...



-- 
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] (MRESOLVER-382) Define local outgoing (bind) address

2023-07-05 Thread ASF GitHub Bot (Jira)

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

ASF GitHub Bot commented on MRESOLVER-382:
--

michael-o commented on code in PR #315:
URL: https://github.com/apache/maven-resolver/pull/315#discussion_r1252684740


##
maven-resolver-transport-http/src/main/java/org/eclipse/aether/transport/http/HttpTransporter.java:
##
@@ -295,6 +300,20 @@ final class HttpTransporter extends AbstractTransporter {
 this.client = builder.build();
 }
 
+private InetAddress getBindAddress(RepositorySystemSession session) {
+String bindAddress = ConfigUtils.getString(session, null, 
BIND_ADDRESS);
+return 
Optional.ofNullable(bindAddress).map(this::resolveAddressOrNull).orElse(null);
+}
+
+private InetAddress resolveAddressOrNull(String bindAddress) {

Review Comment:
   It is not null anymore...





> Define local outgoing (bind) address
> 
>
> Key: MRESOLVER-382
> URL: https://issues.apache.org/jira/browse/MRESOLVER-382
> Project: Maven Resolver
>  Issue Type: Improvement
>  Components: Resolver
>Reporter: Benjamin Marwell
>Assignee: Benjamin Marwell
>Priority: Major
>
> Currently, outgoing PUT connections (or download from central for that 
> matter) will be resolved over the default route.
> However, this is not always feasible.
>  h2. Expected behaviour
> A new property {{aether.connector.http.bind.address}} is defined for outgoing 
> requests, so that other routes (other interfaces) can be used.
> h2. Actual behaviour
> Certain systems cannot be reached when a firewall is only opened on a 
> non-default interface.
> h2. User Story
> Builds on servers with multiple interfaces: 
> * The default route is defined poorly
> * Other interfaces are available and have the requested firewall rules
> * User defines -Daether.connector.http.bind.address=${myotherip} (or local 
> address) to make outgoing connections to bind to another interface than the 
> default one.



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


[GitHub] [maven-resolver] michael-o commented on a diff in pull request #315: [MRESOLVER-382] allow setting outgoing interface

2023-07-05 Thread via GitHub

michael-o commented on code in PR #315:
URL: https://github.com/apache/maven-resolver/pull/315#discussion_r1252831609


##
maven-resolver-transport-http/src/main/java/org/eclipse/aether/transport/http/HttpTransporter.java:
##
@@ -295,6 +300,20 @@ final class HttpTransporter extends AbstractTransporter {
 this.client = builder.build();
 }
 
+private InetAddress getBindAddress(RepositorySystemSession session) {
+String bindAddress = ConfigUtils.getString(session, null, 
BIND_ADDRESS);
+return 
Optional.ofNullable(bindAddress).map(this::resolveAddress).orElse(null);
+}
+
+private InetAddress resolveAddress(String bindAddress) {
+try {
+return InetAddress.getByName(bindAddress);
+} catch (UnknownHostException uhe) {
+throw new IllegalArgumentException(
+"Given bind address (" + bindAddress + ") cannot be 
resolved. Reverting to default route.", uhe);

Review Comment:
   The message is not correct anymore



-- 
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] (MRESOLVER-382) Define local outgoing (bind) address

2023-07-05 Thread ASF GitHub Bot (Jira)

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

ASF GitHub Bot commented on MRESOLVER-382:
--

michael-o commented on code in PR #315:
URL: https://github.com/apache/maven-resolver/pull/315#discussion_r1252831609


##
maven-resolver-transport-http/src/main/java/org/eclipse/aether/transport/http/HttpTransporter.java:
##
@@ -295,6 +300,20 @@ final class HttpTransporter extends AbstractTransporter {
 this.client = builder.build();
 }
 
+private InetAddress getBindAddress(RepositorySystemSession session) {
+String bindAddress = ConfigUtils.getString(session, null, 
BIND_ADDRESS);
+return 
Optional.ofNullable(bindAddress).map(this::resolveAddress).orElse(null);
+}
+
+private InetAddress resolveAddress(String bindAddress) {
+try {
+return InetAddress.getByName(bindAddress);
+} catch (UnknownHostException uhe) {
+throw new IllegalArgumentException(
+"Given bind address (" + bindAddress + ") cannot be 
resolved. Reverting to default route.", uhe);

Review Comment:
   The message is not correct anymore





> Define local outgoing (bind) address
> 
>
> Key: MRESOLVER-382
> URL: https://issues.apache.org/jira/browse/MRESOLVER-382
> Project: Maven Resolver
>  Issue Type: Improvement
>  Components: Resolver
>Reporter: Benjamin Marwell
>Assignee: Benjamin Marwell
>Priority: Major
>
> Currently, outgoing PUT connections (or download from central for that 
> matter) will be resolved over the default route.
> However, this is not always feasible.
>  h2. Expected behaviour
> A new property {{aether.connector.http.bind.address}} is defined for outgoing 
> requests, so that other routes (other interfaces) can be used.
> h2. Actual behaviour
> Certain systems cannot be reached when a firewall is only opened on a 
> non-default interface.
> h2. User Story
> Builds on servers with multiple interfaces: 
> * The default route is defined poorly
> * Other interfaces are available and have the requested firewall rules
> * User defines -Daether.connector.http.bind.address=${myotherip} (or local 
> address) to make outgoing connections to bind to another interface than the 
> default one.



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


[GitHub] [maven-enforcer] kwin merged pull request #278: Clarify availability of AbstractEnforcerRule

2023-07-05 Thread via GitHub

kwin merged PR #278:
URL: https://github.com/apache/maven-enforcer/pull/278


-- 
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] (MNGSITE-521) Define dependency type

2023-07-05 Thread Elliotte Rusty Harold (Jira)

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

Elliotte Rusty Harold commented on MNGSITE-521:
---

I'm still not sure myself what a dependency type truly is. Starting with a 
rough idea for improvement and iteration:

The type of a dependency is a string name (any syntactic restrictions on that?) 
that indicates the purpose for which an artifact will be loaded and determines 
how and when it will participate in the build process. For example, ...

> Define dependency type
> --
>
> Key: MNGSITE-521
> URL: https://issues.apache.org/jira/browse/MNGSITE-521
> Project: Maven Project Web Site
>  Issue Type: Bug
>Reporter: Elliotte Rusty Harold
>Priority: Critical
>
> At no point I can find do we ever explain what a "dependency type" is though 
> it's referenced in various places in the docs. It's not a Java type. It's not 
> a file type. Beyond that I can't explain it. 



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


[jira] [Updated] (MNGSITE-521) Define dependency type

2023-07-05 Thread Elliotte Rusty Harold (Jira)

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

Elliotte Rusty Harold updated MNGSITE-521:
--
Description: 
At no point I can find do we ever explain what a "dependency type" is though 
it's referenced in various places in the docs. It's not a Java type. It's not a 
file type. Beyond that I can't explain it. 

api/maven-api-core/src/main/java/org/apache/maven/api/Dependency.java

  was:At no point I can find do we ever explain what a "dependency type" is 
though it's referenced in various places in the docs. It's not a Java type. 
It's not a file type. Beyond that I can't explain it. 


> Define dependency type
> --
>
> Key: MNGSITE-521
> URL: https://issues.apache.org/jira/browse/MNGSITE-521
> Project: Maven Project Web Site
>  Issue Type: Bug
>Reporter: Elliotte Rusty Harold
>Priority: Critical
>
> At no point I can find do we ever explain what a "dependency type" is though 
> it's referenced in various places in the docs. It's not a Java type. It's not 
> a file type. Beyond that I can't explain it. 
> api/maven-api-core/src/main/java/org/apache/maven/api/Dependency.java



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


[GitHub] [maven] elharo commented on a diff in pull request #1198: Javadoc fixes

2023-07-05 Thread via GitHub

elharo commented on code in PR #1198:
URL: https://github.com/apache/maven/pull/1198#discussion_r1252960901


##
api/maven-api-core/src/main/java/org/apache/maven/api/Type.java:
##
@@ -22,7 +22,7 @@
 import org.apache.maven.api.annotations.Immutable;
 
 /**
- * An artifact's{@code Type} represents a known kind of artifacts.
+ * A dependency's {@code Type} represents a known kind of dependencies.
  * Such types are often associated to an extension and possibly

Review Comment:
   associated with
   
   Is this often or always?



##
api/maven-api-core/src/main/java/org/apache/maven/api/Dependency.java:
##
@@ -23,9 +23,9 @@
 public interface Dependency extends Artifact {

Review Comment:
   Realizing now this inheritance hierarchy is wonky. This suggests a 
Dependency *is* an artifact, which isn't true. Nothing to do about that in this 
PR of course, but I wanted to call it out while I'm thinking about it. 



##
api/maven-api-core/src/main/java/org/apache/maven/api/Type.java:
##
@@ -22,7 +22,7 @@
 import org.apache.maven.api.annotations.Immutable;
 
 /**
- * An artifact's{@code Type} represents a known kind of artifacts.
+ * A dependency's {@code Type} represents a known kind of dependencies.

Review Comment:
   dependency (singular)
   
   This comment gives an example, which is good, but it still doesn't fully 
explain what a dependency type *is*. see 
https://issues.apache.org/jira/browse/MNGSITE-521
   



-- 
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-7828) Bump guava from 31.1-jre to 32.0.1-jre

2023-07-05 Thread ASF GitHub Bot (Jira)

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

ASF GitHub Bot commented on MNG-7828:
-

bvolpato commented on PR #1191:
URL: https://github.com/apache/maven/pull/1191#issuecomment-1621608212

   I looked into it, but it's not very straightforward like the bump of 
`` here. In `3.8.x`, Guava comes transitively from Guice.




> Bump guava from 31.1-jre to 32.0.1-jre
> --
>
> Key: MNG-7828
> URL: https://issues.apache.org/jira/browse/MNG-7828
> Project: Maven
>  Issue Type: Dependency upgrade
>Affects Versions: 3.9.x-candidate, 4.0.x-candidate
>Reporter: Bruno Candido Volpato da Cunha
>Priority: Major
>
> Currently used version is in the range of CVE-2023-2976, which was fixed in 
> 32.0.0.
>  
> Please check [https://osv.dev/vulnerability/GHSA-7g45-4rm6-3mm3] for more 
> information.



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


[GitHub] [maven] elharo commented on a diff in pull request #1197: [MNG 7836] Support alternative syntaxes for POMs

2023-07-05 Thread via GitHub

elharo commented on code in PR #1197:
URL: https://github.com/apache/maven/pull/1197#discussion_r1252988776


##
api/maven-api-core/src/main/java/org/apache/maven/api/services/Source.java:
##
@@ -20,17 +20,35 @@
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.nio.file.Path;
 
 import org.apache.maven.api.annotations.Experimental;
+import org.apache.maven.api.annotations.Nonnull;
+import org.apache.maven.api.annotations.Nullable;
 
 /**
- * The source for a project's XML model.
+ * The source for parsing an object.
  *
  * @since 4.0.0
  */
 @Experimental
 public interface Source {
+
+/**
+ * Provides access the file to be parsed, if this source is backed by a 
file.

Review Comment:
   access to
   
   or perhaps just "Returns the path of the file being parsed"



##
api/maven-api-core/src/main/java/org/apache/maven/api/services/Source.java:
##
@@ -20,17 +20,35 @@
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.nio.file.Path;
 
 import org.apache.maven.api.annotations.Experimental;
+import org.apache.maven.api.annotations.Nonnull;
+import org.apache.maven.api.annotations.Nullable;
 
 /**
- * The source for a project's XML model.
+ * The source for parsing an object.
  *
  * @since 4.0.0
  */
 @Experimental
 public interface Source {
+
+/**
+ * Provides access the file to be parsed, if this source is backed by a 
file.
+ */
+@Nullable
+Path getPath();
+
+/**
+ * Creates a readable stream.
+ */
+@Nonnull
 InputStream getInputStream() throws IOException;
 
+/**
+ * Retrieves the location for this source, useful to display to the user.

Review Comment:
   How does this differ from the path? What is a location if not  a path?



##
api/maven-api-spi/src/main/java/org/apache/maven/api/spi/ModelParser.java:
##
@@ -0,0 +1,55 @@
+/*
+ * 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.api.spi;
+
+import java.nio.file.Path;
+import java.util.Map;
+
+import org.apache.maven.api.annotations.Experimental;
+import org.apache.maven.api.annotations.Nonnull;
+import org.apache.maven.api.annotations.Nullable;
+import org.apache.maven.api.model.Model;
+import org.apache.maven.api.services.Source;
+
+/**
+ * The {@code ModelParser} interface is used to locate and read {@link Model}s 
from the file system.
+ * This allows plugging in additional syntaxes for the main model read by 
maven when building a project.

Review Comment:
   Maven



##
api/maven-api-spi/src/main/java/org/apache/maven/api/spi/ModelParser.java:
##
@@ -0,0 +1,55 @@
+/*
+ * 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.api.spi;
+
+import java.nio.file.Path;
+import java.util.Map;
+
+import org.apache.maven.api.annotations.Experimental;
+import org.apache.maven.api.annotations.Nonnull;
+import org.apache.maven.api.annotations.Nullable;
+import org.apache.maven.api.model.Model;
+import org.apache.maven.api.services.Source;
+
+/**
+ * The {@code ModelParser} interface is used to locate and read {@link Model}s 
from the file system.
+ * This allows plugging in additional syntaxes for the main model read by 
maven when building a project.
+ */
+@Experimental
+public interface ModelParser {
+
+/**
+ * Locates the pom in the given directory
+ *
+ * @param dir the directory to locate the pom for, never {@code null}
+  

[jira] [Commented] (MNG-7733) maven4 user settings mirrorOf-external:* does not override global settings external:http:*

2023-07-05 Thread Guillaume Nodet (Jira)

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

Guillaume Nodet commented on MNG-7733:
--

[~sellersj] note that 4.0.0-alpha-7 has been released a few days ago...

> maven4 user settings mirrorOf-external:* does not override global settings 
> external:http:* 
> ---
>
> Key: MNG-7733
> URL: https://issues.apache.org/jira/browse/MNG-7733
> Project: Maven
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 4.0.0-alpha-4
>Reporter: James Nord
>Assignee: Guillaume Nodet
>Priority: Major
>  Labels: regresion
>
> I have a settings file in my home directory (~/.m2/settings.xml) that works 
> fine with maven 3.x (including 3.9.0)
> containing
> {code}
>   
> 
>   myco-internal
>   external:*
>   https://nexus-cache.mycorp.com/content/groups/staged
> 
>   
> {code}
> with maven 4.0.0-alpha4 when building a project it will fail in dependency 
> resolution due to the `maven-default-http-blocker` mirror.
> {noformat}
> unable to create flattened dependencies: caught exception when flattening 
> dependencies: Failed to read artifact descriptor for 
> javax.servlet:javax.servlet-api::3.1.0: Could not transfer artifact 
> net.java:jvnet-parent:pom:3 from/to maven-default-http-blocker 
> (http://0.0.0.0/): Blocked mirror for repositories: [glassfish-repository 
> (http://download.java.net/maven/glassfish, default, releases+snapshots)] -
> {noformat}
> However I expect that my user settings should override global settings.
> as {{external:\*}} used in my local settings should also match anything that 
> is matched by {{external:http:\*}} in the global settings I would not expect 
> that the global settings mirror would be used.
> However this is infact the case.
> if I use --global-settings to specify my local settings file then the builds 
> work
> Additionally changing my mirror defintion to be 
> {{external:\*,external:http:\*}} still does not work
> initial output from {{mvn -x install}}
> {noformat}
> [DEBUG] Reading global settings from 
> 'c:\java\maven-4.0.0-alpha-4\conf\settings.xml'
> [DEBUG] Reading user settings from 'C:\Users\me\.m2\settings.xml'
> [DEBUG] Created adapter factory; available factories [file-lock, 
> rwlock-local, semaphore-local, noop]; available name mappers [discriminating, 
> file-gav, file-hgav, gav, static]
> [DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for 
> C:\Users\me\.m2\repository
> [DEBUG] Creating adapter using nameMapper 'gav' and factory 'rwlock-local'
> [DEBUG] Using mirror myco-internal 
> (https://nexus-cache.mycorp.com/content/groups/staged) for central 
> (https://repo.maven.apache.org/maven2).
> [DEBUG] Using mirror maven-default-http-blocker (http://0.0.0.0/) for 
> apache.snapshots (http://repository.apache.org/snapshots).
> [DEBUG] Using mirror myco-internal 
> (https://nexus-cache.mycorp.com/content/groups/staged) for apache.snapshots 
> (https://repository.apache.org/snapshots).
> [DEBUG] Using mirror maven-default-http-blocker (http://0.0.0.0/) for 
> codehaus.snapshots (http://snapshots.repository.codehaus.org).
> [DEBUG] Using mirror myco-internal 
> (https://nexus-cache.mycorp.com/content/groups/staged) for 
> sonatype-nexus-snapshots 
> (https://oss.sonatype.org/content/repositories/snapshots).
> [DEBUG] Using mirror maven-default-http-blocker (http://0.0.0.0/) for 
> repository.jboss.org (http://repository.jboss.org/maven2).
> [DEBUG] Using mirror maven-default-http-blocker (http://0.0.0.0/) for 
> snapshots.jboss.org (http://snapshots.jboss.org/maven2).
> [DEBUG] Using mirror maven-default-http-blocker (http://0.0.0.0/) for 
> oss.sonatype.org/jboss-snapshots 
> (http://oss.sonatype.org/content/repositories/jboss-snapshots).
> [DEBUG] Using mirror myco-internal 
> (https://nexus-cache.mycorp.com/content/groups/staged) for jgit-repository 
> (https://repo.eclipse.org/content/repositories/jgit-releases/).
> [DEBUG] Using mirror maven-default-http-blocker (http://0.0.0.0/) for spy 
> (http://files.couchbase.com/maven2/).
> {noformat}



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


[jira] [Closed] (MNG-7733) maven4 user settings mirrorOf-external:* does not override global settings external:http:*

2023-07-05 Thread Guillaume Nodet (Jira)

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

Guillaume Nodet closed MNG-7733.

Resolution: Fixed

> maven4 user settings mirrorOf-external:* does not override global settings 
> external:http:* 
> ---
>
> Key: MNG-7733
> URL: https://issues.apache.org/jira/browse/MNG-7733
> Project: Maven
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 4.0.0-alpha-4
>Reporter: James Nord
>Assignee: Guillaume Nodet
>Priority: Major
>  Labels: regresion
>
> I have a settings file in my home directory (~/.m2/settings.xml) that works 
> fine with maven 3.x (including 3.9.0)
> containing
> {code}
>   
> 
>   myco-internal
>   external:*
>   https://nexus-cache.mycorp.com/content/groups/staged
> 
>   
> {code}
> with maven 4.0.0-alpha4 when building a project it will fail in dependency 
> resolution due to the `maven-default-http-blocker` mirror.
> {noformat}
> unable to create flattened dependencies: caught exception when flattening 
> dependencies: Failed to read artifact descriptor for 
> javax.servlet:javax.servlet-api::3.1.0: Could not transfer artifact 
> net.java:jvnet-parent:pom:3 from/to maven-default-http-blocker 
> (http://0.0.0.0/): Blocked mirror for repositories: [glassfish-repository 
> (http://download.java.net/maven/glassfish, default, releases+snapshots)] -
> {noformat}
> However I expect that my user settings should override global settings.
> as {{external:\*}} used in my local settings should also match anything that 
> is matched by {{external:http:\*}} in the global settings I would not expect 
> that the global settings mirror would be used.
> However this is infact the case.
> if I use --global-settings to specify my local settings file then the builds 
> work
> Additionally changing my mirror defintion to be 
> {{external:\*,external:http:\*}} still does not work
> initial output from {{mvn -x install}}
> {noformat}
> [DEBUG] Reading global settings from 
> 'c:\java\maven-4.0.0-alpha-4\conf\settings.xml'
> [DEBUG] Reading user settings from 'C:\Users\me\.m2\settings.xml'
> [DEBUG] Created adapter factory; available factories [file-lock, 
> rwlock-local, semaphore-local, noop]; available name mappers [discriminating, 
> file-gav, file-hgav, gav, static]
> [DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for 
> C:\Users\me\.m2\repository
> [DEBUG] Creating adapter using nameMapper 'gav' and factory 'rwlock-local'
> [DEBUG] Using mirror myco-internal 
> (https://nexus-cache.mycorp.com/content/groups/staged) for central 
> (https://repo.maven.apache.org/maven2).
> [DEBUG] Using mirror maven-default-http-blocker (http://0.0.0.0/) for 
> apache.snapshots (http://repository.apache.org/snapshots).
> [DEBUG] Using mirror myco-internal 
> (https://nexus-cache.mycorp.com/content/groups/staged) for apache.snapshots 
> (https://repository.apache.org/snapshots).
> [DEBUG] Using mirror maven-default-http-blocker (http://0.0.0.0/) for 
> codehaus.snapshots (http://snapshots.repository.codehaus.org).
> [DEBUG] Using mirror myco-internal 
> (https://nexus-cache.mycorp.com/content/groups/staged) for 
> sonatype-nexus-snapshots 
> (https://oss.sonatype.org/content/repositories/snapshots).
> [DEBUG] Using mirror maven-default-http-blocker (http://0.0.0.0/) for 
> repository.jboss.org (http://repository.jboss.org/maven2).
> [DEBUG] Using mirror maven-default-http-blocker (http://0.0.0.0/) for 
> snapshots.jboss.org (http://snapshots.jboss.org/maven2).
> [DEBUG] Using mirror maven-default-http-blocker (http://0.0.0.0/) for 
> oss.sonatype.org/jboss-snapshots 
> (http://oss.sonatype.org/content/repositories/jboss-snapshots).
> [DEBUG] Using mirror myco-internal 
> (https://nexus-cache.mycorp.com/content/groups/staged) for jgit-repository 
> (https://repo.eclipse.org/content/repositories/jgit-releases/).
> [DEBUG] Using mirror maven-default-http-blocker (http://0.0.0.0/) for spy 
> (http://files.couchbase.com/maven2/).
> {noformat}



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


[GitHub] [maven-assembly-plugin] mabrarov commented on a diff in pull request #148: [MASSEMBLY-791] overrideUmask option to ensure permissions in packaged archive match …

2023-07-05 Thread via GitHub

mabrarov commented on code in PR #148:
URL: 
https://github.com/apache/maven-assembly-plugin/pull/148#discussion_r1253062676


##
src/main/java/org/apache/maven/plugins/assembly/AssemblerConfigurationSource.java:
##
@@ -223,4 +223,9 @@ public interface AssemblerConfigurationSource {
  * @return Override group name.
  */
 String getOverrideGroupName();
+
+/**
+ * @return Override umask.

Review Comment:
   Changed to
   
   ```java
   /**
* Mask which is applied to permissions of files/directories before they are 
put into assembly.
* If {@code null} then the mask is not explicitly configured and remains 
implementation-specific.
*/
   ```



-- 
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] (MASSEMBLY-791) fileMode not set in dependencySet creating format tar.gz

2023-07-05 Thread ASF GitHub Bot (Jira)

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

ASF GitHub Bot commented on MASSEMBLY-791:
--

mabrarov commented on code in PR #148:
URL: 
https://github.com/apache/maven-assembly-plugin/pull/148#discussion_r1253062676


##
src/main/java/org/apache/maven/plugins/assembly/AssemblerConfigurationSource.java:
##
@@ -223,4 +223,9 @@ public interface AssemblerConfigurationSource {
  * @return Override group name.
  */
 String getOverrideGroupName();
+
+/**
+ * @return Override umask.

Review Comment:
   Changed to
   
   ```java
   /**
* Mask which is applied to permissions of files/directories before they are 
put into assembly.
* If {@code null} then the mask is not explicitly configured and remains 
implementation-specific.
*/
   ```





> fileMode not set in dependencySet creating format tar.gz
> 
>
> Key: MASSEMBLY-791
> URL: https://issues.apache.org/jira/browse/MASSEMBLY-791
> Project: Maven Assembly Plugin
>  Issue Type: Bug
>  Components: permissions
>Affects Versions: 2.6
> Environment: Linux and Windows
>Reporter: Rick Poleshuck
>Priority: Major
>
> The fileMode is ignored within a dependencySet while creating a tar.gz 
> archive. This works just fine in 2.4.
> 
> 
> 
> com.company:dependency-artifact
> 
> true
> 
> 
> *.py
> 
> 
> 
> 0750
> 0750
> 
> 
> 

[GitHub] [maven-assembly-plugin] mabrarov commented on a diff in pull request #148: [MASSEMBLY-791] overrideUmask option to ensure permissions in packaged archive match …

2023-07-05 Thread via GitHub

mabrarov commented on code in PR #148:
URL: 
https://github.com/apache/maven-assembly-plugin/pull/148#discussion_r1253063508


##
src/main/java/org/apache/maven/plugins/assembly/AssemblerConfigurationSource.java:
##
@@ -223,4 +223,9 @@ public interface AssemblerConfigurationSource {
  * @return Override group name.
  */
 String getOverrideGroupName();
+
+/**
+ * @return Override umask.
+ */
+Integer getOverrideUmask();

Review Comment:
   Added default method implementation.



-- 
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] (MASSEMBLY-791) fileMode not set in dependencySet creating format tar.gz

2023-07-05 Thread ASF GitHub Bot (Jira)

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

ASF GitHub Bot commented on MASSEMBLY-791:
--

mabrarov commented on code in PR #148:
URL: 
https://github.com/apache/maven-assembly-plugin/pull/148#discussion_r1253063508


##
src/main/java/org/apache/maven/plugins/assembly/AssemblerConfigurationSource.java:
##
@@ -223,4 +223,9 @@ public interface AssemblerConfigurationSource {
  * @return Override group name.
  */
 String getOverrideGroupName();
+
+/**
+ * @return Override umask.
+ */
+Integer getOverrideUmask();

Review Comment:
   Added default method implementation.





> fileMode not set in dependencySet creating format tar.gz
> 
>
> Key: MASSEMBLY-791
> URL: https://issues.apache.org/jira/browse/MASSEMBLY-791
> Project: Maven Assembly Plugin
>  Issue Type: Bug
>  Components: permissions
>Affects Versions: 2.6
> Environment: Linux and Windows
>Reporter: Rick Poleshuck
>Priority: Major
>
> The fileMode is ignored within a dependencySet while creating a tar.gz 
> archive. This works just fine in 2.4.
> 
> 
> 
> com.company:dependency-artifact
> 
> true
> 
> 
> *.py
> 
> 
> 
> 0750
> 0750
> 
> 
> 

[GitHub] [maven-assembly-plugin] elharo commented on a diff in pull request #148: [MASSEMBLY-791] overrideUmask option to ensure permissions in packaged archive match …

2023-07-05 Thread via GitHub

elharo commented on code in PR #148:
URL: 
https://github.com/apache/maven-assembly-plugin/pull/148#discussion_r1253066482


##
src/main/java/org/apache/maven/plugins/assembly/AssemblerConfigurationSource.java:
##
@@ -223,4 +223,12 @@ public interface AssemblerConfigurationSource {
  * @return Override group name.
  */
 String getOverrideGroupName();
+
+/**
+ * @return Mask which is applied to permissions of files/directories 
before they are put into assembly.

Review Comment:
   nit: Mask --> mask
   



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

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

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



[GitHub] [maven-assembly-plugin] mabrarov commented on a diff in pull request #148: [MASSEMBLY-791] overrideUmask option to ensure permissions in packaged archive match …

2023-07-05 Thread via GitHub

mabrarov commented on code in PR #148:
URL: 
https://github.com/apache/maven-assembly-plugin/pull/148#discussion_r1253072332


##
src/main/java/org/apache/maven/plugins/assembly/mojos/AbstractAssemblyMojo.java:
##
@@ -430,6 +430,12 @@ public abstract class AbstractAssemblyMojo extends 
AbstractMojo implements Assem
 @Parameter
 private String overrideGroupName;
 
+/**
+ * Override of umask.

Review Comment:
   Changed to
   
   ```java
   /**
* Mask which is applied to permissions of files/directories before they are 
put into assembly.
* If {@code null} then the mask is not explicitly configured and remains 
implementation-specific.
*/
   ```
   
   When this option is not configured (`null`), then the umask remains Plexus 
Archiver implementation detail (which I know is `022`, but I cannot put it into 
documentation of `overrideUmask` configuration option of Maven Assembly Plugin).
   
   IMHO, we can not put `022` as default value of `overrideUmask` configuration 
option of Maven Assembly Plugin, because it breaks backward compatibility (in 
case someone uses another version of Plexus Archiver - the one which has 
different default value of umask option - with Maven Assembly Plugin and 
migrates to the new version of Maven Assembly Plugin with this pull request 
integrated).



-- 
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] (MASSEMBLY-791) fileMode not set in dependencySet creating format tar.gz

2023-07-05 Thread ASF GitHub Bot (Jira)

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

ASF GitHub Bot commented on MASSEMBLY-791:
--

elharo commented on code in PR #148:
URL: 
https://github.com/apache/maven-assembly-plugin/pull/148#discussion_r1253066482


##
src/main/java/org/apache/maven/plugins/assembly/AssemblerConfigurationSource.java:
##
@@ -223,4 +223,12 @@ public interface AssemblerConfigurationSource {
  * @return Override group name.
  */
 String getOverrideGroupName();
+
+/**
+ * @return Mask which is applied to permissions of files/directories 
before they are put into assembly.

Review Comment:
   nit: Mask --> mask
   





> fileMode not set in dependencySet creating format tar.gz
> 
>
> Key: MASSEMBLY-791
> URL: https://issues.apache.org/jira/browse/MASSEMBLY-791
> Project: Maven Assembly Plugin
>  Issue Type: Bug
>  Components: permissions
>Affects Versions: 2.6
> Environment: Linux and Windows
>Reporter: Rick Poleshuck
>Priority: Major
>
> The fileMode is ignored within a dependencySet while creating a tar.gz 
> archive. This works just fine in 2.4.
> 
> 
> 
> com.company:dependency-artifact
> 
> true
> 
> 
> *.py
> 
> 
> 
> 0750
> 0750
> 
> 
> 

[jira] [Commented] (MASSEMBLY-791) fileMode not set in dependencySet creating format tar.gz

2023-07-05 Thread ASF GitHub Bot (Jira)

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

ASF GitHub Bot commented on MASSEMBLY-791:
--

mabrarov commented on code in PR #148:
URL: 
https://github.com/apache/maven-assembly-plugin/pull/148#discussion_r1253072332


##
src/main/java/org/apache/maven/plugins/assembly/mojos/AbstractAssemblyMojo.java:
##
@@ -430,6 +430,12 @@ public abstract class AbstractAssemblyMojo extends 
AbstractMojo implements Assem
 @Parameter
 private String overrideGroupName;
 
+/**
+ * Override of umask.

Review Comment:
   Changed to
   
   ```java
   /**
* Mask which is applied to permissions of files/directories before they are 
put into assembly.
* If {@code null} then the mask is not explicitly configured and remains 
implementation-specific.
*/
   ```
   
   When this option is not configured (`null`), then the umask remains Plexus 
Archiver implementation detail (which I know is `022`, but I cannot put it into 
documentation of `overrideUmask` configuration option of Maven Assembly Plugin).
   
   IMHO, we can not put `022` as default value of `overrideUmask` configuration 
option of Maven Assembly Plugin, because it breaks backward compatibility (in 
case someone uses another version of Plexus Archiver - the one which has 
different default value of umask option - with Maven Assembly Plugin and 
migrates to the new version of Maven Assembly Plugin with this pull request 
integrated).





> fileMode not set in dependencySet creating format tar.gz
> 
>
> Key: MASSEMBLY-791
> URL: https://issues.apache.org/jira/browse/MASSEMBLY-791
> Project: Maven Assembly Plugin
>  Issue Type: Bug
>  Components: permissions
>Affects Versions: 2.6
> Environment: Linux and Windows
>Reporter: Rick Poleshuck
>Priority: Major
>
> The fileMode is ignored within a dependencySet while creating a tar.gz 
> archive. This works just fine in 2.4.
> 
> 
> 
> com.company:dependency-artifact
> 
> true
> 
> 
> *.py
> 
> 
> 
> 0750
> 0750
> 
> 
> 

[GitHub] [maven-assembly-plugin] mabrarov commented on a diff in pull request #148: [MASSEMBLY-791] overrideUmask option to ensure permissions in packaged archive match …

2023-07-05 Thread via GitHub

mabrarov commented on code in PR #148:
URL: 
https://github.com/apache/maven-assembly-plugin/pull/148#discussion_r1253076754


##
src/main/java/org/apache/maven/plugins/assembly/AssemblerConfigurationSource.java:
##
@@ -223,4 +223,12 @@ public interface AssemblerConfigurationSource {
  * @return Override group name.
  */
 String getOverrideGroupName();
+
+/**
+ * @return Mask which is applied to permissions of files/directories 
before they are put into assembly.

Review Comment:
   Sorry, do you mean changing of case (**m**ask)? I see all over methods with 
`@return` Javadoc start from upper case after `@return` statement. Is it OK to 
not follow existing formatting in this case?



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

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

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



[GitHub] [maven-assembly-plugin] mabrarov commented on a diff in pull request #148: [MASSEMBLY-791] overrideUmask option to ensure permissions in packaged archive match …

2023-07-05 Thread via GitHub

mabrarov commented on code in PR #148:
URL: 
https://github.com/apache/maven-assembly-plugin/pull/148#discussion_r1253076754


##
src/main/java/org/apache/maven/plugins/assembly/AssemblerConfigurationSource.java:
##
@@ -223,4 +223,12 @@ public interface AssemblerConfigurationSource {
  * @return Override group name.
  */
 String getOverrideGroupName();
+
+/**
+ * @return Mask which is applied to permissions of files/directories 
before they are put into assembly.

Review Comment:
   Sorry, do you mean changing of case? I see all over methods with `@return` 
Javadoc start from upper case after `@return` statement. Is it OK to not follow 
existing formatting in this case?



-- 
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] (MASSEMBLY-791) fileMode not set in dependencySet creating format tar.gz

2023-07-05 Thread ASF GitHub Bot (Jira)

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

ASF GitHub Bot commented on MASSEMBLY-791:
--

mabrarov commented on code in PR #148:
URL: 
https://github.com/apache/maven-assembly-plugin/pull/148#discussion_r1253076754


##
src/main/java/org/apache/maven/plugins/assembly/AssemblerConfigurationSource.java:
##
@@ -223,4 +223,12 @@ public interface AssemblerConfigurationSource {
  * @return Override group name.
  */
 String getOverrideGroupName();
+
+/**
+ * @return Mask which is applied to permissions of files/directories 
before they are put into assembly.

Review Comment:
   Sorry, do you mean changing of case? I see all over methods with `@return` 
Javadoc start from upper case after `@return` statement. Is it OK to not follow 
existing formatting in this case?





> fileMode not set in dependencySet creating format tar.gz
> 
>
> Key: MASSEMBLY-791
> URL: https://issues.apache.org/jira/browse/MASSEMBLY-791
> Project: Maven Assembly Plugin
>  Issue Type: Bug
>  Components: permissions
>Affects Versions: 2.6
> Environment: Linux and Windows
>Reporter: Rick Poleshuck
>Priority: Major
>
> The fileMode is ignored within a dependencySet while creating a tar.gz 
> archive. This works just fine in 2.4.
> 
> 
> 
> com.company:dependency-artifact
> 
> true
> 
> 
> *.py
> 
> 
> 
> 0750
> 0750
> 
> 
> 

[jira] [Commented] (MASSEMBLY-791) fileMode not set in dependencySet creating format tar.gz

2023-07-05 Thread ASF GitHub Bot (Jira)

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

ASF GitHub Bot commented on MASSEMBLY-791:
--

mabrarov commented on code in PR #148:
URL: 
https://github.com/apache/maven-assembly-plugin/pull/148#discussion_r1253076754


##
src/main/java/org/apache/maven/plugins/assembly/AssemblerConfigurationSource.java:
##
@@ -223,4 +223,12 @@ public interface AssemblerConfigurationSource {
  * @return Override group name.
  */
 String getOverrideGroupName();
+
+/**
+ * @return Mask which is applied to permissions of files/directories 
before they are put into assembly.

Review Comment:
   Sorry, do you mean changing of case (**m**ask)? I see all over methods with 
`@return` Javadoc start from upper case after `@return` statement. Is it OK to 
not follow existing formatting in this case?





> fileMode not set in dependencySet creating format tar.gz
> 
>
> Key: MASSEMBLY-791
> URL: https://issues.apache.org/jira/browse/MASSEMBLY-791
> Project: Maven Assembly Plugin
>  Issue Type: Bug
>  Components: permissions
>Affects Versions: 2.6
> Environment: Linux and Windows
>Reporter: Rick Poleshuck
>Priority: Major
>
> The fileMode is ignored within a dependencySet while creating a tar.gz 
> archive. This works just fine in 2.4.
> 
> 
> 
> com.company:dependency-artifact
> 
> true
> 
> 
> *.py
> 
> 
> 
> 0750
> 0750
> 
> 
> 

[GitHub] [maven-assembly-plugin] mabrarov commented on a diff in pull request #148: [MASSEMBLY-791] overrideUmask option to ensure permissions in packaged archive match …

2023-07-05 Thread via GitHub

mabrarov commented on code in PR #148:
URL: 
https://github.com/apache/maven-assembly-plugin/pull/148#discussion_r1253076754


##
src/main/java/org/apache/maven/plugins/assembly/AssemblerConfigurationSource.java:
##
@@ -223,4 +223,12 @@ public interface AssemblerConfigurationSource {
  * @return Override group name.
  */
 String getOverrideGroupName();
+
+/**
+ * @return Mask which is applied to permissions of files/directories 
before they are put into assembly.

Review Comment:
   Sorry, do you mean changing of case (**m**ask)? It looks like documentation 
for all over methods with `@return` Javadoc starts from upper case after 
`@return` statement. Is it OK to not follow existing formatting in this case?



-- 
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] (MASSEMBLY-791) fileMode not set in dependencySet creating format tar.gz

2023-07-05 Thread ASF GitHub Bot (Jira)

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

ASF GitHub Bot commented on MASSEMBLY-791:
--

mabrarov commented on code in PR #148:
URL: 
https://github.com/apache/maven-assembly-plugin/pull/148#discussion_r1253076754


##
src/main/java/org/apache/maven/plugins/assembly/AssemblerConfigurationSource.java:
##
@@ -223,4 +223,12 @@ public interface AssemblerConfigurationSource {
  * @return Override group name.
  */
 String getOverrideGroupName();
+
+/**
+ * @return Mask which is applied to permissions of files/directories 
before they are put into assembly.

Review Comment:
   Sorry, do you mean changing of case (**m**ask)? It looks like documentation 
for all over methods with `@return` Javadoc starts from upper case after 
`@return` statement. Is it OK to not follow existing formatting in this case?





> fileMode not set in dependencySet creating format tar.gz
> 
>
> Key: MASSEMBLY-791
> URL: https://issues.apache.org/jira/browse/MASSEMBLY-791
> Project: Maven Assembly Plugin
>  Issue Type: Bug
>  Components: permissions
>Affects Versions: 2.6
> Environment: Linux and Windows
>Reporter: Rick Poleshuck
>Priority: Major
>
> The fileMode is ignored within a dependencySet while creating a tar.gz 
> archive. This works just fine in 2.4.
> 
> 
> 
> com.company:dependency-artifact
> 
> true
> 
> 
> *.py
> 
> 
> 
> 0750
> 0750
> 
> 
> 

[GitHub] [maven-assembly-plugin] elharo commented on a diff in pull request #148: [MASSEMBLY-791] overrideUmask option to ensure permissions in packaged archive match …

2023-07-05 Thread via GitHub

elharo commented on code in PR #148:
URL: 
https://github.com/apache/maven-assembly-plugin/pull/148#discussion_r1253083133


##
src/main/java/org/apache/maven/plugins/assembly/AssemblerConfigurationSource.java:
##
@@ -223,4 +223,12 @@ public interface AssemblerConfigurationSource {
  * @return Override group name.
  */
 String getOverrideGroupName();
+
+/**
+ * @return Mask which is applied to permissions of files/directories 
before they are put into assembly.

Review Comment:
   Yes, change the case per Javadoc conventions as published by Oracle. Always 
follow the documented rules. Do not copy what some random developer did 15 
years ago. "The description begins with a lowercase letter if it is a phrase 
(contains no verb), or an uppercase letter if it is a sentence. End the phrase 
with a period only if another phrase or sentence follows 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] (MASSEMBLY-791) fileMode not set in dependencySet creating format tar.gz

2023-07-05 Thread ASF GitHub Bot (Jira)

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

ASF GitHub Bot commented on MASSEMBLY-791:
--

elharo commented on code in PR #148:
URL: 
https://github.com/apache/maven-assembly-plugin/pull/148#discussion_r1253083133


##
src/main/java/org/apache/maven/plugins/assembly/AssemblerConfigurationSource.java:
##
@@ -223,4 +223,12 @@ public interface AssemblerConfigurationSource {
  * @return Override group name.
  */
 String getOverrideGroupName();
+
+/**
+ * @return Mask which is applied to permissions of files/directories 
before they are put into assembly.

Review Comment:
   Yes, change the case per Javadoc conventions as published by Oracle. Always 
follow the documented rules. Do not copy what some random developer did 15 
years ago. "The description begins with a lowercase letter if it is a phrase 
(contains no verb), or an uppercase letter if it is a sentence. End the phrase 
with a period only if another phrase or sentence follows it."





> fileMode not set in dependencySet creating format tar.gz
> 
>
> Key: MASSEMBLY-791
> URL: https://issues.apache.org/jira/browse/MASSEMBLY-791
> Project: Maven Assembly Plugin
>  Issue Type: Bug
>  Components: permissions
>Affects Versions: 2.6
> Environment: Linux and Windows
>Reporter: Rick Poleshuck
>Priority: Major
>
> The fileMode is ignored within a dependencySet while creating a tar.gz 
> archive. This works just fine in 2.4.
> 
> 
> 
> com.company:dependency-artifact
> 
> true
> 
> 
> *.py
> 
> 
> 
> 0750
> 0750
> 
> 
> 

[GitHub] [maven] gnodet commented on a diff in pull request #1198: Javadoc fixes

2023-07-05 Thread via GitHub

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


##
api/maven-api-core/src/main/java/org/apache/maven/api/Dependency.java:
##
@@ -23,9 +23,9 @@
 public interface Dependency extends Artifact {

Review Comment:
   I think this is true in this context.  This is unrelated to the model's 
dependency list.
   Here, the `Dependency` is the resolved `Artifact` that come from a 
`DependencyCoordinate`.  This is more related to the dependency collection and 
artifact resolution.  The `DependencyCoordinate` is what maps closely to the 
model's `Dependency`.



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

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

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



[jira] [Commented] (MASSEMBLY-791) fileMode not set in dependencySet creating format tar.gz

2023-07-05 Thread ASF GitHub Bot (Jira)

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

ASF GitHub Bot commented on MASSEMBLY-791:
--

mabrarov commented on code in PR #148:
URL: 
https://github.com/apache/maven-assembly-plugin/pull/148#discussion_r1253097140


##
src/main/java/org/apache/maven/plugins/assembly/AssemblerConfigurationSource.java:
##
@@ -223,4 +223,12 @@ public interface AssemblerConfigurationSource {
  * @return Override group name.
  */
 String getOverrideGroupName();
+
+/**
+ * @return Mask which is applied to permissions of files/directories 
before they are put into assembly.

Review Comment:
   Fixed





> fileMode not set in dependencySet creating format tar.gz
> 
>
> Key: MASSEMBLY-791
> URL: https://issues.apache.org/jira/browse/MASSEMBLY-791
> Project: Maven Assembly Plugin
>  Issue Type: Bug
>  Components: permissions
>Affects Versions: 2.6
> Environment: Linux and Windows
>Reporter: Rick Poleshuck
>Priority: Major
>
> The fileMode is ignored within a dependencySet while creating a tar.gz 
> archive. This works just fine in 2.4.
> 
> 
> 
> com.company:dependency-artifact
> 
> true
> 
> 
> *.py
> 
> 
> 
> 0750
> 0750
> 
> 
> 

[GitHub] [maven-assembly-plugin] mabrarov commented on a diff in pull request #148: [MASSEMBLY-791] overrideUmask option to ensure permissions in packaged archive match …

2023-07-05 Thread via GitHub

mabrarov commented on code in PR #148:
URL: 
https://github.com/apache/maven-assembly-plugin/pull/148#discussion_r1253097140


##
src/main/java/org/apache/maven/plugins/assembly/AssemblerConfigurationSource.java:
##
@@ -223,4 +223,12 @@ public interface AssemblerConfigurationSource {
  * @return Override group name.
  */
 String getOverrideGroupName();
+
+/**
+ * @return Mask which is applied to permissions of files/directories 
before they are put into assembly.

Review Comment:
   Fixed



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

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

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



[GitHub] [maven] gnodet commented on a diff in pull request #1197: [MNG 7836] Support alternative syntaxes for POMs

2023-07-05 Thread via GitHub

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


##
maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProcessor.java:
##
@@ -63,32 +75,110 @@
 @Typed(ModelProcessor.class)
 public class DefaultModelProcessor implements ModelProcessor {
 
-private final ModelLocator locator;
-private final ModelReader reader;
+private final Collection modelParsers;
+private final ModelLocator modelLocator;
+private final ModelReader modelReader;
 
 @Inject
-public DefaultModelProcessor(ModelLocator locator, ModelReader reader) {
-this.locator = locator;
-this.reader = reader;
+public DefaultModelProcessor(
+Collection modelParsers, ModelLocator modelLocator, 
ModelReader modelReader) {
+this.modelParsers = modelParsers;
+this.modelLocator = modelLocator;
+this.modelReader = modelReader;
 }
 
 @Override
 public File locatePom(File projectDirectory) {
-return locator.locatePom(projectDirectory);
+return locatePom(projectDirectory.toPath()).toFile();
+}
+
+public Path locatePom(Path projectDirectory) {
+// Note that the ModelProcessor#locatePom never returns null
+// while the ModelParser#locatePom needs to return an existing path !
+Path pom = modelParsers.stream()
+.map(m -> m.locatePom(projectDirectory))
+.filter(Objects::nonNull)
+.filter(Files::exists)
+.findFirst()
+.orElseGet(
+() -> 
modelLocator.locatePom(projectDirectory.toFile()).toPath());
+if (!pom.getParent().equals(projectDirectory)) {
+throw new IllegalArgumentException("The POM found does not belong 
to the given directory: " + pom);
+}
+return pom;
+}
+
+protected org.apache.maven.api.model.Model read(
+Path pomFile, InputStream input, Reader reader, Map 
options) throws IOException {
+Source source = (Source) options.get(ModelProcessor.SOURCE);
+if (pomFile == null && source != null) {
+Path p = Paths.get(source.getLocation());
+if (Files.exists(p)) {
+pomFile = p;
+}
+}
+if (pomFile != null) {
+Path projectDirectory = pomFile.getParent();
+Path path = pomFile;
+List parsers = modelParsers.stream()
+.filter(p -> path.equals(p.locatePom(projectDirectory)))
+.collect(Collectors.toList());
+List exceptions = new ArrayList<>();
+for (ModelParser parser : parsers) {
+try {
+Model model = parser.parse(new FileSource(pomFile), 
options);
+return model.withPomFile(pomFile);
+} catch (ModelParserException e) {
+exceptions.add(e);
+}
+}
+try {
+return readXmlModel(pomFile, null, null, options);
+} catch (IOException e) {
+exceptions.forEach(e::addSuppressed);
+throw e;
+}
+} else {
+return readXmlModel(pomFile, input, reader, options);
+}
+}
+
+private org.apache.maven.api.model.Model readXmlModel(
+Path pomFile, InputStream input, Reader reader, Map 
options) throws IOException {
+if (pomFile != null) {
+return modelReader.read(pomFile.toFile(), options).getDelegate();
+} else if (input != null) {
+return modelReader.read(input, options).getDelegate();
+} else {
+return modelReader.read(reader, options).getDelegate();
+}
 }
 
 @Override
-public Model read(File input, Map options) throws IOException {
-return reader.read(input, options);
+public org.apache.maven.model.Model read(File file, Map 
options) throws IOException {
+Objects.requireNonNull(file, "file cannot be null");
+Path path = file.toPath();
+org.apache.maven.api.model.Model model = read(path, null, null, 
options);
+return new org.apache.maven.model.Model(model);
 }
 
 @Override
-public Model read(Reader input, Map options) throws IOException 
{
-return reader.read(input, options);
+public org.apache.maven.model.Model read(InputStream input, Map 
options) throws IOException {
+Objects.requireNonNull(input, "input cannot be null");
+try (InputStream in = input) {
+org.apache.maven.api.model.Model model = read(null, in, null, 
options);
+return new org.apache.maven.model.Model(model);
+} catch (ModelParserException e) {

Review Comment:
   I agree, but that's always the problem to bridge between the v3 and v4 apis.



-- 
This is an automated message from the Apache Git Service.
To r

[GitHub] [maven] gnodet commented on a diff in pull request #1197: [MNG 7836] Support alternative syntaxes for POMs

2023-07-05 Thread via GitHub

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


##
maven-model-builder/src/main/java/org/apache/maven/model/building/FileSource.java:
##
@@ -0,0 +1,47 @@
+/*
+ * 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.model.building;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Path;
+
+public class FileSource implements org.apache.maven.api.services.Source {
+private final Path pom;
+
+public FileSource(Path pom) {
+this.pom = pom;
+}
+
+@Override
+public Path getPath() {
+return pom;
+}
+
+@Override
+public InputStream getInputStream() throws IOException {
+return Files.newInputStream(pom);
+}
+
+@Override
+public String getLocation() {

Review Comment:
   No, we may have other implementations such as:
* 
https://github.com/apache/maven/blob/de19cfcd2bc8e774818d87472e8e64dc37c0b93d/maven-builder-support/src/main/java/org/apache/maven/building/StringSource.java
* 
https://github.com/apache/maven/blob/de19cfcd2bc8e774818d87472e8e64dc37c0b93d/maven-builder-support/src/main/java/org/apache/maven/building/UrlSource.java



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

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

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



[GitHub] [maven] gnodet commented on a diff in pull request #1197: [MNG 7836] Support alternative syntaxes for POMs

2023-07-05 Thread via GitHub

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


##
maven-model-builder/src/main/java/org/apache/maven/model/building/FileSource.java:
##
@@ -0,0 +1,47 @@
+/*
+ * 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.model.building;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Path;
+
+public class FileSource implements org.apache.maven.api.services.Source {
+private final Path pom;
+
+public FileSource(Path pom) {
+this.pom = pom;
+}
+
+@Override
+public Path getPath() {
+return pom;
+}
+
+@Override
+public InputStream getInputStream() throws IOException {
+return Files.newInputStream(pom);
+}
+
+@Override
+public String getLocation() {

Review Comment:
   No, we may have other implementations such as:
* 
[StringSource](https://github.com/apache/maven/blob/de19cfcd2bc8e774818d87472e8e64dc37c0b93d/maven-builder-support/src/main/java/org/apache/maven/building/StringSource.java)
* 
[UrlSource](https://github.com/apache/maven/blob/de19cfcd2bc8e774818d87472e8e64dc37c0b93d/maven-builder-support/src/main/java/org/apache/maven/building/UrlSource.java)



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

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

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



[GitHub] [maven] gnodet commented on a diff in pull request #1197: [MNG 7836] Support alternative syntaxes for POMs

2023-07-05 Thread via GitHub

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


##
api/maven-api-core/src/main/java/org/apache/maven/api/services/Source.java:
##
@@ -20,17 +20,35 @@
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.nio.file.Path;
 
 import org.apache.maven.api.annotations.Experimental;
+import org.apache.maven.api.annotations.Nonnull;
+import org.apache.maven.api.annotations.Nullable;
 
 /**
- * The source for a project's XML model.
+ * The source for parsing an object.

Review Comment:
   Yeah, the wording is not really good.  The idea is that the _thing_ pointed 
to by the `Source` will be be parsed into.  
   I'll fix them to be closer to those from 
[`org.apache.maven.building.Source`](https://github.com/apache/maven/blob/de19cfcd2bc8e774818d87472e8e64dc37c0b93d/maven-builder-support/src/main/java/org/apache/maven/building/Source.java)



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

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

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



[GitHub] [maven] gnodet merged pull request #1196: Use model processor when locating the root pom when using -f/--file

2023-07-05 Thread via GitHub

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


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

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

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



[GitHub] [maven] gnodet merged pull request #1195: [MNG-7834] Fix NullPointerException in flatten-maven-plugin

2023-07-05 Thread via GitHub

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


-- 
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-7834) NPE in flatten-maven-plugin

2023-07-05 Thread ASF GitHub Bot (Jira)

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

ASF GitHub Bot commented on MNG-7834:
-

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




> NPE in flatten-maven-plugin
> ---
>
> Key: MNG-7834
> URL: https://issues.apache.org/jira/browse/MNG-7834
> Project: Maven
>  Issue Type: Bug
>Affects Versions: 4.0.0-alpha-7
>Reporter: Guillaume Nodet
>Assignee: Guillaume Nodet
>Priority: Major
> Fix For: 4.0.0-alpha-8
>
>
> The flatten-maven-plugin fails with a NullPointerException:
> {code}[ERROR] Failed to execute goal 
> org.codehaus.mojo:flatten-maven-plugin:1.5.0:flatten (default-cli) on project 
> camel: failed to create a clean pom: Cannot invoke "java.util.List.stream()" 
> because "dependencies" is null -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute 
> goal org.codehaus.mojo:flatten-maven-plugin:1.5.0:flatten (default-cli) on 
> project camel: failed to create a clean pom
>   at 
> org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:341)
>   at 
> org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:324)
>   at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
>   at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:174)
>   at 
> org.apache.maven.lifecycle.internal.MojoExecutor.access$000(MojoExecutor.java:77)
>   at 
> org.apache.maven.lifecycle.internal.MojoExecutor$1.run(MojoExecutor.java:162)
>   at 
> org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute(DefaultMojosExecutionStrategy.java:39)
>   at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:159)
>   at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:114)
>   at 
> io.takari.maven.builder.smart.SmartBuilderImpl.buildProject(SmartBuilderImpl.java:204)
>   at 
> io.takari.maven.builder.smart.SmartBuilderImpl$ProjectBuildTask.run(SmartBuilderImpl.java:78)
>   at 
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
>   at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
>   at 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
>   at 
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
>   at java.base/java.lang.Thread.run(Thread.java:1623)
> Caused by: org.apache.maven.plugin.MojoExecutionException: failed to create a 
> clean pom
>   at 
> org.codehaus.mojo.flatten.FlattenMojo.createFlattenedPom(FlattenMojo.java:556)
>   at org.codehaus.mojo.flatten.FlattenMojo.execute(FlattenMojo.java:406)
>   at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:143)
>   at 
> org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:336)
>   ... 15 common frames omitted
> Caused by: java.lang.NullPointerException: Cannot invoke 
> "java.util.List.stream()" because "dependencies" is null
>   at org.apache.maven.model.ModelBase.setDependencies(ModelBase.java:164)
>   at 
> org.codehaus.mojo.flatten.FlattenMojo.createCleanPom(FlattenMojo.java:686)
>   at 
> org.codehaus.mojo.flatten.FlattenMojo.createFlattenedPom(FlattenMojo.java:554)
>   ... 18 common frames omitted
> {code}



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


[jira] [Closed] (MNG-7834) NPE in flatten-maven-plugin

2023-07-05 Thread Guillaume Nodet (Jira)

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

Guillaume Nodet closed MNG-7834.

Resolution: Fixed

> NPE in flatten-maven-plugin
> ---
>
> Key: MNG-7834
> URL: https://issues.apache.org/jira/browse/MNG-7834
> Project: Maven
>  Issue Type: Bug
>Affects Versions: 4.0.0-alpha-7
>Reporter: Guillaume Nodet
>Assignee: Guillaume Nodet
>Priority: Major
> Fix For: 4.0.0-alpha-8
>
>
> The flatten-maven-plugin fails with a NullPointerException:
> {code}[ERROR] Failed to execute goal 
> org.codehaus.mojo:flatten-maven-plugin:1.5.0:flatten (default-cli) on project 
> camel: failed to create a clean pom: Cannot invoke "java.util.List.stream()" 
> because "dependencies" is null -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute 
> goal org.codehaus.mojo:flatten-maven-plugin:1.5.0:flatten (default-cli) on 
> project camel: failed to create a clean pom
>   at 
> org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:341)
>   at 
> org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:324)
>   at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
>   at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:174)
>   at 
> org.apache.maven.lifecycle.internal.MojoExecutor.access$000(MojoExecutor.java:77)
>   at 
> org.apache.maven.lifecycle.internal.MojoExecutor$1.run(MojoExecutor.java:162)
>   at 
> org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute(DefaultMojosExecutionStrategy.java:39)
>   at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:159)
>   at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:114)
>   at 
> io.takari.maven.builder.smart.SmartBuilderImpl.buildProject(SmartBuilderImpl.java:204)
>   at 
> io.takari.maven.builder.smart.SmartBuilderImpl$ProjectBuildTask.run(SmartBuilderImpl.java:78)
>   at 
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
>   at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
>   at 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
>   at 
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
>   at java.base/java.lang.Thread.run(Thread.java:1623)
> Caused by: org.apache.maven.plugin.MojoExecutionException: failed to create a 
> clean pom
>   at 
> org.codehaus.mojo.flatten.FlattenMojo.createFlattenedPom(FlattenMojo.java:556)
>   at org.codehaus.mojo.flatten.FlattenMojo.execute(FlattenMojo.java:406)
>   at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:143)
>   at 
> org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:336)
>   ... 15 common frames omitted
> Caused by: java.lang.NullPointerException: Cannot invoke 
> "java.util.List.stream()" because "dependencies" is null
>   at org.apache.maven.model.ModelBase.setDependencies(ModelBase.java:164)
>   at 
> org.codehaus.mojo.flatten.FlattenMojo.createCleanPom(FlattenMojo.java:686)
>   at 
> org.codehaus.mojo.flatten.FlattenMojo.createFlattenedPom(FlattenMojo.java:554)
>   ... 18 common frames omitted
> {code}



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


[jira] [Updated] (MNGSITE-521) Define dependency type

2023-07-05 Thread Elliotte Rusty Harold (Jira)

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

Elliotte Rusty Harold updated MNGSITE-521:
--
Description: 
At no point I can find, do we ever explain what a "dependency type" is though 
it's referenced in various places in the docs. It's not a Java type. It's not a 
file type. Beyond that I can't explain it. 

api/maven-api-core/src/main/java/org/apache/maven/api/Dependency.java
api/maven-api-core/src/main/java/org/apache/maven/api/Type.java

  was:
At no point I can find do we ever explain what a "dependency type" is though 
it's referenced in various places in the docs. It's not a Java type. It's not a 
file type. Beyond that I can't explain it. 

api/maven-api-core/src/main/java/org/apache/maven/api/Dependency.java
api/maven-api-core/src/main/java/org/apache/maven/api/Type.java


> Define dependency type
> --
>
> Key: MNGSITE-521
> URL: https://issues.apache.org/jira/browse/MNGSITE-521
> Project: Maven Project Web Site
>  Issue Type: Bug
>Reporter: Elliotte Rusty Harold
>Priority: Critical
>
> At no point I can find, do we ever explain what a "dependency type" is though 
> it's referenced in various places in the docs. It's not a Java type. It's not 
> a file type. Beyond that I can't explain it. 
> api/maven-api-core/src/main/java/org/apache/maven/api/Dependency.java
> api/maven-api-core/src/main/java/org/apache/maven/api/Type.java



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


[jira] [Updated] (MNGSITE-521) Define dependency type

2023-07-05 Thread Elliotte Rusty Harold (Jira)

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

Elliotte Rusty Harold updated MNGSITE-521:
--
Description: 
At no point I can find do we ever explain what a "dependency type" is though 
it's referenced in various places in the docs. It's not a Java type. It's not a 
file type. Beyond that I can't explain it. 

api/maven-api-core/src/main/java/org/apache/maven/api/Dependency.java
api/maven-api-core/src/main/java/org/apache/maven/api/Type.java

  was:
At no point I can find do we ever explain what a "dependency type" is though 
it's referenced in various places in the docs. It's not a Java type. It's not a 
file type. Beyond that I can't explain it. 

api/maven-api-core/src/main/java/org/apache/maven/api/Dependency.java


> Define dependency type
> --
>
> Key: MNGSITE-521
> URL: https://issues.apache.org/jira/browse/MNGSITE-521
> Project: Maven Project Web Site
>  Issue Type: Bug
>Reporter: Elliotte Rusty Harold
>Priority: Critical
>
> At no point I can find do we ever explain what a "dependency type" is though 
> it's referenced in various places in the docs. It's not a Java type. It's not 
> a file type. Beyond that I can't explain it. 
> api/maven-api-core/src/main/java/org/apache/maven/api/Dependency.java
> api/maven-api-core/src/main/java/org/apache/maven/api/Type.java



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


[GitHub] [maven] gnodet commented on a diff in pull request #1198: Javadoc fixes

2023-07-05 Thread via GitHub

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


##
api/maven-api-core/src/main/java/org/apache/maven/api/Type.java:
##
@@ -22,7 +22,7 @@
 import org.apache.maven.api.annotations.Immutable;
 
 /**
- * An artifact's{@code Type} represents a known kind of artifacts.
+ * A dependency's {@code Type} represents a known kind of dependencies.
  * Such types are often associated to an extension and possibly

Review Comment:
   Always.



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

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

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



[GitHub] [maven] gnodet commented on a diff in pull request #1198: Javadoc fixes

2023-07-05 Thread via GitHub

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


##
api/maven-api-core/src/main/java/org/apache/maven/api/Type.java:
##
@@ -22,7 +22,7 @@
 import org.apache.maven.api.annotations.Immutable;
 
 /**
- * An artifact's{@code Type} represents a known kind of artifacts.
+ * A dependency's {@code Type} represents a known kind of dependencies.

Review Comment:
   I've reworded again.



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

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

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



[GitHub] [maven] gnodet commented on a diff in pull request #1194: [MNG-6401] Support interpolation of the proxy port in settings.xml

2023-07-05 Thread via GitHub

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


##
api/maven-api-settings/src/main/mdo/settings.mdo:
##
@@ -535,6 +539,62 @@
   String
 
   
+  
+
+  1.0.0/1.3.0
+  
+

[jira] [Commented] (MNG-6401) Support proxy port interpolation in settings.xml

2023-07-05 Thread ASF GitHub Bot (Jira)

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

ASF GitHub Bot commented on MNG-6401:
-

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


##
api/maven-api-settings/src/main/mdo/settings.mdo:
##
@@ -535,6 +539,62 @@
   String
 
   
+  
+
+  1.0.0/1.3.0
+  
+

[GitHub] [maven] gnodet commented on a diff in pull request #1194: [MNG-6401] Support interpolation of the proxy port in settings.xml

2023-07-05 Thread via GitHub

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


##
api/maven-api-settings/src/main/mdo/settings.mdo:
##
@@ -535,6 +539,62 @@
   String
 
   
+  
+
+  1.0.0/1.3.0
+  
+
+  
+
+
+  2.0.0+
+  
+

[GitHub] [maven] gnodet commented on a diff in pull request #1194: [MNG-6401] Support interpolation of the proxy port in settings.xml

2023-07-05 Thread via GitHub

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


##
api/maven-api-settings/src/main/mdo/settings.mdo:
##
@@ -535,6 +539,62 @@
   String
 
   
+  
+
+  1.0.0/1.3.0
+  
+
+  
+
+
+  2.0.0+
+  
+

[jira] [Commented] (MNG-6401) Support proxy port interpolation in settings.xml

2023-07-05 Thread ASF GitHub Bot (Jira)

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

ASF GitHub Bot commented on MNG-6401:
-

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


##
api/maven-api-settings/src/main/mdo/settings.mdo:
##
@@ -535,6 +539,62 @@
   String
 
   
+  
+
+  1.0.0/1.3.0
+  
+
+  
+
+
+  2.0.0+
+  
+

[jira] [Commented] (MNG-6401) Support proxy port interpolation in settings.xml

2023-07-05 Thread ASF GitHub Bot (Jira)

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

ASF GitHub Bot commented on MNG-6401:
-

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


##
api/maven-api-settings/src/main/mdo/settings.mdo:
##
@@ -535,6 +539,62 @@
   String
 
   
+  
+
+  1.0.0/1.3.0
+  
+
+  
+
+
+  2.0.0+
+  
+

[GitHub] [maven] gnodet commented on a diff in pull request #1194: [MNG-6401] Support interpolation of the proxy port in settings.xml

2023-07-05 Thread via GitHub

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


##
api/maven-api-settings/src/main/mdo/settings.mdo:
##
@@ -535,6 +539,62 @@
   String
 
   
+  
+
+  1.0.0/1.3.0
+  
+
+  
+
+
+  2.0.0+
+  
+

[jira] [Commented] (MNG-6401) Support proxy port interpolation in settings.xml

2023-07-05 Thread ASF GitHub Bot (Jira)

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

ASF GitHub Bot commented on MNG-6401:
-

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


##
api/maven-api-settings/src/main/mdo/settings.mdo:
##
@@ -535,6 +539,62 @@
   String
 
   
+  
+
+  1.0.0/1.3.0
+  
+
+  
+
+
+  2.0.0+
+  
+

[GitHub] [maven] gnodet commented on a diff in pull request #1194: [MNG-6401] Support interpolation of the proxy port in settings.xml

2023-07-05 Thread via GitHub

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


##
api/maven-api-settings/src/main/mdo/settings.mdo:
##
@@ -535,6 +539,62 @@
   String
 
   
+  
+
+  1.0.0/1.3.0
+  
+
+  
+
+
+  2.0.0+
+  
+

[jira] [Commented] (MNG-6401) Support proxy port interpolation in settings.xml

2023-07-05 Thread ASF GitHub Bot (Jira)

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

ASF GitHub Bot commented on MNG-6401:
-

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


##
api/maven-api-settings/src/main/mdo/settings.mdo:
##
@@ -535,6 +539,62 @@
   String
 
   
+  
+
+  1.0.0/1.3.0
+  
+
+  
+
+
+  2.0.0+
+  
+

[GitHub] [maven] ywluogg commented on pull request #1191: [MNG-7828] Bump guava from 30.1-jre to 32.0.1-jre

2023-07-05 Thread via GitHub

ywluogg commented on PR #1191:
URL: https://github.com/apache/maven/pull/1191#issuecomment-1622074257

   > I looked into it, but it's not very straightforward like the bump of 
`` here. In `3.8.x`, Guava comes transitively from Guice.
   
   Thanks for this detail!


-- 
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-7828) Bump guava from 31.1-jre to 32.0.1-jre

2023-07-05 Thread ASF GitHub Bot (Jira)

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

ASF GitHub Bot commented on MNG-7828:
-

ywluogg commented on PR #1191:
URL: https://github.com/apache/maven/pull/1191#issuecomment-1622074257

   > I looked into it, but it's not very straightforward like the bump of 
`` here. In `3.8.x`, Guava comes transitively from Guice.
   
   Thanks for this detail!




> Bump guava from 31.1-jre to 32.0.1-jre
> --
>
> Key: MNG-7828
> URL: https://issues.apache.org/jira/browse/MNG-7828
> Project: Maven
>  Issue Type: Dependency upgrade
>Affects Versions: 3.9.x-candidate, 4.0.x-candidate
>Reporter: Bruno Candido Volpato da Cunha
>Priority: Major
>
> Currently used version is in the range of CVE-2023-2976, which was fixed in 
> 32.0.0.
>  
> Please check [https://osv.dev/vulnerability/GHSA-7g45-4rm6-3mm3] for more 
> information.



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


[GitHub] [maven] gnodet commented on a diff in pull request #1197: [MNG 7836] Support alternative syntaxes for POMs

2023-07-05 Thread via GitHub

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


##
api/maven-api-core/src/main/java/org/apache/maven/api/services/Source.java:
##
@@ -20,17 +20,35 @@
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.nio.file.Path;
 
 import org.apache.maven.api.annotations.Experimental;
+import org.apache.maven.api.annotations.Nonnull;
+import org.apache.maven.api.annotations.Nullable;
 
 /**
- * The source for a project's XML model.
+ * The source for parsing an object.
  *
  * @since 4.0.0
  */
 @Experimental
 public interface Source {
+
+/**
+ * Provides access the file to be parsed, if this source is backed by a 
file.
+ */
+@Nullable
+Path getPath();
+
+/**
+ * Creates a readable stream.
+ */
+@Nonnull
 InputStream getInputStream() throws IOException;
 
+/**
+ * Retrieves the location for this source, useful to display to the user.

Review Comment:
   The location could be a URL.  The point is that `getPath()` returns a path, 
but may be `null` if the source is created with an `InputStream`.



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

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

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



[GitHub] [maven] gnodet commented on a diff in pull request #1197: [MNG 7836] Support alternative syntaxes for POMs

2023-07-05 Thread via GitHub

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


##
api/maven-api-spi/src/main/java/org/apache/maven/api/spi/ModelParserException.java:
##
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.api.spi;
+
+import org.apache.maven.api.annotations.Experimental;
+import org.apache.maven.api.services.MavenException;
+
+@Experimental
+public class ModelParserException extends MavenException {

Review Comment:
   We can discuss that, but this is a general problem in the api, as all 
exceptions inherit from `MavenException` which is `RuntimeException`.



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

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

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



[GitHub] [maven] gnodet commented on a diff in pull request #1197: [MNG 7836] Support alternative syntaxes for POMs

2023-07-05 Thread via GitHub

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


##
api/maven-api-spi/src/main/java/org/apache/maven/api/spi/ModelParserException.java:
##
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.api.spi;
+
+import org.apache.maven.api.annotations.Experimental;
+import org.apache.maven.api.services.MavenException;
+
+@Experimental
+public class ModelParserException extends MavenException {

Review Comment:
   We can discuss that, but this is a general problem in the api, as all 
exceptions inherit from `MavenException` which is `RuntimeException` so I don't 
think this PR is the right media to discuss that.



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

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

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



[GitHub] [maven] gnodet commented on a diff in pull request #1197: [MNG 7836] Support alternative syntaxes for POMs

2023-07-05 Thread via GitHub

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


##
maven-core/src/main/java/org/apache/maven/internal/transformation/ConsumerPomArtifactTransformer.java:
##
@@ -165,31 +178,50 @@ private ConsumerPomArtifact(MavenProject mavenProject, 
Path target, RepositorySy
 target,
 transformer(session));
 }
+}
 
-private static BiConsumer 
transformer(RepositorySystemSession session) {
-TransformerContext context = (TransformerContext) 
session.getData().get(TransformerContext.KEY);
-return (src, dest) -> {
-try (InputStream inputStream = transform(src, context)) {
-Files.createDirectories(dest.getParent());
-Files.copy(inputStream, dest, 
StandardCopyOption.REPLACE_EXISTING);
-} catch (XMLStreamException | IOException e) {
-throw new RuntimeException(e);
-}
-};
-}
+BiConsumer transformer(RepositorySystemSession session) {
+TransformerContext context = (TransformerContext) 
session.getData().get(TransformerContext.KEY);
+return (src, dest) -> {
+try {
+Files.createDirectories(dest.getParent());
+transform(src, dest, context);
+} catch (XMLStreamException | IOException e) {
+throw new RuntimeException(e);
+}
+};
 }
 
 /**
  * The actual transformation: visible for testing.
  */
-static InputStream transform(Path pomFile, TransformerContext context) 
throws IOException, XMLStreamException {
-try (InputStream input = Files.newInputStream(pomFile)) {
-XMLInputFactory2 factory = new 
com.ctc.wstx.stax.WstxInputFactory();
-factory.configureForRoundTripping();
-XMLStreamReader reader = factory.createXMLStreamReader(input);
-reader = new RawToConsumerPomXMLFilterFactory(new 
DefaultBuildPomXMLFilterFactory(context, true))
-.get(reader, pomFile);
-return XmlUtils.writeDocument(reader);
+void transform(Path pomFile, Path destPomFile, TransformerContext context) 
throws IOException, XMLStreamException {
+ModelParser parser = modelParsers.values().stream()
+.filter(p -> pomFile.equals(p.locatePom(pomFile.getParent(
+.findAny()
+.orElse(null);
+if (parser != null) {
+try (OutputStream output = Files.newOutputStream(destPomFile)) {
+Model model = parser.parse(new FileSource(pomFile), null);

Review Comment:
   Yes, that's exactly why I prefer unchecked exceptions.
   The way to handle that, if `ModelParserException` would be a checked 
exception, is to add another exception type to the [catch 
clause](https://github.com/gnodet/maven/blob/MNG-7836-Support-alternative-syntaxes-for-POMs/maven-core/src/main/java/org/apache/maven/internal/transformation/ConsumerPomArtifactTransformer.java#L189)
 so that it can be rethrown as a `RuntimeException`.   The catch/rethrow with a 
different checked exception is a very common pattern, which imho does not make 
sense.



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

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

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



[GitHub] [maven] gnodet commented on a diff in pull request #1197: [MNG 7836] Support alternative syntaxes for POMs

2023-07-05 Thread via GitHub

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


##
maven-core/src/main/java/org/apache/maven/internal/transformation/ConsumerPomArtifactTransformer.java:
##
@@ -165,31 +178,50 @@ private ConsumerPomArtifact(MavenProject mavenProject, 
Path target, RepositorySy
 target,
 transformer(session));
 }
+}
 
-private static BiConsumer 
transformer(RepositorySystemSession session) {
-TransformerContext context = (TransformerContext) 
session.getData().get(TransformerContext.KEY);
-return (src, dest) -> {
-try (InputStream inputStream = transform(src, context)) {
-Files.createDirectories(dest.getParent());
-Files.copy(inputStream, dest, 
StandardCopyOption.REPLACE_EXISTING);
-} catch (XMLStreamException | IOException e) {
-throw new RuntimeException(e);
-}
-};
-}
+BiConsumer transformer(RepositorySystemSession session) {
+TransformerContext context = (TransformerContext) 
session.getData().get(TransformerContext.KEY);
+return (src, dest) -> {
+try {
+Files.createDirectories(dest.getParent());
+transform(src, dest, context);
+} catch (XMLStreamException | IOException e) {
+throw new RuntimeException(e);
+}
+};
 }
 
 /**
  * The actual transformation: visible for testing.
  */
-static InputStream transform(Path pomFile, TransformerContext context) 
throws IOException, XMLStreamException {
-try (InputStream input = Files.newInputStream(pomFile)) {
-XMLInputFactory2 factory = new 
com.ctc.wstx.stax.WstxInputFactory();
-factory.configureForRoundTripping();
-XMLStreamReader reader = factory.createXMLStreamReader(input);
-reader = new RawToConsumerPomXMLFilterFactory(new 
DefaultBuildPomXMLFilterFactory(context, true))
-.get(reader, pomFile);
-return XmlUtils.writeDocument(reader);
+void transform(Path pomFile, Path destPomFile, TransformerContext context) 
throws IOException, XMLStreamException {
+ModelParser parser = modelParsers.values().stream()
+.filter(p -> pomFile.equals(p.locatePom(pomFile.getParent(
+.findAny()
+.orElse(null);
+if (parser != null) {
+try (OutputStream output = Files.newOutputStream(destPomFile)) {
+Model model = parser.parse(new FileSource(pomFile), null);
+// transform
+model = model.withRoot(false).withModules(null);
+if (model.getParent() != null) {
+model = 
model.withParent(model.getParent().withRelativePath(null));
+}
+MavenStaxWriter w = new MavenStaxWriter();
+w.write(output, model);

Review Comment:
   Ouch, no, it has options (file comment, string formatter), which are not 
used 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



[GitHub] [maven] gnodet commented on a diff in pull request #1197: [MNG 7836] Support alternative syntaxes for POMs

2023-07-05 Thread via GitHub

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


##
maven-core/src/main/java/org/apache/maven/internal/transformation/ConsumerPomArtifactTransformer.java:
##
@@ -165,31 +178,50 @@ private ConsumerPomArtifact(MavenProject mavenProject, 
Path target, RepositorySy
 target,
 transformer(session));
 }
+}
 
-private static BiConsumer 
transformer(RepositorySystemSession session) {
-TransformerContext context = (TransformerContext) 
session.getData().get(TransformerContext.KEY);
-return (src, dest) -> {
-try (InputStream inputStream = transform(src, context)) {
-Files.createDirectories(dest.getParent());
-Files.copy(inputStream, dest, 
StandardCopyOption.REPLACE_EXISTING);
-} catch (XMLStreamException | IOException e) {
-throw new RuntimeException(e);
-}
-};
-}
+BiConsumer transformer(RepositorySystemSession session) {
+TransformerContext context = (TransformerContext) 
session.getData().get(TransformerContext.KEY);
+return (src, dest) -> {
+try {
+Files.createDirectories(dest.getParent());
+transform(src, dest, context);
+} catch (XMLStreamException | IOException e) {
+throw new RuntimeException(e);

Review Comment:
   So you want me to define an interface with `throw Exception` just to avoid 
using unchecked exception ?
   Worse, define a new interface + exception type, both would only be used in 
this context, just to wrap another checked exception for the sole purpose of 
not using unchecked exceptions ?
   Again, that's a more general discussion we can have, but I don't think it's 
the right place.  Feel free to start a discussion thread on exception handling 
in the v4 api on the mailing list.



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

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

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



[GitHub] [maven] gnodet commented on a diff in pull request #1197: [MNG 7836] Support alternative syntaxes for POMs

2023-07-05 Thread via GitHub

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


##
maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProcessor.java:
##
@@ -63,32 +75,110 @@
 @Typed(ModelProcessor.class)
 public class DefaultModelProcessor implements ModelProcessor {
 
-private final ModelLocator locator;
-private final ModelReader reader;
+private final Collection modelParsers;
+private final ModelLocator modelLocator;
+private final ModelReader modelReader;
 
 @Inject
-public DefaultModelProcessor(ModelLocator locator, ModelReader reader) {
-this.locator = locator;
-this.reader = reader;
+public DefaultModelProcessor(
+Collection modelParsers, ModelLocator modelLocator, 
ModelReader modelReader) {
+this.modelParsers = modelParsers;
+this.modelLocator = modelLocator;
+this.modelReader = modelReader;
 }
 
 @Override
 public File locatePom(File projectDirectory) {
-return locator.locatePom(projectDirectory);
+return locatePom(projectDirectory.toPath()).toFile();
+}
+
+public Path locatePom(Path projectDirectory) {
+// Note that the ModelProcessor#locatePom never returns null
+// while the ModelParser#locatePom needs to return an existing path !

Review Comment:
   Yes, French bias. Always an unbreakable space before double punctation signs 
in French.



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

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

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



[GitHub] [maven] gnodet commented on a diff in pull request #1197: [MNG 7836] Support alternative syntaxes for POMs

2023-07-05 Thread via GitHub

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


##
maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProcessor.java:
##
@@ -63,32 +75,110 @@
 @Typed(ModelProcessor.class)
 public class DefaultModelProcessor implements ModelProcessor {
 
-private final ModelLocator locator;
-private final ModelReader reader;
+private final Collection modelParsers;
+private final ModelLocator modelLocator;
+private final ModelReader modelReader;
 
 @Inject
-public DefaultModelProcessor(ModelLocator locator, ModelReader reader) {
-this.locator = locator;
-this.reader = reader;
+public DefaultModelProcessor(
+Collection modelParsers, ModelLocator modelLocator, 
ModelReader modelReader) {
+this.modelParsers = modelParsers;
+this.modelLocator = modelLocator;
+this.modelReader = modelReader;
 }
 
 @Override
 public File locatePom(File projectDirectory) {
-return locator.locatePom(projectDirectory);
+return locatePom(projectDirectory.toPath()).toFile();
+}
+
+public Path locatePom(Path projectDirectory) {
+// Note that the ModelProcessor#locatePom never returns null
+// while the ModelParser#locatePom needs to return an existing path !
+Path pom = modelParsers.stream()
+.map(m -> m.locatePom(projectDirectory))
+.filter(Objects::nonNull)
+.filter(Files::exists)
+.findFirst()
+.orElseGet(
+() -> 
modelLocator.locatePom(projectDirectory.toFile()).toPath());
+if (!pom.getParent().equals(projectDirectory)) {
+throw new IllegalArgumentException("The POM found does not belong 
to the given directory: " + pom);

Review Comment:
   Well, for once, this can't be done easily without breaking the v3 API.  This 
method implements 
[`ModelLocator`](https://github.com/apache/maven/blob/de19cfcd2bc8e774818d87472e8e64dc37c0b93d/maven-model-builder/src/main/java/org/apache/maven/model/locator/ModelLocator.java#L40)
 which does not throw any checked exception.



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

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

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



[GitHub] [maven] gnodet commented on a diff in pull request #1197: [MNG 7836] Support alternative syntaxes for POMs

2023-07-05 Thread via GitHub

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


##
api/maven-api-core/src/main/java/org/apache/maven/api/services/Source.java:
##
@@ -20,17 +20,35 @@
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.nio.file.Path;
 
 import org.apache.maven.api.annotations.Experimental;
+import org.apache.maven.api.annotations.Nonnull;
+import org.apache.maven.api.annotations.Nullable;
 
 /**
- * The source for a project's XML model.
+ * The source for parsing an object.
  *
  * @since 4.0.0
  */
 @Experimental
 public interface Source {
+
+/**
+ * Provides access the file to be parsed, if this source is backed by a 
file.

Review Comment:
   No, because the Source is not limited to a file.



-- 
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-7733) maven4 user settings mirrorOf-external:* does not override global settings external:http:*

2023-07-05 Thread Jim Sellers (Jira)

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

Jim Sellers commented on MNG-7733:
--

Thanks [~gnodet]!

Also worked for me with 4.0.0-alpha-7 and 4.0.0-alpha-8-SNAPSHOT.

> maven4 user settings mirrorOf-external:* does not override global settings 
> external:http:* 
> ---
>
> Key: MNG-7733
> URL: https://issues.apache.org/jira/browse/MNG-7733
> Project: Maven
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 4.0.0-alpha-4
>Reporter: James Nord
>Assignee: Guillaume Nodet
>Priority: Major
>  Labels: regresion
>
> I have a settings file in my home directory (~/.m2/settings.xml) that works 
> fine with maven 3.x (including 3.9.0)
> containing
> {code}
>   
> 
>   myco-internal
>   external:*
>   https://nexus-cache.mycorp.com/content/groups/staged
> 
>   
> {code}
> with maven 4.0.0-alpha4 when building a project it will fail in dependency 
> resolution due to the `maven-default-http-blocker` mirror.
> {noformat}
> unable to create flattened dependencies: caught exception when flattening 
> dependencies: Failed to read artifact descriptor for 
> javax.servlet:javax.servlet-api::3.1.0: Could not transfer artifact 
> net.java:jvnet-parent:pom:3 from/to maven-default-http-blocker 
> (http://0.0.0.0/): Blocked mirror for repositories: [glassfish-repository 
> (http://download.java.net/maven/glassfish, default, releases+snapshots)] -
> {noformat}
> However I expect that my user settings should override global settings.
> as {{external:\*}} used in my local settings should also match anything that 
> is matched by {{external:http:\*}} in the global settings I would not expect 
> that the global settings mirror would be used.
> However this is infact the case.
> if I use --global-settings to specify my local settings file then the builds 
> work
> Additionally changing my mirror defintion to be 
> {{external:\*,external:http:\*}} still does not work
> initial output from {{mvn -x install}}
> {noformat}
> [DEBUG] Reading global settings from 
> 'c:\java\maven-4.0.0-alpha-4\conf\settings.xml'
> [DEBUG] Reading user settings from 'C:\Users\me\.m2\settings.xml'
> [DEBUG] Created adapter factory; available factories [file-lock, 
> rwlock-local, semaphore-local, noop]; available name mappers [discriminating, 
> file-gav, file-hgav, gav, static]
> [DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for 
> C:\Users\me\.m2\repository
> [DEBUG] Creating adapter using nameMapper 'gav' and factory 'rwlock-local'
> [DEBUG] Using mirror myco-internal 
> (https://nexus-cache.mycorp.com/content/groups/staged) for central 
> (https://repo.maven.apache.org/maven2).
> [DEBUG] Using mirror maven-default-http-blocker (http://0.0.0.0/) for 
> apache.snapshots (http://repository.apache.org/snapshots).
> [DEBUG] Using mirror myco-internal 
> (https://nexus-cache.mycorp.com/content/groups/staged) for apache.snapshots 
> (https://repository.apache.org/snapshots).
> [DEBUG] Using mirror maven-default-http-blocker (http://0.0.0.0/) for 
> codehaus.snapshots (http://snapshots.repository.codehaus.org).
> [DEBUG] Using mirror myco-internal 
> (https://nexus-cache.mycorp.com/content/groups/staged) for 
> sonatype-nexus-snapshots 
> (https://oss.sonatype.org/content/repositories/snapshots).
> [DEBUG] Using mirror maven-default-http-blocker (http://0.0.0.0/) for 
> repository.jboss.org (http://repository.jboss.org/maven2).
> [DEBUG] Using mirror maven-default-http-blocker (http://0.0.0.0/) for 
> snapshots.jboss.org (http://snapshots.jboss.org/maven2).
> [DEBUG] Using mirror maven-default-http-blocker (http://0.0.0.0/) for 
> oss.sonatype.org/jboss-snapshots 
> (http://oss.sonatype.org/content/repositories/jboss-snapshots).
> [DEBUG] Using mirror myco-internal 
> (https://nexus-cache.mycorp.com/content/groups/staged) for jgit-repository 
> (https://repo.eclipse.org/content/repositories/jgit-releases/).
> [DEBUG] Using mirror maven-default-http-blocker (http://0.0.0.0/) for spy 
> (http://files.couchbase.com/maven2/).
> {noformat}



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


[GitHub] [maven] elharo commented on a diff in pull request #1198: Javadoc fixes

2023-07-05 Thread via GitHub

elharo commented on code in PR #1198:
URL: https://github.com/apache/maven/pull/1198#discussion_r1253549700


##
api/maven-api-core/src/main/java/org/apache/maven/api/Type.java:
##
@@ -43,27 +48,43 @@ public interface Type {
 String TEST_JAR = "test-jar";
 
 /**
- * Returns the dependency type name.
+ * Returns the dependency type id.
+ * The id uniquely identifies this dependency type.
  *
- * @return the type name
+ * @return the id of this type
  */
-String getName();
+String getId();
 
 /**
- * Get the file extension associated to the file represented by the 
dependency type.
+ * Get the file extension of artifacts of this type.
  *
  * @return the file extension
  */
 String getExtension();
 
 /**
- * Get the classifier associated to the dependency type.
+ * Get the default classifier associated to the dependency type.
+ * The default classifier can be overriden when specifying

Review Comment:
   overridden



##
api/maven-api-core/src/main/java/org/apache/maven/api/Type.java:
##
@@ -20,14 +20,19 @@
 
 import org.apache.maven.api.annotations.Experimental;
 import org.apache.maven.api.annotations.Immutable;
+import org.apache.maven.api.model.Dependency;
 
 /**
- * An artifact's{@code Type} represents a known kind of artifacts.
- * Such types are often associated to an extension and possibly
- * a classifier, for example {@code java-source} has a {@code jar}
- * extension and a {@code sources} classifier.
- * It is also used to determine if a given dependency should be
- * included in the classpath or if its transitive dependencies should.
+ * A dependency's {@code Type} is uniquely identified by a {@code String},
+ * and semantically represents a known kind of dependency.
+ * 
+ * It provides information about the file type (or extension) of the 
associated artifact,
+ * its default classifier, and how the artifact will be used in the build when 
creating
+ * classpaths.
+ * 
+ * For example, the type {@code java-source} has a {@code jar} extension and a

Review Comment:
   classifier, the artifact
   -->
   classifier. The artifact



##
api/maven-api-core/src/main/java/org/apache/maven/api/Type.java:
##
@@ -43,27 +48,43 @@ public interface Type {
 String TEST_JAR = "test-jar";
 
 /**
- * Returns the dependency type name.
+ * Returns the dependency type id.
+ * The id uniquely identifies this dependency type.
  *
- * @return the type name
+ * @return the id of this type
  */
-String getName();
+String getId();
 
 /**
- * Get the file extension associated to the file represented by the 
dependency type.
+ * Get the file extension of artifacts of this type.
  *
  * @return the file extension
  */
 String getExtension();
 
 /**
- * Get the classifier associated to the dependency type.
+ * Get the default classifier associated to the dependency type.
+ * The default classifier can be overriden when specifying
+ * the {@link Dependency#getClassifier()}.
  *
- * @return the classifier
+ * @return the default classifier
  */
 String getClassifier();
 
-boolean isIncludesDependencies();
-
+/**
+ * Specifies if the artifact contains java code and should be

Review Comment:
   Java byte code?



##
api/maven-api-core/src/main/java/org/apache/maven/api/Type.java:
##
@@ -43,27 +48,43 @@ public interface Type {
 String TEST_JAR = "test-jar";
 
 /**
- * Returns the dependency type name.
+ * Returns the dependency type id.
+ * The id uniquely identifies this dependency type.
  *
- * @return the type name
+ * @return the id of this type
  */
-String getName();
+String getId();
 
 /**
- * Get the file extension associated to the file represented by the 
dependency type.
+ * Get the file extension of artifacts of this type.
  *
  * @return the file extension
  */
 String getExtension();
 
 /**
- * Get the classifier associated to the dependency type.
+ * Get the default classifier associated to the dependency type.
+ * The default classifier can be overriden when specifying
+ * the {@link Dependency#getClassifier()}.
  *
- * @return the classifier
+ * @return the default classifier
  */
 String getClassifier();
 
-boolean isIncludesDependencies();
-
+/**
+ * Specifies if the artifact contains java code and should be
+ * added to the classpath.
+ *
+ * @return if the artifact should be added to the classpath
+ */
 boolean isAddedToClasspath();
+
+/**
+ * Specifies if the artifacts already embeds its own dependencies.

Review Comment:
   artifacts --> artifact



##
api/maven-api-core/src/main/java/org/apache/maven/api/Type.java:
##
@@ -43,27 +48,43 @@ public interface Type {
 S

[jira] [Commented] (MNG-7828) Bump guava from 31.1-jre to 32.0.1-jre

2023-07-05 Thread ASF GitHub Bot (Jira)

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

ASF GitHub Bot commented on MNG-7828:
-

ywluogg commented on PR #1191:
URL: https://github.com/apache/maven/pull/1191#issuecomment-1622599921

   Ah it seems like Guice has done the fix upstream: 
https://github.com/google/guice/commit/331e484c77dd121ffa21831c057f51735d967022




> Bump guava from 31.1-jre to 32.0.1-jre
> --
>
> Key: MNG-7828
> URL: https://issues.apache.org/jira/browse/MNG-7828
> Project: Maven
>  Issue Type: Dependency upgrade
>Affects Versions: 3.9.x-candidate, 4.0.x-candidate
>Reporter: Bruno Candido Volpato da Cunha
>Priority: Major
>
> Currently used version is in the range of CVE-2023-2976, which was fixed in 
> 32.0.0.
>  
> Please check [https://osv.dev/vulnerability/GHSA-7g45-4rm6-3mm3] for more 
> information.



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


[GitHub] [maven] bvolpato commented on pull request #1189: [MNG-7828] Bump guava from 31.1-jre to 32.0.1-jre

2023-07-05 Thread via GitHub

bvolpato commented on PR #1189:
URL: https://github.com/apache/maven/pull/1189#issuecomment-1622980343

   Can a committer merge this PR? Thanks!


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

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

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



[GitHub] [maven] bvolpato commented on pull request #1191: [MNG-7828] Bump guava from 30.1-jre to 32.0.1-jre

2023-07-05 Thread via GitHub

bvolpato commented on PR #1191:
URL: https://github.com/apache/maven/pull/1191#issuecomment-1622980405

   Can a committer merge this PR? Thanks!


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

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

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



[jira] [Commented] (MNG-7828) Bump guava from 31.1-jre to 32.0.1-jre

2023-07-05 Thread ASF GitHub Bot (Jira)

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

ASF GitHub Bot commented on MNG-7828:
-

bvolpato commented on PR #1189:
URL: https://github.com/apache/maven/pull/1189#issuecomment-1622980343

   Can a committer merge this PR? Thanks!




> Bump guava from 31.1-jre to 32.0.1-jre
> --
>
> Key: MNG-7828
> URL: https://issues.apache.org/jira/browse/MNG-7828
> Project: Maven
>  Issue Type: Dependency upgrade
>Affects Versions: 3.9.x-candidate, 4.0.x-candidate
>Reporter: Bruno Candido Volpato da Cunha
>Priority: Major
>
> Currently used version is in the range of CVE-2023-2976, which was fixed in 
> 32.0.0.
>  
> Please check [https://osv.dev/vulnerability/GHSA-7g45-4rm6-3mm3] for more 
> information.



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


[jira] [Commented] (MNG-7828) Bump guava from 31.1-jre to 32.0.1-jre

2023-07-05 Thread ASF GitHub Bot (Jira)

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

ASF GitHub Bot commented on MNG-7828:
-

bvolpato commented on PR #1191:
URL: https://github.com/apache/maven/pull/1191#issuecomment-1622980405

   Can a committer merge this PR? Thanks!




> Bump guava from 31.1-jre to 32.0.1-jre
> --
>
> Key: MNG-7828
> URL: https://issues.apache.org/jira/browse/MNG-7828
> Project: Maven
>  Issue Type: Dependency upgrade
>Affects Versions: 3.9.x-candidate, 4.0.x-candidate
>Reporter: Bruno Candido Volpato da Cunha
>Priority: Major
>
> Currently used version is in the range of CVE-2023-2976, which was fixed in 
> 32.0.0.
>  
> Please check [https://osv.dev/vulnerability/GHSA-7g45-4rm6-3mm3] for more 
> information.



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