[jira] [Commented] (MNG-6843) Parallel build fails due to missing JAR artifacts in compilePath

2021-10-22 Thread Hudson (Jira)


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

Hudson commented on MNG-6843:
-

Build unstable in Jenkins: Maven » Maven TLP » maven » maven-3.8.x #83

See 
https://ci-maven.apache.org/job/Maven/job/maven-box/job/maven/job/maven-3.8.x/83/

> Parallel build fails due to missing JAR artifacts in compilePath
> 
>
> Key: MNG-6843
> URL: https://issues.apache.org/jira/browse/MNG-6843
> Project: Maven
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 3.6.3
> Environment: - Linux (tested Docker using maven:3-jdk-8 tag): happens 
> most times.
> - Windows 10: happens sometimes.
>Reporter: Stepan Hrbacek
>Assignee: Robert Scholte
>Priority: Major
> Fix For: 3.8.2, 4.0.0, 4.0.0-alpha-1
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Build of our multi module (57) Java maven project is failing phase when 
> running it as parallel in 4 threads (mvn -T 4 clean install). The failure 
> happens during compilation because packages/classes from compile dependencies 
> cannot be found:
> {noformat}
> [main] [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile 
> (default-compile) on project common: Compilation failure: Compilation 
> failure: 
> [main] [ERROR] 
> /home/common/src/main/java/com/foo/ZonedDateTimeParser.java:[6,32] package 
> org.apache.commons.lang3 does not exist{noformat}
> After enabling debug logging (with thread names) I have found out that a 
> compile path of the failing module is empty (besides target/classes):
> When running in 4 threads (-T 4):
> {noformat}
> [BuilderThread 2] [DEBUG] (f) compilePath = [/home/common/target/classes]
> ...
> [BuilderThread 2] [DEBUG] Command line options:
> [BuilderThread 2] [DEBUG] -d /home/common/target/classes -classpath 
> /home/common/target/classes: -sourcepath 
> /home/common/src/main/java:/home/common/target/generated-sources/annotations: 
> -s /home/common/target/generated-sources/annotations -g -nowarn -target 1.8 
> -source 1.8 -encoding UTF-8{noformat}
> When running in a single thread (-T 1):
> {noformat}
> [BuilderThread 0] [DEBUG] (f) compilePath = [/home/common/target/classes, 
> /root/.m2/repository/commons-beanutils/commons-beanutils/1.9.3/commons-beanutils-1.9.3.jar,
>  
> /root/.m2/repository/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar,
>  
> /root/.m2/repository/org/apache/commons/commons-collections4/4.3/commons-collections4-4.3.jar,
>  
> /root/.m2/repository/org/apache/commons/commons-lang3/3.9/commons-lang3-3.9.jar,
>  /root/.m2/repository/org/jooq/jool-java-8/0.9.14/jool-java-8-0.9.14.jar, 
> /root/.m2/repository/org/slf4j/slf4j-api/1.7.26/slf4j-api-1.7.26.jar, 
> /root/.m2/repository/org/springframework/spring-beans/5.1.8.RELEASE/spring-beans-5.1.8.RELEASE.jar,
>  
> /root/.m2/repository/org/springframework/spring-core/5.1.8.RELEASE/spring-core-5.1.8.RELEASE.jar,
>  
> /root/.m2/repository/org/springframework/spring-context/5.1.8.RELEASE/spring-context-5.1.8.RELEASE.jar]
> ...
> [BuilderThread 0] [DEBUG] Command line options:
> [BuilderThread 0] [DEBUG] -d /home/common/target/classes -classpath 
> /home/common/target/classes:/root/.m2/repository/commons-beanutils/commons-beanutils/1.9.3/commons-beanutils-1.9.3.jar:/root/.m2/repository/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar:/root/.m2/repository/org/apache/commons/commons-collections4/4.3/commons-collections4-4.3.jar:/root/.m2/repository/org/apache/commons/commons-lang3/3.9/commons-lang3-3.9.jar:/root/.m2/repository/org/jooq/jool-java-8/0.9.14/jool-java-8-0.9.14.jar:/root/.m2/repository/org/slf4j/slf4j-api/1.7.26/slf4j-api-1.7.26.jar:/root/.m2/repository/org/springframework/spring-beans/5.1.8.RELEASE/spring-beans-5.1.8.RELEASE.jar:/root/.m2/repository/org/springframework/spring-core/5.1.8.RELEASE/spring-core-5.1.8.RELEASE.jar:/root/.m2/repository/org/springframework/spring-context/5.1.8.RELEASE/spring-context-5.1.8.RELEASE.jar:
>  -sourcepath 
> /home/common/src/main/java:/home/common/target/generated-sources/annotations: 
> -s /home/common/target/generated-sources/annotations -g -nowarn -target 1.8 
> -source 1.8 -encoding UTF-8{noformat}
> After adding custom log messages I have found out that the root cause is that 
> org.apache.maven.project.MavenProject.setArtifactFilter() is called with null 
> artifactFilter parameter. The call happens for the failing module from a 
> thread that is building another module. The call stack is:
> {code:java}
> "BuilderThread 0@2513" prio=5 tid=0xe nid=NA runnable
>  java.lang.Thread.State: RUNNABLE
>  at 
> org.apache.maven.project.MavenProject.setArtifactFilter(MavenProject.java:1437)
>  at 
> 

[jira] [Commented] (MNG-7251) Fix threadLocalArtifactsHolder leaking into cloned project

2021-10-22 Thread Hudson (Jira)


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

Hudson commented on MNG-7251:
-

Build unstable in Jenkins: Maven » Maven TLP » maven » maven-3.8.x #83

See 
https://ci-maven.apache.org/job/Maven/job/maven-box/job/maven/job/maven-3.8.x/83/

> Fix threadLocalArtifactsHolder leaking into cloned project
> --
>
> Key: MNG-7251
> URL: https://issues.apache.org/jira/browse/MNG-7251
> Project: Maven
>  Issue Type: Bug
>  Components: Class Loading, Dependencies
>Affects Versions: 3.8.2, 4.0.0-alpha-1
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Critical
> Fix For: 4.0.0, 4.0.0-alpha-1, 3.8.3
>
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (MNG-6914) Align mvn and mvnw scripts

2021-10-22 Thread Hudson (Jira)


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

Hudson commented on MNG-6914:
-

Build unstable in Jenkins: Maven » Maven TLP » maven » maven-3.8.x #83

See 
https://ci-maven.apache.org/job/Maven/job/maven-box/job/maven/job/maven-3.8.x/83/

> Align mvn and mvnw scripts
> --
>
> Key: MNG-6914
> URL: https://issues.apache.org/jira/browse/MNG-6914
> Project: Maven
>  Issue Type: Improvement
>Reporter: Robert Scholte
>Assignee: Robert Scholte
>Priority: Major
> Fix For: 4.0.0, 4.0.0-alpha-1
>
>
> With MNG-5937 the wrapper code becomes part of core.
> The scripts are like 80% the same, 10% is wrapper specific and 10% are 
> differences due to  improvements on one or the other side.
> By aligning the scripts they both benefit from the improvements.
> Some important changes that might but should not effect the build:
> - CLASSWORLDS_LAUNCHER / WRAPPER_LAUNCHER will be renamed to MAVEN_LAUNCHER
> - CLASSWORLDS_JAR / WRAPPER_JAR will be renamed to LAUNCHER_JAR
> - Introduce MAVENHOME_CONFIG. For the wrapper it will be empty (as the 
> wrapper must download the Maven first), maven will use it to set 
> classworlds.conf, maven.home and library.jansi.path



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (MNG-7312) Revert ThreadLocal approach from MNG-6843 and MNG-7251

2021-10-22 Thread Hudson (Jira)


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

Hudson commented on MNG-7312:
-

Build unstable in Jenkins: Maven » Maven TLP » maven » maven-3.8.x #83

See 
https://ci-maven.apache.org/job/Maven/job/maven-box/job/maven/job/maven-3.8.x/83/

> Revert ThreadLocal approach from MNG-6843 and MNG-7251
> --
>
> Key: MNG-7312
> URL: https://issues.apache.org/jira/browse/MNG-7312
> Project: Maven
>  Issue Type: Task
>  Components: Class Loading, Core, Dependencies
>Affects Versions: 4.0.0-alpha-1, 3.8.3
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 4.0.0, 4.0.0-alpha-1, 3.8.4
>
>
> Both have been proved not to work as intended. They will be reverted.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Comment Edited] (MNG-6606) Allow installation-wide parameter customization

2021-10-22 Thread Michael Osipov (Jira)


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

Michael Osipov edited comment on MNG-6606 at 10/22/21, 8:29 PM:


There is no {{/.mvn/bashrc}}.


was (Author: michael-o):
There is no {{./mvn/bashrc}}.

> Allow installation-wide parameter customization
> ---
>
> Key: MNG-6606
> URL: https://issues.apache.org/jira/browse/MNG-6606
> Project: Maven
>  Issue Type: Improvement
>  Components: Core
>Affects Versions: 3.1.1
>Reporter: Paul Benedict
>Priority: Major
> Fix For: waiting-for-feedback, wontfix-candidate
>
>
> In my use case, I would like to always print the version of Maven at every 
> execution. I am not interested in a per-project case basis; nor interested in 
> modifying the startup batch scripts. I want to drop in a standard 
> configuration file to control all my Maven installations in the same manner.
> My request is to make {{/.mvn/maven.config}} and {{./mvn/}}{{mavenrc}} to 
> also be recognized in the Maven installation root. I am not explicitly asking 
> for {{${maven.root}/.mvn}} to be *the* solution, but it's the right place to 
> start the problem solving.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (MNG-6606) Allow installation-wide parameter customization

2021-10-22 Thread Michael Osipov (Jira)


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

Michael Osipov commented on MNG-6606:
-

Still waiting for response.

> Allow installation-wide parameter customization
> ---
>
> Key: MNG-6606
> URL: https://issues.apache.org/jira/browse/MNG-6606
> Project: Maven
>  Issue Type: Improvement
>  Components: Core
>Affects Versions: 3.1.1
>Reporter: Paul Benedict
>Priority: Major
> Fix For: waiting-for-feedback, wontfix-candidate
>
>
> In my use case, I would like to always print the version of Maven at every 
> execution. I am not interested in a per-project case basis; nor interested in 
> modifying the startup batch scripts. I want to drop in a standard 
> configuration file to control all my Maven installations in the same manner.
> My request is to make {{/.mvn/maven.config}} and {{./mvn/}}{{mavenrc}} to 
> also be recognized in the Maven installation root. I am not explicitly asking 
> for {{${maven.root}/.mvn}} to be *the* solution, but it's the right place to 
> start the problem solving.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Closed] (MNG-7212) Prefer use of InheritableThreadLocal to fix possible issue when mojo starts a thread and tries to access some artifacts

2021-10-22 Thread Michael Osipov (Jira)


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

Michael Osipov closed MNG-7212.
---
Fix Version/s: (was: 3.8.x-candidate)
   (was: 4.0.x-candidate)
   Resolution: Won't Fix

Since the {{ThreadLocal}} approach has been reverted there is no need to 
address this anymore.

> Prefer use of InheritableThreadLocal to fix possible issue when mojo starts a 
> thread and tries to access some artifacts
> ---
>
> Key: MNG-7212
> URL: https://issues.apache.org/jira/browse/MNG-7212
> Project: Maven
>  Issue Type: Improvement
>  Components: Artifacts and Repositories, Core, Performance
>Reporter: Michael Osipov
>Priority: Major
>
> This is a followup to MNG-6843. Found during the vote for 3.8.2.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Closed] (MNG-7285) [Regression] MavenProject.getArtifacts() not returning correct value across multiple threads

2021-10-22 Thread Michael Osipov (Jira)


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

Michael Osipov closed MNG-7285.
---
Fix Version/s: (was: 3.8.x-candidate)
   (was: 4.0.x-candidate)
   3.8.4
   4.0.0-alpha-1
   4.0.0
   Resolution: Fixed

> [Regression] MavenProject.getArtifacts() not returning correct value across 
> multiple threads
> 
>
> Key: MNG-7285
> URL: https://issues.apache.org/jira/browse/MNG-7285
> Project: Maven
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 3.8.2, 4.0.0-alpha-1, 3.8.3
>Reporter: Mickael Istria
>Assignee: Michael Osipov
>Priority: Critical
> Fix For: 4.0.0, 4.0.0-alpha-1, 3.8.4
>
>
> Patch for MNG-6843 seems to cause that when trying to use 
> MavenProject.getArtifacts() across different threads, some of them get an 
> incorrect result.
> This cause an issue in m2e where we schedule a lot of work and don't have 
> much control over which thread will do the work (there is a thread pool); 
> we've faced several regressions because of this issue when trying to adopt 
> 3.8.3 from 3.8.1. More details at 
> [https://github.com/eclipse-m2e/m2e-core/pull/346|https://github.com/eclipse-m2e/m2e-core/pull/350]
>  , 
> [https://github.com/eclipse-m2e/m2e-core/pull/347|https://github.com/eclipse-m2e/m2e-core/pull/350]
>  and [https://github.com/eclipse-m2e/m2e-core/pull/350] .
> I'll try to capture it in a test case for maven repo in the next days.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Closed] (MNG-7300) [Regression] Reloading web application (Enter) fails due to java.lang.ClassNotFoundException

2021-10-22 Thread Michael Osipov (Jira)


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

Michael Osipov closed MNG-7300.
---
Fix Version/s: (was: 3.8.x-candidate)
   (was: 4.0.x-candidate)
   3.8.4
   4.0.0-alpha-1
   4.0.0
   Resolution: Fixed

> [Regression] Reloading web application (Enter) fails due to 
> java.lang.ClassNotFoundException
> 
>
> Key: MNG-7300
> URL: https://issues.apache.org/jira/browse/MNG-7300
> Project: Maven
>  Issue Type: Bug
>  Components: Class Loading, Core
>Affects Versions: 3.8.2, 4.0.0-alpha-1, 3.8.3
> Environment: Apply to all environments
>Reporter: Manuel Álvarez Díaz
>Assignee: Michael Osipov
>Priority: Major
>  Labels: class_loader, modules, multiple, restart
> Fix For: 4.0.0, 4.0.0-alpha-1, 3.8.4
>
> Attachments: test-project.zip
>
>
> Reloading a web application with maven-jetty-plugin 9.4.43.v20210629, 
> 9.4.44.v20210927 or 11.0.6 (at least) is failing when executing with apache 
> maven 3.8.2 or 3.8.3, but it worked fine with maven 3.8.1.
> Error is different with maven-jetty-plugin 9.x vs 11.x ,but in both cases, 
> the base error is due to java.lang.ClassNotFoundException error (different 
> classes in each case, but classes which can be correctly loaded with starting 
> the web context the first time). Error occurs when ENTER (default key for web 
> context restart) is typed.
> NOTE: I had created an incidence for the jetty plugin (see 
> [6977|https://github.com/eclipse/jetty.project/issues/6977]) but after 
> analyzing it, it was closed pointing to a core issue.
>  
> *Steps to reproduce:*
> I have attached a simple Apache Maven project with two submodules presenting 
> the fail in a very simple scenario:
>  * Subsytem test-project-util defines a class extending HttpServlet
>  * Subsystem test-project-service defines a class HelloServlet extending the 
> class in the test-project-util subsystem
> NOTE: In the jax-rs project, error is different, but probably the cause is 
> the same.
> Steps to reproduce the issue:
>  * unzip test-project.zip file
>  * cd test-project
>  * mvn install
>  * cd test-project-service
>  * mvn jetty:run
>  * ENTER (to reload application)
> After this, the following exception is raised
>  
> {{[INFO] restarting o.e.j.m.p.JettyWebAppContext@55fee662\{WS Test 
> Service,/test-project-service,file:///D://test-project/test-project-service/src/main/webapp/,AVAILABLE}{file:///D:/test-project/test-project-service/src/main/webapp/}
> [INFO] Stopped o.e.j.m.p.JettyWebAppContext@55fee662\{WS Test 
> Service,/test-project-service,file:///D://test-project/test-project-service/src/main/webapp/,STOPPED}{file:///D:/test-project/test-project-service/src/main/webapp/}
> [INFO] Webapp source directory = 
> D:\\test-project\test-project-service\src\main\webapp
> [INFO] Reload Mechanic: manual
> [INFO] nonBlocking:false
> [INFO] Classes = D:\\test-project\test-project-service\target\classes
> [INFO] Context path = /test-project-service
> [INFO] Tmp directory = D:\\test-project\test-project-service\target\tmp
> [INFO] Web defaults = org/eclipse/jetty/webapp/webdefault.xml
> [INFO] Web overrides =  none
> [INFO] web.xml file = 
> file:///D://test-project/test-project-service/src/main/webapp/WEB-INF/web.xml
> [INFO] Webapp directory = 
> D:\\test-project\test-project-service\src\main\webapp
> [INFO] Scanning elapsed time=12ms
> [WARNING] Failed startup of context o.e.j.m.p.JettyWebAppContext@55fee662\{WS 
> Test 
> Service,/test-project-service,file:///D://test-project/test-project-service/src/main/webapp/,UNAVAILABLE}{file:///D://test-project/test-project-service/src/main/webapp/}
> java.lang.NoClassDefFoundError: es/testproject/SimpleRestHttpServletTemplate
> at java.lang.ClassLoader.defineClass1 (Native Method)
> at java.lang.ClassLoader.defineClass (ClassLoader.java:1017)
> at java.security.SecureClassLoader.defineClass 
> (SecureClassLoader.java:174)
> at java.net.URLClassLoader.defineClass (URLClassLoader.java:550)
> at java.net.URLClassLoader$1.run (URLClassLoader.java:458)
> at java.net.URLClassLoader$1.run (URLClassLoader.java:452)
> at java.security.AccessController.doPrivileged (Native Method)
> at java.net.URLClassLoader.findClass (URLClassLoader.java:451)
> at org.eclipse.jetty.webapp.WebAppClassLoader.foundClass 
> (WebAppClassLoader.java:642)
> at org.eclipse.jetty.webapp.WebAppClassLoader.loadAsResource 
> (WebAppClassLoader.java:615)
> at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass 
> (WebAppClassLoader.java:529)
> at java.lang.ClassLoader.loadClass (ClassLoader.java:522)
> at org.eclipse.jetty.util.Loader.loa

[jira] [Closed] (MNG-7312) Revert ThreadLocal approach from MNG-6843 and MNG-7251

2021-10-22 Thread Michael Osipov (Jira)


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

Michael Osipov closed MNG-7312.
---
Fix Version/s: (was: 3.8.x-candidate)
   (was: 4.0.x-candidate)
   3.8.4
   4.0.0-alpha-1
   4.0.0
   Resolution: Fixed

Fixed with 
[8784812cf6af6c72597a8f3de45288ce7b1206a6|https://gitbox.apache.org/repos/asf?p=maven.git;a=commit;h=8784812cf6af6c72597a8f3de45288ce7b1206a6]
 and  
[5c36bf5ef78a162cefea47ccdaf0d28e01c1426c|https://gitbox.apache.org/repos/asf?p=maven.git;a=commit;h=5c36bf5ef78a162cefea47ccdaf0d28e01c1426c]
 for {{maven-3.8.x}} branch.

> Revert ThreadLocal approach from MNG-6843 and MNG-7251
> --
>
> Key: MNG-7312
> URL: https://issues.apache.org/jira/browse/MNG-7312
> Project: Maven
>  Issue Type: Task
>  Components: Class Loading, Core, Dependencies
>Affects Versions: 4.0.0-alpha-1, 3.8.3
>Reporter: Michael Osipov
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 4.0.0, 4.0.0-alpha-1, 3.8.4
>
>
> Both have been proved not to work as intended. They will be reverted.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [maven] michael-o closed pull request #595: [MNG-7312] Revert ThreadLocal approach from MNG-6843 and MNG-7251

2021-10-22 Thread GitBox


michael-o closed pull request #595:
URL: https://github.com/apache/maven/pull/595


   


-- 
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] michael-o commented on pull request #595: [MNG-7312] Revert ThreadLocal approach from MNG-6843 and MNG-7251

2021-10-22 Thread GitBox


michael-o commented on pull request #595:
URL: https://github.com/apache/maven/pull/595#issuecomment-949923703


   Merged.


-- 
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] asfgit closed pull request #594: [MNG-7312] Revert ThreadLocal approach from MNG-6843 and MNG-7251

2021-10-22 Thread GitBox


asfgit closed pull request #594:
URL: https://github.com/apache/maven/pull/594


   


-- 
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] cstamas commented on pull request #46: [MPLUGIN-373] Group extractors and improve their selection

2021-10-22 Thread GitBox


cstamas commented on pull request #46:
URL: https://github.com/apache/maven-plugin-tools/pull/46#issuecomment-949899593


   w/ qdox 2.0.1-SNAPSHOT and finally fixed ordering (and removed skip for 
deprecated):
   ```
   [INFO] --- maven-plugin-plugin:3.6.2-SNAPSHOT:descriptor 
(default-descriptor) @ maven-plugin-minimal ---
   [ERROR] 
   
   Maven dependencies of Maven Plugins should be in provided scope.
   Please make sure that all your dependencies declared in POM whose group ID is
   org.apache.maven have set 'provided' as well.
   In the future this error will break the build.
   
   The following dependencies are in wrong scope:
* org.apache.maven:maven-plugin-api:jar:3.8.1:compile
* org.apache.maven:maven-model:jar:3.8.1:compile
* org.apache.maven:maven-artifact:jar:3.8.1:compile
* org.apache.maven:maven-project:jar:2.2.1:compile
* org.apache.maven:maven-settings:jar:2.2.1:compile
* org.apache.maven:maven-profile:jar:2.2.1:compile
* org.apache.maven:maven-artifact-manager:jar:2.2.1:compile
* org.apache.maven:maven-repository-metadata:jar:2.2.1:compile
* org.apache.maven:maven-plugin-registry:jar:2.2.1:compile
   
   Please fix your build!
   
   
   [WARNING] Using platform encoding (UTF-8 actually) to read mojo source 
files, i.e. build is platform dependent!
   [INFO] java-annotations mojo extractor found 1 mojo descriptor.
   [INFO] java-javadoc mojo extractor found 0 mojo descriptor.
   [INFO] ant mojo extractor found 0 mojo descriptor.
   [INFO] bsh mojo extractor found 0 mojo descriptor.
   ```
   
   but one remark: the POM of "test" project contains these dependencies:
   ```
 
   
 org.apache.maven
 maven-plugin-api
 3.8.1
   
   
 org.apache.maven.plugin-tools
 maven-plugin-annotations
 3.6.0
 provided
   
   
 org.apache.maven
 maven-project
 2.2.1
   
 
   ```
   
   Which is:
   * mvn 2 is ancien
   * mixes maven 3.8.1 and 2.1 😄 
   IMO, m-p-p should detect and forbid things like this


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

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

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




[jira] [Commented] (MNG-7310) Maven loads plugin from another submodule

2021-10-22 Thread Michael Osipov (Jira)


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

Michael Osipov commented on MNG-7310:
-

That's really confusing, the change itself is quite mechanical. I don't see any 
behavioral change. Maybe we relied on an inconsistent behavior of the previous 
shim?

> Maven loads plugin from another submodule
> -
>
> Key: MNG-7310
> URL: https://issues.apache.org/jira/browse/MNG-7310
> Project: Maven
>  Issue Type: Bug
>Affects Versions: 4.0.0-alpha-1
>Reporter: Martin Kanters
>Priority: Major
> Attachments: demo-plugins.zip
>
>
> With the latest Maven master, I'm not able to build a certain multi module 
> project.
> It fails with the following error:
> C:\work\apache\demo>mvn validate
>  [INFO] Scanning for projects...
>  ...
>  [ERROR] The build could not read 1 project -> [Help 1]
>  [ERROR]
>  [ERROR] The project com.example:demo2:0.0.1-SNAPSHOT 
> (C:\work\apache\demo\demo2\pom.xml) has 1 error
>  [ERROR] 'build.plugins.plugin.version' for 
> org.springframework.cloud:spring-cloud-contract-maven-plugin must be a valid 
> version but is '${project.version}'. @ 
> org.apache.maven:maven-core:4.0.0-alpha-1-SNAPSHOT:default-lifecycle-bindings
> The project looks as follows:
> parent
>  – demo (module containing plugin "spring-cloud-contract-maven-plugin")
>  – demo2 (module)
> "demo2" has no dependency on "demo" and the parent of "demo2" is "parent"..
>  Somehow, the plugin from "demo" leaks into "demo2", which I've verified is 
> the case during a debug session.
> I'm still unsure of a couple of things:
>  - Does it only happen with the "spring-cloud-contract-maven-plugin" plugin?
>  - Where does ${project.version} come from? (I've not defined it)
> I've done a bisect and tracked it down to the following commit:
>  [[MNG-5577] Convert maven-core to JSR 
> 330|https://github.com/apache/maven/commit/9567da2bc889a94f5c3b692b4afb310ddbacd6e5]
> Subject project is attached. Reproduce with the current master of Maven: mvn 
> validate.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (MPLUGIN-373) Java 16 features not supported by maven-plugin-plugin:3.6.1

2021-10-22 Thread Robert Scholte (Jira)


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

Robert Scholte commented on MPLUGIN-373:


[~makingthematrix] can you confirm? If so I can prepare a release this week of 
QDox.

> Java 16 features not supported by maven-plugin-plugin:3.6.1 
> 
>
> Key: MPLUGIN-373
> URL: https://issues.apache.org/jira/browse/MPLUGIN-373
> Project: Maven Plugin Tools
>  Issue Type: Bug
>  Components: Plugin Plugin
>Affects Versions: 3.6.1
> Environment: Linux Mint 21.0 Cinnamon, Linux Kernel 5.4.0-71-generic, 
> arch amd64, OpenJDK 16.0.1, Apache Maven 3.6.3.
>Reporter: Maciej Gorywoda
>Priority: Major
>
> Even though compilation works, `mvn install` fails with:
> {noformat}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-plugin-plugin:3.6.1:descriptor 
> (default-descriptor) on project maven-plugin-minimal: Execution 
> default-descriptor of goal 
> org.apache.maven.plugins:maven-plugin-plugin:3.6.1:descriptor failed: syntax 
> error @[27,1] in 
> [file:/home/makingthematrix/workspace/maven-plugin-minimal/src/main/java/io/makingthematrix/MinimalMojo.java|file:///home/makingthematrix/workspace/maven-plugin-minimal/src/main/java/io/makingthematrix/MinimalMojo.java]
>  -> [Help 1]
>  {noformat}
> That syntax error @[27,1] is
>  ```
>  {color:#0033b3}record 
> {color}{color:#00}KaBoom{color}({color:#00}String {color}foo) {}
>  ```
> Tested on openjdk-16 and graalvm-21.1.0 for Java 16.
> {color:#0033b3}maven-compiler-plugin version: 3.8.1{color}
> {color:#0033b3}maven-plugin-plugin version: 3.6.1{color}
> I made a minimal example and put it on GitHub: 
> [https://github.com/makingthematrix/maven-plugin-minimal]
> And here are the logs:
>  —
>  {noformat}
>  makingthematrix@makingthematrix:~/workspace/maven-plugin-minimal$ java 
> -version
>  openjdk version "16.0.1" 2021-04-20
>  OpenJDK Runtime Environment (build 16.0.1+9-24)
>  OpenJDK 64-Bit Server VM (build 16.0.1+9-24, mixed mode, sharing)
> makingthematrix@makingthematrix:~/workspace/maven-plugin-minimal$ mvn 
> --version
>  Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
>  Maven home: /opt/mvn
>  Java version: 16.0.1, vendor: Oracle Corporation, runtime: /opt/jdk-16.0.1
>  Default locale: en_US, platform encoding: UTF-8
>  OS name: "linux", version: "5.4.0-71-generic", arch: "amd64", family: "unix"
> makingthematrix@makingthematrix:~/workspace/maven-plugin-minimal$ mvn clean
>  [INFO] Scanning for projects...
>  [INFO] 
>  [INFO] --< io.makingthematrix:maven-plugin-minimal 
> >---
>  [INFO] Building Maven Plugin Minimal 0.0.1
>  [INFO] [ maven-plugin 
> ]
>  [INFO] 
>  [INFO] — maven-clean-plugin:2.5:clean (default-clean) @ maven-plugin-minimal 
> —
>  [INFO] Deleting /home/makingthematrix/workspace/maven-plugin-minimal/target
>  [INFO] 
> 
>  [INFO] BUILD SUCCESS
>  [INFO] 
> 
>  [INFO] Total time: 0.184 s
>  [INFO] Finished at: 2021-04-30T19:07:36+02:00
>  [INFO] 
> 
>  
> makingthematrix@makingthematrix:~/workspace/maven-plugin-minimal$ mvn compile
>  [INFO] Scanning for projects...
>  [INFO] 
>  [INFO] --< io.makingthematrix:maven-plugin-minimal 
> >---
>  [INFO] Building Maven Plugin Minimal 0.0.1
>  [INFO] [ maven-plugin 
> ]
>  [INFO] 
>  [INFO] — maven-resources-plugin:2.6:resources (default-resources) @ 
> maven-plugin-minimal —
>  [WARNING] Using platform encoding (UTF-8 actually) to copy filtered 
> resources, i.e. build is platform dependent!
>  [INFO] skip non existing resourceDirectory 
> /home/makingthematrix/workspace/maven-plugin-minimal/src/main/resources
>  [INFO] 
>  [INFO] — maven-compiler-plugin:3.8.1:compile (default-compile) @ 
> maven-plugin-minimal —
>  [INFO] Changes detected - recompiling the module!
>  [WARNING] File encoding has not been set, using platform encoding UTF-8, 
> i.e. build is platform dependent!
>  [INFO] Compiling 1 source file to 
> /home/makingthematrix/workspace/maven-plugin-minimal/target/classes
>  [INFO] 
> 
>  [INFO] BUILD SUCCESS
>  [INFO] 
> 
>  [INFO] Total time: 1.262 s
>  [INFO] Finished at: 2021-04-30T19:08:15+02:00
>  [INFO] 
> 
>  
> makingthematrix@makingthematrix:~/work

[GitHub] [maven-plugin-tools] cstamas commented on pull request #46: [MPLUGIN-373] Group extractors and improve their selection

2021-10-22 Thread GitBox


cstamas commented on pull request #46:
URL: https://github.com/apache/maven-plugin-tools/pull/46#issuecomment-949834992


   Build fails due qdox:2.0.1-SNAPSHOT, but locally is buildable (and 
oss.sonatype.org will be used to pull the snapshot)


-- 
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] cstamas commented on a change in pull request #46: [MPLUGIN-373] Group extractors and improve their selection

2021-10-22 Thread GitBox


cstamas commented on a change in pull request #46:
URL: https://github.com/apache/maven-plugin-tools/pull/46#discussion_r734712571



##
File path: 
maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/scanner/DefaultMojoScanner.java
##
@@ -77,29 +82,60 @@ public void populatePluginDescriptor( PluginToolsRequest 
request )
 throws ExtractionException, InvalidPluginDescriptorException
 {
 Logger logger = getLogger();
-Set activeExtractorsInternal = getActiveExtractors();
-
-logger.debug( "Using " + activeExtractorsInternal.size() + " mojo 
extractors." );
 
 int numMojoDescriptors = 0;
 
-for ( String extractorId : activeExtractorsInternal )
+List orderedExtractors = 
getOrderedExtractors();
+
+logger.debug( "Using " + orderedExtractors.size() + " mojo 
extractors." );
+
+HashMap groupStats = new HashMap<>();
+
+for ( MojoDescriptorExtractor extractor : orderedExtractors )
 {
-MojoDescriptorExtractor extractor = mojoDescriptorExtractors.get( 
extractorId );
+GroupKey groupKey = extractor.getGroupKey();
+String extractorId = extractor.getName();
 
-if ( extractor == null )
+if ( extractor.isDeprecated() )
 {
-throw new ExtractionException( "No mojo extractor with '" + 
extractorId + "' id." );
+if ( groupStats.containsKey( groupKey.getGroup() )
+  && groupStats.get( groupKey.getGroup() ) != 0 )
+{
+logger.info( extractorId + " deprecated mojo extractor 
skipped as group '" + groupKey.getGroup()
++ "' already discovered " + groupStats.get( 
groupKey.getGroup() )
++ " mojo descriptor" + ( groupStats.get( 
groupKey.getGroup() ) > 1 ? "s" : "" ) + "." );
+continue; // if same group already found descriptors, skip 
rest of the group
+}
 }
 
 logger.debug( "Applying " + extractorId + " mojo extractor" );
 
 List extractorDescriptors = extractor.execute( 
request );
 
+int extractorDescriptorsCount = extractorDescriptors.size();
+
 logger.info( extractorId + " mojo extractor found " + 
extractorDescriptors.size()
  + " mojo descriptor" + ( 
extractorDescriptors.size() > 1 ? "s" : "" ) + "." );
 numMojoDescriptors += extractorDescriptors.size();
 
+if ( extractor.isDeprecated() &&  extractorDescriptorsCount > 0 )
+{
+logger.warn( "" );
+logger.warn( "Deprecated extractor extracted descriptors. 
Upgrade your Mojo definitions." );
+logger.warn( "" );

Review comment:
   which is deprecated is shown now, and if Java group is in question, it 
is said what should be used instead.




-- 
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] cstamas commented on a change in pull request #46: [MPLUGIN-373] Group extractors and improve their selection

2021-10-22 Thread GitBox


cstamas commented on a change in pull request #46:
URL: https://github.com/apache/maven-plugin-tools/pull/46#discussion_r734712260



##
File path: 
maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/extractor/GroupKey.java
##
@@ -0,0 +1,83 @@
+package org.apache.maven.tools.plugin.extractor;
+
+/*
+ * 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.
+ */
+
+/**
+ * Group key: defines "grouping" for descriptor (based on source of 
extraction) and rank within
+ * group.
+ */
+public final class GroupKey
+implements Comparable
+{
+/**
+ * Java group is handled a bit special: is always first to be scanned.
+ */
+public static final String JAVA_GROUP = "java";
+
+private final String group;
+
+private final int order;
+
+public GroupKey( final String group, final int order )

Review comment:
   removed




-- 
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] cstamas commented on a change in pull request #46: [MPLUGIN-373] Group extractors and improve their selection

2021-10-22 Thread GitBox


cstamas commented on a change in pull request #46:
URL: https://github.com/apache/maven-plugin-tools/pull/46#discussion_r734712165



##
File path: 
maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/JavaAnnotationsMojoDescriptorExtractor.java
##
@@ -95,6 +100,25 @@
 @org.codehaus.plexus.component.annotations.Requirement
 private ArchiverManager archiverManager;
 
+@Override
+public String getName()
+{
+return NAME;
+}
+
+@Override
+public boolean isDeprecated()
+{
+return false; // this is the "current way" to write Java Mojos
+}
+
+@Override
+@SuppressWarnings( "checkstyle:magicnumber" )

Review comment:
   removed, is leftover




-- 
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-373) Java 16 features not supported by maven-plugin-plugin:3.6.1

2021-10-22 Thread Jira


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

Tamás Cservenák commented on MPLUGIN-373:
-

Tested, works OK on provided demo project: 
https://github.com/apache/maven-plugin-tools/pull/46#issuecomment-949809315

> Java 16 features not supported by maven-plugin-plugin:3.6.1 
> 
>
> Key: MPLUGIN-373
> URL: https://issues.apache.org/jira/browse/MPLUGIN-373
> Project: Maven Plugin Tools
>  Issue Type: Bug
>  Components: Plugin Plugin
>Affects Versions: 3.6.1
> Environment: Linux Mint 21.0 Cinnamon, Linux Kernel 5.4.0-71-generic, 
> arch amd64, OpenJDK 16.0.1, Apache Maven 3.6.3.
>Reporter: Maciej Gorywoda
>Priority: Major
>
> Even though compilation works, `mvn install` fails with:
> {noformat}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-plugin-plugin:3.6.1:descriptor 
> (default-descriptor) on project maven-plugin-minimal: Execution 
> default-descriptor of goal 
> org.apache.maven.plugins:maven-plugin-plugin:3.6.1:descriptor failed: syntax 
> error @[27,1] in 
> [file:/home/makingthematrix/workspace/maven-plugin-minimal/src/main/java/io/makingthematrix/MinimalMojo.java|file:///home/makingthematrix/workspace/maven-plugin-minimal/src/main/java/io/makingthematrix/MinimalMojo.java]
>  -> [Help 1]
>  {noformat}
> That syntax error @[27,1] is
>  ```
>  {color:#0033b3}record 
> {color}{color:#00}KaBoom{color}({color:#00}String {color}foo) {}
>  ```
> Tested on openjdk-16 and graalvm-21.1.0 for Java 16.
> {color:#0033b3}maven-compiler-plugin version: 3.8.1{color}
> {color:#0033b3}maven-plugin-plugin version: 3.6.1{color}
> I made a minimal example and put it on GitHub: 
> [https://github.com/makingthematrix/maven-plugin-minimal]
> And here are the logs:
>  —
>  {noformat}
>  makingthematrix@makingthematrix:~/workspace/maven-plugin-minimal$ java 
> -version
>  openjdk version "16.0.1" 2021-04-20
>  OpenJDK Runtime Environment (build 16.0.1+9-24)
>  OpenJDK 64-Bit Server VM (build 16.0.1+9-24, mixed mode, sharing)
> makingthematrix@makingthematrix:~/workspace/maven-plugin-minimal$ mvn 
> --version
>  Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
>  Maven home: /opt/mvn
>  Java version: 16.0.1, vendor: Oracle Corporation, runtime: /opt/jdk-16.0.1
>  Default locale: en_US, platform encoding: UTF-8
>  OS name: "linux", version: "5.4.0-71-generic", arch: "amd64", family: "unix"
> makingthematrix@makingthematrix:~/workspace/maven-plugin-minimal$ mvn clean
>  [INFO] Scanning for projects...
>  [INFO] 
>  [INFO] --< io.makingthematrix:maven-plugin-minimal 
> >---
>  [INFO] Building Maven Plugin Minimal 0.0.1
>  [INFO] [ maven-plugin 
> ]
>  [INFO] 
>  [INFO] — maven-clean-plugin:2.5:clean (default-clean) @ maven-plugin-minimal 
> —
>  [INFO] Deleting /home/makingthematrix/workspace/maven-plugin-minimal/target
>  [INFO] 
> 
>  [INFO] BUILD SUCCESS
>  [INFO] 
> 
>  [INFO] Total time: 0.184 s
>  [INFO] Finished at: 2021-04-30T19:07:36+02:00
>  [INFO] 
> 
>  
> makingthematrix@makingthematrix:~/workspace/maven-plugin-minimal$ mvn compile
>  [INFO] Scanning for projects...
>  [INFO] 
>  [INFO] --< io.makingthematrix:maven-plugin-minimal 
> >---
>  [INFO] Building Maven Plugin Minimal 0.0.1
>  [INFO] [ maven-plugin 
> ]
>  [INFO] 
>  [INFO] — maven-resources-plugin:2.6:resources (default-resources) @ 
> maven-plugin-minimal —
>  [WARNING] Using platform encoding (UTF-8 actually) to copy filtered 
> resources, i.e. build is platform dependent!
>  [INFO] skip non existing resourceDirectory 
> /home/makingthematrix/workspace/maven-plugin-minimal/src/main/resources
>  [INFO] 
>  [INFO] — maven-compiler-plugin:3.8.1:compile (default-compile) @ 
> maven-plugin-minimal —
>  [INFO] Changes detected - recompiling the module!
>  [WARNING] File encoding has not been set, using platform encoding UTF-8, 
> i.e. build is platform dependent!
>  [INFO] Compiling 1 source file to 
> /home/makingthematrix/workspace/maven-plugin-minimal/target/classes
>  [INFO] 
> 
>  [INFO] BUILD SUCCESS
>  [INFO] 
> 
>  [INFO] Total time: 1.262 s
>  [INFO] Finished at: 2021-04-30T19:08:15+02:00
>  [INFO] 
> 
>  
> ma

[GitHub] [maven-plugin-tools] cstamas commented on pull request #46: [MPLUGIN-373] Group extractors and improve their selection

2021-10-22 Thread GitBox


cstamas commented on pull request #46:
URL: https://github.com/apache/maven-plugin-tools/pull/46#issuecomment-949809315


   Update qdox to 2.0.1-SNAPSHOT, and now scanning record is OK:
   
   ```
   [INFO] --- maven-plugin-plugin:3.6.2-SNAPSHOT:descriptor 
(default-descriptor) @ maven-plugin-minimal ---
   [ERROR] 
   
   Maven dependencies of Maven Plugins should be in provided scope.
   Please make sure that all your dependencies declared in POM whose group ID is
   org.apache.maven have set 'provided' as well.
   In the future this error will break the build.
   
   The following dependencies are in wrong scope:
* org.apache.maven:maven-plugin-api:jar:3.8.1:compile
* org.apache.maven:maven-model:jar:3.8.1:compile
* org.apache.maven:maven-artifact:jar:3.8.1:compile
* org.apache.maven:maven-project:jar:2.2.1:compile
* org.apache.maven:maven-settings:jar:2.2.1:compile
* org.apache.maven:maven-profile:jar:2.2.1:compile
* org.apache.maven:maven-artifact-manager:jar:2.2.1:compile
* org.apache.maven:maven-repository-metadata:jar:2.2.1:compile
* org.apache.maven:maven-plugin-registry:jar:2.2.1:compile
   
   Please fix your build!
   
   
   [WARNING] Using platform encoding (UTF-8 actually) to read mojo source 
files, i.e. build is platform dependent!
   [INFO] ant mojo extractor found 0 mojo descriptor.
   [INFO] bsh mojo extractor found 0 mojo descriptor.
   [INFO] java-annotations mojo extractor found 1 mojo descriptor.
   [INFO] java-javadoc deprecated mojo extractor skipped as group 'java' 
already discovered 1 mojo descriptor.
   [INFO] 
   ```


-- 
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-4173) Remove automatic version resolution for POM plugins

2021-10-22 Thread Ran Biron (Jira)


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

Ran Biron commented on MNG-4173:


[~alan-czajkowski] I'll capitulate to "broken". But the way it is right now 
(broken or as designed) works well for our flow. All I'm requesting is for a 
way to preserve this, even using a special flag 
"–iReallyGiveUpOnReproduciableBuildsLetMeUseReleaseVersionForDependencies".

Making the change as you've described might have a technical benefit, but in 
our project that won't translate to any other kind of benefit and splitting the 
modules will cause us extra headache with multi-project release management 
"just" because the build process for one part is more demanding (in resources, 
licenses, etc) than another part.

> Remove automatic version resolution for POM plugins
> ---
>
> Key: MNG-4173
> URL: https://issues.apache.org/jira/browse/MNG-4173
> Project: Maven
>  Issue Type: Task
>  Components: Plugins and Lifecycle
>Affects Versions: 3.0-alpha-3
>Reporter: Benjamin Bentmann
>Priority: Major
> Fix For: 4.0.x-candidate
>
>
> Maven 3.x will no longer try to automatically find the version for plugins 
> specified in the POM, i.e. the effective POM must declare a version for each 
> plugin used for the sake of reproducible builds. Omitting the plugin version 
> will raise in error.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [maven-apache-parent] ctubbsii commented on pull request #40: [MPOM-244] upload SHA-512 only for source-release to staging repo

2021-10-22 Thread GitBox


ctubbsii commented on pull request #40:
URL: 
https://github.com/apache/maven-apache-parent/pull/40#issuecomment-949706958


   A lot of this discussion is out of scope for MPOM. The point I was trying to 
make here in 
https://github.com/apache/maven-apache-parent/pull/40#issuecomment-947318959 is 
that this shouldn't be running by default in the apache-release profile if it's 
going to produce files with less overall utility to the staging process than 
the ones projects might already be creating for themselves. Therefore, it 
doesn't add much value to those MPOM users. I don't think MPOM should decide 
the format for the whole project, but I'm happy to advocate for the BSD "tag" 
style in the appropriate venue. For here, I'd be happy if it could be disabled 
more easily, or configured to provide the output format I prefer, so it's not 
just being a bother.


-- 
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-7310) Maven loads plugin from another submodule

2021-10-22 Thread Martin Kanters (Jira)


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

Martin Kanters commented on MNG-7310:
-

Ok, I found out a couple of things. 

First of all, it only fails when the plugin is an extensions, with a new 
lifecycle. In this case, spring-cloud-contract-verifier [adds 
one|https://github.com/spring-cloud/spring-cloud-contract/blob/e73d6526bfb3240f9dc33d6afcf2be17e5383f49/spring-cloud-contract-tools/spring-cloud-contract-maven-plugin/src/main/resources/META-INF/plexus/components.xml].
 This is also where the ${project.version}s are coming from, which ultimately 
lets the build fail.

Secondly, I've debugged both a working version of Maven (3.8.3) and the latest 
master to try and see the differences. I traced it down to the 
DefaultLifecycles class. It looks like it loads the spring-cloud extension 
correctly while building the "demo" module (where it is registered, so that's 
good). But only for the current master Maven version, the new spring cloud 
extension is still present in the "demo2" module during the build. In the Maven 
3.8.3, it is not there anymore.

Since the [offending 
commit|https://github.com/apache/maven/commit/9567da2bc889a94f5c3b692b4afb310ddbacd6e5]
 has changed a lot of stuff regarding dependency injection, it must have to do 
something with that. I'm just sure how 
[lifecyclesMap|https://github.com/apache/maven/blob/c3962c1a6c0b40abbfb12740253437f6431b234b/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycles.java#L54]
 is dynamically changing on runtime. 

It would help a lot if someone more into the dependency injection system could 
give a pointer.

> Maven loads plugin from another submodule
> -
>
> Key: MNG-7310
> URL: https://issues.apache.org/jira/browse/MNG-7310
> Project: Maven
>  Issue Type: Bug
>Affects Versions: 4.0.0-alpha-1
>Reporter: Martin Kanters
>Priority: Major
> Attachments: demo-plugins.zip
>
>
> With the latest Maven master, I'm not able to build a certain multi module 
> project.
> It fails with the following error:
> C:\work\apache\demo>mvn validate
>  [INFO] Scanning for projects...
>  ...
>  [ERROR] The build could not read 1 project -> [Help 1]
>  [ERROR]
>  [ERROR] The project com.example:demo2:0.0.1-SNAPSHOT 
> (C:\work\apache\demo\demo2\pom.xml) has 1 error
>  [ERROR] 'build.plugins.plugin.version' for 
> org.springframework.cloud:spring-cloud-contract-maven-plugin must be a valid 
> version but is '${project.version}'. @ 
> org.apache.maven:maven-core:4.0.0-alpha-1-SNAPSHOT:default-lifecycle-bindings
> The project looks as follows:
> parent
>  – demo (module containing plugin "spring-cloud-contract-maven-plugin")
>  – demo2 (module)
> "demo2" has no dependency on "demo" and the parent of "demo2" is "parent"..
>  Somehow, the plugin from "demo" leaks into "demo2", which I've verified is 
> the case during a debug session.
> I'm still unsure of a couple of things:
>  - Does it only happen with the "spring-cloud-contract-maven-plugin" plugin?
>  - Where does ${project.version} come from? (I've not defined it)
> I've done a bisect and tracked it down to the following commit:
>  [[MNG-5577] Convert maven-core to JSR 
> 330|https://github.com/apache/maven/commit/9567da2bc889a94f5c3b692b4afb310ddbacd6e5]
> Subject project is attached. Reproduce with the current master of Maven: mvn 
> validate.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [maven-plugin-tools] cstamas commented on a change in pull request #46: [MPLUGIN-373] Group extractors and improve their selection

2021-10-22 Thread GitBox


cstamas commented on a change in pull request #46:
URL: https://github.com/apache/maven-plugin-tools/pull/46#discussion_r734574486



##
File path: 
maven-plugin-tools-java/src/main/java/org/apache/maven/tools/plugin/extractor/javadoc/JavaJavadocMojoDescriptorExtractor.java
##
@@ -62,11 +63,34 @@
  *
  * @see org.apache.maven.plugin.descriptor.MojoDescriptor
  */
-@Component( role = MojoDescriptorExtractor.class, hint = "java-javadoc" )
+@Component( role = MojoDescriptorExtractor.class, hint = 
JavaJavadocMojoDescriptorExtractor.NAME )
 public class JavaJavadocMojoDescriptorExtractor
 extends AbstractLogEnabled
 implements MojoDescriptorExtractor, JavadocMojoAnnotation
 {
+public static final String NAME = "java-javadoc";
+
+private static final GroupKey GROUP_KEY = new GroupKey( 
GroupKey.JAVA_GROUP, 200 );
+
+@Override
+public String getName()
+{
+return NAME;
+}
+
+@Override
+public boolean isDeprecated()
+{
+return true; // one should use Java5 annotations instead
+}
+
+@Override
+@SuppressWarnings( "checkstyle:magicnumber" )

Review comment:
   Ah, nvm, reworked since, not needed 😄 




-- 
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-373) Java 16 features not supported by maven-plugin-plugin:3.6.1

2021-10-22 Thread Robert Scholte (Jira)


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

Robert Scholte commented on MPLUGIN-373:


Could anyone test this with qdox-2.0.1-SNAPSHOT from 
https://oss.sonatype.org/content/repositories/snapshots? Is should now still 
work with records, sealed classes and text blocks.

> Java 16 features not supported by maven-plugin-plugin:3.6.1 
> 
>
> Key: MPLUGIN-373
> URL: https://issues.apache.org/jira/browse/MPLUGIN-373
> Project: Maven Plugin Tools
>  Issue Type: Bug
>  Components: Plugin Plugin
>Affects Versions: 3.6.1
> Environment: Linux Mint 21.0 Cinnamon, Linux Kernel 5.4.0-71-generic, 
> arch amd64, OpenJDK 16.0.1, Apache Maven 3.6.3.
>Reporter: Maciej Gorywoda
>Priority: Major
>
> Even though compilation works, `mvn install` fails with:
> {noformat}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-plugin-plugin:3.6.1:descriptor 
> (default-descriptor) on project maven-plugin-minimal: Execution 
> default-descriptor of goal 
> org.apache.maven.plugins:maven-plugin-plugin:3.6.1:descriptor failed: syntax 
> error @[27,1] in 
> [file:/home/makingthematrix/workspace/maven-plugin-minimal/src/main/java/io/makingthematrix/MinimalMojo.java|file:///home/makingthematrix/workspace/maven-plugin-minimal/src/main/java/io/makingthematrix/MinimalMojo.java]
>  -> [Help 1]
>  {noformat}
> That syntax error @[27,1] is
>  ```
>  {color:#0033b3}record 
> {color}{color:#00}KaBoom{color}({color:#00}String {color}foo) {}
>  ```
> Tested on openjdk-16 and graalvm-21.1.0 for Java 16.
> {color:#0033b3}maven-compiler-plugin version: 3.8.1{color}
> {color:#0033b3}maven-plugin-plugin version: 3.6.1{color}
> I made a minimal example and put it on GitHub: 
> [https://github.com/makingthematrix/maven-plugin-minimal]
> And here are the logs:
>  —
>  {noformat}
>  makingthematrix@makingthematrix:~/workspace/maven-plugin-minimal$ java 
> -version
>  openjdk version "16.0.1" 2021-04-20
>  OpenJDK Runtime Environment (build 16.0.1+9-24)
>  OpenJDK 64-Bit Server VM (build 16.0.1+9-24, mixed mode, sharing)
> makingthematrix@makingthematrix:~/workspace/maven-plugin-minimal$ mvn 
> --version
>  Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
>  Maven home: /opt/mvn
>  Java version: 16.0.1, vendor: Oracle Corporation, runtime: /opt/jdk-16.0.1
>  Default locale: en_US, platform encoding: UTF-8
>  OS name: "linux", version: "5.4.0-71-generic", arch: "amd64", family: "unix"
> makingthematrix@makingthematrix:~/workspace/maven-plugin-minimal$ mvn clean
>  [INFO] Scanning for projects...
>  [INFO] 
>  [INFO] --< io.makingthematrix:maven-plugin-minimal 
> >---
>  [INFO] Building Maven Plugin Minimal 0.0.1
>  [INFO] [ maven-plugin 
> ]
>  [INFO] 
>  [INFO] — maven-clean-plugin:2.5:clean (default-clean) @ maven-plugin-minimal 
> —
>  [INFO] Deleting /home/makingthematrix/workspace/maven-plugin-minimal/target
>  [INFO] 
> 
>  [INFO] BUILD SUCCESS
>  [INFO] 
> 
>  [INFO] Total time: 0.184 s
>  [INFO] Finished at: 2021-04-30T19:07:36+02:00
>  [INFO] 
> 
>  
> makingthematrix@makingthematrix:~/workspace/maven-plugin-minimal$ mvn compile
>  [INFO] Scanning for projects...
>  [INFO] 
>  [INFO] --< io.makingthematrix:maven-plugin-minimal 
> >---
>  [INFO] Building Maven Plugin Minimal 0.0.1
>  [INFO] [ maven-plugin 
> ]
>  [INFO] 
>  [INFO] — maven-resources-plugin:2.6:resources (default-resources) @ 
> maven-plugin-minimal —
>  [WARNING] Using platform encoding (UTF-8 actually) to copy filtered 
> resources, i.e. build is platform dependent!
>  [INFO] skip non existing resourceDirectory 
> /home/makingthematrix/workspace/maven-plugin-minimal/src/main/resources
>  [INFO] 
>  [INFO] — maven-compiler-plugin:3.8.1:compile (default-compile) @ 
> maven-plugin-minimal —
>  [INFO] Changes detected - recompiling the module!
>  [WARNING] File encoding has not been set, using platform encoding UTF-8, 
> i.e. build is platform dependent!
>  [INFO] Compiling 1 source file to 
> /home/makingthematrix/workspace/maven-plugin-minimal/target/classes
>  [INFO] 
> 
>  [INFO] BUILD SUCCESS
>  [INFO] 
> 
>  [INFO] Total time: 1.262 s
>  [INFO] Finished at: 2021-04-30T19:08:15+02:00
>  [INFO] 
> 

[GitHub] [maven-plugin-tools] cstamas commented on a change in pull request #46: [MPLUGIN-373] Group extractors and improve their selection

2021-10-22 Thread GitBox


cstamas commented on a change in pull request #46:
URL: https://github.com/apache/maven-plugin-tools/pull/46#discussion_r734554880



##
File path: 
maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/scanner/DefaultMojoScanner.java
##
@@ -118,21 +156,38 @@ public void populatePluginDescriptor( PluginToolsRequest 
request )
 }
 }
 
-/**
- * Gets the name of the active extractors.
- *
- * @return A Set containing the names of the active extractors.
- */
-protected Set getActiveExtractors()
+private List getOrderedExtractors() throws 
ExtractionException
 {
-Set result = activeExtractors;
+Set extractors = activeExtractors;
 
-if ( result == null )
+if ( extractors == null )
 {
-result = new HashSet<>( mojoDescriptorExtractors.keySet() );
+extractors = new HashSet<>( mojoDescriptorExtractors.keySet() );
+}
+
+ArrayList orderedExtractors = new 
ArrayList<>();
+for ( String extractorId : extractors )
+{
+MojoDescriptorExtractor extractor = mojoDescriptorExtractors.get( 
extractorId );
+
+if ( extractor == null )
+{
+throw new ExtractionException( "No mojo extractor with '" + 
extractorId + "' id." );
+}
+
+orderedExtractors.add( extractor );
 }
 
-return result;
+Collections.sort( orderedExtractors, new 
Comparator()
+{
+@Override
+public int compare( final MojoDescriptorExtractor o1, final 
MojoDescriptorExtractor o2 )
+{
+return o1.getGroupKey().compareTo( o2.getGroupKey() );
+}
+} );

Review comment:
   Actually yes, would simplify things




-- 
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] cstamas commented on a change in pull request #46: [MPLUGIN-373] Group extractors and improve their selection

2021-10-22 Thread GitBox


cstamas commented on a change in pull request #46:
URL: https://github.com/apache/maven-plugin-tools/pull/46#discussion_r734554563



##
File path: 
maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/extractor/GroupKey.java
##
@@ -0,0 +1,83 @@
+package org.apache.maven.tools.plugin.extractor;
+
+/*
+ * 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.
+ */
+
+/**
+ * Group key: defines "grouping" for descriptor (based on source of 
extraction) and rank within
+ * group.
+ */
+public final class GroupKey
+implements Comparable
+{
+/**
+ * Java group is handled a bit special: is always first to be scanned.
+ */
+public static final String JAVA_GROUP = "java";
+
+private final String group;
+
+private final int order;
+
+public GroupKey( final String group, final int order )

Review comment:
   Matter of taste, not needed.




-- 
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] cstamas commented on a change in pull request #46: [MPLUGIN-373] Group extractors and improve their selection

2021-10-22 Thread GitBox


cstamas commented on a change in pull request #46:
URL: https://github.com/apache/maven-plugin-tools/pull/46#discussion_r734554384



##
File path: 
maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/extractor/GroupKey.java
##
@@ -0,0 +1,83 @@
+package org.apache.maven.tools.plugin.extractor;
+
+/*
+ * 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.
+ */
+
+/**
+ * Group key: defines "grouping" for descriptor (based on source of 
extraction) and rank within
+ * group.
+ */
+public final class GroupKey
+implements Comparable
+{
+/**
+ * Java group is handled a bit special: is always first to be scanned.
+ */
+public static final String JAVA_GROUP = "java";

Review comment:
   I don't want to limit (ie. by using enum): right now we are open, just 
add (your own) extractor to plugin and it will work. Don't want to "predefine" 
them. Java is ONLY one that in m-p-p has two extractors. Once we have others 
doubled, we can add them as well.




-- 
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] cstamas commented on a change in pull request #46: [MPLUGIN-373] Group extractors and improve their selection

2021-10-22 Thread GitBox


cstamas commented on a change in pull request #46:
URL: https://github.com/apache/maven-plugin-tools/pull/46#discussion_r734553287



##
File path: 
maven-plugin-tools-java/src/main/java/org/apache/maven/tools/plugin/extractor/javadoc/JavaJavadocMojoDescriptorExtractor.java
##
@@ -62,11 +63,34 @@
  *
  * @see org.apache.maven.plugin.descriptor.MojoDescriptor
  */
-@Component( role = MojoDescriptorExtractor.class, hint = "java-javadoc" )
+@Component( role = MojoDescriptorExtractor.class, hint = 
JavaJavadocMojoDescriptorExtractor.NAME )
 public class JavaJavadocMojoDescriptorExtractor
 extends AbstractLogEnabled
 implements MojoDescriptorExtractor, JavadocMojoAnnotation
 {
+public static final String NAME = "java-javadoc";
+
+private static final GroupKey GROUP_KEY = new GroupKey( 
GroupKey.JAVA_GROUP, 200 );
+
+@Override
+public String getName()
+{
+return NAME;
+}
+
+@Override
+public boolean isDeprecated()
+{
+return true; // one should use Java5 annotations instead
+}
+
+@Override
+@SuppressWarnings( "checkstyle:magicnumber" )

Review comment:
   Checkstyle was yelling, so I added, yes.




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

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

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




[jira] [Commented] (MNG-6784) Create correct SHA512 content

2021-10-22 Thread Christopher Tubbs (Jira)


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

Christopher Tubbs commented on MNG-6784:


[~kwin] - The page you linked is an informational page, a "HOW TO" guide, not 
policy. Even if it were ASF policy, nothing in that page describes any kind of 
file format requirement, as far as I can tell. If you believe otherwise, please 
cite the specific line.

> Create correct SHA512 content
> -
>
> Key: MNG-6784
> URL: https://issues.apache.org/jira/browse/MNG-6784
> Project: Maven
>  Issue Type: Improvement
>  Components: Deployment
>Affects Versions: 3.6.2
>Reporter: Karl Heinz Marbaise
>Priority: Minor
> Fix For: 4.0.x-candidate, wontfix-candidate
>
>
> Currently the created SHA512 which is used for the distribution area contains 
> only the checksum but not the filename which results in bad output if the 
> checksums being checked via command line tool:
> {code}
> $ shasum -c apache-maven-3.2.5-bin.tar.gz.sha512
> $ shasum: apache-maven-3.2.5-bin.tar.gz.sha512: no properly formatted SHA 
> checksum lines found
> {code}
> The checksum should be enhanced to support that correctly.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [maven-plugin-tools] slawekjaranowski commented on a change in pull request #46: [MPLUGIN-373] Group extractors and improve their selection

2021-10-22 Thread GitBox


slawekjaranowski commented on a change in pull request #46:
URL: https://github.com/apache/maven-plugin-tools/pull/46#discussion_r734456299



##
File path: 
maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/JavaAnnotationsMojoDescriptorExtractor.java
##
@@ -95,6 +100,25 @@
 @org.codehaus.plexus.component.annotations.Requirement
 private ArchiverManager archiverManager;
 
+@Override
+public String getName()
+{
+return NAME;
+}
+
+@Override
+public boolean isDeprecated()
+{
+return false; // this is the "current way" to write Java Mojos
+}
+
+@Override
+@SuppressWarnings( "checkstyle:magicnumber" )

Review comment:
   is needed?

##
File path: 
maven-plugin-tools-java/src/main/java/org/apache/maven/tools/plugin/extractor/javadoc/JavaJavadocMojoDescriptorExtractor.java
##
@@ -62,11 +63,34 @@
  *
  * @see org.apache.maven.plugin.descriptor.MojoDescriptor
  */
-@Component( role = MojoDescriptorExtractor.class, hint = "java-javadoc" )
+@Component( role = MojoDescriptorExtractor.class, hint = 
JavaJavadocMojoDescriptorExtractor.NAME )
 public class JavaJavadocMojoDescriptorExtractor
 extends AbstractLogEnabled
 implements MojoDescriptorExtractor, JavadocMojoAnnotation
 {
+public static final String NAME = "java-javadoc";
+
+private static final GroupKey GROUP_KEY = new GroupKey( 
GroupKey.JAVA_GROUP, 200 );
+
+@Override
+public String getName()
+{
+return NAME;
+}
+
+@Override
+public boolean isDeprecated()
+{
+return true; // one should use Java5 annotations instead
+}
+
+@Override
+@SuppressWarnings( "checkstyle:magicnumber" )

Review comment:
   is needed?

##
File path: 
maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/extractor/GroupKey.java
##
@@ -0,0 +1,83 @@
+package org.apache.maven.tools.plugin.extractor;
+
+/*
+ * 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.
+ */
+
+/**
+ * Group key: defines "grouping" for descriptor (based on source of 
extraction) and rank within
+ * group.
+ */
+public final class GroupKey
+implements Comparable
+{
+/**
+ * Java group is handled a bit special: is always first to be scanned.
+ */
+public static final String JAVA_GROUP = "java";

Review comment:
   why are not defined for other? maybe enum?

##
File path: 
maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/scanner/DefaultMojoScanner.java
##
@@ -77,29 +82,60 @@ public void populatePluginDescriptor( PluginToolsRequest 
request )
 throws ExtractionException, InvalidPluginDescriptorException
 {
 Logger logger = getLogger();
-Set activeExtractorsInternal = getActiveExtractors();
-
-logger.debug( "Using " + activeExtractorsInternal.size() + " mojo 
extractors." );
 
 int numMojoDescriptors = 0;
 
-for ( String extractorId : activeExtractorsInternal )
+List orderedExtractors = 
getOrderedExtractors();
+
+logger.debug( "Using " + orderedExtractors.size() + " mojo 
extractors." );
+
+HashMap groupStats = new HashMap<>();
+
+for ( MojoDescriptorExtractor extractor : orderedExtractors )
 {
-MojoDescriptorExtractor extractor = mojoDescriptorExtractors.get( 
extractorId );
+GroupKey groupKey = extractor.getGroupKey();
+String extractorId = extractor.getName();
 
-if ( extractor == null )
+if ( extractor.isDeprecated() )
 {
-throw new ExtractionException( "No mojo extractor with '" + 
extractorId + "' id." );
+if ( groupStats.containsKey( groupKey.getGroup() )
+  && groupStats.get( groupKey.getGroup() ) != 0 )
+{
+logger.info( extractorId + " deprecated mojo extractor 
skipped as group '" + groupKey.getGroup()
++ "' already discovered " + groupStats.get( 
groupKey.getGroup() )
++ " mojo descriptor" + ( groupStats.get( 
groupKey.getGroup() ) > 1 ? "s" : "" ) + "." );
+  

[GitHub] [maven-plugin-tools] cstamas edited a comment on pull request #46: [MPLUGIN-373] Group extractors and improve their selection

2021-10-22 Thread GitBox


cstamas edited a comment on pull request #46:
URL: https://github.com/apache/maven-plugin-tools/pull/46#issuecomment-949442354


   Added commit 5a1d36097c4142e66dcb447d440d9c3664f6a676
   
   Now relevant bit of console output of test project looks like this:
   ```
   [INFO] --- maven-plugin-plugin:3.6.2-SNAPSHOT:descriptor 
(default-descriptor) @ maven-plugin-minimal ---
   [ERROR] 
   
   Maven dependencies of Maven Plugins should be in provided scope.
   Please make sure that all your dependencies declared in POM whose group ID is
   org.apache.maven have set 'provided' as well.
   In the future this error will break the build.
   
   The following dependencies are in wrong scope:
* org.apache.maven:maven-plugin-api:jar:3.8.1:compile
* org.apache.maven:maven-model:jar:3.8.1:compile
* org.apache.maven:maven-artifact:jar:3.8.1:compile
* org.apache.maven:maven-project:jar:2.2.1:compile
* org.apache.maven:maven-settings:jar:2.2.1:compile
* org.apache.maven:maven-profile:jar:2.2.1:compile
* org.apache.maven:maven-artifact-manager:jar:2.2.1:compile
* org.apache.maven:maven-repository-metadata:jar:2.2.1:compile
* org.apache.maven:maven-plugin-registry:jar:2.2.1:compile
   
   Please fix your build!
   
   
   [WARNING] Using platform encoding (UTF-8 actually) to read mojo source 
files, i.e. build is platform dependent!
   [INFO] ant mojo extractor found 0 mojo descriptor.
   [INFO] bsh mojo extractor found 0 mojo descriptor.
   [WARNING] Unable to scan Javadoc from 
/home/cstamas/tmp/maven-plugin-minimal/src/main/java; skipping since, 
deprecation and description scanning from it
   [INFO] java-annotations mojo extractor found 1 mojo descriptor.
   [INFO] java-javadoc deprecated mojo extractor skipped as group 'java' 
already discovered 1 mojo descriptor.
   [INFO] 
   ```


-- 
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] cstamas commented on pull request #46: [MPLUGIN-373] Group extractors and improve their selection

2021-10-22 Thread GitBox


cstamas commented on pull request #46:
URL: https://github.com/apache/maven-plugin-tools/pull/46#issuecomment-949442354


   Added commit 5a1d36097c4142e66dcb447d440d9c3664f6a676
   
   Now relevant bit of console output of test project looks like this:
   ```
   [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ 
maven-plugin-minimal ---
   [INFO] Changes detected - recompiling the module!
   [WARNING] File encoding has not been set, using platform encoding UTF-8, 
i.e. build is platform dependent!
   [INFO] Compiling 1 source file to 
/home/cstamas/tmp/maven-plugin-minimal/target/classes
   [INFO] 
   [INFO] --- maven-plugin-plugin:3.6.2-SNAPSHOT:descriptor 
(default-descriptor) @ maven-plugin-minimal ---
   [ERROR] 
   
   Maven dependencies of Maven Plugins should be in provided scope.
   Please make sure that all your dependencies declared in POM whose group ID is
   org.apache.maven have set 'provided' as well.
   In the future this error will break the build.
   
   The following dependencies are in wrong scope:
* org.apache.maven:maven-plugin-api:jar:3.8.1:compile
* org.apache.maven:maven-model:jar:3.8.1:compile
* org.apache.maven:maven-artifact:jar:3.8.1:compile
* org.apache.maven:maven-project:jar:2.2.1:compile
* org.apache.maven:maven-settings:jar:2.2.1:compile
* org.apache.maven:maven-profile:jar:2.2.1:compile
* org.apache.maven:maven-artifact-manager:jar:2.2.1:compile
* org.apache.maven:maven-repository-metadata:jar:2.2.1:compile
* org.apache.maven:maven-plugin-registry:jar:2.2.1:compile
   
   Please fix your build!
   
   
   [WARNING] Using platform encoding (UTF-8 actually) to read mojo source 
files, i.e. build is platform dependent!
   [INFO] ant mojo extractor found 0 mojo descriptor.
   [INFO] bsh mojo extractor found 0 mojo descriptor.
   [WARNING] Unable to scan Javadoc from 
/home/cstamas/tmp/maven-plugin-minimal/src/main/java; skipping since, 
deprecation and description scanning from it
   [INFO] java-annotations mojo extractor found 1 mojo descriptor.
   [INFO] 
   [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) 
@ maven-plugin-minimal ---
   ```


-- 
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-373) Java 16 features not supported by maven-plugin-plugin:3.6.1

2021-10-22 Thread Maciej Gorywoda (Jira)


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

Maciej Gorywoda commented on MPLUGIN-373:
-

[~rfscholte]: Please try to find time and motivation :)

And thanks for working on this!

> Java 16 features not supported by maven-plugin-plugin:3.6.1 
> 
>
> Key: MPLUGIN-373
> URL: https://issues.apache.org/jira/browse/MPLUGIN-373
> Project: Maven Plugin Tools
>  Issue Type: Bug
>  Components: Plugin Plugin
>Affects Versions: 3.6.1
> Environment: Linux Mint 21.0 Cinnamon, Linux Kernel 5.4.0-71-generic, 
> arch amd64, OpenJDK 16.0.1, Apache Maven 3.6.3.
>Reporter: Maciej Gorywoda
>Priority: Major
>
> Even though compilation works, `mvn install` fails with:
> {noformat}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-plugin-plugin:3.6.1:descriptor 
> (default-descriptor) on project maven-plugin-minimal: Execution 
> default-descriptor of goal 
> org.apache.maven.plugins:maven-plugin-plugin:3.6.1:descriptor failed: syntax 
> error @[27,1] in 
> [file:/home/makingthematrix/workspace/maven-plugin-minimal/src/main/java/io/makingthematrix/MinimalMojo.java|file:///home/makingthematrix/workspace/maven-plugin-minimal/src/main/java/io/makingthematrix/MinimalMojo.java]
>  -> [Help 1]
>  {noformat}
> That syntax error @[27,1] is
>  ```
>  {color:#0033b3}record 
> {color}{color:#00}KaBoom{color}({color:#00}String {color}foo) {}
>  ```
> Tested on openjdk-16 and graalvm-21.1.0 for Java 16.
> {color:#0033b3}maven-compiler-plugin version: 3.8.1{color}
> {color:#0033b3}maven-plugin-plugin version: 3.6.1{color}
> I made a minimal example and put it on GitHub: 
> [https://github.com/makingthematrix/maven-plugin-minimal]
> And here are the logs:
>  —
>  {noformat}
>  makingthematrix@makingthematrix:~/workspace/maven-plugin-minimal$ java 
> -version
>  openjdk version "16.0.1" 2021-04-20
>  OpenJDK Runtime Environment (build 16.0.1+9-24)
>  OpenJDK 64-Bit Server VM (build 16.0.1+9-24, mixed mode, sharing)
> makingthematrix@makingthematrix:~/workspace/maven-plugin-minimal$ mvn 
> --version
>  Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
>  Maven home: /opt/mvn
>  Java version: 16.0.1, vendor: Oracle Corporation, runtime: /opt/jdk-16.0.1
>  Default locale: en_US, platform encoding: UTF-8
>  OS name: "linux", version: "5.4.0-71-generic", arch: "amd64", family: "unix"
> makingthematrix@makingthematrix:~/workspace/maven-plugin-minimal$ mvn clean
>  [INFO] Scanning for projects...
>  [INFO] 
>  [INFO] --< io.makingthematrix:maven-plugin-minimal 
> >---
>  [INFO] Building Maven Plugin Minimal 0.0.1
>  [INFO] [ maven-plugin 
> ]
>  [INFO] 
>  [INFO] — maven-clean-plugin:2.5:clean (default-clean) @ maven-plugin-minimal 
> —
>  [INFO] Deleting /home/makingthematrix/workspace/maven-plugin-minimal/target
>  [INFO] 
> 
>  [INFO] BUILD SUCCESS
>  [INFO] 
> 
>  [INFO] Total time: 0.184 s
>  [INFO] Finished at: 2021-04-30T19:07:36+02:00
>  [INFO] 
> 
>  
> makingthematrix@makingthematrix:~/workspace/maven-plugin-minimal$ mvn compile
>  [INFO] Scanning for projects...
>  [INFO] 
>  [INFO] --< io.makingthematrix:maven-plugin-minimal 
> >---
>  [INFO] Building Maven Plugin Minimal 0.0.1
>  [INFO] [ maven-plugin 
> ]
>  [INFO] 
>  [INFO] — maven-resources-plugin:2.6:resources (default-resources) @ 
> maven-plugin-minimal —
>  [WARNING] Using platform encoding (UTF-8 actually) to copy filtered 
> resources, i.e. build is platform dependent!
>  [INFO] skip non existing resourceDirectory 
> /home/makingthematrix/workspace/maven-plugin-minimal/src/main/resources
>  [INFO] 
>  [INFO] — maven-compiler-plugin:3.8.1:compile (default-compile) @ 
> maven-plugin-minimal —
>  [INFO] Changes detected - recompiling the module!
>  [WARNING] File encoding has not been set, using platform encoding UTF-8, 
> i.e. build is platform dependent!
>  [INFO] Compiling 1 source file to 
> /home/makingthematrix/workspace/maven-plugin-minimal/target/classes
>  [INFO] 
> 
>  [INFO] BUILD SUCCESS
>  [INFO] 
> 
>  [INFO] Total time: 1.262 s
>  [INFO] Finished at: 2021-04-30T19:08:15+02:00
>  [INFO] 
> 
>  
> makingthematrix@makingthematrix:~

[GitHub] [maven-plugin-tools] cstamas commented on pull request #46: [MPLUGIN-373] Group extractors and improve their selection

2021-10-22 Thread GitBox


cstamas commented on pull request #46:
URL: https://github.com/apache/maven-plugin-tools/pull/46#issuecomment-949421497


   Meh, just now realized that since, deprecation and descriptions are ALSO 
gleaned by QDox in "modern" annotation extractor :disappointed: So this PR as 
is does NOT solve the issue in JIRA... (test project here 
https://github.com/makingthematrix/maven-plugin-minimal)


-- 
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-373) Java 16 features not supported by maven-plugin-plugin:3.6.1

2021-10-22 Thread Jira


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

Tamás Cservenák commented on MPLUGIN-373:
-

Added a proposal/draft PR that solves this issue (not the QDox one, as user 
reporting this issue even does not WANT nor NEED to use QDox).

> Java 16 features not supported by maven-plugin-plugin:3.6.1 
> 
>
> Key: MPLUGIN-373
> URL: https://issues.apache.org/jira/browse/MPLUGIN-373
> Project: Maven Plugin Tools
>  Issue Type: Bug
>  Components: Plugin Plugin
>Affects Versions: 3.6.1
> Environment: Linux Mint 21.0 Cinnamon, Linux Kernel 5.4.0-71-generic, 
> arch amd64, OpenJDK 16.0.1, Apache Maven 3.6.3.
>Reporter: Maciej Gorywoda
>Priority: Major
>
> Even though compilation works, `mvn install` fails with:
> {noformat}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-plugin-plugin:3.6.1:descriptor 
> (default-descriptor) on project maven-plugin-minimal: Execution 
> default-descriptor of goal 
> org.apache.maven.plugins:maven-plugin-plugin:3.6.1:descriptor failed: syntax 
> error @[27,1] in 
> [file:/home/makingthematrix/workspace/maven-plugin-minimal/src/main/java/io/makingthematrix/MinimalMojo.java|file:///home/makingthematrix/workspace/maven-plugin-minimal/src/main/java/io/makingthematrix/MinimalMojo.java]
>  -> [Help 1]
>  {noformat}
> That syntax error @[27,1] is
>  ```
>  {color:#0033b3}record 
> {color}{color:#00}KaBoom{color}({color:#00}String {color}foo) {}
>  ```
> Tested on openjdk-16 and graalvm-21.1.0 for Java 16.
> {color:#0033b3}maven-compiler-plugin version: 3.8.1{color}
> {color:#0033b3}maven-plugin-plugin version: 3.6.1{color}
> I made a minimal example and put it on GitHub: 
> [https://github.com/makingthematrix/maven-plugin-minimal]
> And here are the logs:
>  —
>  {noformat}
>  makingthematrix@makingthematrix:~/workspace/maven-plugin-minimal$ java 
> -version
>  openjdk version "16.0.1" 2021-04-20
>  OpenJDK Runtime Environment (build 16.0.1+9-24)
>  OpenJDK 64-Bit Server VM (build 16.0.1+9-24, mixed mode, sharing)
> makingthematrix@makingthematrix:~/workspace/maven-plugin-minimal$ mvn 
> --version
>  Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
>  Maven home: /opt/mvn
>  Java version: 16.0.1, vendor: Oracle Corporation, runtime: /opt/jdk-16.0.1
>  Default locale: en_US, platform encoding: UTF-8
>  OS name: "linux", version: "5.4.0-71-generic", arch: "amd64", family: "unix"
> makingthematrix@makingthematrix:~/workspace/maven-plugin-minimal$ mvn clean
>  [INFO] Scanning for projects...
>  [INFO] 
>  [INFO] --< io.makingthematrix:maven-plugin-minimal 
> >---
>  [INFO] Building Maven Plugin Minimal 0.0.1
>  [INFO] [ maven-plugin 
> ]
>  [INFO] 
>  [INFO] — maven-clean-plugin:2.5:clean (default-clean) @ maven-plugin-minimal 
> —
>  [INFO] Deleting /home/makingthematrix/workspace/maven-plugin-minimal/target
>  [INFO] 
> 
>  [INFO] BUILD SUCCESS
>  [INFO] 
> 
>  [INFO] Total time: 0.184 s
>  [INFO] Finished at: 2021-04-30T19:07:36+02:00
>  [INFO] 
> 
>  
> makingthematrix@makingthematrix:~/workspace/maven-plugin-minimal$ mvn compile
>  [INFO] Scanning for projects...
>  [INFO] 
>  [INFO] --< io.makingthematrix:maven-plugin-minimal 
> >---
>  [INFO] Building Maven Plugin Minimal 0.0.1
>  [INFO] [ maven-plugin 
> ]
>  [INFO] 
>  [INFO] — maven-resources-plugin:2.6:resources (default-resources) @ 
> maven-plugin-minimal —
>  [WARNING] Using platform encoding (UTF-8 actually) to copy filtered 
> resources, i.e. build is platform dependent!
>  [INFO] skip non existing resourceDirectory 
> /home/makingthematrix/workspace/maven-plugin-minimal/src/main/resources
>  [INFO] 
>  [INFO] — maven-compiler-plugin:3.8.1:compile (default-compile) @ 
> maven-plugin-minimal —
>  [INFO] Changes detected - recompiling the module!
>  [WARNING] File encoding has not been set, using platform encoding UTF-8, 
> i.e. build is platform dependent!
>  [INFO] Compiling 1 source file to 
> /home/makingthematrix/workspace/maven-plugin-minimal/target/classes
>  [INFO] 
> 
>  [INFO] BUILD SUCCESS
>  [INFO] 
> 
>  [INFO] Total time: 1.262 s
>  [INFO] Finished at: 2021-04-30T19:08:15+02:00
>  [INFO] 
> -

[GitHub] [maven-plugin-tools] cstamas opened a new pull request #46: [MPLUGIN-373] Group extractors and improve their selection

2021-10-22 Thread GitBox


cstamas opened a new pull request #46:
URL: https://github.com/apache/maven-plugin-tools/pull/46


   The issue describes following situation: developer uses
   modern Java level and uses Mojo annotations to create a
   maven plugin. Everything works (compile), but maven-plugin-plugin
   fails to extract the mojo descriptors.
   
   Reason is simple: javadoc extractor (powered by QDox) chokes on
   same modern Java language features (like record is in issue).
   
   So, proposal:
   
   Extend extractors iface with following fields:
   * getName() -- just to simplify their handling in code (no need to hold on 
map).
   * isDeprecated() -- IMO, we should deprecate Javadoc mojo descriptor 
extraction, and
 if used, Maven should WARN to migrate to Annotations.
   * getGroupKey() -- this defines "extractor" groups and ordering within it
   
   Currently we have two extractors in same group "java": the annotation 
extractor
   and javadoc/qdox extractor. Their run order is _undefined currently_.
   
   This proposal implements following changes:
   * extractors are SORTED by groupKey before being used (so defined exectution 
ordering)
   * extractors of same group are ordered (annotations then javadoc)
   * javadoc extractor is DEPRECATED (isDeprecated returns true)
   * MojoScanner is modified, that IF a deprecated extractor is on turn, but 
there ARE
 discovered components in same group, it is skipped.
   
   This may look as tailored to java case, but is actually future proof. This
   will fix out of the box the MPLUGIN-373 for example, where legacy bits
   within maven-plugin-plugin prevents user to use modern Java and modern tools.
   
   On the other hand, this may need more, things like:
   * allow run of deprecated extractors?


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

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

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




[jira] [Updated] (MPLUGIN-373) Java 16 features not supported by maven-plugin-plugin:3.6.1

2021-10-22 Thread Robert Scholte (Jira)


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

Robert Scholte updated MPLUGIN-373:
---
Fix Version/s: (was: 3.6.2)

> Java 16 features not supported by maven-plugin-plugin:3.6.1 
> 
>
> Key: MPLUGIN-373
> URL: https://issues.apache.org/jira/browse/MPLUGIN-373
> Project: Maven Plugin Tools
>  Issue Type: Bug
>  Components: Plugin Plugin
>Affects Versions: 3.6.1
> Environment: Linux Mint 21.0 Cinnamon, Linux Kernel 5.4.0-71-generic, 
> arch amd64, OpenJDK 16.0.1, Apache Maven 3.6.3.
>Reporter: Maciej Gorywoda
>Priority: Major
>
> Even though compilation works, `mvn install` fails with:
> {noformat}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-plugin-plugin:3.6.1:descriptor 
> (default-descriptor) on project maven-plugin-minimal: Execution 
> default-descriptor of goal 
> org.apache.maven.plugins:maven-plugin-plugin:3.6.1:descriptor failed: syntax 
> error @[27,1] in 
> [file:/home/makingthematrix/workspace/maven-plugin-minimal/src/main/java/io/makingthematrix/MinimalMojo.java|file:///home/makingthematrix/workspace/maven-plugin-minimal/src/main/java/io/makingthematrix/MinimalMojo.java]
>  -> [Help 1]
>  {noformat}
> That syntax error @[27,1] is
>  ```
>  {color:#0033b3}record 
> {color}{color:#00}KaBoom{color}({color:#00}String {color}foo) {}
>  ```
> Tested on openjdk-16 and graalvm-21.1.0 for Java 16.
> {color:#0033b3}maven-compiler-plugin version: 3.8.1{color}
> {color:#0033b3}maven-plugin-plugin version: 3.6.1{color}
> I made a minimal example and put it on GitHub: 
> [https://github.com/makingthematrix/maven-plugin-minimal]
> And here are the logs:
>  —
>  {noformat}
>  makingthematrix@makingthematrix:~/workspace/maven-plugin-minimal$ java 
> -version
>  openjdk version "16.0.1" 2021-04-20
>  OpenJDK Runtime Environment (build 16.0.1+9-24)
>  OpenJDK 64-Bit Server VM (build 16.0.1+9-24, mixed mode, sharing)
> makingthematrix@makingthematrix:~/workspace/maven-plugin-minimal$ mvn 
> --version
>  Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
>  Maven home: /opt/mvn
>  Java version: 16.0.1, vendor: Oracle Corporation, runtime: /opt/jdk-16.0.1
>  Default locale: en_US, platform encoding: UTF-8
>  OS name: "linux", version: "5.4.0-71-generic", arch: "amd64", family: "unix"
> makingthematrix@makingthematrix:~/workspace/maven-plugin-minimal$ mvn clean
>  [INFO] Scanning for projects...
>  [INFO] 
>  [INFO] --< io.makingthematrix:maven-plugin-minimal 
> >---
>  [INFO] Building Maven Plugin Minimal 0.0.1
>  [INFO] [ maven-plugin 
> ]
>  [INFO] 
>  [INFO] — maven-clean-plugin:2.5:clean (default-clean) @ maven-plugin-minimal 
> —
>  [INFO] Deleting /home/makingthematrix/workspace/maven-plugin-minimal/target
>  [INFO] 
> 
>  [INFO] BUILD SUCCESS
>  [INFO] 
> 
>  [INFO] Total time: 0.184 s
>  [INFO] Finished at: 2021-04-30T19:07:36+02:00
>  [INFO] 
> 
>  
> makingthematrix@makingthematrix:~/workspace/maven-plugin-minimal$ mvn compile
>  [INFO] Scanning for projects...
>  [INFO] 
>  [INFO] --< io.makingthematrix:maven-plugin-minimal 
> >---
>  [INFO] Building Maven Plugin Minimal 0.0.1
>  [INFO] [ maven-plugin 
> ]
>  [INFO] 
>  [INFO] — maven-resources-plugin:2.6:resources (default-resources) @ 
> maven-plugin-minimal —
>  [WARNING] Using platform encoding (UTF-8 actually) to copy filtered 
> resources, i.e. build is platform dependent!
>  [INFO] skip non existing resourceDirectory 
> /home/makingthematrix/workspace/maven-plugin-minimal/src/main/resources
>  [INFO] 
>  [INFO] — maven-compiler-plugin:3.8.1:compile (default-compile) @ 
> maven-plugin-minimal —
>  [INFO] Changes detected - recompiling the module!
>  [WARNING] File encoding has not been set, using platform encoding UTF-8, 
> i.e. build is platform dependent!
>  [INFO] Compiling 1 source file to 
> /home/makingthematrix/workspace/maven-plugin-minimal/target/classes
>  [INFO] 
> 
>  [INFO] BUILD SUCCESS
>  [INFO] 
> 
>  [INFO] Total time: 1.262 s
>  [INFO] Finished at: 2021-04-30T19:08:15+02:00
>  [INFO] 
> 
>  
> makingthematrix@makingthematrix:~/workspace/maven-plugin-minimal$ mvn install
>  [INFO] Scanning for projects...
>  [INFO] 
>  [INFO] 

[jira] [Commented] (MPLUGIN-373) Java 16 features not supported by maven-plugin-plugin:3.6.1

2021-10-22 Thread Robert Scholte (Jira)


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

Robert Scholte commented on MPLUGIN-373:


Or I need to find time and motivation to support records in QDox and other new 
JVM language features, even if it is just about valid parsing.

> Java 16 features not supported by maven-plugin-plugin:3.6.1 
> 
>
> Key: MPLUGIN-373
> URL: https://issues.apache.org/jira/browse/MPLUGIN-373
> Project: Maven Plugin Tools
>  Issue Type: Bug
>  Components: Plugin Plugin
>Affects Versions: 3.6.1
> Environment: Linux Mint 21.0 Cinnamon, Linux Kernel 5.4.0-71-generic, 
> arch amd64, OpenJDK 16.0.1, Apache Maven 3.6.3.
>Reporter: Maciej Gorywoda
>Priority: Major
> Fix For: 3.6.2
>
>
> Even though compilation works, `mvn install` fails with:
> {noformat}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-plugin-plugin:3.6.1:descriptor 
> (default-descriptor) on project maven-plugin-minimal: Execution 
> default-descriptor of goal 
> org.apache.maven.plugins:maven-plugin-plugin:3.6.1:descriptor failed: syntax 
> error @[27,1] in 
> [file:/home/makingthematrix/workspace/maven-plugin-minimal/src/main/java/io/makingthematrix/MinimalMojo.java|file:///home/makingthematrix/workspace/maven-plugin-minimal/src/main/java/io/makingthematrix/MinimalMojo.java]
>  -> [Help 1]
>  {noformat}
> That syntax error @[27,1] is
>  ```
>  {color:#0033b3}record 
> {color}{color:#00}KaBoom{color}({color:#00}String {color}foo) {}
>  ```
> Tested on openjdk-16 and graalvm-21.1.0 for Java 16.
> {color:#0033b3}maven-compiler-plugin version: 3.8.1{color}
> {color:#0033b3}maven-plugin-plugin version: 3.6.1{color}
> I made a minimal example and put it on GitHub: 
> [https://github.com/makingthematrix/maven-plugin-minimal]
> And here are the logs:
>  —
>  {noformat}
>  makingthematrix@makingthematrix:~/workspace/maven-plugin-minimal$ java 
> -version
>  openjdk version "16.0.1" 2021-04-20
>  OpenJDK Runtime Environment (build 16.0.1+9-24)
>  OpenJDK 64-Bit Server VM (build 16.0.1+9-24, mixed mode, sharing)
> makingthematrix@makingthematrix:~/workspace/maven-plugin-minimal$ mvn 
> --version
>  Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
>  Maven home: /opt/mvn
>  Java version: 16.0.1, vendor: Oracle Corporation, runtime: /opt/jdk-16.0.1
>  Default locale: en_US, platform encoding: UTF-8
>  OS name: "linux", version: "5.4.0-71-generic", arch: "amd64", family: "unix"
> makingthematrix@makingthematrix:~/workspace/maven-plugin-minimal$ mvn clean
>  [INFO] Scanning for projects...
>  [INFO] 
>  [INFO] --< io.makingthematrix:maven-plugin-minimal 
> >---
>  [INFO] Building Maven Plugin Minimal 0.0.1
>  [INFO] [ maven-plugin 
> ]
>  [INFO] 
>  [INFO] — maven-clean-plugin:2.5:clean (default-clean) @ maven-plugin-minimal 
> —
>  [INFO] Deleting /home/makingthematrix/workspace/maven-plugin-minimal/target
>  [INFO] 
> 
>  [INFO] BUILD SUCCESS
>  [INFO] 
> 
>  [INFO] Total time: 0.184 s
>  [INFO] Finished at: 2021-04-30T19:07:36+02:00
>  [INFO] 
> 
>  
> makingthematrix@makingthematrix:~/workspace/maven-plugin-minimal$ mvn compile
>  [INFO] Scanning for projects...
>  [INFO] 
>  [INFO] --< io.makingthematrix:maven-plugin-minimal 
> >---
>  [INFO] Building Maven Plugin Minimal 0.0.1
>  [INFO] [ maven-plugin 
> ]
>  [INFO] 
>  [INFO] — maven-resources-plugin:2.6:resources (default-resources) @ 
> maven-plugin-minimal —
>  [WARNING] Using platform encoding (UTF-8 actually) to copy filtered 
> resources, i.e. build is platform dependent!
>  [INFO] skip non existing resourceDirectory 
> /home/makingthematrix/workspace/maven-plugin-minimal/src/main/resources
>  [INFO] 
>  [INFO] — maven-compiler-plugin:3.8.1:compile (default-compile) @ 
> maven-plugin-minimal —
>  [INFO] Changes detected - recompiling the module!
>  [WARNING] File encoding has not been set, using platform encoding UTF-8, 
> i.e. build is platform dependent!
>  [INFO] Compiling 1 source file to 
> /home/makingthematrix/workspace/maven-plugin-minimal/target/classes
>  [INFO] 
> 
>  [INFO] BUILD SUCCESS
>  [INFO] 
> 
>  [INFO] Total time: 1.262 s
>  [INFO] Finished at: 2021-04-30T19:08:15+02:00
>  [INFO] 
> -

[GitHub] [maven-deploy-plugin] rfscholte commented on pull request #20: [MDEPLOY-193] Deploy At End feature (no extension)

2021-10-22 Thread GitBox


rfscholte commented on pull request #20:
URL: 
https://github.com/apache/maven-deploy-plugin/pull/20#issuecomment-949396602


   I'm pretty sure I wrote ITs for it, so if they keep working we should be 
safe. For Maven 3 (and likely 4) this would be fine until 
https://issues.apache.org/jira/browse/MNG-5666 has been implemented.


-- 
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] (MSHADE-141) keepDependenciesWithProvidedScope does not work

2021-10-22 Thread Delany (Jira)


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

Delany commented on MSHADE-141:
---

You're right. Thing im using does not support dependency-reduced/flattened pom

> keepDependenciesWithProvidedScope does not work
> ---
>
> Key: MSHADE-141
> URL: https://issues.apache.org/jira/browse/MSHADE-141
> Project: Maven Shade Plugin
>  Issue Type: Bug
>Affects Versions: 2.0
>Reporter: Steve Tynor
>Priority: Major
> Fix For: waiting-for-feedback
>
> Attachments: pom-direct.xml, pom-indirect.xml
>
>
> keepDependenciesWithProvidedScope option does not seem to work.
> Expected behavior from both poms is to create an uber jar from the following 
> transitive dependencies: 
> [INFO] Including org.apache.activemq:activemq-client:jar:5.8.0 in the shaded 
> jar.
> [INFO] Including org.slf4j:slf4j-api:jar:1.6.6 in the shaded jar.
> [INFO] Including org.apache.geronimo.specs:geronimo-jms_1.1_spec:jar:1.1.1 in 
> the shaded jar.
> [INFO] Including org.fusesource.hawtbuf:hawtbuf:jar:1.9 in the shaded jar.
> [INFO] Including 
> org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec:jar:1.0.1 in the 
> shaded jar.
> I've attached two test cases 
>mvn -f pom-direct.xml clean install
> will create an empty jar.
>mvn -f pom-indirect.xml clean install
> will not include the slf4j-api which is a dependency of activemq-client, but 
> is marked provided in the pom.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (MPH-173) An API incompatibility was encountered while executing org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate: java.lang.ExceptionInInitializerError: null

2021-10-22 Thread Michael Osipov (Jira)


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

Michael Osipov commented on MPH-173:


Did it work?

> An API incompatibility was encountered while executing 
> org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate: 
> java.lang.ExceptionInInitializerError: null
> -
>
> Key: MPH-173
> URL: https://issues.apache.org/jira/browse/MPH-173
> Project: Maven Help Plugin
>  Issue Type: Bug
>  Components: evaluate
>Affects Versions: 3.2.0
> Environment: Redhat 7
>Reporter: Martin Aldrin
>Priority: Major
>
> Exception occur when I try to build with JDK 16
> Command: mvn help:evaluate -f pom.xml -Dexpression=project.properties
> {noformat}
> Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
>  Maven home: maven/3.8.1
>  Java version: 16.0.1, vendor: Azul Systems, Inc., runtime: openjdk/16.0.1
>  Default locale: en_US, platform encoding: ISO-8859-1
>  OS name: "linux", version: "3.10.0-1127.8.2.el7.x86_64", arch: "amd64", 
> family: "unix"
>  [INFO] [jenkins-event-spy] Generate 
> maven-spy-20210609-083439-2219272842220994490755.log.tmp ...
>  [INFO] Scanning for projects...
>  [INFO] 
>  [INFO] -< x:x >--
>  [INFO] Building x 0.0.1991-SNAPSHOT
>  [INFO] [ jar 
> ]-
>  [INFO] 
>  [INFO] — maven-help-plugin:3.2.0:evaluate (default-cli) @ x —
>  [INFO] No artifact parameter specified, using 'x:x:jar:0.0.1991-SNAPSHOT' as 
> project.
>  [INFO] 
> 
>  [INFO] BUILD FAILURE
>  [INFO] 
> 
>  [INFO] Total time: 0.839 s
>  [INFO] Finished at: 2021-06-09T08:34:40+02:00
>  [INFO] 
> 
>  [INFO] [jenkins-event-spy] Generated 
> maven-spy-20210609-083439-2219272842220994490755.log
>  [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate (default-cli) on 
> project x: Execution default-cli of goal 
> org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate failed: An API 
> incompatibility was encountered while executing 
> org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate: 
> java.lang.ExceptionInInitializerError: null
>  [ERROR] -
>  [ERROR] realm = plugin>org.apache.maven.plugins:maven-help-plugin:3.2.0
>  [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
>  [ERROR] urls[0] = 
> .repository/org/apache/maven/plugins/maven-help-plugin/3.2.0/maven-help-plugin-3.2.0.jar
>  [ERROR] urls[1] = 
> .repository/org/sonatype/aether/aether-util/1.7/aether-util-1.7.jar
>  [ERROR] urls[2] = 
> .repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
>  [ERROR] urls[3] = 
> .repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar
>  [ERROR] urls[4] = 
> .repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar
>  [ERROR] urls[5] = 
> .repository/org/codehaus/plexus/plexus-component-annotations/1.7.1/plexus-component-annotations-1.7.1.jar
>  [ERROR] urls[6] = 
> .repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
>  [ERROR] urls[7] = 
> .repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
>  [ERROR] urls[8] = 
> .repository/org/apache/maven/plugin-tools/maven-plugin-tools-generators/3.5.2/maven-plugin-tools-generators-3.5.2.jar
>  [ERROR] urls[9] = 
> .repository/org/apache/maven/plugin-tools/maven-plugin-tools-api/3.5.2/maven-plugin-tools-api-3.5.2.jar
>  [ERROR] urls[10] = 
> .repository/org/codehaus/plexus/plexus-velocity/1.1.8/plexus-velocity-1.1.8.jar
>  [ERROR] urls[11] = .repository/junit/junit/3.8.1/junit-3.8.1.jar
>  [ERROR] urls[12] = 
> .repository/commons-collections/commons-collections/3.1/commons-collections-3.1.jar
>  [ERROR] urls[13] = 
> .repository/org/apache/velocity/velocity/1.7/velocity-1.7.jar
>  [ERROR] urls[14] = 
> .repository/commons-lang/commons-lang/2.4/commons-lang-2.4.jar
>  [ERROR] urls[15] = .repository/net/sf/jtidy/jtidy/r938/jtidy-r938.jar
>  [ERROR] urls[16] = 
> .repository/org/apache/maven/shared/maven-shared-utils/3.2.1/maven-shared-utils-3.2.1.jar
>  [ERROR] urls[17] = .repository/commons-io/commons-io/2.5/commons-io-2.5.jar
>  [ERROR] urls[18] = 
> .repository/org/apache/maven/shared/maven-artifact-transfer/0.10.0/maven-artifact-transfer-0.10.0.jar
>  [ERROR] urls[19] = 
> .repository/org/apache/maven/shared/maven-common-artifact-filters/3.

[jira] [Comment Edited] (MPH-173) An API incompatibility was encountered while executing org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate: java.lang.ExceptionInInitializerError: null

2021-10-22 Thread Michael Osipov (Jira)


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

Michael Osipov edited comment on MPH-173 at 10/22/21, 8:06 AM:
---

Hi, you mean adding the XStream as a plugin dependency in my pom?


was (Author: mar...@aldrin.net):
Hi, you mean adding the XStream as a plugin dependency in my pom?

 

 

> An API incompatibility was encountered while executing 
> org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate: 
> java.lang.ExceptionInInitializerError: null
> -
>
> Key: MPH-173
> URL: https://issues.apache.org/jira/browse/MPH-173
> Project: Maven Help Plugin
>  Issue Type: Bug
>  Components: evaluate
>Affects Versions: 3.2.0
> Environment: Redhat 7
>Reporter: Martin Aldrin
>Priority: Major
>
> Exception occur when I try to build with JDK 16
> Command: mvn help:evaluate -f pom.xml -Dexpression=project.properties
> {noformat}
> Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
>  Maven home: maven/3.8.1
>  Java version: 16.0.1, vendor: Azul Systems, Inc., runtime: openjdk/16.0.1
>  Default locale: en_US, platform encoding: ISO-8859-1
>  OS name: "linux", version: "3.10.0-1127.8.2.el7.x86_64", arch: "amd64", 
> family: "unix"
>  [INFO] [jenkins-event-spy] Generate 
> maven-spy-20210609-083439-2219272842220994490755.log.tmp ...
>  [INFO] Scanning for projects...
>  [INFO] 
>  [INFO] -< x:x >--
>  [INFO] Building x 0.0.1991-SNAPSHOT
>  [INFO] [ jar 
> ]-
>  [INFO] 
>  [INFO] — maven-help-plugin:3.2.0:evaluate (default-cli) @ x —
>  [INFO] No artifact parameter specified, using 'x:x:jar:0.0.1991-SNAPSHOT' as 
> project.
>  [INFO] 
> 
>  [INFO] BUILD FAILURE
>  [INFO] 
> 
>  [INFO] Total time: 0.839 s
>  [INFO] Finished at: 2021-06-09T08:34:40+02:00
>  [INFO] 
> 
>  [INFO] [jenkins-event-spy] Generated 
> maven-spy-20210609-083439-2219272842220994490755.log
>  [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate (default-cli) on 
> project x: Execution default-cli of goal 
> org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate failed: An API 
> incompatibility was encountered while executing 
> org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate: 
> java.lang.ExceptionInInitializerError: null
>  [ERROR] -
>  [ERROR] realm = plugin>org.apache.maven.plugins:maven-help-plugin:3.2.0
>  [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
>  [ERROR] urls[0] = 
> .repository/org/apache/maven/plugins/maven-help-plugin/3.2.0/maven-help-plugin-3.2.0.jar
>  [ERROR] urls[1] = 
> .repository/org/sonatype/aether/aether-util/1.7/aether-util-1.7.jar
>  [ERROR] urls[2] = 
> .repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
>  [ERROR] urls[3] = 
> .repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar
>  [ERROR] urls[4] = 
> .repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar
>  [ERROR] urls[5] = 
> .repository/org/codehaus/plexus/plexus-component-annotations/1.7.1/plexus-component-annotations-1.7.1.jar
>  [ERROR] urls[6] = 
> .repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
>  [ERROR] urls[7] = 
> .repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
>  [ERROR] urls[8] = 
> .repository/org/apache/maven/plugin-tools/maven-plugin-tools-generators/3.5.2/maven-plugin-tools-generators-3.5.2.jar
>  [ERROR] urls[9] = 
> .repository/org/apache/maven/plugin-tools/maven-plugin-tools-api/3.5.2/maven-plugin-tools-api-3.5.2.jar
>  [ERROR] urls[10] = 
> .repository/org/codehaus/plexus/plexus-velocity/1.1.8/plexus-velocity-1.1.8.jar
>  [ERROR] urls[11] = .repository/junit/junit/3.8.1/junit-3.8.1.jar
>  [ERROR] urls[12] = 
> .repository/commons-collections/commons-collections/3.1/commons-collections-3.1.jar
>  [ERROR] urls[13] = 
> .repository/org/apache/velocity/velocity/1.7/velocity-1.7.jar
>  [ERROR] urls[14] = 
> .repository/commons-lang/commons-lang/2.4/commons-lang-2.4.jar
>  [ERROR] urls[15] = .repository/net/sf/jtidy/jtidy/r938/jtidy-r938.jar
>  [ERROR] urls[16] = 
> .repository/org/apache/maven/shared/maven-shared-utils/3.2.1/maven-shared-utils-3.2.1.jar
>  [ERROR] urls[17] = .repository/commons-io/commons-io/2.5/commons-io-2.5.jar
>  [ERR

[jira] [Commented] (MSHADE-141) keepDependenciesWithProvidedScope does not work

2021-10-22 Thread Robert Scholte (Jira)


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

Robert Scholte commented on MSHADE-141:
---

{{provided}} means it is already available on the targeted runtime environment, 
so it doesn't make sense to include that in the shaded jar. You better find the 
proper scope for your dependency.

> keepDependenciesWithProvidedScope does not work
> ---
>
> Key: MSHADE-141
> URL: https://issues.apache.org/jira/browse/MSHADE-141
> Project: Maven Shade Plugin
>  Issue Type: Bug
>Affects Versions: 2.0
>Reporter: Steve Tynor
>Priority: Major
> Fix For: waiting-for-feedback
>
> Attachments: pom-direct.xml, pom-indirect.xml
>
>
> keepDependenciesWithProvidedScope option does not seem to work.
> Expected behavior from both poms is to create an uber jar from the following 
> transitive dependencies: 
> [INFO] Including org.apache.activemq:activemq-client:jar:5.8.0 in the shaded 
> jar.
> [INFO] Including org.slf4j:slf4j-api:jar:1.6.6 in the shaded jar.
> [INFO] Including org.apache.geronimo.specs:geronimo-jms_1.1_spec:jar:1.1.1 in 
> the shaded jar.
> [INFO] Including org.fusesource.hawtbuf:hawtbuf:jar:1.9 in the shaded jar.
> [INFO] Including 
> org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec:jar:1.0.1 in the 
> shaded jar.
> I've attached two test cases 
>mvn -f pom-direct.xml clean install
> will create an empty jar.
>mvn -f pom-indirect.xml clean install
> will not include the slf4j-api which is a dependency of activemq-client, but 
> is marked provided in the pom.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (MSHADE-141) keepDependenciesWithProvidedScope does not work

2021-10-22 Thread Delany (Jira)


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

Delany commented on MSHADE-141:
---

Could do with a *shadeDependenciesWithProvidedScope* option

> keepDependenciesWithProvidedScope does not work
> ---
>
> Key: MSHADE-141
> URL: https://issues.apache.org/jira/browse/MSHADE-141
> Project: Maven Shade Plugin
>  Issue Type: Bug
>Affects Versions: 2.0
>Reporter: Steve Tynor
>Priority: Major
> Fix For: waiting-for-feedback
>
> Attachments: pom-direct.xml, pom-indirect.xml
>
>
> keepDependenciesWithProvidedScope option does not seem to work.
> Expected behavior from both poms is to create an uber jar from the following 
> transitive dependencies: 
> [INFO] Including org.apache.activemq:activemq-client:jar:5.8.0 in the shaded 
> jar.
> [INFO] Including org.slf4j:slf4j-api:jar:1.6.6 in the shaded jar.
> [INFO] Including org.apache.geronimo.specs:geronimo-jms_1.1_spec:jar:1.1.1 in 
> the shaded jar.
> [INFO] Including org.fusesource.hawtbuf:hawtbuf:jar:1.9 in the shaded jar.
> [INFO] Including 
> org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec:jar:1.0.1 in the 
> shaded jar.
> I've attached two test cases 
>mvn -f pom-direct.xml clean install
> will create an empty jar.
>mvn -f pom-indirect.xml clean install
> will not include the slf4j-api which is a dependency of activemq-client, but 
> is marked provided in the pom.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)