[jira] [Updated] (MARTIFACT-34) detect ignored modules when nexus-staging-maven-plugin skipNexusStagingDeployMojo=true

2023-09-27 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot updated MARTIFACT-34:

Labels: pull-request-available  (was: )

> detect ignored modules when nexus-staging-maven-plugin 
> skipNexusStagingDeployMojo=true
> --
>
> Key: MARTIFACT-34
> URL: https://issues.apache.org/jira/browse/MARTIFACT-34
> Project: Maven Artifact Plugin
>  Issue Type: New Feature
>  Components: artifact:buildinfo, artifact:compare
>Affects Versions: 3.3.0
>Reporter: Herve Boutemy
>Priority: Major
>  Labels: pull-request-available
> Fix For: 3.5.0
>
>
> we currently skip if maven-install-plugin or maven-deploy-plugin are 
> configured to skip: 
> https://github.com/apache/maven-artifact-plugin/commit/97f418469abb8f319821f1a9ae19e1c701bc67be
> and we propose to skip by classifier/extension: MARTIFACT-12
> but some people configure nexus-staging-maven-plugin for the same purpose: 
> https://github.com/s4u/slf4j-mock/blob/v2.3.0/slf4j-mock-coverage-report/pom.xml#L65
> we need either to detect or propose configuration



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


[jira] [Commented] (MARTIFACT-34) detect ignored modules when nexus-staging-maven-plugin skipNexusStagingDeployMojo=true

2023-09-27 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MARTIFACT-34:
-

hboutemy opened a new pull request, #22:
URL: https://github.com/apache/maven-artifact-plugin/pull/22

   (no comment)




> detect ignored modules when nexus-staging-maven-plugin 
> skipNexusStagingDeployMojo=true
> --
>
> Key: MARTIFACT-34
> URL: https://issues.apache.org/jira/browse/MARTIFACT-34
> Project: Maven Artifact Plugin
>  Issue Type: New Feature
>  Components: artifact:buildinfo, artifact:compare
>Affects Versions: 3.3.0
>Reporter: Herve Boutemy
>Priority: Major
> Fix For: 3.5.0
>
>
> we currently skip if maven-install-plugin or maven-deploy-plugin are 
> configured to skip: 
> https://github.com/apache/maven-artifact-plugin/commit/97f418469abb8f319821f1a9ae19e1c701bc67be
> and we propose to skip by classifier/extension: MARTIFACT-12
> but some people configure nexus-staging-maven-plugin for the same purpose: 
> https://github.com/s4u/slf4j-mock/blob/v2.3.0/slf4j-mock-coverage-report/pom.xml#L65
> we need either to detect or propose configuration



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


[jira] [Commented] (MNG-7886) Do not warn (or improve warning message) if a profile exists only in the reactor pom, but not in the selected module.

2023-09-27 Thread Reto Hoehener (Jira)


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

Reto Hoehener commented on MNG-7886:


Adding :aggregator to the list is no problem however, thanks for the tip. 

> Do not warn (or improve warning message) if a profile exists only in the 
> reactor pom, but not in the selected module.
> -
>
> Key: MNG-7886
> URL: https://issues.apache.org/jira/browse/MNG-7886
> Project: Maven
>  Issue Type: Improvement
>Affects Versions: 3.9.4
>Reporter: Reto Hoehener
>Priority: Minor
> Attachments: test.zip
>
>
> No warning:
> {code:java}
> mvn -f aggregator/pom.xml -P test-profile validate{code}
> Warning: 
> {code:java}
> mvn -f aggregator/pom.xml -P test-profile -pl :module-1 validate
> [INFO] Scanning for projects...
> [WARNING] The requested profile "test-profile" could not be activated because 
> it does not exist. {code}
> The build is successful, and the aggregator profile is activated correctly.
> *Improvement suggestion:*
> Do not warn at all, or:
> {code:java}
> [WARNING] The requested profile "test-profile" could only be activated in the 
> reactor pom, but does not exist in the selected module "module-1" (this can 
> be intended).{code}



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


[jira] [Commented] (MNG-7886) Do not warn (or improve warning message) if a profile exists only in the reactor pom, but not in the selected module.

2023-09-27 Thread Reto Hoehener (Jira)


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

Reto Hoehener commented on MNG-7886:


In my real-world use case I specify different sets of modules in each 
aggregator profile, so the profile selection most certainly has a very 
important effect, even if the modules themselves know nothing about the 
aggregator profile. 

> Do not warn (or improve warning message) if a profile exists only in the 
> reactor pom, but not in the selected module.
> -
>
> Key: MNG-7886
> URL: https://issues.apache.org/jira/browse/MNG-7886
> Project: Maven
>  Issue Type: Improvement
>Affects Versions: 3.9.4
>Reporter: Reto Hoehener
>Priority: Minor
> Attachments: test.zip
>
>
> No warning:
> {code:java}
> mvn -f aggregator/pom.xml -P test-profile validate{code}
> Warning: 
> {code:java}
> mvn -f aggregator/pom.xml -P test-profile -pl :module-1 validate
> [INFO] Scanning for projects...
> [WARNING] The requested profile "test-profile" could not be activated because 
> it does not exist. {code}
> The build is successful, and the aggregator profile is activated correctly.
> *Improvement suggestion:*
> Do not warn at all, or:
> {code:java}
> [WARNING] The requested profile "test-profile" could only be activated in the 
> reactor pom, but does not exist in the selected module "module-1" (this can 
> be intended).{code}



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


[GitHub] [maven-site] slawekjaranowski opened a new pull request, #457: Rename basedir to project.basedir

2023-09-27 Thread via GitHub


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

   We should consequently use one property name
   
   changed pages by replace in IDE:
   
   https://maven.apache.org/guides/getting-started/index.html
   https://maven.apache.org/guides/mini/guide-attached-tests.html
   https://maven.apache.org/guides/mini/guide-site.html
   https://maven.apache.org/guides/mini/guide-snippet-macro.html
   https://maven.apache.org/plugin-developers/common-bugs.html
   
https://maven.apache.org/plugin-developers/cookbook/plexus-plugin-upgrade.html
   https://maven.apache.org/pom.html
   
   https://maven.apache.org/faq-unoffical.html - not linked anywhere, content 
is broken, I don't fix 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



[GitHub] [maven-gh-actions-shared] slawekjaranowski opened a new pull request, #81: Use only-script m-wrapper-p type

2023-09-27 Thread via GitHub


slawekjaranowski opened a new pull request, #81:
URL: https://github.com/apache/maven-gh-actions-shared/pull/81

   (no comment)


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

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

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



[jira] [Closed] (MNG-7895) Support ${project.basedir} in file profile activation

2023-09-27 Thread Slawomir Jaranowski (Jira)


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

Slawomir Jaranowski closed MNG-7895.

Resolution: Fixed

> Support ${project.basedir} in file profile activation 
> --
>
> Key: MNG-7895
> URL: https://issues.apache.org/jira/browse/MNG-7895
> Project: Maven
>  Issue Type: Improvement
>  Components: Profiles
>Reporter: Slawomir Jaranowski
>Assignee: Slawomir Jaranowski
>Priority: Major
> Fix For: 4.0.0-alpha-8, 3.9.5
>
>
> Profile activation by file exists or missing should allow to use 
> ${project.basedir}
> Currently only {{${basedir}}} can be used ... but short properties are 
> deprecated
> It can confusing users.
> Documentation to fix:
> https://maven.apache.org/pom.html#activation



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


[jira] [Created] (MSITE-978) Support ${project.basedir} in file profile activation - update docs

2023-09-27 Thread Slawomir Jaranowski (Jira)
Slawomir Jaranowski created MSITE-978:
-

 Summary: Support ${project.basedir} in file profile activation - 
update docs
 Key: MSITE-978
 URL: https://issues.apache.org/jira/browse/MSITE-978
 Project: Maven Site Plugin
  Issue Type: Task
Reporter: Slawomir Jaranowski
Assignee: Slawomir Jaranowski


After 3.9.5 release we can update 

https://maven.apache.org/pom.html#activation
https://maven.apache.org/settings.html#activation



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


[jira] [Comment Edited] (MNG-7373) Maven should not attempt to download the jar when pom

2023-09-27 Thread Tamas Cservenak (Jira)


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

Tamas Cservenak edited comment on MNG-7373 at 9/27/23 8:18 PM:
---

Maven when reaches out to remote artifacts uses locally provided information 
(even for packaging), NOT the remote one. Hence, if you do not want to download 
the JAR, then specify dependency type=pom (but Maven Plugins are and can be JAR 
packaging only).

In other words, Resolver has no notion of "POM" (that is a Maven term), all 
that Resolver sees is this: 
[https://github.com/apache/maven-resolver/blob/master/maven-resolver-api/src/main/java/org/eclipse/aether/resolution/ArtifactDescriptorResult.java]
 (and there is no packaging, nor is expected to be).

It is a common misconception that Maven "goes remote, download POM and based on 
downloaded POM decides what to download next". Nada, it is dependency or 
whatever defined locally that has to predefine all aspects of artifact.

See [https://maven.apache.org/repositories/artifacts.html]


was (Author: cstamas):
Maven when reaches out to remote artifacts uses locally provided information 
(even for packaging), NOT the remote one. Hence, if you do not want to download 
the JAR, then specify dependency type=pom (but Maven Plugins are and can be JAR 
packaging only).

In other words, Resolver has no notion of "POM" (that is a Maven term), all 
that Resolver sees is this: 
[https://github.com/apache/maven-resolver/blob/master/maven-resolver-api/src/main/java/org/eclipse/aether/resolution/ArtifactDescriptorResult.java]
 (and there is no packaging, nor is expected to be).

It is a common misconception that Maven "goes remote, download POM and based on 
downloaded POM decides what do download next". Nada, it is dependency or 
whatever defined locally that has to predefine all aspects of artifact.

See https://maven.apache.org/repositories/artifacts.html

> Maven should not attempt to download the jar when pom
> 
>
> Key: MNG-7373
> URL: https://issues.apache.org/jira/browse/MNG-7373
> Project: Maven
>  Issue Type: Improvement
>Reporter: S L
>Priority: Major
> Fix For: waiting-for-feedback, wontfix-candidate
>
>
> Hello,
> maybe a corner case of what exactly should be part of a "relocation pom" 
> ([https://maven.apache.org/guides/mini/guide-relocation.html]), but I created 
> a release just consisting of the relocation-info 
> ([https://repo1.maven.org/maven2/pl/project13/maven/git-commit-id-plugin/4.9.9/git-commit-id-plugin-4.9.9.pom])
>  as type `pom` (since I only wanted to publish the 
> relocation information).
> Using this depdendency.e.g. via:
> {code}
> 
>   
> 
>   pl.project13.maven
>   git-commit-id-plugin
>   4.9.9
> 
>   
> 
> {code}
> yields in the incorrect attempt of downloading a JAR-File from the new 
> repository location:
> {code}
> [INFO] Building Git Commit Id Plugin Maven Mojo Debugging 0.0.3-SNAPSHOT  
> [1/3]
> [INFO] [ pom 
> ]-
> Downloading from central-secure: 
> https://repo.maven.apache.org/maven2/io/github/git-commit-id/git-commit-id-maven-plugin/4.9.9/git-commit-id-maven-plugin-4.9.9.pom
> [WARNING] The POM for 
> io.github.git-commit-id:git-commit-id-maven-plugin:jar:4.9.9 is missing, no 
> dependency information available
> Downloading from central-secure: 
> https://repo.maven.apache.org/maven2/io/github/git-commit-id/git-commit-id-maven-plugin/4.9.9/git-commit-id-maven-plugin-4.9.9.jar
> [INFO] 
> 
> [INFO] Reactor Summary for Git Commit Id Plugin Maven Mojo Debugging 
> 0.0.3-SNAPSHOT:
> [INFO] 
> [INFO] Git Commit Id Plugin Maven Mojo Debugging .. FAILURE [  0.850 
> s]
> [INFO] submodule-one .. SKIPPED
> [INFO] submodule-two .. SKIPPED
> [INFO] 
> 
> [INFO] BUILD FAILURE
> [INFO] 
> 
> [INFO] Total time:  1.000 s
> [INFO] Finished at: 2021-07-12T21:42:15+02:00
> [INFO] 
> 
> [ERROR] Plugin pl.project13.maven:git-commit-id-plugin:4.9.9 or one of its 
> dependencies could not be resolved: Could not find artifact 
> io.github.git-commit-id:git-commit-id-maven-plugin:jar:4.9.9 in 
> central-secure (https://repo.maven.apache.org/maven2) -> [Help 1]
>  {code}
> IMHO Maven should not even try to search for a jar when 
> `pom`. Simply raise an error that the package was 
> relocated. the new location is at least detected, since 

[jira] [Comment Edited] (MNG-7373) Maven should not attempt to download the jar when pom

2023-09-27 Thread Tamas Cservenak (Jira)


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

Tamas Cservenak edited comment on MNG-7373 at 9/27/23 8:18 PM:
---

Maven when reaches out to remote artifacts uses locally provided information 
(even for packaging), NOT the remote one. Hence, if you do not want to download 
the JAR, then specify dependency type=pom (but Maven Plugins are and can be JAR 
packaging only).

In other words, Resolver has no notion of "POM" (that is a Maven term), all 
that Resolver sees is this: 
[https://github.com/apache/maven-resolver/blob/master/maven-resolver-api/src/main/java/org/eclipse/aether/resolution/ArtifactDescriptorResult.java]
 (and there is no packaging, nor is expected to be).

It is a common misconception that Maven "goes remote, download POM and based on 
downloaded POM decides what do download next". Nada, it is dependency or 
whatever defined locally that has to predefine all aspects of artifact.

See https://maven.apache.org/repositories/artifacts.html


was (Author: cstamas):
Maven when reaches out to remote artifacts uses locally provided information 
(even for packaging), NOT the remote one. In other words, if you do not want to 
download then JAR, then specify type=pom on dependency (and plugins are by 
default JAR packaging).

In other words, Resolver has no notion of "POM" (that is a Maven term), all 
that Resolver sees from POM is this: 
[https://github.com/apache/maven-resolver/blob/master/maven-resolver-api/src/main/java/org/eclipse/aether/resolution/ArtifactDescriptorResult.java]
 (and there is no packaging, nor is expected to be).

> Maven should not attempt to download the jar when pom
> 
>
> Key: MNG-7373
> URL: https://issues.apache.org/jira/browse/MNG-7373
> Project: Maven
>  Issue Type: Improvement
>Reporter: S L
>Priority: Major
> Fix For: waiting-for-feedback, wontfix-candidate
>
>
> Hello,
> maybe a corner case of what exactly should be part of a "relocation pom" 
> ([https://maven.apache.org/guides/mini/guide-relocation.html]), but I created 
> a release just consisting of the relocation-info 
> ([https://repo1.maven.org/maven2/pl/project13/maven/git-commit-id-plugin/4.9.9/git-commit-id-plugin-4.9.9.pom])
>  as type `pom` (since I only wanted to publish the 
> relocation information).
> Using this depdendency.e.g. via:
> {code}
> 
>   
> 
>   pl.project13.maven
>   git-commit-id-plugin
>   4.9.9
> 
>   
> 
> {code}
> yields in the incorrect attempt of downloading a JAR-File from the new 
> repository location:
> {code}
> [INFO] Building Git Commit Id Plugin Maven Mojo Debugging 0.0.3-SNAPSHOT  
> [1/3]
> [INFO] [ pom 
> ]-
> Downloading from central-secure: 
> https://repo.maven.apache.org/maven2/io/github/git-commit-id/git-commit-id-maven-plugin/4.9.9/git-commit-id-maven-plugin-4.9.9.pom
> [WARNING] The POM for 
> io.github.git-commit-id:git-commit-id-maven-plugin:jar:4.9.9 is missing, no 
> dependency information available
> Downloading from central-secure: 
> https://repo.maven.apache.org/maven2/io/github/git-commit-id/git-commit-id-maven-plugin/4.9.9/git-commit-id-maven-plugin-4.9.9.jar
> [INFO] 
> 
> [INFO] Reactor Summary for Git Commit Id Plugin Maven Mojo Debugging 
> 0.0.3-SNAPSHOT:
> [INFO] 
> [INFO] Git Commit Id Plugin Maven Mojo Debugging .. FAILURE [  0.850 
> s]
> [INFO] submodule-one .. SKIPPED
> [INFO] submodule-two .. SKIPPED
> [INFO] 
> 
> [INFO] BUILD FAILURE
> [INFO] 
> 
> [INFO] Total time:  1.000 s
> [INFO] Finished at: 2021-07-12T21:42:15+02:00
> [INFO] 
> 
> [ERROR] Plugin pl.project13.maven:git-commit-id-plugin:4.9.9 or one of its 
> dependencies could not be resolved: Could not find artifact 
> io.github.git-commit-id:git-commit-id-maven-plugin:jar:4.9.9 in 
> central-secure (https://repo.maven.apache.org/maven2) -> [Help 1]
>  {code}
> IMHO Maven should not even try to search for a jar when 
> `pom`. Simply raise an error that the package was 
> relocated. the new location is at least detected, since it tries to download 
> the artifact from a new location.



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


[jira] [Commented] (MNG-7886) Do not warn (or improve warning message) if a profile exists only in the reactor pom, but not in the selected module.

2023-09-27 Thread Tamas Cservenak (Jira)


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

Tamas Cservenak commented on MNG-7886:
--

Regarding "affects version: 3.9.4" set by reported: this warning is in place 
since way way earlier than 3.9.4, the code emitting this warning is in place 
since 2014 or so.

> Do not warn (or improve warning message) if a profile exists only in the 
> reactor pom, but not in the selected module.
> -
>
> Key: MNG-7886
> URL: https://issues.apache.org/jira/browse/MNG-7886
> Project: Maven
>  Issue Type: Improvement
>Affects Versions: 3.9.4
>Reporter: Reto Hoehener
>Priority: Minor
> Attachments: test.zip
>
>
> No warning:
> {code:java}
> mvn -f aggregator/pom.xml -P test-profile validate{code}
> Warning: 
> {code:java}
> mvn -f aggregator/pom.xml -P test-profile -pl :module-1 validate
> [INFO] Scanning for projects...
> [WARNING] The requested profile "test-profile" could not be activated because 
> it does not exist. {code}
> The build is successful, and the aggregator profile is activated correctly.
> *Improvement suggestion:*
> Do not warn at all, or:
> {code:java}
> [WARNING] The requested profile "test-profile" could only be activated in the 
> reactor pom, but does not exist in the selected module "module-1" (this can 
> be intended).{code}



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


[jira] [Updated] (MNG-7886) Do not warn (or improve warning message) if a profile exists only in the reactor pom, but not in the selected module.

2023-09-27 Thread Tamas Cservenak (Jira)


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

Tamas Cservenak updated MNG-7886:
-
Fix Version/s: (was: 3.9.5)

> Do not warn (or improve warning message) if a profile exists only in the 
> reactor pom, but not in the selected module.
> -
>
> Key: MNG-7886
> URL: https://issues.apache.org/jira/browse/MNG-7886
> Project: Maven
>  Issue Type: Improvement
>Affects Versions: 3.9.4
>Reporter: Reto Hoehener
>Priority: Minor
> Attachments: test.zip
>
>
> No warning:
> {code:java}
> mvn -f aggregator/pom.xml -P test-profile validate{code}
> Warning: 
> {code:java}
> mvn -f aggregator/pom.xml -P test-profile -pl :module-1 validate
> [INFO] Scanning for projects...
> [WARNING] The requested profile "test-profile" could not be activated because 
> it does not exist. {code}
> The build is successful, and the aggregator profile is activated correctly.
> *Improvement suggestion:*
> Do not warn at all, or:
> {code:java}
> [WARNING] The requested profile "test-profile" could only be activated in the 
> reactor pom, but does not exist in the selected module "module-1" (this can 
> be intended).{code}



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


[jira] [Comment Edited] (MNG-7886) Do not warn (or improve warning message) if a profile exists only in the reactor pom, but not in the selected module.

2023-09-27 Thread Tamas Cservenak (Jira)


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

Tamas Cservenak edited comment on MNG-7886 at 9/27/23 8:10 PM:
---

You consequence is somewhat wrong: by invoking project like this {{-f 
aggregator/pom.xml -P test-profile}} you do activate profile (as you invoke 
Maven on {{aggregator/pom.xml}} and _profile is applied onto aggregator but 
modifies aggregator project only_ (by adding module module-1), and it does NOT 
modifies/alters module-1 project in any way. Next, by using {{-pl :module-1}} 
you effectively skip the profile altered project altogether, leaving only 
module-1 in reactor, that again, was not altered/affected by profile (as it was 
aggregator that was affected by it).

While there may be truth in what you saying, I find this whole example a bit 
over-thought, and personally I don't find this as a problem or "misleading 
message" at all.

Note: message would be gone, if module-1 would use aggregator as parent, but 
then aggregator is not an aggregator anymore :D

Note: if the goal is just to continue (aggregated) modules build from some 
point, you could use {{-rf}} instead, as there are no warning in that case, 
since aggregator project remains in there (minor nuisance).

Note: or just continue using {{-pl}} but you have to remember to always add 
{{:aggregator}} to the end of the list.


was (Author: cstamas):
You consequence is somewhat wrong: by invoking project like this {{-f 
aggregator/pom.xml -P test-profile}} you do activate profile (as you invoke 
Maven on {{aggregator/pom.xml}} and _profile is applied onto aggregator but 
modifies aggregator project only_ (by adding module module-1), and it does NOT 
modifies/alters module-1 project in any way. Next, by using {{-pl :module-1}} 
you effectively skip the profile altered project altogether, leaving only 
module-1 in reactor, that again, was not altered/affected by profile (as it was 
aggregator that was affected by it).

While there may be truth in what you saying, I find this whole example a bit 
over-thought, and personally I don't find this as a problem or "misleading 
message" at all.

Note: message would be gone, if module-1 would use aggregator as parent, but 
then aggregator is not an aggregator anymore :D

Note: if the goal is just to continue (aggregated) modules build from some 
point, you could use {{-rf}} instead, as there are no warning in that case, 
since aggregator project remains in there (minor nuisance).

> Do not warn (or improve warning message) if a profile exists only in the 
> reactor pom, but not in the selected module.
> -
>
> Key: MNG-7886
> URL: https://issues.apache.org/jira/browse/MNG-7886
> Project: Maven
>  Issue Type: Improvement
>Affects Versions: 3.9.4
>Reporter: Reto Hoehener
>Priority: Minor
> Fix For: 3.9.5
>
> Attachments: test.zip
>
>
> No warning:
> {code:java}
> mvn -f aggregator/pom.xml -P test-profile validate{code}
> Warning: 
> {code:java}
> mvn -f aggregator/pom.xml -P test-profile -pl :module-1 validate
> [INFO] Scanning for projects...
> [WARNING] The requested profile "test-profile" could not be activated because 
> it does not exist. {code}
> The build is successful, and the aggregator profile is activated correctly.
> *Improvement suggestion:*
> Do not warn at all, or:
> {code:java}
> [WARNING] The requested profile "test-profile" could only be activated in the 
> reactor pom, but does not exist in the selected module "module-1" (this can 
> be intended).{code}



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


[jira] [Commented] (MNG-7886) Do not warn (or improve warning message) if a profile exists only in the reactor pom, but not in the selected module.

2023-09-27 Thread Tamas Cservenak (Jira)


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

Tamas Cservenak commented on MNG-7886:
--

You consequence is somewhat wrong: by invoking project like this {{-f 
aggregator/pom.xml -P test-profile}} you do activate profile (as you invoke 
Maven on {{aggregator/pom.xml}} and _profile is applied onto aggregator but 
modifies aggregator project only_ (by adding module module-1), and it does NOT 
modifies/alters module-1 project in any way. Next, by using {{-pl :module-1}} 
you effectively skip the profile altered project altogether, leaving only 
module-1 in reactor, that again, was not altered/affected by profile (as it was 
aggregator that was affected by it).

While there may be truth in what you saying, I find this whole example a bit 
over-thought, and personally I don't find this as a problem or "misleading 
message" at all.

Note: message would be gone, if module-1 would use aggregator as parent, but 
then aggregator is not an aggregator anymore :D

Note: if the goal is just to continue (aggregated) modules build from some 
point, you could use {{-rf}} instead, as there are no warning in that case, 
since aggregator project remains in there (minor nuisance).

> Do not warn (or improve warning message) if a profile exists only in the 
> reactor pom, but not in the selected module.
> -
>
> Key: MNG-7886
> URL: https://issues.apache.org/jira/browse/MNG-7886
> Project: Maven
>  Issue Type: Improvement
>Affects Versions: 3.9.4
>Reporter: Reto Hoehener
>Priority: Minor
> Fix For: 3.9.5
>
> Attachments: test.zip
>
>
> No warning:
> {code:java}
> mvn -f aggregator/pom.xml -P test-profile validate{code}
> Warning: 
> {code:java}
> mvn -f aggregator/pom.xml -P test-profile -pl :module-1 validate
> [INFO] Scanning for projects...
> [WARNING] The requested profile "test-profile" could not be activated because 
> it does not exist. {code}
> The build is successful, and the aggregator profile is activated correctly.
> *Improvement suggestion:*
> Do not warn at all, or:
> {code:java}
> [WARNING] The requested profile "test-profile" could only be activated in the 
> reactor pom, but does not exist in the selected module "module-1" (this can 
> be intended).{code}



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


[jira] [Commented] (MNG-7895) Support ${project.basedir} in file profile activation

2023-09-27 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-7895:
-

slawekjaranowski merged PR #1271:
URL: https://github.com/apache/maven/pull/1271




> Support ${project.basedir} in file profile activation 
> --
>
> Key: MNG-7895
> URL: https://issues.apache.org/jira/browse/MNG-7895
> Project: Maven
>  Issue Type: Improvement
>  Components: Profiles
>Reporter: Slawomir Jaranowski
>Assignee: Slawomir Jaranowski
>Priority: Major
> Fix For: 4.0.0-alpha-8, 3.9.5
>
>
> Profile activation by file exists or missing should allow to use 
> ${project.basedir}
> Currently only {{${basedir}}} can be used ... but short properties are 
> deprecated
> It can confusing users.
> Documentation to fix:
> https://maven.apache.org/pom.html#activation



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


[GitHub] [maven] slawekjaranowski merged pull request #1271: [MNG-7895] Support ${project.basedir} in file profile activation

2023-09-27 Thread via GitHub


slawekjaranowski merged PR #1271:
URL: https://github.com/apache/maven/pull/1271


-- 
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-integration-testing] slawekjaranowski merged pull request #301: [MNG-7895] Support ${project.basedir} in file profile activation - fix ITs 3.9.5

2023-09-27 Thread via GitHub


slawekjaranowski merged PR #301:
URL: https://github.com/apache/maven-integration-testing/pull/301


-- 
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-6887) Provide a Github Action to check the validity of the Maven Wrapper

2023-09-27 Thread Slawomir Jaranowski (Jira)


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

Slawomir Jaranowski commented on MNG-6887:
--

We have a wrapper type \{{only-script}} where no binary is needed - it is only 
shell/cmd script in distribution.

I would like to consider to remove binary distribution at all.

 

> Provide a Github Action to check the validity of the Maven Wrapper
> --
>
> Key: MNG-6887
> URL: https://issues.apache.org/jira/browse/MNG-6887
> Project: Maven
>  Issue Type: New Feature
>  Components: General
>Reporter: Fred Bricon
>Priority: Major
>
> The Gradle project provides a "Gradle Wrapper Validation" [Github 
> Action|https://github.com/marketplace/actions/gradle-wrapper-validation]
> {quote}This action validates the checksums of [Gradle 
> Wrapper|https://docs.gradle.org/current/userguide/gradle_wrapper.html] JAR 
> files present in the source tree and fails if unknown Gradle Wrapper JAR 
> files are found.
> ...
> A fairly simple social engineering supply chain attack against open source 
> would be contribute a helpful “Updated to Gradle xxx” PR that contains 
> malicious code hidden inside this binary JAR. A malicious 
> {{gradle-wrapper.jar}} could execute, download, or install arbitrary code 
> while otherwise behaving like a completely normal {{gradle-wrapper.jar}}.
> {quote}
> Since the Maven wrapper is coming to the mothership, it'd make sense for the 
> Maven Project to provide a similar Github action, and advertise about it in 
> the official doc, similar to 
> [Gradle|#automatically_verifying_the_gradle_wrapper_jar_on_github].
> Forking [https://github.com/gradle/wrapper-validation-action] to adapt it to 
> the Maven wrapper should be fairly straightforward.
> Although anybody could provide such Github action, I feel it being provided 
> by the Maven Project itself would make it much more legitimate.



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


[jira] [Commented] (MNG-7373) Maven should not attempt to download the jar when pom

2023-09-27 Thread Tamas Cservenak (Jira)


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

Tamas Cservenak commented on MNG-7373:
--

Maven when reaches out to remote artifacts uses locally provided information 
(even for packaging), NOT the remote one. In other words, if you do not want to 
download then JAR, then specify.

In other words, Resolver has no notion of "POM" (that is a Maven term), all 
that Resolver sees from POM is this: 
[https://github.com/apache/maven-resolver/blob/master/maven-resolver-api/src/main/java/org/eclipse/aether/resolution/ArtifactDescriptorResult.java]
 (and there is no packaging, nor is expected to be).

> Maven should not attempt to download the jar when pom
> 
>
> Key: MNG-7373
> URL: https://issues.apache.org/jira/browse/MNG-7373
> Project: Maven
>  Issue Type: Improvement
>Reporter: S L
>Priority: Major
> Fix For: waiting-for-feedback, wontfix-candidate
>
>
> Hello,
> maybe a corner case of what exactly should be part of a "relocation pom" 
> ([https://maven.apache.org/guides/mini/guide-relocation.html]), but I created 
> a release just consisting of the relocation-info 
> ([https://repo1.maven.org/maven2/pl/project13/maven/git-commit-id-plugin/4.9.9/git-commit-id-plugin-4.9.9.pom])
>  as type `pom` (since I only wanted to publish the 
> relocation information).
> Using this depdendency.e.g. via:
> {code}
> 
>   
> 
>   pl.project13.maven
>   git-commit-id-plugin
>   4.9.9
> 
>   
> 
> {code}
> yields in the incorrect attempt of downloading a JAR-File from the new 
> repository location:
> {code}
> [INFO] Building Git Commit Id Plugin Maven Mojo Debugging 0.0.3-SNAPSHOT  
> [1/3]
> [INFO] [ pom 
> ]-
> Downloading from central-secure: 
> https://repo.maven.apache.org/maven2/io/github/git-commit-id/git-commit-id-maven-plugin/4.9.9/git-commit-id-maven-plugin-4.9.9.pom
> [WARNING] The POM for 
> io.github.git-commit-id:git-commit-id-maven-plugin:jar:4.9.9 is missing, no 
> dependency information available
> Downloading from central-secure: 
> https://repo.maven.apache.org/maven2/io/github/git-commit-id/git-commit-id-maven-plugin/4.9.9/git-commit-id-maven-plugin-4.9.9.jar
> [INFO] 
> 
> [INFO] Reactor Summary for Git Commit Id Plugin Maven Mojo Debugging 
> 0.0.3-SNAPSHOT:
> [INFO] 
> [INFO] Git Commit Id Plugin Maven Mojo Debugging .. FAILURE [  0.850 
> s]
> [INFO] submodule-one .. SKIPPED
> [INFO] submodule-two .. SKIPPED
> [INFO] 
> 
> [INFO] BUILD FAILURE
> [INFO] 
> 
> [INFO] Total time:  1.000 s
> [INFO] Finished at: 2021-07-12T21:42:15+02:00
> [INFO] 
> 
> [ERROR] Plugin pl.project13.maven:git-commit-id-plugin:4.9.9 or one of its 
> dependencies could not be resolved: Could not find artifact 
> io.github.git-commit-id:git-commit-id-maven-plugin:jar:4.9.9 in 
> central-secure (https://repo.maven.apache.org/maven2) -> [Help 1]
>  {code}
> IMHO Maven should not even try to search for a jar when 
> `pom`. Simply raise an error that the package was 
> relocated. the new location is at least detected, since it tries to download 
> the artifact from a new location.



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


[jira] [Comment Edited] (MNG-7373) Maven should not attempt to download the jar when pom

2023-09-27 Thread Tamas Cservenak (Jira)


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

Tamas Cservenak edited comment on MNG-7373 at 9/27/23 6:37 PM:
---

Maven when reaches out to remote artifacts uses locally provided information 
(even for packaging), NOT the remote one. In other words, if you do not want to 
download then JAR, then specify type=pom on dependency (and plugins are by 
default JAR packaging).

In other words, Resolver has no notion of "POM" (that is a Maven term), all 
that Resolver sees from POM is this: 
[https://github.com/apache/maven-resolver/blob/master/maven-resolver-api/src/main/java/org/eclipse/aether/resolution/ArtifactDescriptorResult.java]
 (and there is no packaging, nor is expected to be).


was (Author: cstamas):
Maven when reaches out to remote artifacts uses locally provided information 
(even for packaging), NOT the remote one. In other words, if you do not want to 
download then JAR, then specify.

In other words, Resolver has no notion of "POM" (that is a Maven term), all 
that Resolver sees from POM is this: 
[https://github.com/apache/maven-resolver/blob/master/maven-resolver-api/src/main/java/org/eclipse/aether/resolution/ArtifactDescriptorResult.java]
 (and there is no packaging, nor is expected to be).

> Maven should not attempt to download the jar when pom
> 
>
> Key: MNG-7373
> URL: https://issues.apache.org/jira/browse/MNG-7373
> Project: Maven
>  Issue Type: Improvement
>Reporter: S L
>Priority: Major
> Fix For: waiting-for-feedback, wontfix-candidate
>
>
> Hello,
> maybe a corner case of what exactly should be part of a "relocation pom" 
> ([https://maven.apache.org/guides/mini/guide-relocation.html]), but I created 
> a release just consisting of the relocation-info 
> ([https://repo1.maven.org/maven2/pl/project13/maven/git-commit-id-plugin/4.9.9/git-commit-id-plugin-4.9.9.pom])
>  as type `pom` (since I only wanted to publish the 
> relocation information).
> Using this depdendency.e.g. via:
> {code}
> 
>   
> 
>   pl.project13.maven
>   git-commit-id-plugin
>   4.9.9
> 
>   
> 
> {code}
> yields in the incorrect attempt of downloading a JAR-File from the new 
> repository location:
> {code}
> [INFO] Building Git Commit Id Plugin Maven Mojo Debugging 0.0.3-SNAPSHOT  
> [1/3]
> [INFO] [ pom 
> ]-
> Downloading from central-secure: 
> https://repo.maven.apache.org/maven2/io/github/git-commit-id/git-commit-id-maven-plugin/4.9.9/git-commit-id-maven-plugin-4.9.9.pom
> [WARNING] The POM for 
> io.github.git-commit-id:git-commit-id-maven-plugin:jar:4.9.9 is missing, no 
> dependency information available
> Downloading from central-secure: 
> https://repo.maven.apache.org/maven2/io/github/git-commit-id/git-commit-id-maven-plugin/4.9.9/git-commit-id-maven-plugin-4.9.9.jar
> [INFO] 
> 
> [INFO] Reactor Summary for Git Commit Id Plugin Maven Mojo Debugging 
> 0.0.3-SNAPSHOT:
> [INFO] 
> [INFO] Git Commit Id Plugin Maven Mojo Debugging .. FAILURE [  0.850 
> s]
> [INFO] submodule-one .. SKIPPED
> [INFO] submodule-two .. SKIPPED
> [INFO] 
> 
> [INFO] BUILD FAILURE
> [INFO] 
> 
> [INFO] Total time:  1.000 s
> [INFO] Finished at: 2021-07-12T21:42:15+02:00
> [INFO] 
> 
> [ERROR] Plugin pl.project13.maven:git-commit-id-plugin:4.9.9 or one of its 
> dependencies could not be resolved: Could not find artifact 
> io.github.git-commit-id:git-commit-id-maven-plugin:jar:4.9.9 in 
> central-secure (https://repo.maven.apache.org/maven2) -> [Help 1]
>  {code}
> IMHO Maven should not even try to search for a jar when 
> `pom`. Simply raise an error that the package was 
> relocated. the new location is at least detected, since it tries to download 
> the artifact from a new location.



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


[jira] [Commented] (MNG-7508) Validate usage of true on plugins

2023-09-27 Thread Tamas Cservenak (Jira)


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

Tamas Cservenak commented on MNG-7508:
--

There are cases where loading a "plain" (without extension) plugin as extension 
is for technical reason required (ie. to circumvent some static class loading 
issue), and also other way around.

So if "validate" means "emit warning", then am OK with it, otherwise if plan is 
to fail the build (break maven execution), then a big no for this.

> Validate usage of true on plugins
> --
>
> Key: MNG-7508
> URL: https://issues.apache.org/jira/browse/MNG-7508
> Project: Maven
>  Issue Type: Improvement
>  Components: Plugins and Lifecycle
>Reporter: Konrad Windszus
>Priority: Major
>
> It should be validated by Maven if a Maven plugin loaded with 
> {{true}} actually comes with extensions or custom 
> lifecycle mapping requiring it to be loaded with that option. Similarly in 
> case this flag is {{false}} (default) Maven should emit a warning if the 
> plugin comes with extensions.



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


[jira] [Commented] (MNG-7772) Allow to register maven core extension in .m2 directory instead of MAVEN_HOME

2023-09-27 Thread Tamas Cservenak (Jira)


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

Tamas Cservenak commented on MNG-7772:
--

The reason why this was not considered is how easily makes it possible to shoot 
yourself in your foot. You have to be _very well aware_ what extension you (at 
user level?) use, how it alters your local build(s) you execute in your altered 
"maven home", otherwise builds may end up broken, or just non-transportable 
("works for me") or just behave differently (think reproducible builds, etc).

If Maven could "know" what an extension does, and forbid any extension that 
modifies build, and let only "harmless" (for example alternate resolver 
transport, etc) extensions, then I'd be 100% with this.

But today, am not opposing, but just want to express my worries about this.

> Allow to register maven core extension in .m2 directory instead of MAVEN_HOME 
> --
>
> Key: MNG-7772
> URL: https://issues.apache.org/jira/browse/MNG-7772
> Project: Maven
>  Issue Type: Improvement
>Reporter: Roy Teeuwen
>Priority: Major
> Fix For: 4.0.x-candidate
>
>
> Currently the way to register a maven core extension is described here: 
> [https://maven.apache.org/guides/mini/guide-using-extensions.html]
> Namely the following ways are supported:
>  * Registered via extension jar in {{${maven.home}/lib/ext}}
>  * Registered via CLI argument {{mvn -Dmaven.ext.class.path=extension.jar}}
>  * Registered via [{{.mvn/extensions.xml}} 
> file|https://maven.apache.org/configure.html#mvn-extensions-xml-file]
> The downside of this is that the ${maven.home} directory is not something 
> that you should touch, seeing as with every update of maven (through for 
> example homebrew), it will replace the directory with the new version, making 
> it required to manually re-register the core extension by dragging the jar in 
> /lib/ext.
> My proposal is to also make it possible to register the extension through the 
> ${user.home}/.m2 directory. This could for example be by also allowing the 
> extensions.xml in the .m2 directory or by creating an ext directory in the 
> .m2 directory.



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


[jira] [Commented] (MWRAPPER-117) Wrapper distributions and jars sha256 checksums should be published

2023-09-27 Thread Alexis Tual (Jira)


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

Alexis Tual commented on MWRAPPER-117:
--

Can we expect the sha256 to be published ? If not then have a 
`distributionSha512Sum` and `wrapperSha512Sum` supported by the wrapper instead 
?

> Wrapper distributions and jars sha256 checksums should be published
> ---
>
> Key: MWRAPPER-117
> URL: https://issues.apache.org/jira/browse/MWRAPPER-117
> Project: Maven Wrapper
>  Issue Type: Improvement
>Reporter: Alexis Tual
>Priority: High
>
> The Maven wrapper supports setting the sha256 for both the distribution and 
> the wrapper jars: 
> [https://maven.apache.org/wrapper/#checksum-verification-of-downloaded-binaries].
> However those sha256 checksums are not published in 
> [https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/] nor 
> [https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper] 
> making this feature harder to use.



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


[GitHub] [maven-surefire] mfussenegger opened a new pull request, #672: Mention toolchains limitations in docs

2023-09-27 Thread via GitHub


mfussenegger opened a new pull request, #672:
URL: https://github.com/apache/maven-surefire/pull/672

   If forkCount is configured the test goal can fail with a
   UnsupportedClassVersionError
   
   Apparently this is by design:
   
   
https://issues.apache.org/jira/browse/SUREFIRE-720?focusedCommentId=16395576&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16395576
   
   The documentation should mention a limitation like 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



[jira] [Resolved] (MSHARED-1305) maven-shared-utils 3.4.2

2023-09-27 Thread Elliotte Rusty Harold (Jira)


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

Elliotte Rusty Harold resolved MSHARED-1305.

Fix Version/s: maven-invoker-next-release
   Resolution: Fixed

> maven-shared-utils 3.4.2
> 
>
> Key: MSHARED-1305
> URL: https://issues.apache.org/jira/browse/MSHARED-1305
> Project: Maven Shared Components
>  Issue Type: Dependency upgrade
>  Components: maven-invoker
>Reporter: Elliotte Rusty Harold
>Assignee: Elliotte Rusty Harold
>Priority: Minor
> Fix For: maven-invoker-next-release
>
>
> Not quite automatic due to a change in an exception message a test depends on



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


[jira] [Closed] (MSHARED-1305) maven-shared-utils 3.4.2

2023-09-27 Thread Elliotte Rusty Harold (Jira)


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

Elliotte Rusty Harold closed MSHARED-1305.
--

> maven-shared-utils 3.4.2
> 
>
> Key: MSHARED-1305
> URL: https://issues.apache.org/jira/browse/MSHARED-1305
> Project: Maven Shared Components
>  Issue Type: Dependency upgrade
>  Components: maven-invoker
>Reporter: Elliotte Rusty Harold
>Assignee: Elliotte Rusty Harold
>Priority: Minor
> Fix For: maven-invoker-next-release
>
>
> Not quite automatic due to a change in an exception message a test depends on



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


[jira] [Commented] (MSHARED-1305) maven-shared-utils 3.4.2

2023-09-27 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MSHARED-1305:
-

elharo merged PR #65:
URL: https://github.com/apache/maven-invoker/pull/65




> maven-shared-utils 3.4.2
> 
>
> Key: MSHARED-1305
> URL: https://issues.apache.org/jira/browse/MSHARED-1305
> Project: Maven Shared Components
>  Issue Type: Dependency upgrade
>  Components: maven-invoker
>Reporter: Elliotte Rusty Harold
>Assignee: Elliotte Rusty Harold
>Priority: Minor
>
> Not quite automatic due to a change in an exception message a test depends on



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


[GitHub] [maven-invoker] elharo merged pull request #65: [MSHARED-1305] update maven-shared-utils to 3.4.2

2023-09-27 Thread via GitHub


elharo merged PR #65:
URL: https://github.com/apache/maven-invoker/pull/65


-- 
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] (MSHARED-832) Cannot invoke maven from path with parentheses on Windows

2023-09-27 Thread Elliotte Rusty Harold (Jira)


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

Elliotte Rusty Harold commented on MSHARED-832:
---

I can't immediately put my finger on any reference that explains which 
characters need to be escaped on Windows command lines and why. Anyone have 
that handy?

> Cannot invoke maven from path with parentheses on Windows
> -
>
> Key: MSHARED-832
> URL: https://issues.apache.org/jira/browse/MSHARED-832
> Project: Maven Shared Components
>  Issue Type: Bug
>  Components: maven-invoker, maven-shared-utils
>Affects Versions: maven-invoker-2.2
> Environment: Windows 10
>Reporter: Anton Krylov
>Priority: Major
>
> When {{M2_HOME}} is set to a path with parentheses (in this case 
> {{C:\work\lol(1)\maven)}}, the following command is generated on windows:
> {noformat}
> cmd.exe /X /C "C:\work\lol(1)\maven\bin\mvn.cmd -B -e -V compile"
> {noformat}
> This command fails, saying that C:\work\lol is not a known command
> When a space is added to the path, the path gets escaped, and the command 
> runs successfully.
> It looks like more characters need to be escaped on some platforms



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


[jira] [Commented] (MSHARED-832) Cannot invoke maven from path with parentheses on Windows

2023-09-27 Thread Elliotte Rusty Harold (Jira)


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

Elliotte Rusty Harold commented on MSHARED-832:
---

Problem is likely in Shell.quoteOneItem and can be tested from 
Shell.getCommandLine which returns quoted arguments

> Cannot invoke maven from path with parentheses on Windows
> -
>
> Key: MSHARED-832
> URL: https://issues.apache.org/jira/browse/MSHARED-832
> Project: Maven Shared Components
>  Issue Type: Bug
>  Components: maven-invoker, maven-shared-utils
>Affects Versions: maven-invoker-2.2
> Environment: Windows 10
>Reporter: Anton Krylov
>Priority: Major
>
> When {{M2_HOME}} is set to a path with parentheses (in this case 
> {{C:\work\lol(1)\maven)}}, the following command is generated on windows:
> {noformat}
> cmd.exe /X /C "C:\work\lol(1)\maven\bin\mvn.cmd -B -e -V compile"
> {noformat}
> This command fails, saying that C:\work\lol is not a known command
> When a space is added to the path, the path gets escaped, and the command 
> runs successfully.
> It looks like more characters need to be escaped on some platforms



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


[jira] [Created] (MSHARED-1306) Cleanup DefaultInvokerTest

2023-09-27 Thread Elliotte Rusty Harold (Jira)
Elliotte Rusty Harold created MSHARED-1306:
--

 Summary: Cleanup DefaultInvokerTest 
 Key: MSHARED-1306
 URL: https://issues.apache.org/jira/browse/MSHARED-1306
 Project: Maven Shared Components
  Issue Type: Improvement
  Components: maven-invoker
Reporter: Elliotte Rusty Harold


1. Use test fixtures
2. Passing tests should generate no output



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


[jira] [Assigned] (MSHARED-1305) maven-shared-utils 3.4.2

2023-09-27 Thread Elliotte Rusty Harold (Jira)


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

Elliotte Rusty Harold reassigned MSHARED-1305:
--

Assignee: Elliotte Rusty Harold

> maven-shared-utils 3.4.2
> 
>
> Key: MSHARED-1305
> URL: https://issues.apache.org/jira/browse/MSHARED-1305
> Project: Maven Shared Components
>  Issue Type: Dependency upgrade
>  Components: maven-invoker
>Reporter: Elliotte Rusty Harold
>Assignee: Elliotte Rusty Harold
>Priority: Minor
>
> Not quite automatic due to a change in an exception message a test depends on



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


[jira] [Created] (MSHARED-1305) maven-shared-utils 3.4.2

2023-09-27 Thread Elliotte Rusty Harold (Jira)
Elliotte Rusty Harold created MSHARED-1305:
--

 Summary: maven-shared-utils 3.4.2
 Key: MSHARED-1305
 URL: https://issues.apache.org/jira/browse/MSHARED-1305
 Project: Maven Shared Components
  Issue Type: Dependency upgrade
  Components: maven-invoker
Reporter: Elliotte Rusty Harold


Not quite automatic due to a change in an exception message a test depends on



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


[GitHub] [maven-invoker] dependabot[bot] commented on pull request #62: Bump maven-shared-utils from 3.3.4 to 3.4.1

2023-09-27 Thread via GitHub


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

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


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

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

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



[GitHub] [maven-invoker] elharo closed pull request #62: Bump maven-shared-utils from 3.3.4 to 3.4.1

2023-09-27 Thread via GitHub


elharo closed pull request #62: Bump maven-shared-utils from 3.3.4 to 3.4.1
URL: https://github.com/apache/maven-invoker/pull/62


-- 
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-invoker] elharo opened a new pull request, #65: update maven-shared-utils to 3.4.2

2023-09-27 Thread via GitHub


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

   (no comment)


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

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

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



[jira] [Commented] (MPLUGIN-442) Get rid of deprecated XDoc format

2023-09-27 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MPLUGIN-442:


kwin commented on PR #225:
URL: 
https://github.com/apache/maven-plugin-tools/pull/225#issuecomment-1737259952

   @michael-o Any more comments on the anchors being generated?




> Get rid of deprecated XDoc format
> -
>
> Key: MPLUGIN-442
> URL: https://issues.apache.org/jira/browse/MPLUGIN-442
> Project: Maven Plugin Tools
>  Issue Type: Bug
>  Components: Plugin Plugin
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
>
> At some time in the future m-site-p/doxia will no longer support XDoc 
> (compare with 
> https://issues.apache.org/jira/browse/DOXIA-569?focusedCommentId=17634481&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17634481).
>  Therefore the "report" goal should be converted to create "markdown" for the 
> plugin goal documentation pages instead of "XDoc" in 
> https://github.com/apache/maven-plugin-tools/blob/master/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginXdocGenerator.java.



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


[jira] [Commented] (MPLUGIN-442) Get rid of deprecated XDoc format

2023-09-27 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MPLUGIN-442:


kwin commented on code in PR #225:
URL: 
https://github.com/apache/maven-plugin-tools/pull/225#discussion_r1338500519


##
maven-plugin-report-plugin/src/main/java/org/apache/maven/plugin/plugin/report/AbstractPluginReportRenderer.java:
##
@@ -0,0 +1,54 @@
+/*
+ * 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.plugin.plugin.report;
+
+import java.util.Locale;
+
+import org.apache.maven.doxia.sink.Sink;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.reporting.AbstractMavenReportRenderer;
+import org.codehaus.plexus.i18n.I18N;
+
+/** Base class for all reports generated by the plugin report plugin. 
Encapsulates i18n functionality as well as functionality to directly
+ * emit XHTML markup */
+public abstract class AbstractPluginReportRenderer extends 
AbstractMavenReportRenderer {
+
+private static final String KEY_PREFIX = "report.plugin.";
+
+private static final String RESOURCE_BASENAME = "plugin-report";
+
+private final I18N i18n;
+
+protected final Locale locale;
+
+protected final MavenProject project;
+
+protected AbstractPluginReportRenderer(Sink sink, Locale locale, I18N 
i18n, MavenProject project) {
+super(sink);
+this.i18n = i18n;
+this.locale = locale;
+this.project = project;
+}
+
+/** @param key The key.
+ * @return The translated string. */
+protected String getI18nString(String key) {
+return i18n.getString(RESOURCE_BASENAME, locale, KEY_PREFIX + key);
+}
+}

Review Comment:
   Done.





> Get rid of deprecated XDoc format
> -
>
> Key: MPLUGIN-442
> URL: https://issues.apache.org/jira/browse/MPLUGIN-442
> Project: Maven Plugin Tools
>  Issue Type: Bug
>  Components: Plugin Plugin
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
>
> At some time in the future m-site-p/doxia will no longer support XDoc 
> (compare with 
> https://issues.apache.org/jira/browse/DOXIA-569?focusedCommentId=17634481&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17634481).
>  Therefore the "report" goal should be converted to create "markdown" for the 
> plugin goal documentation pages instead of "XDoc" in 
> https://github.com/apache/maven-plugin-tools/blob/master/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginXdocGenerator.java.



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


[GitHub] [maven-plugin-tools] kwin commented on pull request #225: [MPLUGIN-442] Generate goal documentation leveraging Sink API

2023-09-27 Thread via GitHub


kwin commented on PR #225:
URL: 
https://github.com/apache/maven-plugin-tools/pull/225#issuecomment-1737259952

   @michael-o Any more comments on the anchors being generated?


-- 
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-plugin-tools] kwin commented on a diff in pull request #225: [MPLUGIN-442] Generate goal documentation leveraging Sink API

2023-09-27 Thread via GitHub


kwin commented on code in PR #225:
URL: 
https://github.com/apache/maven-plugin-tools/pull/225#discussion_r1338500519


##
maven-plugin-report-plugin/src/main/java/org/apache/maven/plugin/plugin/report/AbstractPluginReportRenderer.java:
##
@@ -0,0 +1,54 @@
+/*
+ * 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.plugin.plugin.report;
+
+import java.util.Locale;
+
+import org.apache.maven.doxia.sink.Sink;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.reporting.AbstractMavenReportRenderer;
+import org.codehaus.plexus.i18n.I18N;
+
+/** Base class for all reports generated by the plugin report plugin. 
Encapsulates i18n functionality as well as functionality to directly
+ * emit XHTML markup */
+public abstract class AbstractPluginReportRenderer extends 
AbstractMavenReportRenderer {
+
+private static final String KEY_PREFIX = "report.plugin.";
+
+private static final String RESOURCE_BASENAME = "plugin-report";
+
+private final I18N i18n;
+
+protected final Locale locale;
+
+protected final MavenProject project;
+
+protected AbstractPluginReportRenderer(Sink sink, Locale locale, I18N 
i18n, MavenProject project) {
+super(sink);
+this.i18n = i18n;
+this.locale = locale;
+this.project = project;
+}
+
+/** @param key The key.
+ * @return The translated string. */
+protected String getI18nString(String key) {
+return i18n.getString(RESOURCE_BASENAME, locale, KEY_PREFIX + key);
+}
+}

Review Comment:
   Done.



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

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

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



[jira] [Commented] (MPLUGIN-442) Get rid of deprecated XDoc format

2023-09-27 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MPLUGIN-442:


kwin commented on code in PR #225:
URL: 
https://github.com/apache/maven-plugin-tools/pull/225#discussion_r1338499597


##
maven-plugin-report-plugin/src/main/java/org/apache/maven/plugin/plugin/report/GoalRenderer.java:
##
@@ -0,0 +1,544 @@
+/*
+ * 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.plugin.plugin.report;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.text.MessageFormat;
+import java.util.AbstractMap.SimpleEntry;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Optional;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.stream.Collectors;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.maven.doxia.sink.Sink;
+import org.apache.maven.doxia.sink.SinkFactory;
+import org.apache.maven.doxia.sink.impl.SinkEventAttributeSet.Semantics;
+import org.apache.maven.plugin.descriptor.MojoDescriptor;
+import org.apache.maven.plugin.descriptor.Parameter;
+import org.apache.maven.plugin.logging.Log;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.tools.plugin.EnhancedParameterWrapper;
+import org.apache.maven.tools.plugin.ExtendedMojoDescriptor;
+import org.apache.maven.tools.plugin.javadoc.JavadocLinkGenerator;
+import org.apache.maven.tools.plugin.util.PluginUtils;
+import org.codehaus.plexus.i18n.I18N;
+
+public class GoalRenderer extends AbstractPluginReportRenderer {
+
+/** Regular expression matching an XHTML link with group 1 = link target, 
group 2 = link label. */
+private static final Pattern HTML_LINK_PATTERN = Pattern.compile("(.*?)");
+
+public static GoalRenderer create(
+SinkFactory sinkFactory,
+File outputDirectory,
+I18N i18n,
+Locale locale,
+MavenProject project,
+MojoDescriptor descriptor,
+boolean disableInternalJavadocLinkValidation,
+Log log)
+throws IOException {
+String filename = descriptor.getGoal() + "-mojo.html";
+Sink sink = sinkFactory.createSink(outputDirectory, filename);
+return new GoalRenderer(
+sink, i18n, locale, project, descriptor, outputDirectory, 
disableInternalJavadocLinkValidation, log);
+}

Review Comment:
   Fixed



##
maven-plugin-report-plugin/src/main/java/org/apache/maven/plugin/plugin/report/PluginReport.java:
##
@@ -229,403 +195,34 @@ public String getOutputName() {
 }
 
 /**
- * Generate the mojos documentation, as xdoc files.
+ * Generate the mojos' documentation with the {@link #getSinkFactory()}
  *
  * @param pluginDescriptor not null
  * @param locale   not null
  * @throws MavenReportException if any
+ * @throws IOException
  */
 private void generateMojosDocumentation(PluginDescriptor pluginDescriptor, 
Locale locale)
 throws MavenReportException {
-try {
-File outputDir;
-if (!locale.equals(SiteTool.DEFAULT_LOCALE)) {
-outputDir = new File(new File(generatedSiteDirectory, 
locale.toString()), "xdoc");
-} else {
-outputDir = new File(generatedSiteDirectory, "xdoc");
-}
-outputDir.mkdirs();
-
-PluginXdocGenerator generator = new PluginXdocGenerator(
-getProject(), locale, getReportOutputDirectory(), 
disableInternalJavadocLinkValidation);
-PluginToolsRequest pluginToolsRequest = new 
DefaultPluginToolsRequest(getProject(), pluginDescriptor);
-generator.execute(outputDir, pluginToolsRequest);
-} catch (GeneratorException e) {
-throw new MavenReportException("Error writing plugin 
documentation", e);
- 

[jira] [Commented] (MPLUGIN-442) Get rid of deprecated XDoc format

2023-09-27 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MPLUGIN-442:


kwin commented on code in PR #225:
URL: 
https://github.com/apache/maven-plugin-tools/pull/225#discussion_r1338499957


##
maven-plugin-report-plugin/src/main/java/org/apache/maven/plugin/plugin/report/PluginOverviewRenderer.java:
##
@@ -0,0 +1,392 @@
+/*
+ * 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.plugin.plugin.report;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Optional;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.maven.doxia.markup.Markup;
+import org.apache.maven.doxia.sink.Sink;
+import org.apache.maven.model.Plugin;
+import org.apache.maven.model.Prerequisites;
+import org.apache.maven.plugin.descriptor.MojoDescriptor;
+import org.apache.maven.plugin.descriptor.PluginDescriptor;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.tools.plugin.ExtendedPluginDescriptor;
+import org.apache.maven.tools.plugin.util.PluginUtils;
+import org.codehaus.plexus.i18n.I18N;
+import org.codehaus.plexus.util.xml.Xpp3Dom;
+
+/**
+ * Generates an overview page with the list of goals
+ * and a link to the goal's page.
+ */
+class PluginOverviewRenderer extends AbstractPluginReportRenderer {
+
+private final List requirementsHistories;
+
+private final PluginDescriptor pluginDescriptor;
+
+private final boolean hasExtensionsToLoad;
+
+/**
+ * @param sink  not null
+ * @param i18n  not null
+ * @param localenot null
+ * @param project   not null
+ * @param requirementsHistories not null
+ * @param pluginDescriptor  not null
+ */
+PluginOverviewRenderer(
+Sink sink,
+I18N i18n,
+Locale locale,
+MavenProject project,
+List requirementsHistories,
+PluginDescriptor pluginDescriptor,
+boolean hasExtensionsToLoad) {
+super(sink, locale, i18n, project);
+
+this.requirementsHistories = requirementsHistories;
+
+this.pluginDescriptor = pluginDescriptor;
+
+this.hasExtensionsToLoad = hasExtensionsToLoad;
+}
+
+@Override
+public String getTitle() {
+return getI18nString("title");
+}

Review Comment:
   Fixed.





> Get rid of deprecated XDoc format
> -
>
> Key: MPLUGIN-442
> URL: https://issues.apache.org/jira/browse/MPLUGIN-442
> Project: Maven Plugin Tools
>  Issue Type: Bug
>  Components: Plugin Plugin
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
>
> At some time in the future m-site-p/doxia will no longer support XDoc 
> (compare with 
> https://issues.apache.org/jira/browse/DOXIA-569?focusedCommentId=17634481&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17634481).
>  Therefore the "report" goal should be converted to create "markdown" for the 
> plugin goal documentation pages instead of "XDoc" in 
> https://github.com/apache/maven-plugin-tools/blob/master/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginXdocGenerator.java.



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


[GitHub] [maven-plugin-tools] kwin commented on a diff in pull request #225: [MPLUGIN-442] Generate goal documentation leveraging Sink API

2023-09-27 Thread via GitHub


kwin commented on code in PR #225:
URL: 
https://github.com/apache/maven-plugin-tools/pull/225#discussion_r1338499957


##
maven-plugin-report-plugin/src/main/java/org/apache/maven/plugin/plugin/report/PluginOverviewRenderer.java:
##
@@ -0,0 +1,392 @@
+/*
+ * 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.plugin.plugin.report;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Optional;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.maven.doxia.markup.Markup;
+import org.apache.maven.doxia.sink.Sink;
+import org.apache.maven.model.Plugin;
+import org.apache.maven.model.Prerequisites;
+import org.apache.maven.plugin.descriptor.MojoDescriptor;
+import org.apache.maven.plugin.descriptor.PluginDescriptor;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.tools.plugin.ExtendedPluginDescriptor;
+import org.apache.maven.tools.plugin.util.PluginUtils;
+import org.codehaus.plexus.i18n.I18N;
+import org.codehaus.plexus.util.xml.Xpp3Dom;
+
+/**
+ * Generates an overview page with the list of goals
+ * and a link to the goal's page.
+ */
+class PluginOverviewRenderer extends AbstractPluginReportRenderer {
+
+private final List requirementsHistories;
+
+private final PluginDescriptor pluginDescriptor;
+
+private final boolean hasExtensionsToLoad;
+
+/**
+ * @param sink  not null
+ * @param i18n  not null
+ * @param localenot null
+ * @param project   not null
+ * @param requirementsHistories not null
+ * @param pluginDescriptor  not null
+ */
+PluginOverviewRenderer(
+Sink sink,
+I18N i18n,
+Locale locale,
+MavenProject project,
+List requirementsHistories,
+PluginDescriptor pluginDescriptor,
+boolean hasExtensionsToLoad) {
+super(sink, locale, i18n, project);
+
+this.requirementsHistories = requirementsHistories;
+
+this.pluginDescriptor = pluginDescriptor;
+
+this.hasExtensionsToLoad = hasExtensionsToLoad;
+}
+
+@Override
+public String getTitle() {
+return getI18nString("title");
+}

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-plugin-tools] kwin commented on a diff in pull request #225: [MPLUGIN-442] Generate goal documentation leveraging Sink API

2023-09-27 Thread via GitHub


kwin commented on code in PR #225:
URL: 
https://github.com/apache/maven-plugin-tools/pull/225#discussion_r1338499597


##
maven-plugin-report-plugin/src/main/java/org/apache/maven/plugin/plugin/report/GoalRenderer.java:
##
@@ -0,0 +1,544 @@
+/*
+ * 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.plugin.plugin.report;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.text.MessageFormat;
+import java.util.AbstractMap.SimpleEntry;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Optional;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.stream.Collectors;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.maven.doxia.sink.Sink;
+import org.apache.maven.doxia.sink.SinkFactory;
+import org.apache.maven.doxia.sink.impl.SinkEventAttributeSet.Semantics;
+import org.apache.maven.plugin.descriptor.MojoDescriptor;
+import org.apache.maven.plugin.descriptor.Parameter;
+import org.apache.maven.plugin.logging.Log;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.tools.plugin.EnhancedParameterWrapper;
+import org.apache.maven.tools.plugin.ExtendedMojoDescriptor;
+import org.apache.maven.tools.plugin.javadoc.JavadocLinkGenerator;
+import org.apache.maven.tools.plugin.util.PluginUtils;
+import org.codehaus.plexus.i18n.I18N;
+
+public class GoalRenderer extends AbstractPluginReportRenderer {
+
+/** Regular expression matching an XHTML link with group 1 = link target, 
group 2 = link label. */
+private static final Pattern HTML_LINK_PATTERN = Pattern.compile("(.*?)");
+
+public static GoalRenderer create(
+SinkFactory sinkFactory,
+File outputDirectory,
+I18N i18n,
+Locale locale,
+MavenProject project,
+MojoDescriptor descriptor,
+boolean disableInternalJavadocLinkValidation,
+Log log)
+throws IOException {
+String filename = descriptor.getGoal() + "-mojo.html";
+Sink sink = sinkFactory.createSink(outputDirectory, filename);
+return new GoalRenderer(
+sink, i18n, locale, project, descriptor, outputDirectory, 
disableInternalJavadocLinkValidation, log);
+}

Review Comment:
   Fixed



##
maven-plugin-report-plugin/src/main/java/org/apache/maven/plugin/plugin/report/PluginReport.java:
##
@@ -229,403 +195,34 @@ public String getOutputName() {
 }
 
 /**
- * Generate the mojos documentation, as xdoc files.
+ * Generate the mojos' documentation with the {@link #getSinkFactory()}
  *
  * @param pluginDescriptor not null
  * @param locale   not null
  * @throws MavenReportException if any
+ * @throws IOException
  */
 private void generateMojosDocumentation(PluginDescriptor pluginDescriptor, 
Locale locale)
 throws MavenReportException {
-try {
-File outputDir;
-if (!locale.equals(SiteTool.DEFAULT_LOCALE)) {
-outputDir = new File(new File(generatedSiteDirectory, 
locale.toString()), "xdoc");
-} else {
-outputDir = new File(generatedSiteDirectory, "xdoc");
-}
-outputDir.mkdirs();
-
-PluginXdocGenerator generator = new PluginXdocGenerator(
-getProject(), locale, getReportOutputDirectory(), 
disableInternalJavadocLinkValidation);
-PluginToolsRequest pluginToolsRequest = new 
DefaultPluginToolsRequest(getProject(), pluginDescriptor);
-generator.execute(outputDir, pluginToolsRequest);
-} catch (GeneratorException e) {
-throw new MavenReportException("Error writing plugin 
documentation", e);
-}
-}
-
-/**
- * Generates an overview page with the list of goals
- * and a link to the goal's page.
- */
-static class PluginOverviewRenderer extends AbstractMavenReportRenderer {
-private final I18N i18n;
-
-priva

[jira] [Commented] (MNG-6847) Explicit type can be replaced by the diamond operator

2023-09-27 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-6847:
-

elharo merged PR #10:
URL: https://github.com/apache/maven-doxia-linkcheck/pull/10




> Explicit type can be replaced by the diamond operator
> -
>
> Key: MNG-6847
> URL: https://issues.apache.org/jira/browse/MNG-6847
> Project: Maven
>  Issue Type: Improvement
>  Components: Core
>Affects Versions: 3.6.3
>Reporter: Krosheninnikov Artem
>Assignee: Michael Osipov
>Priority: Trivial
> Fix For: 4.0.0-alpha-2, 4.0.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> As the title says. It's a small change to reduce unneeded verbosity in the 
> code.



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


[GitHub] [maven-doxia-linkcheck] elharo merged pull request #10: [MNG-6847] Use diamond operator

2023-09-27 Thread via GitHub


elharo merged PR #10:
URL: https://github.com/apache/maven-doxia-linkcheck/pull/10


-- 
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-7899) Various memory usage improvements

2023-09-27 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-7899:
-

sebastien-doyon commented on PR #1265:
URL: https://github.com/apache/maven/pull/1265#issuecomment-1737197122

   Thanks @cstamas, I will close this pr




> Various memory usage improvements
> -
>
> Key: MNG-7899
> URL: https://issues.apache.org/jira/browse/MNG-7899
> Project: Maven
>  Issue Type: Improvement
>  Components: Design, Patterns & Best Practices, Embedding, 
> General, Logging
>Affects Versions: 4.0.0-alpha-2
>Reporter: sebastien
>Priority: Major
>
> Some optimisations can be applied to the code to reduce the use of temporary 
> objects.
> Typical improvements identified are:
>  * reduce scope of temporary objects creation to avoid creating when not 
> needed. Example :
> {code:java}
> public String toString() {
> StringBuilder sb = new StringBuilder(512);
> if (isEmpty()) {
> return "empty";
> }
> for (MetadataGraphVertex v : vertices) {
> .{code}
> can be replaced by 
> {code:java}
> public String toString() {
> if (isEmpty()) {
> return "empty";
> }
> StringBuilder sb = new StringBuilder(512);
>     for (MetadataGraphVertex v : vertices) {
> .{code}
>  * Reuse StringBuilder objects in loops by setting its length to zero
>  * Use the StringBuilder.append() with index to avoid String.substring(). 
> Example:
>  
> {code:java}
> int idx = resourceName.lastIndexOf('/');
> buffer.append(idx < 0 ? resourceName : resourceName.substring(idx + 1)); 
> {code}
> can be replaced by 
>  
> {code:java}
> int idx = resourceName.lastIndexOf('/');
> if (idx < 0) {
> buffer.append(resourceName);
> } else {
> buffer.append(resourceName, idx + 1, resourceName.length());  
>   } {code}
>  
>  
>  * Replace dynamic string creation static constants when possible
>  * Avoid creating temporary strings with + operator when the final 
> destination can be used instead, like PrintStream.print() method
>  * Avoir using StringBuilder.append() method and util method MessageUtils.a() 
> when the final destination can be used instead, like PrintStream.print() 
> method
>  



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


[jira] [Commented] (MNG-7899) Various memory usage improvements

2023-09-27 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-7899:
-

sebastien-doyon closed pull request #1265: [MNG-7899] Various memory usage 
improvements 1
URL: https://github.com/apache/maven/pull/1265




> Various memory usage improvements
> -
>
> Key: MNG-7899
> URL: https://issues.apache.org/jira/browse/MNG-7899
> Project: Maven
>  Issue Type: Improvement
>  Components: Design, Patterns & Best Practices, Embedding, 
> General, Logging
>Affects Versions: 4.0.0-alpha-2
>Reporter: sebastien
>Priority: Major
>
> Some optimisations can be applied to the code to reduce the use of temporary 
> objects.
> Typical improvements identified are:
>  * reduce scope of temporary objects creation to avoid creating when not 
> needed. Example :
> {code:java}
> public String toString() {
> StringBuilder sb = new StringBuilder(512);
> if (isEmpty()) {
> return "empty";
> }
> for (MetadataGraphVertex v : vertices) {
> .{code}
> can be replaced by 
> {code:java}
> public String toString() {
> if (isEmpty()) {
> return "empty";
> }
> StringBuilder sb = new StringBuilder(512);
>     for (MetadataGraphVertex v : vertices) {
> .{code}
>  * Reuse StringBuilder objects in loops by setting its length to zero
>  * Use the StringBuilder.append() with index to avoid String.substring(). 
> Example:
>  
> {code:java}
> int idx = resourceName.lastIndexOf('/');
> buffer.append(idx < 0 ? resourceName : resourceName.substring(idx + 1)); 
> {code}
> can be replaced by 
>  
> {code:java}
> int idx = resourceName.lastIndexOf('/');
> if (idx < 0) {
> buffer.append(resourceName);
> } else {
> buffer.append(resourceName, idx + 1, resourceName.length());  
>   } {code}
>  
>  
>  * Replace dynamic string creation static constants when possible
>  * Avoid creating temporary strings with + operator when the final 
> destination can be used instead, like PrintStream.print() method
>  * Avoir using StringBuilder.append() method and util method MessageUtils.a() 
> when the final destination can be used instead, like PrintStream.print() 
> method
>  



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


[GitHub] [maven] sebastien-doyon closed pull request #1265: [MNG-7899] Various memory usage improvements 1

2023-09-27 Thread via GitHub


sebastien-doyon closed pull request #1265: [MNG-7899] Various memory usage 
improvements 1
URL: https://github.com/apache/maven/pull/1265


-- 
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-7899) Various memory usage improvements

2023-09-27 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-7899:
-

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

   maven-compat classes are really used by Maven2 plugins/extensions and are 
all deprecated. IMHO, they should be just left as is...




> Various memory usage improvements
> -
>
> Key: MNG-7899
> URL: https://issues.apache.org/jira/browse/MNG-7899
> Project: Maven
>  Issue Type: Improvement
>  Components: Design, Patterns & Best Practices, Embedding, 
> General, Logging
>Affects Versions: 4.0.0-alpha-2
>Reporter: sebastien
>Priority: Major
>
> Some optimisations can be applied to the code to reduce the use of temporary 
> objects.
> Typical improvements identified are:
>  * reduce scope of temporary objects creation to avoid creating when not 
> needed. Example :
> {code:java}
> public String toString() {
> StringBuilder sb = new StringBuilder(512);
> if (isEmpty()) {
> return "empty";
> }
> for (MetadataGraphVertex v : vertices) {
> .{code}
> can be replaced by 
> {code:java}
> public String toString() {
> if (isEmpty()) {
> return "empty";
> }
> StringBuilder sb = new StringBuilder(512);
>     for (MetadataGraphVertex v : vertices) {
> .{code}
>  * Reuse StringBuilder objects in loops by setting its length to zero
>  * Use the StringBuilder.append() with index to avoid String.substring(). 
> Example:
>  
> {code:java}
> int idx = resourceName.lastIndexOf('/');
> buffer.append(idx < 0 ? resourceName : resourceName.substring(idx + 1)); 
> {code}
> can be replaced by 
>  
> {code:java}
> int idx = resourceName.lastIndexOf('/');
> if (idx < 0) {
> buffer.append(resourceName);
> } else {
> buffer.append(resourceName, idx + 1, resourceName.length());  
>   } {code}
>  
>  
>  * Replace dynamic string creation static constants when possible
>  * Avoid creating temporary strings with + operator when the final 
> destination can be used instead, like PrintStream.print() method
>  * Avoir using StringBuilder.append() method and util method MessageUtils.a() 
> when the final destination can be used instead, like PrintStream.print() 
> method
>  



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


[GitHub] [maven-mvnd] gnodet commented on a diff in pull request #881: Code improvements.

2023-09-27 Thread via GitHub


gnodet commented on code in PR #881:
URL: https://github.com/apache/maven-mvnd/pull/881#discussion_r1338286106


##
client/src/main/java/org/mvndaemon/mvnd/client/DaemonConnector.java:
##
@@ -69,6 +73,11 @@
 public class DaemonConnector {
 
 private static final Logger LOGGER = 
LoggerFactory.getLogger(DaemonConnector.class);
+private static final Function daemonIsIdle = di -> 
di.getState() == DaemonState.Idle;

Review Comment:
   Why not using method if we don't want to inline those methods ?



##
client/src/main/java/org/mvndaemon/mvnd/client/DaemonConnector.java:
##
@@ -391,30 +412,21 @@ private Process startDaemonProcess(String daemonId, 
ClientOutput output) {
 host = "localhost";
 port = address;
 }
-if (!port.matches("[0-9]+")) {
+if (!port.matches("\\d+")) {
 throw new IllegalArgumentException("Wrong debug address 
syntax: " + address);
 }
 int iPort = Integer.parseInt(port);
 if (iPort == 0) {
-try (ServerSocketChannel channel = 
SocketFamily.inet.openServerSocket()) {
-iPort = ((InetSocketAddress) 
channel.getLocalAddress()).getPort();
-} catch (IOException e) {
-throw new IllegalStateException("Unable to find a free 
debug port", e);
-}
+iPort = findPort();
 }
+
 address = host + ":" + iPort;
 output.accept(Message.buildStatus("Daemon listening for 
debugger on address: " + address));
 
args.add("-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=" + 
address);
 }
 // jvm args
-String jvmArgs = parameters.jvmArgs();
-if (jvmArgs != null) {
-for (String arg : jvmArgs.split(" ")) {
-if (!arg.isEmpty()) {
-args.add(arg);
-}
-}
-}
+String jvmArgs = Objects.toString(parameters.jvmArgs(), "");
+args.addAll(Stream.of(jvmArgs.split(" 
")).filter(nonEmpty).collect(Collectors.toList()));

Review Comment:
   `Stream.of(jvmArgs.split(" ")).filter(nonEmpty).forEach(args::add)` ? to 
avoid the `toList` step



##
client/src/main/java/org/mvndaemon/mvnd/client/DaemonConnector.java:
##
@@ -194,6 +203,7 @@ private String handleStopEvents(
 .collect(Collectors.groupingBy(DaemonStopEvent::getDaemonId, 
Collectors.minBy(this::compare)))
 .values()
 .stream()
+.filter(Optional::isPresent)

Review Comment:
   I know IntelliJ prints a warning `'Optional::get' without 'isPresent()' 
check`, but I think this is not a possible case : the `groupingBy` would not 
create a key if there's no value, so `minBy` will always return a non empty 
Optional.



-- 
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-6847) Explicit type can be replaced by the diamond operator

2023-09-27 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on MNG-6847:
-

ppalaga commented on PR #886:
URL: https://github.com/apache/maven-mvnd/pull/886#issuecomment-1736970631

   Thanks, all good! Hopefully we see each other at some other conference again!




> Explicit type can be replaced by the diamond operator
> -
>
> Key: MNG-6847
> URL: https://issues.apache.org/jira/browse/MNG-6847
> Project: Maven
>  Issue Type: Improvement
>  Components: Core
>Affects Versions: 3.6.3
>Reporter: Krosheninnikov Artem
>Assignee: Michael Osipov
>Priority: Trivial
> Fix For: 4.0.0-alpha-2, 4.0.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> As the title says. It's a small change to reduce unneeded verbosity in the 
> code.



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


[GitHub] [maven-mvnd] ppalaga commented on pull request #886: [MNG-6847] Use diamond operator

2023-09-27 Thread via GitHub


ppalaga commented on PR #886:
URL: https://github.com/apache/maven-mvnd/pull/886#issuecomment-1736970631

   Thanks, all good! Hopefully we see each other at some other conference 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-integration-testing] slawekjaranowski commented on a diff in pull request #307: Try to fix MavenITmng7836AlternativePomSyntaxTest

2023-09-27 Thread via GitHub


slawekjaranowski commented on code in PR #307:
URL: 
https://github.com/apache/maven-integration-testing/pull/307#discussion_r1338256489


##
core-it-suite/src/test/resources-filtered/settings-remote.xml:
##
@@ -67,6 +67,35 @@ plugins/artifacts from test repos so use of these settings 
should be the excepti
 
   
 
+
+  asf-snapshot-repo
+  
+
+  asf-snapshot
+  Apache Maven Snapshot Repository
+  https://repository.apache.org/snapshots/
+  
+false
+  
+  
+true
+  
+
+  
+  
+
+  asf-snapshot
+  Apache Maven Snapshot Repository
+  https://repository.apache.org/snapshots/
+  
+false
+  
+  
+true
+  
+
+  
+

Review Comment:
   It fix only build on GitHub teh same local repo is used for build Maven and 
execute IT
   but on jenkins and on local host we have separate clean repo for ITs



-- 
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] (MCOMPILER-546) Maven compiling fails when using JEP 443

2023-09-27 Thread Tamas Cservenak (Jira)


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

Tamas Cservenak commented on MCOMPILER-546:
---

Reported as https://bugs.openjdk.org/browse/JDK-8317002

> Maven compiling fails when using JEP 443
> 
>
> Key: MCOMPILER-546
> URL: https://issues.apache.org/jira/browse/MCOMPILER-546
> Project: Maven Compiler Plugin
>  Issue Type: Bug
>Affects Versions: 3.11.0
> Environment: Both MacOS and Windows. 
> Maven 3.9.4
> Maven Compiler 3.11
> Java 21 Preview
>Reporter: Vlad Galuska
>Assignee: Tamas Cservenak
>Priority: Major
> Attachments: mvn-compile-1.log, pom.xml
>
>
> I'm trying to test out the preview feature described in JEP 443: Unnamed 
> patterns and variables [https://openjdk.org/jeps/443] . I have the following:
> {code:java}
> 
> org.apache.maven.plugins
> maven-compiler-plugin
> 
> 21
> 21
> 
> --enable-preview
> 
> 
>  {code}
> I then run `mvn -X compile`, the result of which has been attached as 
> mvn-compile.log.
> The target just contains the Main.class file and the `createdFiles.lst` with: 
> `org/example/Main.class` and `inputFiles.lst` with: 
> `/Users/vlad.galuska/IdeaProjects/preview/Java21Preview/src/main/java/org/example/Main.java`
> {*}Note{*}: The picture is from IntelIJ but all the commands have been run 
> from the command line.
> When running the generated .class file:
> `cd target/classes `
> `java --enable-preview org.example.Main`
> I get the following message:
> ```
> Error: LinkageError occurred while loading main class org.example.Main
>         java.lang.ClassFormatError: Illegal field name "" in class 
> org/example/Main
> ```
> This only happens when using the maven compiler plugin as when compiling 
> manually from the command line:
> `javac --enable-preview --release 21 org/example/Main.java `
> `java --enable-preview org.example.Main `
> I get the intended result:
> ```
> Hello, World!
> Hello, World!
> Hello, World!
> ```
> The same behavior has been recorded on Windows. I've also tried this with the 
> amazon coretto version of java 21, OpenJDK Java 21 GA release and OpenJDK 
> java 21.ea.35-open.
> Maven is also a clean install of 3.9.4, but was reproduced with a 3.8 I had 
> installed previously.
> Here's also a repository where I have uploaded the code base for this bug 
> report:
> [https://github.com/VladGaluska/jdk21-preview-bug]
>  



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


[jira] [Created] (MSHARED-1304) Backport use of WeakReference in ReflectionValueExtractor

2023-09-27 Thread Guillaume Nodet (Jira)
Guillaume Nodet created MSHARED-1304:


 Summary: Backport use of WeakReference in ReflectionValueExtractor
 Key: MSHARED-1304
 URL: https://issues.apache.org/jira/browse/MSHARED-1304
 Project: Maven Shared Components
  Issue Type: New Feature
Reporter: Guillaume Nodet


Ideally, the change 
https://github.com/apache/maven/commit/14d16064f69aeac554ebc8469bc44f6dec75d1ca#diff-14f8ce5db70c603718aa8696a42ab819c76cf2c455e9c94251764c6fd64ac4e9
 should be back ported to the mavne-shared-utils {{ReflectionValueExtractor}}.



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


[GitHub] [maven-integration-testing] gnodet merged pull request #308: Fix expectations on IT MNG-7836 following the modifications on the consumer pom

2023-09-27 Thread via GitHub


gnodet merged PR #308:
URL: https://github.com/apache/maven-integration-testing/pull/308


-- 
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