[jira] [Commented] (MNG-7455) IllegalStateException in SessionScope during guice injection in multithreaded build
[ https://issues.apache.org/jira/browse/MNG-7455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17520947#comment-17520947 ] Emond Papegaaij commented on MNG-7455: -- [~Abel S.Romero] A reproducer will be difficult, but I've attached the full configuration of the plugin as generated by help:effective-pom: [^pom.xml.effective]. As you can see, we run quite a few steps in different executions, but we only have 1 module with the asciidoctor plugin. By multi threaded I indeed meant parallel builds. The error is not consistent, it only happens once every 20 or so builds. > IllegalStateException in SessionScope during guice injection in multithreaded > build > --- > > Key: MNG-7455 > URL: https://issues.apache.org/jira/browse/MNG-7455 > Project: Maven > Issue Type: Bug > Components: Core >Affects Versions: 3.8.5 >Reporter: Emond Papegaaij >Priority: Major > Attachments: pom.xml.effective > > > Since Maven 3.8.5 we are seeing intermittent failures with the stacktrace > below. With 3.8.4 we did not have this issue. Looking at the changelog I > suspect this regression is caused by MNG-7347. > {code:java} > 09:36:53 [mvn-builder-keyhub-manual] [INFO] --- > asciidoctor-maven-plugin:2.2.2:process-asciidoc (output-html-nl) @ > keyhub-manual --- > 09:36:53 [mvn-builder-keyhub-manual] [WARNING] Error injecting: > org.asciidoctor.maven.AsciidoctorMojo > com.google.inject.ProvisionException: Unable to provision, see the following > errors: > 1) Error in custom provider, java.lang.IllegalStateException > at > org.apache.maven.session.scope.internal.SessionScopeModule.configure(SessionScopeModule.java:64) > (via modules: org.eclipse.sisu.wire.WireModule -> > org.apache.maven.session.scope.internal.SessionScopeModule) > while locating org.apache.maven.execution.MavenSession > for field at org.asciidoctor.maven.AsciidoctorMojo.session(Unknown Source) > while locating org.asciidoctor.maven.AsciidoctorMojo > 1 error > at > com.google.inject.internal.InternalProvisionException.toProvisionException > (InternalProvisionException.java:226) > at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1053) > at com.google.inject.internal.InjectorImpl.getInstance > (InjectorImpl.java:1086) > at org.eclipse.sisu.space.AbstractDeferredClass.get > (AbstractDeferredClass.java:48) > at com.google.inject.internal.ProviderInternalFactory.provision > (ProviderInternalFactory.java:85) > at > com.google.inject.internal.InternalFactoryToInitializableAdapter.provision > (InternalFactoryToInitializableAdapter.java:57) > at com.google.inject.internal.ProviderInternalFactory$1.call > (ProviderInternalFactory.java:66) > at > com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision > (ProvisionListenerStackCallback.java:112) > at > com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision > (ProvisionListenerStackCallback.java:127) > at com.google.inject.internal.ProvisionListenerStackCallback.provision > (ProvisionListenerStackCallback.java:66) > at com.google.inject.internal.ProviderInternalFactory.circularGet > (ProviderInternalFactory.java:61) > at com.google.inject.internal.InternalFactoryToInitializableAdapter.get > (InternalFactoryToInitializableAdapter.java:47) > at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1050) > at org.eclipse.sisu.inject.Guice4$1.get (Guice4.java:162) > at org.eclipse.sisu.inject.LazyBeanEntry.getValue (LazyBeanEntry.java:81) > at org.eclipse.sisu.plexus.LazyPlexusBean.getValue > (LazyPlexusBean.java:51) > at org.codehaus.plexus.DefaultPlexusContainer.lookup > (DefaultPlexusContainer.java:263) > at org.codehaus.plexus.DefaultPlexusContainer.lookup > (DefaultPlexusContainer.java:255) > at > org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo > (DefaultMavenPluginManager.java:520) > at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo > (DefaultBuildPluginManager.java:124) > at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute > (MojoExecutor.java:301) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:211) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:165) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:157) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:121) > at > org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call > (MultiThreadedBuilder.java:210) > at > org.apache.maven.lifecycle.intern
[jira] [Updated] (MNG-7455) IllegalStateException in SessionScope during guice injection in multithreaded build
[ https://issues.apache.org/jira/browse/MNG-7455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Emond Papegaaij updated MNG-7455: - Attachment: pom.xml.effective > IllegalStateException in SessionScope during guice injection in multithreaded > build > --- > > Key: MNG-7455 > URL: https://issues.apache.org/jira/browse/MNG-7455 > Project: Maven > Issue Type: Bug > Components: Core >Affects Versions: 3.8.5 >Reporter: Emond Papegaaij >Priority: Major > Attachments: pom.xml.effective > > > Since Maven 3.8.5 we are seeing intermittent failures with the stacktrace > below. With 3.8.4 we did not have this issue. Looking at the changelog I > suspect this regression is caused by MNG-7347. > {code:java} > 09:36:53 [mvn-builder-keyhub-manual] [INFO] --- > asciidoctor-maven-plugin:2.2.2:process-asciidoc (output-html-nl) @ > keyhub-manual --- > 09:36:53 [mvn-builder-keyhub-manual] [WARNING] Error injecting: > org.asciidoctor.maven.AsciidoctorMojo > com.google.inject.ProvisionException: Unable to provision, see the following > errors: > 1) Error in custom provider, java.lang.IllegalStateException > at > org.apache.maven.session.scope.internal.SessionScopeModule.configure(SessionScopeModule.java:64) > (via modules: org.eclipse.sisu.wire.WireModule -> > org.apache.maven.session.scope.internal.SessionScopeModule) > while locating org.apache.maven.execution.MavenSession > for field at org.asciidoctor.maven.AsciidoctorMojo.session(Unknown Source) > while locating org.asciidoctor.maven.AsciidoctorMojo > 1 error > at > com.google.inject.internal.InternalProvisionException.toProvisionException > (InternalProvisionException.java:226) > at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1053) > at com.google.inject.internal.InjectorImpl.getInstance > (InjectorImpl.java:1086) > at org.eclipse.sisu.space.AbstractDeferredClass.get > (AbstractDeferredClass.java:48) > at com.google.inject.internal.ProviderInternalFactory.provision > (ProviderInternalFactory.java:85) > at > com.google.inject.internal.InternalFactoryToInitializableAdapter.provision > (InternalFactoryToInitializableAdapter.java:57) > at com.google.inject.internal.ProviderInternalFactory$1.call > (ProviderInternalFactory.java:66) > at > com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision > (ProvisionListenerStackCallback.java:112) > at > com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision > (ProvisionListenerStackCallback.java:127) > at com.google.inject.internal.ProvisionListenerStackCallback.provision > (ProvisionListenerStackCallback.java:66) > at com.google.inject.internal.ProviderInternalFactory.circularGet > (ProviderInternalFactory.java:61) > at com.google.inject.internal.InternalFactoryToInitializableAdapter.get > (InternalFactoryToInitializableAdapter.java:47) > at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1050) > at org.eclipse.sisu.inject.Guice4$1.get (Guice4.java:162) > at org.eclipse.sisu.inject.LazyBeanEntry.getValue (LazyBeanEntry.java:81) > at org.eclipse.sisu.plexus.LazyPlexusBean.getValue > (LazyPlexusBean.java:51) > at org.codehaus.plexus.DefaultPlexusContainer.lookup > (DefaultPlexusContainer.java:263) > at org.codehaus.plexus.DefaultPlexusContainer.lookup > (DefaultPlexusContainer.java:255) > at > org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo > (DefaultMavenPluginManager.java:520) > at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo > (DefaultBuildPluginManager.java:124) > at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute > (MojoExecutor.java:301) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:211) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:165) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:157) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:121) > at > org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call > (MultiThreadedBuilder.java:210) > at > org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call > (MultiThreadedBuilder.java:195) > at java.util.concurrent.FutureTask.run (FutureTask.java:264) > at java.util.concurrent.Executors$RunnableAdapter.call > (Executors.java:539) > at java.util.concurrent.FutureTask.run (FutureTask.java:264) > at java.util.concurrent.ThreadPoolExecutor.runWorker > (ThreadPoolExecutor.java:1136) > at java.util.concurrent.Threa
[jira] [Created] (MNG-7458) Maven 3.8.4 binary is missing
Noorul Islam K M created MNG-7458: - Summary: Maven 3.8.4 binary is missing Key: MNG-7458 URL: https://issues.apache.org/jira/browse/MNG-7458 Project: Maven Issue Type: Bug Components: Artifacts and Repositories Affects Versions: 3.8.4 Reporter: Noorul Islam K M I can't find 3.8.4 binaries at https://ftp.wayne.edu/apache/maven/maven-3/ -- This message was sent by Atlassian Jira (v8.20.1#820001)
[GitHub] [maven-invoker-plugin] dependabot[bot] opened a new pull request, #112: Bump maven-invoker from 3.1.0 to 3.2.0
dependabot[bot] opened a new pull request, #112: URL: https://github.com/apache/maven-invoker-plugin/pull/112 Bumps [maven-invoker](https://github.com/apache/maven-invoker) from 3.1.0 to 3.2.0. Release notes Sourced from https://github.com/apache/maven-invoker/releases";>maven-invoker's releases. 3.2.0 🚀 New features and improvements https://issues.apache.org/jira/browse/MSHARED-1040";>[MSHARED-1040] - Require Java 8 (https://github-redirect.dependabot.com/apache/maven-invoker/issues/45";>#45) https://github.com/slawekjaranowski";>@slawekjaranowski https://issues.apache.org/jira/browse/MSHARED-1019";>[MSHARED-1019] - Allow pass raw cli option to Maven process (https://github-redirect.dependabot.com/apache/maven-invoker/issues/43";>#43) https://github.com/slawekjaranowski";>@slawekjaranowski https://issues.apache.org/jira/browse/MSHARED-1018";>[MSHARED-1018] - Allow for using the -ntp ,--no-transfer-progress flag in Maven invocations (https://github-redirect.dependabot.com/apache/maven-invoker/issues/42";>#42) https://github.com/slawekjaranowski";>@slawekjaranowski https://issues.apache.org/jira/browse/MSHARED-1009";>[MSHARED-1009] - Allow providing Maven executable from workspace (https://github-redirect.dependabot.com/apache/maven-invoker/issues/38";>#38) https://github.com/slawekjaranowski";>@slawekjaranowski https://issues.apache.org/jira/browse/MSHARED-649";>[MSHARED-649] - Allow Pom file outside base directory (https://github-redirect.dependabot.com/apache/maven-invoker/issues/37";>#37) https://github.com/slawekjaranowski";>@slawekjaranowski https://issues.apache.org/jira/browse/MSHARED-1007";>[MSHARED-1007] - Add MavenHome and MavenExecutable options to InvocationRequest (https://github-redirect.dependabot.com/apache/maven-invoker/issues/34";>#34) https://github.com/slawekjaranowski";>@slawekjaranowski https://issues.apache.org/jira/browse/MINVOKER-233";>[MINVOKER-233] - Improve DefaultInvoker with a timeout. (https://github-redirect.dependabot.com/apache/maven-invoker/issues/1";>#1) https://github.com/surli";>@surli 🐛 Bug Fixes https://issues.apache.org/jira/browse/MSHARED-1008";>[MSHARED-1008] - Set builder id in proper way (https://github-redirect.dependabot.com/apache/maven-invoker/issues/33";>#33) https://github.com/slawekjaranowski";>@slawekjaranowski 📦 Dependency updates https://issues.apache.org/jira/browse/MSHARED-1042";>[MSHARED-1042] - Upgrade Parent to 35 (https://github-redirect.dependabot.com/apache/maven-invoker/issues/47";>#47) https://github.com/slawekjaranowski";>@slawekjaranowski Bump maven-site-plugin from 3.9.1 to 3.10.0 (https://github-redirect.dependabot.com/apache/maven-invoker/issues/36";>#36) https://github.com/dependabot";>@dependabot Bump extra-enforcer-rules from 1.4 to 1.5.1 (https://github-redirect.dependabot.com/apache/maven-invoker/issues/31";>#31) https://github.com/dependabot";>@dependabot Bump maven-project-info-reports-plugin from 3.1.1 to 3.1.2 (https://github-redirect.dependabot.com/apache/maven-invoker/issues/11";>#11) https://github.com/dependabot";>@dependabot Update build and deps (https://github-redirect.dependabot.com/apache/maven-invoker/issues/25";>#25) https://github.com/cstamas";>@cstamas Bump actions/setup-java from 2.3.0 to 2.3.1 (https://github-redirect.dependabot.com/apache/maven-invoker/issues/23";>#23) https://github.com/dependabot";>@dependabot Bump maven-javadoc-plugin from 3.2.0 to 3.3.1 (https://github-redirect.dependabot.com/apache/maven-invoker/issues/21";>#21) https://github.com/dependabot";>@dependabot Bump actions/setup-java from 2.2.0 to 2.3.0 (https://github-redirect.dependabot.com/apache/maven-invoker/issues/20";>#20) https://github.com/dependabot";>@dependabot Bump actions/cache from 2.1.5 to 2.1.6 (https://github-redirect.dependabot.com/apache/maven-invoker/issues/17";>#17) https://github.com/dependabot";>@dependabot Bump actions/checkout from 2 to 2.3.4 (https://github-redirect.dependabot.com/apache/maven-invoker/issues/14";>#14) https://github.com/dependabot";>@dependabot Bump actions/cache from v2.1.4 to v2.1.5 (https://github-redirect.dependabot.com/apache/maven-invoker/issues/10";>#10) https://github.com/dependabot";>@dependabot Bump junit from 4.13.1 to 4.13.2 (https://github-redirect.dependabot.com/apache/maven-invoker/issues/8";>#8) https://github.com/dependabot";>@dependabot 👻 Maintenance https://issues.apache.org/jira/browse/MSHARED-577";>[MSHARED-577] - Remove usage of M2_HOME environment variable (https://github-redirect.dependabot.com/apache/maven-invoker/issues/35";>#35) https://github.com/slawekjaranowski";>@slawekjaranowski https://issues.apache.org/jira/browse/MSHARED-1006";>[MSHARED-1006] - Deprecate not thread safe methods on Invoker (https://github-redirect.dependabot.com/apache/maven-invoker/issues/32";>#32) https://github.co
[jira] [Updated] (MRESOLVER-249) Update Hazelcast in named-locks-hazelcast module
[ https://issues.apache.org/jira/browse/MRESOLVER-249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tamás Cservenák updated MRESOLVER-249: -- Description: Update Hazelcast from 5.0.2 to latest 5.1.1. This is really not a game changer, as Hazelcast 5.x is API compatible, so end users may choose which version to use for real at runtime. > Update Hazelcast in named-locks-hazelcast module > > > Key: MRESOLVER-249 > URL: https://issues.apache.org/jira/browse/MRESOLVER-249 > Project: Maven Resolver > Issue Type: Dependency upgrade >Reporter: Tamás Cservenák >Assignee: Tamás Cservenák >Priority: Major > Fix For: 1.8.0 > > > Update Hazelcast from 5.0.2 to latest 5.1.1. This is really > not a game changer, as Hazelcast 5.x is API compatible, so > end users may choose which version to use for real at runtime. -- This message was sent by Atlassian Jira (v8.20.1#820001)
[GitHub] [maven-indexer] dependabot[bot] commented on pull request #183: Bump checkstyle from 9.2.1 to 9.3
dependabot[bot] commented on PR #183: URL: https://github.com/apache/maven-indexer/pull/183#issuecomment-1096073057 Superseded by #193. -- 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-indexer] dependabot[bot] closed pull request #183: Bump checkstyle from 9.2.1 to 9.3
dependabot[bot] closed pull request #183: Bump checkstyle from 9.2.1 to 9.3 URL: https://github.com/apache/maven-indexer/pull/183 -- 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-indexer] dependabot[bot] opened a new pull request, #193: Bump checkstyle from 9.2.1 to 10.1
dependabot[bot] opened a new pull request, #193: URL: https://github.com/apache/maven-indexer/pull/193 Bumps [checkstyle](https://github.com/checkstyle/checkstyle) from 9.2.1 to 10.1. Release notes Sourced from https://github.com/checkstyle/checkstyle/releases";>checkstyle's releases. checkstyle-10.1 https://checkstyle.org/releasenotes.html#Release_10.1";>https://checkstyle.org/releasenotes.html#Release_10.1 checkstyle-10.0 https://checkstyle.org/releasenotes.html#Release_10.0";>https://checkstyle.org/releasenotes.html#Release_10.0 checkstyle-9.3 https://checkstyle.org/releasenotes.html#Release_9.3";>https://checkstyle.org/releasenotes.html#Release_9.3 Commits https://github.com/checkstyle/checkstyle/commit/7fa1eb2060fed4a91d874a695b1d8a53890204f4";>7fa1eb2 [maven-release-plugin] prepare release checkstyle-10.1 https://github.com/checkstyle/checkstyle/commit/3be1cc02d7c0a532639dddcefe30c79ba8864209";>3be1cc0 doc: release notes for 10.1 https://github.com/checkstyle/checkstyle/commit/3b3fc46c2b3b24a88c48efe6b2f8133de94b89df";>3b3fc46 minor: remove suppression for spotbugs-maven-plugin version check https://github.com/checkstyle/checkstyle/commit/a8cc4dd8e8571ecd96544192bdf5bafbcf433950";>a8cc4dd Issue https://github-redirect.dependabot.com/checkstyle/checkstyle/issues/6207";>#6207: Add Xpath Regression Test for MethodName https://github.com/checkstyle/checkstyle/commit/21125a7d176a92291c8d624ab6fa6f459d30e049";>21125a7 dependency: bump forbiddenapis from 3.2 to 3.3 https://github.com/checkstyle/checkstyle/commit/b8628532f12f46ab18e61372a997a4ca73e33d2a";>b862853 Issue https://github-redirect.dependabot.com/checkstyle/checkstyle/issues/10924";>#10924: Update SeparatorWrapCheck to use code points https://github.com/checkstyle/checkstyle/commit/693ed38d02a2c3a29da1135180111e85a123c1d8";>693ed38 Issue https://github-redirect.dependabot.com/checkstyle/checkstyle/issues/11446";>#11446: Update ImportOrderCheckTest to use verifyWithInlineConfigParser https://github.com/checkstyle/checkstyle/commit/23b1b29b6a0a865a68f2f29305ddc9709ece2e97";>23b1b29 dependency: bump spotbugs-maven-plugin from 4.5.3.0 to 4.6.0.0 https://github.com/checkstyle/checkstyle/commit/56a87add6ee7eeab833e9203c3694c9769a40e34";>56a87ad Issue https://github-redirect.dependabot.com/checkstyle/checkstyle/issues/11439";>#11439: Converted test for SuppressionXpathSingleFilterTest to use inli... https://github.com/checkstyle/checkstyle/commit/51c04122c24a41a7e890dda24227d1a3c7e24531";>51c0412 minor: change java version for modernizer plugin Additional commits viewable in https://github.com/checkstyle/checkstyle/compare/checkstyle-9.2.1...checkstyle-10.1";>compare view [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.puppycrawl.tools:checkstyle&package-manager=maven&previous-version=9.2.1&new-version=10.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- Dependabot commands and options You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) -- 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-javadoc-plugin] dependabot[bot] opened a new pull request, #133: Bump mockito-core from 4.1.0 to 4.4.0
dependabot[bot] opened a new pull request, #133: URL: https://github.com/apache/maven-javadoc-plugin/pull/133 Bumps [mockito-core](https://github.com/mockito/mockito) from 4.1.0 to 4.4.0. Release notes Sourced from https://github.com/mockito/mockito/releases";>mockito-core's releases. v4.4.0 Changelog generated by https://github.com/shipkit/shipkit-changelog";>Shipkit Changelog Gradle Plugin 4.4.0 2022-03-08 - https://github.com/mockito/mockito/compare/v4.3.1...v4.4.0";>16 commit(s) by Andrew Kozel, Brice Dutheil, Jean-Baptiste Mille, Mirko Alicastro, dependabot[bot] Bump groovy from 3.0.9 to 3.0.10 [(https://github-redirect.dependabot.com/mockito/mockito/issues/2586";>#2586)](https://github-redirect.dependabot.com/mockito/mockito/pull/2586";>mockito/mockito#2586) Bump google-java-format from 1.14.0 to 1.15.0 [(https://github-redirect.dependabot.com/mockito/mockito/issues/2585";>#2585)](https://github-redirect.dependabot.com/mockito/mockito/pull/2585";>mockito/mockito#2585) Bump actions/checkout from 2.4.0 to 3 [(https://github-redirect.dependabot.com/mockito/mockito/issues/2582";>#2582)](https://github-redirect.dependabot.com/mockito/mockito/pull/2582";>mockito/mockito#2582) Bump shipkit-auto-version from 1.1.19 to 1.1.20 [(https://github-redirect.dependabot.com/mockito/mockito/issues/2580";>#2580)](https://github-redirect.dependabot.com/mockito/mockito/pull/2580";>mockito/mockito#2580) Bump biz.aQute.bnd.builder from 6.1.0 to 6.2.0 [(https://github-redirect.dependabot.com/mockito/mockito/issues/2579";>#2579)](https://github-redirect.dependabot.com/mockito/mockito/pull/2579";>mockito/mockito#2579) Bump biz.aQute.bnd.gradle from 6.1.0 to 6.2.0 [(https://github-redirect.dependabot.com/mockito/mockito/issues/2578";>#2578)](https://github-redirect.dependabot.com/mockito/mockito/pull/2578";>mockito/mockito#2578) Adds a Google Java Format for JDK17 [(https://github-redirect.dependabot.com/mockito/mockito/issues/2572";>#2572)](https://github-redirect.dependabot.com/mockito/mockito/pull/2572";>mockito/mockito#2572) Clean up JUnit3 references [(https://github-redirect.dependabot.com/mockito/mockito/issues/2570";>#2570)](https://github-redirect.dependabot.com/mockito/mockito/pull/2570";>mockito/mockito#2570) Bump com.diffplug.spotless from 6.2.2 to 6.3.0 [(https://github-redirect.dependabot.com/mockito/mockito/issues/2567";>#2567)](https://github-redirect.dependabot.com/mockito/mockito/pull/2567";>mockito/mockito#2567) Bump google-java-format from 1.13.0 to 1.14.0 [(https://github-redirect.dependabot.com/mockito/mockito/issues/2565";>#2565)](https://github-redirect.dependabot.com/mockito/mockito/pull/2565";>mockito/mockito#2565) Bump versions.bytebuddy from 1.12.7 to 1.12.8 [(https://github-redirect.dependabot.com/mockito/mockito/issues/2564";>#2564)](https://github-redirect.dependabot.com/mockito/mockito/pull/2564";>mockito/mockito#2564) Bump com.diffplug.spotless from 6.2.1 to 6.2.2 [(https://github-redirect.dependabot.com/mockito/mockito/issues/2562";>#2562)](https://github-redirect.dependabot.com/mockito/mockito/pull/2562";>mockito/mockito#2562) Bump com.github.ben-manes.versions from 0.41.0 to 0.42.0 [(https://github-redirect.dependabot.com/mockito/mockito/issues/2559";>#2559)](https://github-redirect.dependabot.com/mockito/mockito/pull/2559";>mockito/mockito#2559) Bump com.diffplug.spotless from 6.2.0 to 6.2.1 [(https://github-redirect.dependabot.com/mockito/mockito/issues/2556";>#2556)](https://github-redirect.dependabot.com/mockito/mockito/pull/2556";>mockito/mockito#2556) Fixes https://github-redirect.dependabot.com/mockito/mockito/issues/2548";>#2548 : Makes InOrder able to verify static methods [(https://github-redirect.dependabot.com/mockito/mockito/issues/2549";>#2549)](https://github-redirect.dependabot.com/mockito/mockito/pull/2549";>mockito/mockito#2549) [PR open] Add feature to verify static methods calls in order [(https://github-redirect.dependabot.com/mockito/mockito/issues/2548";>#2548)](https://github-redirect.dependabot.com/mockito/mockito/issues/2548";>mockito/mockito#2548) Fixes https://github-redirect.dependabot.com/mockito/mockito/issues/2201";>#2201 : Fixed checking of declared exceptions. [(https://github-redirect.dependabot.com/mockito/mockito/issues/2547";>#2547)](https://github-redirect.dependabot.com/mockito/mockito/pull/2547";>mockito/mockito#2547) Calling getExceptionTypes() on concrete object that is used as interface doesn't return exception types from interface [(https://github-redirect.dependabot.com/mockito/mockito/issues/2201";>#2201)](https://github-redirect.dependabot.com/mockito/mockito/issues/2201";>mockito/mockito#2201) v4.3.1 Changelog generated by https://github.com/shipkit/shipkit-changelog";>Shipkit Changelog Gradle Plugin 4.3.1 2022-01-25 - https://github.com/mockito/mockito/compare/v4.3.0...v4.3.1";>1 commit(s) by Stefano Cordio Add mockito-c
[GitHub] [maven-surefire] sbabcoc commented on pull request #517: [SUREFIRE-2064] Allow all supported values of [parallel] option
sbabcoc commented on PR #517: URL: https://github.com/apache/maven-surefire/pull/517#issuecomment-1095911639 FUTURE: As an alternative to the version-specific custom parsing currently employed by the Surefire plugin, it might be worth exploring the possibility of using TestNG's **Parser** class instead. This can be instantiated with any input stream, including a **ByteArrayInputStream**. This would transform all option processing to a version-agnostic conversion of Surefire configuration settings to corresponding TestNG XML format, instantiation a **Parser**, and calling the `parse()` method. -- 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-resolver] caiwei-ebay closed pull request #163: MRESOLVER-133 unnessary poms downloadings for dependency using versio…
caiwei-ebay closed pull request #163: MRESOLVER-133 unnessary poms downloadings for dependency using versio… URL: https://github.com/apache/maven-resolver/pull/163 -- 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-resolver] caiwei-ebay commented on pull request #163: MRESOLVER-133 unnessary poms downloadings for dependency using versio…
caiwei-ebay commented on PR #163: URL: https://github.com/apache/maven-resolver/pull/163#issuecomment-1095867086 @cstamas Thanks for the insights. I agree we should not do it at least in the resolver part. -- 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-surefire] sbabcoc commented on a diff in pull request #517: [SUREFIRE-2064] Allow all supported values of [parallel] option
sbabcoc commented on code in PR #517: URL: https://github.com/apache/maven-surefire/pull/517#discussion_r847868965 ## surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNG740Configurator.java: ## @@ -37,33 +36,59 @@ * * @since 3.0.0-M6 */ -public class TestNG740Configurator extends TestNG60Configurator +public class TestNG740Configurator +extends TestNG60Configurator { @Override -public void configure( XmlSuite suite, Map options ) +protected void configureThreadCount( XmlSuite suite, Map options ) throws TestSetFailedException { -String threadCountAsString = options.get( THREADCOUNT_PROP ); -int threadCount = threadCountAsString == null ? 1 : parseInt( threadCountAsString ); -suite.setThreadCount( threadCount ); - -String parallel = options.get( PARALLEL_PROP ); -if ( parallel != null ) +String threadCount = options.get( THREADCOUNT_PROP ); +// if [threadcount] spec'd +if ( threadCount != null ) { -if ( !"methods".equalsIgnoreCase( parallel ) && !"classes".equalsIgnoreCase( parallel ) ) +try { -throw new TestSetFailedException( "Unsupported TestNG parallel setting: " -+ parallel + " ( only METHODS or CLASSES supported )" ); +// convert and apply [threadcount] setting +suite.setThreadCount( Integer.parseInt( threadCount ) ); +} +catch ( NumberFormatException e ) +{ +throw new TestSetFailedException( "Non-integer TestNG [threadcount] setting: " + threadCount, e ); } -Class enumClass = tryLoadClass( XmlSuite.class.getClassLoader(), "org.testng.xml.XmlSuite$ParallelMode" ); -Enum parallelEnum = Enum.valueOf( enumClass, parallel.toUpperCase() ); -invokeSetter( suite, "setParallel", enumClass, parallelEnum ); } - -String dataProviderThreadCount = options.get( "dataproviderthreadcount" ); -if ( dataProviderThreadCount != null ) +} + +@Override +protected void configureParallel( XmlSuite suite, Map options ) +throws TestSetFailedException +{ +String parallel = options.get( PARALLEL_PROP ); +// if [parallel] spec'd +if ( parallel != null ) { -suite.setDataProviderThreadCount( Integer.parseInt( dataProviderThreadCount ) ); +// try to load the [ParallelMode] enumeration +Class enumClass = tryLoadClass( XmlSuite.class.getClassLoader(), "org.testng.xml.XmlSuite$ParallelMode" ); +// if enumeration loaded +if ( enumClass != null ) +{ +try +{ +// convert [parallel] option to corresponding constant +Enum parallelEnum = Enum.valueOf( enumClass, parallel.toUpperCase() ); +// set [XmlSuite] parallel mode to specified value +invokeSetter( suite, "setParallel", enumClass, parallelEnum ); Review Comment: @slawekjaranowski: I added JavaDoc to the configuration methods. The documentation for the `configureParallel` method explains the rationale behind this method, specifying the TestNG release that made this necessary. -- 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-surefire] sbabcoc commented on a diff in pull request #517: [SUREFIRE-2064] Allow all supported values of [parallel] option
sbabcoc commented on code in PR #517: URL: https://github.com/apache/maven-surefire/pull/517#discussion_r847843603 ## surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNG740Configurator.java: ## @@ -37,33 +36,59 @@ * * @since 3.0.0-M6 */ -public class TestNG740Configurator extends TestNG60Configurator +public class TestNG740Configurator +extends TestNG60Configurator { @Override -public void configure( XmlSuite suite, Map options ) +protected void configureThreadCount( XmlSuite suite, Map options ) throws TestSetFailedException { -String threadCountAsString = options.get( THREADCOUNT_PROP ); -int threadCount = threadCountAsString == null ? 1 : parseInt( threadCountAsString ); -suite.setThreadCount( threadCount ); - -String parallel = options.get( PARALLEL_PROP ); -if ( parallel != null ) +String threadCount = options.get( THREADCOUNT_PROP ); +// if [threadcount] spec'd +if ( threadCount != null ) { -if ( !"methods".equalsIgnoreCase( parallel ) && !"classes".equalsIgnoreCase( parallel ) ) +try { -throw new TestSetFailedException( "Unsupported TestNG parallel setting: " -+ parallel + " ( only METHODS or CLASSES supported )" ); +// convert and apply [threadcount] setting +suite.setThreadCount( Integer.parseInt( threadCount ) ); +} +catch ( NumberFormatException e ) +{ +throw new TestSetFailedException( "Non-integer TestNG [threadcount] setting: " + threadCount, e ); } -Class enumClass = tryLoadClass( XmlSuite.class.getClassLoader(), "org.testng.xml.XmlSuite$ParallelMode" ); -Enum parallelEnum = Enum.valueOf( enumClass, parallel.toUpperCase() ); -invokeSetter( suite, "setParallel", enumClass, parallelEnum ); } - -String dataProviderThreadCount = options.get( "dataproviderthreadcount" ); -if ( dataProviderThreadCount != null ) +} + +@Override +protected void configureParallel( XmlSuite suite, Map options ) +throws TestSetFailedException +{ +String parallel = options.get( PARALLEL_PROP ); +// if [parallel] spec'd +if ( parallel != null ) { -suite.setDataProviderThreadCount( Integer.parseInt( dataProviderThreadCount ) ); +// try to load the [ParallelMode] enumeration +Class enumClass = tryLoadClass( XmlSuite.class.getClassLoader(), "org.testng.xml.XmlSuite$ParallelMode" ); +// if enumeration loaded +if ( enumClass != null ) +{ +try +{ +// convert [parallel] option to corresponding constant +Enum parallelEnum = Enum.valueOf( enumClass, parallel.toUpperCase() ); +// set [XmlSuite] parallel mode to specified value +invokeSetter( suite, "setParallel", enumClass, parallelEnum ); Review Comment: @Tibor17: Regarding FQN, the **ParallelMode** enumeration is a nested class, so the name is properly spelt. However, your suggestion would be correct for an `import` statement. We would need to have the **XmlSuite** class definition from TestNG 7.4 for that to work, though. -- 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-surefire] sbabcoc commented on a diff in pull request #517: [SUREFIRE-2064] Allow all supported values of [parallel] option
sbabcoc commented on code in PR #517: URL: https://github.com/apache/maven-surefire/pull/517#discussion_r847840590 ## surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNG740Configurator.java: ## @@ -37,33 +36,59 @@ * * @since 3.0.0-M6 */ -public class TestNG740Configurator extends TestNG60Configurator +public class TestNG740Configurator +extends TestNG60Configurator { @Override -public void configure( XmlSuite suite, Map options ) +protected void configureThreadCount( XmlSuite suite, Map options ) throws TestSetFailedException { -String threadCountAsString = options.get( THREADCOUNT_PROP ); -int threadCount = threadCountAsString == null ? 1 : parseInt( threadCountAsString ); -suite.setThreadCount( threadCount ); - -String parallel = options.get( PARALLEL_PROP ); -if ( parallel != null ) +String threadCount = options.get( THREADCOUNT_PROP ); +// if [threadcount] spec'd +if ( threadCount != null ) { -if ( !"methods".equalsIgnoreCase( parallel ) && !"classes".equalsIgnoreCase( parallel ) ) +try { -throw new TestSetFailedException( "Unsupported TestNG parallel setting: " -+ parallel + " ( only METHODS or CLASSES supported )" ); +// convert and apply [threadcount] setting +suite.setThreadCount( Integer.parseInt( threadCount ) ); +} +catch ( NumberFormatException e ) +{ +throw new TestSetFailedException( "Non-integer TestNG [threadcount] setting: " + threadCount, e ); } -Class enumClass = tryLoadClass( XmlSuite.class.getClassLoader(), "org.testng.xml.XmlSuite$ParallelMode" ); -Enum parallelEnum = Enum.valueOf( enumClass, parallel.toUpperCase() ); -invokeSetter( suite, "setParallel", enumClass, parallelEnum ); } - -String dataProviderThreadCount = options.get( "dataproviderthreadcount" ); -if ( dataProviderThreadCount != null ) +} + +@Override +protected void configureParallel( XmlSuite suite, Map options ) +throws TestSetFailedException +{ +String parallel = options.get( PARALLEL_PROP ); +// if [parallel] spec'd +if ( parallel != null ) { -suite.setDataProviderThreadCount( Integer.parseInt( dataProviderThreadCount ) ); +// try to load the [ParallelMode] enumeration +Class enumClass = tryLoadClass( XmlSuite.class.getClassLoader(), "org.testng.xml.XmlSuite$ParallelMode" ); +// if enumeration loaded +if ( enumClass != null ) +{ +try +{ +// convert [parallel] option to corresponding constant +Enum parallelEnum = Enum.valueOf( enumClass, parallel.toUpperCase() ); +// set [XmlSuite] parallel mode to specified value +invokeSetter( suite, "setParallel", enumClass, parallelEnum ); Review Comment: @slawekjaranowski: The class header JavaDoc specifies the TestNG version (`7.4.0`). I suppose this comment could be a bit more explicit, however, regarding the necessity for this configurator class. @Tibor17: The inability to load the enumeration will trigger a clearly-explained failure: `Failed loading TestNG [ParallelMode] enumeration to convert [parallel] setting`. No need to crack open the code to determine the cause of a generic NPE (which will be provided as the cause of the **TestSetFailedException**). -- 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-surefire] sbabcoc commented on a diff in pull request #517: [SUREFIRE-2064] Allow all supported values of [parallel] option
sbabcoc commented on code in PR #517: URL: https://github.com/apache/maven-surefire/pull/517#discussion_r847840590 ## surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNG740Configurator.java: ## @@ -37,33 +36,59 @@ * * @since 3.0.0-M6 */ -public class TestNG740Configurator extends TestNG60Configurator +public class TestNG740Configurator +extends TestNG60Configurator { @Override -public void configure( XmlSuite suite, Map options ) +protected void configureThreadCount( XmlSuite suite, Map options ) throws TestSetFailedException { -String threadCountAsString = options.get( THREADCOUNT_PROP ); -int threadCount = threadCountAsString == null ? 1 : parseInt( threadCountAsString ); -suite.setThreadCount( threadCount ); - -String parallel = options.get( PARALLEL_PROP ); -if ( parallel != null ) +String threadCount = options.get( THREADCOUNT_PROP ); +// if [threadcount] spec'd +if ( threadCount != null ) { -if ( !"methods".equalsIgnoreCase( parallel ) && !"classes".equalsIgnoreCase( parallel ) ) +try { -throw new TestSetFailedException( "Unsupported TestNG parallel setting: " -+ parallel + " ( only METHODS or CLASSES supported )" ); +// convert and apply [threadcount] setting +suite.setThreadCount( Integer.parseInt( threadCount ) ); +} +catch ( NumberFormatException e ) +{ +throw new TestSetFailedException( "Non-integer TestNG [threadcount] setting: " + threadCount, e ); } -Class enumClass = tryLoadClass( XmlSuite.class.getClassLoader(), "org.testng.xml.XmlSuite$ParallelMode" ); -Enum parallelEnum = Enum.valueOf( enumClass, parallel.toUpperCase() ); -invokeSetter( suite, "setParallel", enumClass, parallelEnum ); } - -String dataProviderThreadCount = options.get( "dataproviderthreadcount" ); -if ( dataProviderThreadCount != null ) +} + +@Override +protected void configureParallel( XmlSuite suite, Map options ) +throws TestSetFailedException +{ +String parallel = options.get( PARALLEL_PROP ); +// if [parallel] spec'd +if ( parallel != null ) { -suite.setDataProviderThreadCount( Integer.parseInt( dataProviderThreadCount ) ); +// try to load the [ParallelMode] enumeration +Class enumClass = tryLoadClass( XmlSuite.class.getClassLoader(), "org.testng.xml.XmlSuite$ParallelMode" ); +// if enumeration loaded +if ( enumClass != null ) +{ +try +{ +// convert [parallel] option to corresponding constant +Enum parallelEnum = Enum.valueOf( enumClass, parallel.toUpperCase() ); +// set [XmlSuite] parallel mode to specified value +invokeSetter( suite, "setParallel", enumClass, parallelEnum ); Review Comment: @slawekjaranowski: The class header JavaDoc specifies the TestNG version (`7.4.0`). I suppose this comment could be a bit more explicit, however, regarding the necessity for this configurator class. @Tibor17: The inability to load the enumeration will trigger a clearly-explained failure: `Failed loading TestNG [ParallelMode] enumeration to convert [parallel] setting`. No need to crack open the code to determine the cause of a generic NPE (which will be provided as the cause of the **TestSetFailedException**. -- 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] (MJAVADOC-707) Plugin won't work if Automatic-Module-Name is used
[ https://issues.apache.org/jira/browse/MJAVADOC-707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17520864#comment-17520864 ] Christopher Tubbs commented on MJAVADOC-707: There seem to be two problems: # when the automatic module name is added to the jar manifest, it complains that packages are empty that have only a package-info.java file. It does not complain and works as expected when the automatic-module-name is not in the manifest, and # once the a placeholder class is added so it stops complaining about the empty package, it fails to find dependency classes on the classpath that it needs to generate the javadocs. > Plugin won't work if Automatic-Module-Name is used > -- > > Key: MJAVADOC-707 > URL: https://issues.apache.org/jira/browse/MJAVADOC-707 > Project: Maven Javadoc Plugin > Issue Type: Bug >Affects Versions: 3.3.1, 3.3.2 >Reporter: Christopher Tubbs >Priority: Critical > > Using Automatic-Module-Name in a manifest (an intermediate step to help > transition to using modules) prevents this plugin from adding the necessary > dependencies to the class path, so it can build javadocs. > maven-compiler-plugin seems to work fine, as does surefire and all the others > when Automatic-Module-Name entries appear in a project's jar manifests. > However, this plugin, as of 3.3.1, still does not work correctly with these. > Instead of using the traditional class path, this plugin seems to force > treating the project as a module, even though it does not have any > module-info.java files, and most of its dependencies have not transitioned to > using modules. > Here's a pull request that demonstrates adding the Automatic-Module-Name to > the manifest for a multi-module (Maven module) project, that fails on the > javadoc plugin: > https://github.com/apache/accumulo/pull/2498 ; both javadoc:aggregate and > javadoc:jar are known to fail. I did not test with any other mojos. > Not supporting this feature holds all projects back from being able to > transition to modules over time. > http://branchandbound.net/blog/java/2017/12/automatic-module-name/ > https://docs.oracle.com/javase/9/docs/api/java/lang/module/ModuleFinder.html#automatic-modules -- This message was sent by Atlassian Jira (v8.20.1#820001)
[GitHub] [maven-surefire] sbabcoc commented on a diff in pull request #517: [SUREFIRE-2064] Allow all supported values of [parallel] option
sbabcoc commented on code in PR #517: URL: https://github.com/apache/maven-surefire/pull/517#discussion_r847840590 ## surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNG740Configurator.java: ## @@ -37,33 +36,59 @@ * * @since 3.0.0-M6 */ -public class TestNG740Configurator extends TestNG60Configurator +public class TestNG740Configurator +extends TestNG60Configurator { @Override -public void configure( XmlSuite suite, Map options ) +protected void configureThreadCount( XmlSuite suite, Map options ) throws TestSetFailedException { -String threadCountAsString = options.get( THREADCOUNT_PROP ); -int threadCount = threadCountAsString == null ? 1 : parseInt( threadCountAsString ); -suite.setThreadCount( threadCount ); - -String parallel = options.get( PARALLEL_PROP ); -if ( parallel != null ) +String threadCount = options.get( THREADCOUNT_PROP ); +// if [threadcount] spec'd +if ( threadCount != null ) { -if ( !"methods".equalsIgnoreCase( parallel ) && !"classes".equalsIgnoreCase( parallel ) ) +try { -throw new TestSetFailedException( "Unsupported TestNG parallel setting: " -+ parallel + " ( only METHODS or CLASSES supported )" ); +// convert and apply [threadcount] setting +suite.setThreadCount( Integer.parseInt( threadCount ) ); +} +catch ( NumberFormatException e ) +{ +throw new TestSetFailedException( "Non-integer TestNG [threadcount] setting: " + threadCount, e ); } -Class enumClass = tryLoadClass( XmlSuite.class.getClassLoader(), "org.testng.xml.XmlSuite$ParallelMode" ); -Enum parallelEnum = Enum.valueOf( enumClass, parallel.toUpperCase() ); -invokeSetter( suite, "setParallel", enumClass, parallelEnum ); } - -String dataProviderThreadCount = options.get( "dataproviderthreadcount" ); -if ( dataProviderThreadCount != null ) +} + +@Override +protected void configureParallel( XmlSuite suite, Map options ) +throws TestSetFailedException +{ +String parallel = options.get( PARALLEL_PROP ); +// if [parallel] spec'd +if ( parallel != null ) { -suite.setDataProviderThreadCount( Integer.parseInt( dataProviderThreadCount ) ); +// try to load the [ParallelMode] enumeration +Class enumClass = tryLoadClass( XmlSuite.class.getClassLoader(), "org.testng.xml.XmlSuite$ParallelMode" ); +// if enumeration loaded +if ( enumClass != null ) +{ +try +{ +// convert [parallel] option to corresponding constant +Enum parallelEnum = Enum.valueOf( enumClass, parallel.toUpperCase() ); +// set [XmlSuite] parallel mode to specified value +invokeSetter( suite, "setParallel", enumClass, parallelEnum ); Review Comment: @slawekjaranowski: The class header JavaDoc specifies the TestNG version (`7.4.0`). I suppose this comment could be a bit more explicit, however, regarding the necessity for this configurator class. @Tibor17: The inability to load the enumeration will trigger a clearly-explained failure: `Failed loading TestNG [ParallelMode] enumeration to convert [parallel] setting`. No need to crack open the code to determine the cause of a generic NPE. -- 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-surefire] sbabcoc commented on a diff in pull request #517: [SUREFIRE-2064] Allow all supported values of [parallel] option
sbabcoc commented on code in PR #517: URL: https://github.com/apache/maven-surefire/pull/517#discussion_r847840590 ## surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNG740Configurator.java: ## @@ -37,33 +36,59 @@ * * @since 3.0.0-M6 */ -public class TestNG740Configurator extends TestNG60Configurator +public class TestNG740Configurator +extends TestNG60Configurator { @Override -public void configure( XmlSuite suite, Map options ) +protected void configureThreadCount( XmlSuite suite, Map options ) throws TestSetFailedException { -String threadCountAsString = options.get( THREADCOUNT_PROP ); -int threadCount = threadCountAsString == null ? 1 : parseInt( threadCountAsString ); -suite.setThreadCount( threadCount ); - -String parallel = options.get( PARALLEL_PROP ); -if ( parallel != null ) +String threadCount = options.get( THREADCOUNT_PROP ); +// if [threadcount] spec'd +if ( threadCount != null ) { -if ( !"methods".equalsIgnoreCase( parallel ) && !"classes".equalsIgnoreCase( parallel ) ) +try { -throw new TestSetFailedException( "Unsupported TestNG parallel setting: " -+ parallel + " ( only METHODS or CLASSES supported )" ); +// convert and apply [threadcount] setting +suite.setThreadCount( Integer.parseInt( threadCount ) ); +} +catch ( NumberFormatException e ) +{ +throw new TestSetFailedException( "Non-integer TestNG [threadcount] setting: " + threadCount, e ); } -Class enumClass = tryLoadClass( XmlSuite.class.getClassLoader(), "org.testng.xml.XmlSuite$ParallelMode" ); -Enum parallelEnum = Enum.valueOf( enumClass, parallel.toUpperCase() ); -invokeSetter( suite, "setParallel", enumClass, parallelEnum ); } - -String dataProviderThreadCount = options.get( "dataproviderthreadcount" ); -if ( dataProviderThreadCount != null ) +} + +@Override +protected void configureParallel( XmlSuite suite, Map options ) +throws TestSetFailedException +{ +String parallel = options.get( PARALLEL_PROP ); +// if [parallel] spec'd +if ( parallel != null ) { -suite.setDataProviderThreadCount( Integer.parseInt( dataProviderThreadCount ) ); +// try to load the [ParallelMode] enumeration +Class enumClass = tryLoadClass( XmlSuite.class.getClassLoader(), "org.testng.xml.XmlSuite$ParallelMode" ); +// if enumeration loaded +if ( enumClass != null ) +{ +try +{ +// convert [parallel] option to corresponding constant +Enum parallelEnum = Enum.valueOf( enumClass, parallel.toUpperCase() ); +// set [XmlSuite] parallel mode to specified value +invokeSetter( suite, "setParallel", enumClass, parallelEnum ); Review Comment: @slawekjaranowski: The class header JavaDoc specifies the TestNG version (`7.4.0`). I suppose this comment could be a bit more explicit, however, regarding the necessity for this configurator class. @Tibor17: The inability to load the enumeration will trigger a clearly-explained failure: `Failed loading TestNG [ParallelMode] enumeration to convert [parallel] setting`. No need to crack open the code to determine the cause of the NPE. -- 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-surefire] sbabcoc commented on a diff in pull request #517: [SUREFIRE-2064] Allow all supported values of [parallel] option
sbabcoc commented on code in PR #517: URL: https://github.com/apache/maven-surefire/pull/517#discussion_r847840590 ## surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNG740Configurator.java: ## @@ -37,33 +36,59 @@ * * @since 3.0.0-M6 */ -public class TestNG740Configurator extends TestNG60Configurator +public class TestNG740Configurator +extends TestNG60Configurator { @Override -public void configure( XmlSuite suite, Map options ) +protected void configureThreadCount( XmlSuite suite, Map options ) throws TestSetFailedException { -String threadCountAsString = options.get( THREADCOUNT_PROP ); -int threadCount = threadCountAsString == null ? 1 : parseInt( threadCountAsString ); -suite.setThreadCount( threadCount ); - -String parallel = options.get( PARALLEL_PROP ); -if ( parallel != null ) +String threadCount = options.get( THREADCOUNT_PROP ); +// if [threadcount] spec'd +if ( threadCount != null ) { -if ( !"methods".equalsIgnoreCase( parallel ) && !"classes".equalsIgnoreCase( parallel ) ) +try { -throw new TestSetFailedException( "Unsupported TestNG parallel setting: " -+ parallel + " ( only METHODS or CLASSES supported )" ); +// convert and apply [threadcount] setting +suite.setThreadCount( Integer.parseInt( threadCount ) ); +} +catch ( NumberFormatException e ) +{ +throw new TestSetFailedException( "Non-integer TestNG [threadcount] setting: " + threadCount, e ); } -Class enumClass = tryLoadClass( XmlSuite.class.getClassLoader(), "org.testng.xml.XmlSuite$ParallelMode" ); -Enum parallelEnum = Enum.valueOf( enumClass, parallel.toUpperCase() ); -invokeSetter( suite, "setParallel", enumClass, parallelEnum ); } - -String dataProviderThreadCount = options.get( "dataproviderthreadcount" ); -if ( dataProviderThreadCount != null ) +} + +@Override +protected void configureParallel( XmlSuite suite, Map options ) +throws TestSetFailedException +{ +String parallel = options.get( PARALLEL_PROP ); +// if [parallel] spec'd +if ( parallel != null ) { -suite.setDataProviderThreadCount( Integer.parseInt( dataProviderThreadCount ) ); +// try to load the [ParallelMode] enumeration +Class enumClass = tryLoadClass( XmlSuite.class.getClassLoader(), "org.testng.xml.XmlSuite$ParallelMode" ); +// if enumeration loaded +if ( enumClass != null ) +{ +try +{ +// convert [parallel] option to corresponding constant +Enum parallelEnum = Enum.valueOf( enumClass, parallel.toUpperCase() ); +// set [XmlSuite] parallel mode to specified value +invokeSetter( suite, "setParallel", enumClass, parallelEnum ); Review Comment: @slawekjaranowski: The class header JavaDoc specifies the TestNG version (`7.4.0`). I suppose this comment could be a bit more explicit, however, regarding the necessity for this configurator class. @Tibor17: The inability to load the enumeration will trigger a clearly-explained failure: `Failed loading TestNG [ParallelMode] enumeration to convert [parallel] setting` -- 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] (MJAVADOC-707) Plugin won't work if Automatic-Module-Name is used
[ https://issues.apache.org/jira/browse/MJAVADOC-707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17520861#comment-17520861 ] Christopher Tubbs commented on MJAVADOC-707: I've confirmed this still doesn't work with 3.3.2 as well. This seems pretty important for people to be able to transition to modules. Is there any way this can get on the development roadmap? > Plugin won't work if Automatic-Module-Name is used > -- > > Key: MJAVADOC-707 > URL: https://issues.apache.org/jira/browse/MJAVADOC-707 > Project: Maven Javadoc Plugin > Issue Type: Bug >Affects Versions: 3.3.1, 3.3.2 >Reporter: Christopher Tubbs >Priority: Critical > > Using Automatic-Module-Name in a manifest (an intermediate step to help > transition to using modules) prevents this plugin from adding the necessary > dependencies to the class path, so it can build javadocs. > maven-compiler-plugin seems to work fine, as does surefire and all the others > when Automatic-Module-Name entries appear in a project's jar manifests. > However, this plugin, as of 3.3.1, still does not work correctly with these. > Instead of using the traditional class path, this plugin seems to force > treating the project as a module, even though it does not have any > module-info.java files, and most of its dependencies have not transitioned to > using modules. > Here's a pull request that demonstrates adding the Automatic-Module-Name to > the manifest for a multi-module (Maven module) project, that fails on the > javadoc plugin: > https://github.com/apache/accumulo/pull/2498 ; both javadoc:aggregate and > javadoc:jar are known to fail. I did not test with any other mojos. > Not supporting this feature holds all projects back from being able to > transition to modules over time. > http://branchandbound.net/blog/java/2017/12/automatic-module-name/ > https://docs.oracle.com/javase/9/docs/api/java/lang/module/ModuleFinder.html#automatic-modules -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Updated] (MJAVADOC-707) Plugin won't work if Automatic-Module-Name is used
[ https://issues.apache.org/jira/browse/MJAVADOC-707?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Christopher Tubbs updated MJAVADOC-707: --- Affects Version/s: 3.3.2 > Plugin won't work if Automatic-Module-Name is used > -- > > Key: MJAVADOC-707 > URL: https://issues.apache.org/jira/browse/MJAVADOC-707 > Project: Maven Javadoc Plugin > Issue Type: Bug >Affects Versions: 3.3.1, 3.3.2 >Reporter: Christopher Tubbs >Priority: Critical > > Using Automatic-Module-Name in a manifest (an intermediate step to help > transition to using modules) prevents this plugin from adding the necessary > dependencies to the class path, so it can build javadocs. > maven-compiler-plugin seems to work fine, as does surefire and all the others > when Automatic-Module-Name entries appear in a project's jar manifests. > However, this plugin, as of 3.3.1, still does not work correctly with these. > Instead of using the traditional class path, this plugin seems to force > treating the project as a module, even though it does not have any > module-info.java files, and most of its dependencies have not transitioned to > using modules. > Here's a pull request that demonstrates adding the Automatic-Module-Name to > the manifest for a multi-module (Maven module) project, that fails on the > javadoc plugin: > https://github.com/apache/accumulo/pull/2498 ; both javadoc:aggregate and > javadoc:jar are known to fail. I did not test with any other mojos. > Not supporting this feature holds all projects back from being able to > transition to modules over time. > http://branchandbound.net/blog/java/2017/12/automatic-module-name/ > https://docs.oracle.com/javase/9/docs/api/java/lang/module/ModuleFinder.html#automatic-modules -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Updated] (SUREFIRE-2070) can not set line.sepator
[ https://issues.apache.org/jira/browse/SUREFIRE-2070?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] pengningjun updated SUREFIRE-2070: -- Description: If we try to set line.separator by {*}systemPropertyVariables{*}, there will be a WARN:[code|https://github.com/apache/maven-surefire/blob/master/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java#L50]。 So I try to set line.separator by *argLine* but finally found '\r' and '\n' is replaced: [code|https://github.com/apache/maven-surefire/blob/f6be3e648938414b222b50907b1db2d6a3cc977b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java#L256] So what is the right way to set line.separator? Any suggestion will be great appreciated! was: If we try to set line.separator by {*}systemPropertyVariables{*}, there will be a WARN:[code|https://github.com/apache/maven-surefire/blob/master/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java#L50]]。 So I try to set line.separator by *argLine* but finally found '\r' and '\n' is replaced: [code|https://github.com/apache/maven-surefire/blob/f6be3e648938414b222b50907b1db2d6a3cc977b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java#L256]] So what is the right way to set line.separator? Any suggestion will be great appreciated! > can not set line.sepator > > > Key: SUREFIRE-2070 > URL: https://issues.apache.org/jira/browse/SUREFIRE-2070 > Project: Maven Surefire > Issue Type: Bug >Reporter: pengningjun >Priority: Minor > > If we try to set line.separator by {*}systemPropertyVariables{*}, there will > be a > WARN:[code|https://github.com/apache/maven-surefire/blob/master/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java#L50]。 > So I try to set line.separator by *argLine* but finally found '\r' and '\n' > is replaced: > [code|https://github.com/apache/maven-surefire/blob/f6be3e648938414b222b50907b1db2d6a3cc977b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java#L256] > So what is the right way to set line.separator? > > Any suggestion will be great appreciated! -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Updated] (SUREFIRE-2070) can not set line.sepator
[ https://issues.apache.org/jira/browse/SUREFIRE-2070?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] pengningjun updated SUREFIRE-2070: -- Description: If we try to set line.separator by {*}systemPropertyVariables{*}, there will be a WARN:[code|https://github.com/apache/maven-surefire/blob/master/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java#L50]]。 So I try to set line.separator by *argLine* but finally found '\r' and '\n' is replaced: [code|https://github.com/apache/maven-surefire/blob/f6be3e648938414b222b50907b1db2d6a3cc977b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java#L256]] So what is the right way to set line.separator? Any suggestion will be great appreciated! was: If we try to set line.separator by {*}systemPropertyVariables{*}, there will be a WARN:[code[|https://github.com/apache/maven-surefire/blob/master/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java#L50]|https://github.com/apache/maven-surefire/blob/master/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java#L50]。 So I try to set line.separator by *argLine* but finally found '\r' and '\n' is replaced: [code[|https://github.com/apache/maven-surefire/blob/f6be3e648938414b222b50907b1db2d6a3cc977b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java#L256]|https://github.com/apache/maven-surefire/blob/f6be3e648938414b222b50907b1db2d6a3cc977b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java#L256] So what is the right way to set line.separator? Any suggestion will be great appreciated! > can not set line.sepator > > > Key: SUREFIRE-2070 > URL: https://issues.apache.org/jira/browse/SUREFIRE-2070 > Project: Maven Surefire > Issue Type: Bug >Reporter: pengningjun >Priority: Minor > > If we try to set line.separator by {*}systemPropertyVariables{*}, there will > be a > WARN:[code|https://github.com/apache/maven-surefire/blob/master/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java#L50]]。 > So I try to set line.separator by *argLine* but finally found '\r' and '\n' > is replaced: > [code|https://github.com/apache/maven-surefire/blob/f6be3e648938414b222b50907b1db2d6a3cc977b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java#L256]] > So what is the right way to set line.separator? > > Any suggestion will be great appreciated! -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Updated] (SUREFIRE-2070) can not set line.sepator
[ https://issues.apache.org/jira/browse/SUREFIRE-2070?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] pengningjun updated SUREFIRE-2070: -- Description: If we try to set line.separator by {*}systemPropertyVariables{*}, there will be a WARN:[code[|https://github.com/apache/maven-surefire/blob/master/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java#L50]|https://github.com/apache/maven-surefire/blob/master/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java#L50]。 So I try to set line.separator by *argLine* but finally found '\r' and '\n' is replaced: [code[|https://github.com/apache/maven-surefire/blob/f6be3e648938414b222b50907b1db2d6a3cc977b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java#L256]|https://github.com/apache/maven-surefire/blob/f6be3e648938414b222b50907b1db2d6a3cc977b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java#L256] So what is the right way to set line.separator? Any suggestion will be great appreciated! was: If we try to set line.separator by {*}systemPropertyVariables{*}, this will be a WARN:[code]([https://github.com/apache/maven-surefire/blob/master/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java#L50])。 So I try to set line.separator by *argLine* but finally found '\r' and '\n' is replaced: [code]([https://github.com/apache/maven-surefire/blob/f6be3e648938414b222b50907b1db2d6a3cc977b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java#L256]) So what is the right way to set line.separator? Any suggestion will be great appreciated! > can not set line.sepator > > > Key: SUREFIRE-2070 > URL: https://issues.apache.org/jira/browse/SUREFIRE-2070 > Project: Maven Surefire > Issue Type: Bug >Reporter: pengningjun >Priority: Minor > > If we try to set line.separator by {*}systemPropertyVariables{*}, there will > be a > WARN:[code[|https://github.com/apache/maven-surefire/blob/master/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java#L50]|https://github.com/apache/maven-surefire/blob/master/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java#L50]。 > So I try to set line.separator by *argLine* but finally found '\r' and '\n' > is replaced: > [code[|https://github.com/apache/maven-surefire/blob/f6be3e648938414b222b50907b1db2d6a3cc977b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java#L256]|https://github.com/apache/maven-surefire/blob/f6be3e648938414b222b50907b1db2d6a3cc977b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java#L256] > So what is the right way to set line.separator? > > Any suggestion will be great appreciated! -- This message was sent by Atlassian Jira (v8.20.1#820001)
[GitHub] [maven-surefire] Tibor17 commented on a diff in pull request #517: [SUREFIRE-2064] Allow all supported values of [parallel] option
Tibor17 commented on code in PR #517: URL: https://github.com/apache/maven-surefire/pull/517#discussion_r847792019 ## surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNG740Configurator.java: ## @@ -37,33 +36,59 @@ * * @since 3.0.0-M6 */ -public class TestNG740Configurator extends TestNG60Configurator +public class TestNG740Configurator +extends TestNG60Configurator { @Override -public void configure( XmlSuite suite, Map options ) +protected void configureThreadCount( XmlSuite suite, Map options ) throws TestSetFailedException { -String threadCountAsString = options.get( THREADCOUNT_PROP ); -int threadCount = threadCountAsString == null ? 1 : parseInt( threadCountAsString ); -suite.setThreadCount( threadCount ); - -String parallel = options.get( PARALLEL_PROP ); -if ( parallel != null ) +String threadCount = options.get( THREADCOUNT_PROP ); +// if [threadcount] spec'd +if ( threadCount != null ) { -if ( !"methods".equalsIgnoreCase( parallel ) && !"classes".equalsIgnoreCase( parallel ) ) +try { -throw new TestSetFailedException( "Unsupported TestNG parallel setting: " -+ parallel + " ( only METHODS or CLASSES supported )" ); +// convert and apply [threadcount] setting +suite.setThreadCount( Integer.parseInt( threadCount ) ); +} +catch ( NumberFormatException e ) +{ +throw new TestSetFailedException( "Non-integer TestNG [threadcount] setting: " + threadCount, e ); } -Class enumClass = tryLoadClass( XmlSuite.class.getClassLoader(), "org.testng.xml.XmlSuite$ParallelMode" ); -Enum parallelEnum = Enum.valueOf( enumClass, parallel.toUpperCase() ); -invokeSetter( suite, "setParallel", enumClass, parallelEnum ); } - -String dataProviderThreadCount = options.get( "dataproviderthreadcount" ); -if ( dataProviderThreadCount != null ) +} + +@Override +protected void configureParallel( XmlSuite suite, Map options ) +throws TestSetFailedException +{ +String parallel = options.get( PARALLEL_PROP ); +// if [parallel] spec'd +if ( parallel != null ) { -suite.setDataProviderThreadCount( Integer.parseInt( dataProviderThreadCount ) ); +// try to load the [ParallelMode] enumeration +Class enumClass = tryLoadClass( XmlSuite.class.getClassLoader(), "org.testng.xml.XmlSuite$ParallelMode" ); +// if enumeration loaded +if ( enumClass != null ) +{ +try +{ +// convert [parallel] option to corresponding constant +Enum parallelEnum = Enum.valueOf( enumClass, parallel.toUpperCase() ); +// set [XmlSuite] parallel mode to specified value +invokeSetter( suite, "setParallel", enumClass, parallelEnum ); Review Comment: We are in the right version with this class. We do not expect null `enumClass`. The null check `if ( enumClass != null )` is hiding a future bug - we would not notice the bug. If we get NPE due to the guys in TestNg team broke backwards compatibility again, we would immediately notice it with NPE. -- 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-surefire] Tibor17 commented on a diff in pull request #517: [SUREFIRE-2064] Allow all supported values of [parallel] option
Tibor17 commented on code in PR #517: URL: https://github.com/apache/maven-surefire/pull/517#discussion_r847792019 ## surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNG740Configurator.java: ## @@ -37,33 +36,59 @@ * * @since 3.0.0-M6 */ -public class TestNG740Configurator extends TestNG60Configurator +public class TestNG740Configurator +extends TestNG60Configurator { @Override -public void configure( XmlSuite suite, Map options ) +protected void configureThreadCount( XmlSuite suite, Map options ) throws TestSetFailedException { -String threadCountAsString = options.get( THREADCOUNT_PROP ); -int threadCount = threadCountAsString == null ? 1 : parseInt( threadCountAsString ); -suite.setThreadCount( threadCount ); - -String parallel = options.get( PARALLEL_PROP ); -if ( parallel != null ) +String threadCount = options.get( THREADCOUNT_PROP ); +// if [threadcount] spec'd +if ( threadCount != null ) { -if ( !"methods".equalsIgnoreCase( parallel ) && !"classes".equalsIgnoreCase( parallel ) ) +try { -throw new TestSetFailedException( "Unsupported TestNG parallel setting: " -+ parallel + " ( only METHODS or CLASSES supported )" ); +// convert and apply [threadcount] setting +suite.setThreadCount( Integer.parseInt( threadCount ) ); +} +catch ( NumberFormatException e ) +{ +throw new TestSetFailedException( "Non-integer TestNG [threadcount] setting: " + threadCount, e ); } -Class enumClass = tryLoadClass( XmlSuite.class.getClassLoader(), "org.testng.xml.XmlSuite$ParallelMode" ); -Enum parallelEnum = Enum.valueOf( enumClass, parallel.toUpperCase() ); -invokeSetter( suite, "setParallel", enumClass, parallelEnum ); } - -String dataProviderThreadCount = options.get( "dataproviderthreadcount" ); -if ( dataProviderThreadCount != null ) +} + +@Override +protected void configureParallel( XmlSuite suite, Map options ) +throws TestSetFailedException +{ +String parallel = options.get( PARALLEL_PROP ); +// if [parallel] spec'd +if ( parallel != null ) { -suite.setDataProviderThreadCount( Integer.parseInt( dataProviderThreadCount ) ); +// try to load the [ParallelMode] enumeration +Class enumClass = tryLoadClass( XmlSuite.class.getClassLoader(), "org.testng.xml.XmlSuite$ParallelMode" ); +// if enumeration loaded +if ( enumClass != null ) +{ +try +{ +// convert [parallel] option to corresponding constant +Enum parallelEnum = Enum.valueOf( enumClass, parallel.toUpperCase() ); +// set [XmlSuite] parallel mode to specified value +invokeSetter( suite, "setParallel", enumClass, parallelEnum ); Review Comment: We are in the right version with this class. We do not expect null `enumClass`. The null check `if ( enumClass != null )` is hiding a future bug - we would not notice the bug. If we get NPE due to the guys in TestNg team broke backwards compatibility again, we would immediately notice that with NPE. -- 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-surefire] Tibor17 commented on a diff in pull request #517: [SUREFIRE-2064] Allow all supported values of [parallel] option
Tibor17 commented on code in PR #517: URL: https://github.com/apache/maven-surefire/pull/517#discussion_r847792019 ## surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNG740Configurator.java: ## @@ -37,33 +36,59 @@ * * @since 3.0.0-M6 */ -public class TestNG740Configurator extends TestNG60Configurator +public class TestNG740Configurator +extends TestNG60Configurator { @Override -public void configure( XmlSuite suite, Map options ) +protected void configureThreadCount( XmlSuite suite, Map options ) throws TestSetFailedException { -String threadCountAsString = options.get( THREADCOUNT_PROP ); -int threadCount = threadCountAsString == null ? 1 : parseInt( threadCountAsString ); -suite.setThreadCount( threadCount ); - -String parallel = options.get( PARALLEL_PROP ); -if ( parallel != null ) +String threadCount = options.get( THREADCOUNT_PROP ); +// if [threadcount] spec'd +if ( threadCount != null ) { -if ( !"methods".equalsIgnoreCase( parallel ) && !"classes".equalsIgnoreCase( parallel ) ) +try { -throw new TestSetFailedException( "Unsupported TestNG parallel setting: " -+ parallel + " ( only METHODS or CLASSES supported )" ); +// convert and apply [threadcount] setting +suite.setThreadCount( Integer.parseInt( threadCount ) ); +} +catch ( NumberFormatException e ) +{ +throw new TestSetFailedException( "Non-integer TestNG [threadcount] setting: " + threadCount, e ); } -Class enumClass = tryLoadClass( XmlSuite.class.getClassLoader(), "org.testng.xml.XmlSuite$ParallelMode" ); -Enum parallelEnum = Enum.valueOf( enumClass, parallel.toUpperCase() ); -invokeSetter( suite, "setParallel", enumClass, parallelEnum ); } - -String dataProviderThreadCount = options.get( "dataproviderthreadcount" ); -if ( dataProviderThreadCount != null ) +} + +@Override +protected void configureParallel( XmlSuite suite, Map options ) +throws TestSetFailedException +{ +String parallel = options.get( PARALLEL_PROP ); +// if [parallel] spec'd +if ( parallel != null ) { -suite.setDataProviderThreadCount( Integer.parseInt( dataProviderThreadCount ) ); +// try to load the [ParallelMode] enumeration +Class enumClass = tryLoadClass( XmlSuite.class.getClassLoader(), "org.testng.xml.XmlSuite$ParallelMode" ); +// if enumeration loaded +if ( enumClass != null ) +{ +try +{ +// convert [parallel] option to corresponding constant +Enum parallelEnum = Enum.valueOf( enumClass, parallel.toUpperCase() ); +// set [XmlSuite] parallel mode to specified value +invokeSetter( suite, "setParallel", enumClass, parallelEnum ); Review Comment: We are in the right version with this class. We do not expect null `enumClass`. The null check `if ( enumClass != null )` is hiding a future bug - we would not notice the bug. If we get NPE due to the guys in TestNg team broke backwards compatibility again, we would immediately notice with NPE. -- 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-surefire] Tibor17 commented on a diff in pull request #517: [SUREFIRE-2064] Allow all supported values of [parallel] option
Tibor17 commented on code in PR #517: URL: https://github.com/apache/maven-surefire/pull/517#discussion_r847792381 ## surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNG740Configurator.java: ## @@ -37,33 +36,59 @@ * * @since 3.0.0-M6 */ -public class TestNG740Configurator extends TestNG60Configurator +public class TestNG740Configurator +extends TestNG60Configurator { @Override -public void configure( XmlSuite suite, Map options ) +protected void configureThreadCount( XmlSuite suite, Map options ) throws TestSetFailedException { -String threadCountAsString = options.get( THREADCOUNT_PROP ); -int threadCount = threadCountAsString == null ? 1 : parseInt( threadCountAsString ); -suite.setThreadCount( threadCount ); - -String parallel = options.get( PARALLEL_PROP ); -if ( parallel != null ) +String threadCount = options.get( THREADCOUNT_PROP ); +// if [threadcount] spec'd +if ( threadCount != null ) { -if ( !"methods".equalsIgnoreCase( parallel ) && !"classes".equalsIgnoreCase( parallel ) ) +try { -throw new TestSetFailedException( "Unsupported TestNG parallel setting: " -+ parallel + " ( only METHODS or CLASSES supported )" ); +// convert and apply [threadcount] setting +suite.setThreadCount( Integer.parseInt( threadCount ) ); +} +catch ( NumberFormatException e ) +{ +throw new TestSetFailedException( "Non-integer TestNG [threadcount] setting: " + threadCount, e ); } -Class enumClass = tryLoadClass( XmlSuite.class.getClassLoader(), "org.testng.xml.XmlSuite$ParallelMode" ); -Enum parallelEnum = Enum.valueOf( enumClass, parallel.toUpperCase() ); -invokeSetter( suite, "setParallel", enumClass, parallelEnum ); } - -String dataProviderThreadCount = options.get( "dataproviderthreadcount" ); -if ( dataProviderThreadCount != null ) +} + +@Override +protected void configureParallel( XmlSuite suite, Map options ) +throws TestSetFailedException +{ +String parallel = options.get( PARALLEL_PROP ); +// if [parallel] spec'd +if ( parallel != null ) { -suite.setDataProviderThreadCount( Integer.parseInt( dataProviderThreadCount ) ); +// try to load the [ParallelMode] enumeration +Class enumClass = tryLoadClass( XmlSuite.class.getClassLoader(), "org.testng.xml.XmlSuite$ParallelMode" ); +// if enumeration loaded +if ( enumClass != null ) +{ +try +{ +// convert [parallel] option to corresponding constant +Enum parallelEnum = Enum.valueOf( enumClass, parallel.toUpperCase() ); +// set [XmlSuite] parallel mode to specified value +invokeSetter( suite, "setParallel", enumClass, parallelEnum ); Review Comment: I guess `org.testng.xml.XmlSuite$ParallelMode` should be FQN `org.testng.xml.XmlSuite.ParallelMode`. -- 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-surefire] Tibor17 commented on a diff in pull request #517: [SUREFIRE-2064] Allow all supported values of [parallel] option
Tibor17 commented on code in PR #517: URL: https://github.com/apache/maven-surefire/pull/517#discussion_r847792019 ## surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNG740Configurator.java: ## @@ -37,33 +36,59 @@ * * @since 3.0.0-M6 */ -public class TestNG740Configurator extends TestNG60Configurator +public class TestNG740Configurator +extends TestNG60Configurator { @Override -public void configure( XmlSuite suite, Map options ) +protected void configureThreadCount( XmlSuite suite, Map options ) throws TestSetFailedException { -String threadCountAsString = options.get( THREADCOUNT_PROP ); -int threadCount = threadCountAsString == null ? 1 : parseInt( threadCountAsString ); -suite.setThreadCount( threadCount ); - -String parallel = options.get( PARALLEL_PROP ); -if ( parallel != null ) +String threadCount = options.get( THREADCOUNT_PROP ); +// if [threadcount] spec'd +if ( threadCount != null ) { -if ( !"methods".equalsIgnoreCase( parallel ) && !"classes".equalsIgnoreCase( parallel ) ) +try { -throw new TestSetFailedException( "Unsupported TestNG parallel setting: " -+ parallel + " ( only METHODS or CLASSES supported )" ); +// convert and apply [threadcount] setting +suite.setThreadCount( Integer.parseInt( threadCount ) ); +} +catch ( NumberFormatException e ) +{ +throw new TestSetFailedException( "Non-integer TestNG [threadcount] setting: " + threadCount, e ); } -Class enumClass = tryLoadClass( XmlSuite.class.getClassLoader(), "org.testng.xml.XmlSuite$ParallelMode" ); -Enum parallelEnum = Enum.valueOf( enumClass, parallel.toUpperCase() ); -invokeSetter( suite, "setParallel", enumClass, parallelEnum ); } - -String dataProviderThreadCount = options.get( "dataproviderthreadcount" ); -if ( dataProviderThreadCount != null ) +} + +@Override +protected void configureParallel( XmlSuite suite, Map options ) +throws TestSetFailedException +{ +String parallel = options.get( PARALLEL_PROP ); +// if [parallel] spec'd +if ( parallel != null ) { -suite.setDataProviderThreadCount( Integer.parseInt( dataProviderThreadCount ) ); +// try to load the [ParallelMode] enumeration +Class enumClass = tryLoadClass( XmlSuite.class.getClassLoader(), "org.testng.xml.XmlSuite$ParallelMode" ); +// if enumeration loaded +if ( enumClass != null ) +{ +try +{ +// convert [parallel] option to corresponding constant +Enum parallelEnum = Enum.valueOf( enumClass, parallel.toUpperCase() ); +// set [XmlSuite] parallel mode to specified value +invokeSetter( suite, "setParallel", enumClass, parallelEnum ); Review Comment: We are in the right version with this class. We do not expect null `enumClass`. The null check `if ( enumClass != null )` is hiding a future bug - we would not notice the bug. If we get NPE, we would immediately see it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Created] (MNG-7457) Logs warnings about deprecated plugin Mojo
Slawomir Jaranowski created MNG-7457: Summary: Logs warnings about deprecated plugin Mojo Key: MNG-7457 URL: https://issues.apache.org/jira/browse/MNG-7457 Project: Maven Issue Type: Improvement Reporter: Slawomir Jaranowski Plugin Mojo can be marked as deprecated by author. Maven should log warnings if deprecated Mojo is used in build plan. -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Created] (MPLUGIN-396) Allow only @Deprecated annotation without @deprecated javadoc tag
Slawomir Jaranowski created MPLUGIN-396: --- Summary: Allow only @Deprecated annotation without @deprecated javadoc tag Key: MPLUGIN-396 URL: https://issues.apache.org/jira/browse/MPLUGIN-396 Project: Maven Plugin Tools Issue Type: Improvement Reporter: Slawomir Jaranowski Currently to effective deprecate Mojo parameters we must define both {{@Deprecated}} annotation and {{@deprecated}} javadoc tag. Definition must be: {code:java} /** * A parameter description * * @deprecated */ @Deprecated @Parameter private String param; {code} should be allowed as: {code:java} @Deprecated @Parameter private String param; {code} -- This message was sent by Atlassian Jira (v8.20.1#820001)
[GitHub] [maven-surefire] zoltanmeze commented on a diff in pull request #518: [SUREFIRE-2058] - Corrupted STDOUT by directly writing to native stream in forked JVM 1 with UTF-8 console logging
zoltanmeze commented on code in PR #518: URL: https://github.com/apache/maven-surefire/pull/518#discussion_r847728655 ## surefire-api/src/test/java/org/apache/maven/surefire/api/stream/AbstractStreamDecoderTest.java: ## @@ -258,6 +258,56 @@ public void shouldReadString() throws Exception .isEqualTo( "0123456789" ); } +@Test +public void shouldReadStringOverflowOnNewLine() throws Exception +{ +StringBuilder s = new StringBuilder( 1025 ); +for ( int i = 0; i < 10; i++ ) +{ +s.append( PATTERN1 ); +} +s.append( PATTERN1, 0, 23 ); +s.append( "\u00FA\n" ); // 2-bytes encoded character + LF + +Channel channel = new Channel( s.toString().getBytes( UTF_8 ), s.length() ); + +Mock thread = new Mock( channel, new MockForkNodeArguments(), +Collections.emptyMap() ); + +Memento memento = thread.new Memento(); + +assertThat( (String) invokeMethod( thread, "readString", memento, 1026 ) ) +.isEqualTo( s.toString() ); + +assertThat ( memento.getByteBuffer().remaining() ) +.isEqualTo( 0 ); +} + +@Test +public void shouldReadStringOverflowOn4BytesEncodedSymbol() throws Exception +{ +StringBuilder s = new StringBuilder( 1024 ); Review Comment: Just realized this should be 1025 here, 😵 (`"\uD83D\uDE35"`) is actually counted as 2 characters. Do you want me to change this or just leave StringBuilder to increase the capacity on it's own? -- 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-javadoc-plugin] pzygielo commented on pull request #127: [MJAVADOC-710] Break the build if replaced or removed property is used
pzygielo commented on PR #127: URL: https://github.com/apache/maven-javadoc-plugin/pull/127#issuecomment-1095539912 May I ask for review, please? -- 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-surefire] slawekjaranowski commented on a diff in pull request #517: [SUREFIRE-2064] Allow all supported values of [parallel] option
slawekjaranowski commented on code in PR #517: URL: https://github.com/apache/maven-surefire/pull/517#discussion_r847708733 ## surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNG740Configurator.java: ## @@ -37,33 +36,59 @@ * * @since 3.0.0-M6 */ -public class TestNG740Configurator extends TestNG60Configurator +public class TestNG740Configurator +extends TestNG60Configurator { @Override -public void configure( XmlSuite suite, Map options ) +protected void configureThreadCount( XmlSuite suite, Map options ) throws TestSetFailedException { -String threadCountAsString = options.get( THREADCOUNT_PROP ); -int threadCount = threadCountAsString == null ? 1 : parseInt( threadCountAsString ); -suite.setThreadCount( threadCount ); - -String parallel = options.get( PARALLEL_PROP ); -if ( parallel != null ) +String threadCount = options.get( THREADCOUNT_PROP ); +// if [threadcount] spec'd +if ( threadCount != null ) { -if ( !"methods".equalsIgnoreCase( parallel ) && !"classes".equalsIgnoreCase( parallel ) ) +try { -throw new TestSetFailedException( "Unsupported TestNG parallel setting: " -+ parallel + " ( only METHODS or CLASSES supported )" ); +// convert and apply [threadcount] setting +suite.setThreadCount( Integer.parseInt( threadCount ) ); +} +catch ( NumberFormatException e ) +{ +throw new TestSetFailedException( "Non-integer TestNG [threadcount] setting: " + threadCount, e ); } -Class enumClass = tryLoadClass( XmlSuite.class.getClassLoader(), "org.testng.xml.XmlSuite$ParallelMode" ); -Enum parallelEnum = Enum.valueOf( enumClass, parallel.toUpperCase() ); -invokeSetter( suite, "setParallel", enumClass, parallelEnum ); } - -String dataProviderThreadCount = options.get( "dataproviderthreadcount" ); -if ( dataProviderThreadCount != null ) +} + +@Override +protected void configureParallel( XmlSuite suite, Map options ) +throws TestSetFailedException +{ +String parallel = options.get( PARALLEL_PROP ); +// if [parallel] spec'd +if ( parallel != null ) { -suite.setDataProviderThreadCount( Integer.parseInt( dataProviderThreadCount ) ); +// try to load the [ParallelMode] enumeration +Class enumClass = tryLoadClass( XmlSuite.class.getClassLoader(), "org.testng.xml.XmlSuite$ParallelMode" ); +// if enumeration loaded +if ( enumClass != null ) +{ +try +{ +// convert [parallel] option to corresponding constant +Enum parallelEnum = Enum.valueOf( enumClass, parallel.toUpperCase() ); +// set [XmlSuite] parallel mode to specified value +invokeSetter( suite, "setParallel", enumClass, parallelEnum ); Review Comment: Pleas add in comments version of TestNG which contains such enum and method `setParallel(Enum ...)` We want to drop some of old TestNG, so maybe reflection would be 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-surefire] zoltanmeze commented on pull request #518: [SUREFIRE-2058] - Corrupted STDOUT by directly writing to native stream in forked JVM 1 with UTF-8 console logging
zoltanmeze commented on PR #518: URL: https://github.com/apache/maven-surefire/pull/518#issuecomment-1095528603 I believe it it a different issue, not throwing any `BufferOverflowException`. `CharsetDecoder#decode` in [decodeString call (here)](https://github.com/apache/maven-surefire/blob/master/surefire-api/src/main/java/org/apache/maven/surefire/api/stream/AbstractStreamDecoder.java#L322) results in overflow when there is not enough space left in the output char buffer. And output buffer is not cleared because the `!output.hasRemaining()` condition. Clearing after each chunk ensures underflow in `decodeString`, so it has always enough space to write decoded string into the the output buffer. You can verify this with the two included unit tests. Test method naming is probably not the best, in the first it doesn't needs to be a new line character after a 2-bytes encoded character, it can be anything else. -- 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-7455) IllegalStateException in SessionScope during guice injection in multithreaded build
[ https://issues.apache.org/jira/browse/MNG-7455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17520789#comment-17520789 ] Abel Salgado Romero commented on MNG-7455: -- Hapy to help, b ut to speed this up: * [~papegaaij] can you provide some reproducer? by multithread you mean parallel in https://cwiki.apache.org/confluence/display/MAVEN/Parallel+builds+in+Maven+3 ? Are you running multiple asciidoctor plugins in different modules? * [~michael-o] we directly inject the Sessin with @Inject https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/0aa5121249890c5db7c78b7c82e2ad387f38719e/src/main/java/org/asciidoctor/maven/AsciidoctorMojo.java#L142-L143. Would it be recommended to use Provider instead? > IllegalStateException in SessionScope during guice injection in multithreaded > build > --- > > Key: MNG-7455 > URL: https://issues.apache.org/jira/browse/MNG-7455 > Project: Maven > Issue Type: Bug > Components: Core >Affects Versions: 3.8.5 >Reporter: Emond Papegaaij >Priority: Major > > Since Maven 3.8.5 we are seeing intermittent failures with the stacktrace > below. With 3.8.4 we did not have this issue. Looking at the changelog I > suspect this regression is caused by MNG-7347. > {code:java} > 09:36:53 [mvn-builder-keyhub-manual] [INFO] --- > asciidoctor-maven-plugin:2.2.2:process-asciidoc (output-html-nl) @ > keyhub-manual --- > 09:36:53 [mvn-builder-keyhub-manual] [WARNING] Error injecting: > org.asciidoctor.maven.AsciidoctorMojo > com.google.inject.ProvisionException: Unable to provision, see the following > errors: > 1) Error in custom provider, java.lang.IllegalStateException > at > org.apache.maven.session.scope.internal.SessionScopeModule.configure(SessionScopeModule.java:64) > (via modules: org.eclipse.sisu.wire.WireModule -> > org.apache.maven.session.scope.internal.SessionScopeModule) > while locating org.apache.maven.execution.MavenSession > for field at org.asciidoctor.maven.AsciidoctorMojo.session(Unknown Source) > while locating org.asciidoctor.maven.AsciidoctorMojo > 1 error > at > com.google.inject.internal.InternalProvisionException.toProvisionException > (InternalProvisionException.java:226) > at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1053) > at com.google.inject.internal.InjectorImpl.getInstance > (InjectorImpl.java:1086) > at org.eclipse.sisu.space.AbstractDeferredClass.get > (AbstractDeferredClass.java:48) > at com.google.inject.internal.ProviderInternalFactory.provision > (ProviderInternalFactory.java:85) > at > com.google.inject.internal.InternalFactoryToInitializableAdapter.provision > (InternalFactoryToInitializableAdapter.java:57) > at com.google.inject.internal.ProviderInternalFactory$1.call > (ProviderInternalFactory.java:66) > at > com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision > (ProvisionListenerStackCallback.java:112) > at > com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision > (ProvisionListenerStackCallback.java:127) > at com.google.inject.internal.ProvisionListenerStackCallback.provision > (ProvisionListenerStackCallback.java:66) > at com.google.inject.internal.ProviderInternalFactory.circularGet > (ProviderInternalFactory.java:61) > at com.google.inject.internal.InternalFactoryToInitializableAdapter.get > (InternalFactoryToInitializableAdapter.java:47) > at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1050) > at org.eclipse.sisu.inject.Guice4$1.get (Guice4.java:162) > at org.eclipse.sisu.inject.LazyBeanEntry.getValue (LazyBeanEntry.java:81) > at org.eclipse.sisu.plexus.LazyPlexusBean.getValue > (LazyPlexusBean.java:51) > at org.codehaus.plexus.DefaultPlexusContainer.lookup > (DefaultPlexusContainer.java:263) > at org.codehaus.plexus.DefaultPlexusContainer.lookup > (DefaultPlexusContainer.java:255) > at > org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo > (DefaultMavenPluginManager.java:520) > at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo > (DefaultBuildPluginManager.java:124) > at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute > (MojoExecutor.java:301) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:211) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:165) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:157) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:121) > at > org.apache.maven.lifecycle.internal.builder.multithreaded.Multi
[GitHub] [maven-surefire] Tibor17 commented on pull request #518: [SUREFIRE-2058] - Corrupted STDOUT by directly writing to native stream in forked JVM 1 with UTF-8 console logging
Tibor17 commented on PR #518: URL: https://github.com/apache/maven-surefire/pull/518#issuecomment-1095498879 Hi @zoltanmeze , we fixed buffer overflow in https://github.com/apache/maven-surefire/commit/8e301949173f20971c288484e5711b5496e5df49 This is different buffer overflow? The changes in the algorithm must be reviewed very carefully. Let me check it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Assigned] (MRESOLVER-249) Update Hazelcast in named-locks-hazelcast module
[ https://issues.apache.org/jira/browse/MRESOLVER-249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tamás Cservenák reassigned MRESOLVER-249: - Assignee: Tamás Cservenák > Update Hazelcast in named-locks-hazelcast module > > > Key: MRESOLVER-249 > URL: https://issues.apache.org/jira/browse/MRESOLVER-249 > Project: Maven Resolver > Issue Type: Dependency upgrade >Reporter: Tamás Cservenák >Assignee: Tamás Cservenák >Priority: Major > Fix For: 1.8.0 > > -- This message was sent by Atlassian Jira (v8.20.1#820001)
[GitHub] [maven-resolver] cstamas opened a new pull request, #164: [MRESOLVER-249] Update Hazelcast
cstamas opened a new pull request, #164: URL: https://github.com/apache/maven-resolver/pull/164 Update Hazelcast from 5.0.2 to latest 5.1.1. This is really not a game changes, as Hazelcast 5.x is binary compatible, so end users may choose which version to use for real. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Created] (MRESOLVER-249) Update Hazelcast in named-locks-hazelcast module
Tamás Cservenák created MRESOLVER-249: - Summary: Update Hazelcast in named-locks-hazelcast module Key: MRESOLVER-249 URL: https://issues.apache.org/jira/browse/MRESOLVER-249 Project: Maven Resolver Issue Type: Dependency upgrade Reporter: Tamás Cservenák Fix For: 1.8.0 -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (SUREFIRE-2061) BLOCKED in surefire-forkedjvm-stream-flusher
[ https://issues.apache.org/jira/browse/SUREFIRE-2061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17520762#comment-17520762 ] Zoltan Meze commented on SUREFIRE-2061: --- [~sjaranowski] this looks like the same issue as https://issues.apache.org/jira/browse/SUREFIRE-2058 (second case with infinite loop) > BLOCKED in surefire-forkedjvm-stream-flusher > > > Key: SUREFIRE-2061 > URL: https://issues.apache.org/jira/browse/SUREFIRE-2061 > Project: Maven Surefire > Issue Type: Bug >Affects Versions: 3.0.0-M6 >Reporter: Slawomir Jaranowski >Assignee: Tibor Digana >Priority: Major > Fix For: 3.0.0-M7 > > > From time to time test execution is hung up - wait forever ... > Now I can't reproduce it, test rerun fix it. > The stack is: > {code} > 2022-04-06 13:59:05 > Full thread dump OpenJDK 64-Bit Server VM (25.322-b00 mixed mode): > "Attach Listener" #16 daemon prio=9 os_prio=31 tid=0x7fe48036a000 > nid=0x380b waiting on condition [0x] >java.lang.Thread.State: RUNNABLE > "surefire-forkedjvm-command-thread" #12 daemon prio=5 os_prio=31 > tid=0x7fe504a5c000 nid=0xa803 runnable [0x7db43000] >java.lang.Thread.State: RUNNABLE > at java.io.FileInputStream.readBytes(Native Method) > at java.io.FileInputStream.read(FileInputStream.java:255) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:284) > at java.io.BufferedInputStream.read(BufferedInputStream.java:345) > - locked <0x0005c000ccb0> (a java.io.BufferedInputStream) > at java.io.BufferedInputStream.fill(BufferedInputStream.java:246) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:286) > at java.io.BufferedInputStream.read(BufferedInputStream.java:345) > - locked <0x0005c000ccd8> (a java.io.BufferedInputStream) > at > org.apache.maven.surefire.api.util.internal.Channels$3.readImpl(Channels.java:217) > at > org.apache.maven.surefire.api.util.internal.AbstractNoninterruptibleReadableChannel.read(AbstractNoninterruptibleReadableChannel.java:54) > at > org.apache.maven.surefire.api.stream.AbstractStreamDecoder.read(AbstractStreamDecoder.java:487) > at > org.apache.maven.surefire.api.stream.AbstractStreamDecoder.read(AbstractStreamDecoder.java:473) > at > org.apache.maven.surefire.api.stream.AbstractStreamDecoder.readMessageType(AbstractStreamDecoder.java:118) > at > org.apache.maven.surefire.booter.stream.CommandDecoder.decode(CommandDecoder.java:87) > at > org.apache.maven.surefire.booter.spi.CommandChannelDecoder.decode(CommandChannelDecoder.java:67) > at > org.apache.maven.surefire.booter.CommandReader$CommandRunnable.run(CommandReader.java:345) > at java.lang.Thread.run(Thread.java:750) > "surefire-forkedjvm-stream-flusher" #10 daemon prio=5 os_prio=31 > tid=0x7fe500969000 nid=0xa903 waiting for monitor entry > [0x7da4] >java.lang.Thread.State: BLOCKED (on object monitor) > at java.io.BufferedOutputStream.write(BufferedOutputStream.java:117) > - waiting to lock <0x0005c000d498> (a java.io.BufferedOutputStream) > at > org.apache.maven.surefire.api.util.internal.Channels$4.writeImpl(Channels.java:253) > at > org.apache.maven.surefire.api.util.internal.AbstractNoninterruptibleWritableChannel.write(AbstractNoninterruptibleWritableChannel.java:72) > at > org.apache.maven.surefire.api.util.internal.AbstractNoninterruptibleWritableChannel.write(AbstractNoninterruptibleWritableChannel.java:45) > at > org.apache.maven.surefire.booter.spi.AbstractMasterProcessChannelProcessorFactory$1.run(AbstractMasterProcessChannelProcessorFactory.java:65) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) > at java.lang.Thread.run(Thread.java:750) > "Service Thread" #9 daemon prio=9 os_prio=31 tid=0x7fe50003a800 > nid=0x5603 runnable [0x] >java.lang.Thread.State: RUNNABLE > "C1 CompilerThread3" #8 daemon prio=9 os_prio=31 tid=0x7fe50001f800 > nid=0x3f03 waiting on condition [0x] >java.lang.Thread.State: RUNNABLE > "C2 CompilerThread2" #7 daemon prio=9 os_prio=31 tid=0x7fe5e800 > nid=0x4103 w
[jira] [Commented] (SUREFIRE-2061) BLOCKED in surefire-forkedjvm-stream-flusher
[ https://issues.apache.org/jira/browse/SUREFIRE-2061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17520758#comment-17520758 ] Slawomir Jaranowski commented on SUREFIRE-2061: --- Test can output string produced by: {code} org.apache.commons.lang3.RandomStringUtils.random(9193) {code} > BLOCKED in surefire-forkedjvm-stream-flusher > > > Key: SUREFIRE-2061 > URL: https://issues.apache.org/jira/browse/SUREFIRE-2061 > Project: Maven Surefire > Issue Type: Bug >Affects Versions: 3.0.0-M6 >Reporter: Slawomir Jaranowski >Assignee: Tibor Digana >Priority: Major > Fix For: 3.0.0-M7 > > > From time to time test execution is hung up - wait forever ... > Now I can't reproduce it, test rerun fix it. > The stack is: > {code} > 2022-04-06 13:59:05 > Full thread dump OpenJDK 64-Bit Server VM (25.322-b00 mixed mode): > "Attach Listener" #16 daemon prio=9 os_prio=31 tid=0x7fe48036a000 > nid=0x380b waiting on condition [0x] >java.lang.Thread.State: RUNNABLE > "surefire-forkedjvm-command-thread" #12 daemon prio=5 os_prio=31 > tid=0x7fe504a5c000 nid=0xa803 runnable [0x7db43000] >java.lang.Thread.State: RUNNABLE > at java.io.FileInputStream.readBytes(Native Method) > at java.io.FileInputStream.read(FileInputStream.java:255) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:284) > at java.io.BufferedInputStream.read(BufferedInputStream.java:345) > - locked <0x0005c000ccb0> (a java.io.BufferedInputStream) > at java.io.BufferedInputStream.fill(BufferedInputStream.java:246) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:286) > at java.io.BufferedInputStream.read(BufferedInputStream.java:345) > - locked <0x0005c000ccd8> (a java.io.BufferedInputStream) > at > org.apache.maven.surefire.api.util.internal.Channels$3.readImpl(Channels.java:217) > at > org.apache.maven.surefire.api.util.internal.AbstractNoninterruptibleReadableChannel.read(AbstractNoninterruptibleReadableChannel.java:54) > at > org.apache.maven.surefire.api.stream.AbstractStreamDecoder.read(AbstractStreamDecoder.java:487) > at > org.apache.maven.surefire.api.stream.AbstractStreamDecoder.read(AbstractStreamDecoder.java:473) > at > org.apache.maven.surefire.api.stream.AbstractStreamDecoder.readMessageType(AbstractStreamDecoder.java:118) > at > org.apache.maven.surefire.booter.stream.CommandDecoder.decode(CommandDecoder.java:87) > at > org.apache.maven.surefire.booter.spi.CommandChannelDecoder.decode(CommandChannelDecoder.java:67) > at > org.apache.maven.surefire.booter.CommandReader$CommandRunnable.run(CommandReader.java:345) > at java.lang.Thread.run(Thread.java:750) > "surefire-forkedjvm-stream-flusher" #10 daemon prio=5 os_prio=31 > tid=0x7fe500969000 nid=0xa903 waiting for monitor entry > [0x7da4] >java.lang.Thread.State: BLOCKED (on object monitor) > at java.io.BufferedOutputStream.write(BufferedOutputStream.java:117) > - waiting to lock <0x0005c000d498> (a java.io.BufferedOutputStream) > at > org.apache.maven.surefire.api.util.internal.Channels$4.writeImpl(Channels.java:253) > at > org.apache.maven.surefire.api.util.internal.AbstractNoninterruptibleWritableChannel.write(AbstractNoninterruptibleWritableChannel.java:72) > at > org.apache.maven.surefire.api.util.internal.AbstractNoninterruptibleWritableChannel.write(AbstractNoninterruptibleWritableChannel.java:45) > at > org.apache.maven.surefire.booter.spi.AbstractMasterProcessChannelProcessorFactory$1.run(AbstractMasterProcessChannelProcessorFactory.java:65) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) > at java.lang.Thread.run(Thread.java:750) > "Service Thread" #9 daemon prio=9 os_prio=31 tid=0x7fe50003a800 > nid=0x5603 runnable [0x] >java.lang.Thread.State: RUNNABLE > "C1 CompilerThread3" #8 daemon prio=9 os_prio=31 tid=0x7fe50001f800 > nid=0x3f03 waiting on condition [0x] >java.lang.Thread.State: RUNNABLE > "C2 CompilerThread2" #7 daemon prio=9 os_prio=31 tid=0x7fe5e800 > nid=0x4103 waiting on con
[GitHub] [maven] gnodet commented on pull request #703: New API with immutable model
gnodet commented on PR #703: URL: https://github.com/apache/maven/pull/703#issuecomment-1095245409 > First question... Do we want to have a cycles between packages and interfaces? > eg: > `org.apache.maven.api. Session` needs `org.apache.maven.api.services.ArtifactDeployer` > and `ArtifactDeployer` needs `Session`. I can remove all the methods from the session. Those are shortcuts to improve the user-friendliness of the api. My thinking was that simple usages would just use the `Session` rather than having to go through the services, for example creating an Artifact, but maybe simple usages are not really so frequent... -- 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] slawekjaranowski commented on pull request #703: New API with immutable model
slawekjaranowski commented on PR #703: URL: https://github.com/apache/maven/pull/703#issuecomment-1095238038 First question... Do we want to have a cycles between packages and interfaces? eg: `org.apache.maven.api. Session` needs `org.apache.maven.api.services.ArtifactDeployer` and `ArtifactDeployer` needs `Session`. -- 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-mvnd] MarkvanOsch commented on issue #615: Update to latest maven 3.8.5?
MarkvanOsch commented on issue #615: URL: https://github.com/apache/maven-mvnd/issues/615#issuecomment-1095174396 Thanks @gnodet , really like and enjoy the mvnd performance for my daily work, top! -- 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-pdf-plugin] slachiewicz merged pull request #17: Bump maven-reporting-exec from 1.5.1 to 1.6.0
slachiewicz merged PR #17: URL: https://github.com/apache/maven-pdf-plugin/pull/17 -- 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-pdf-plugin] slachiewicz merged pull request #16: Bump maven-reporting-api from 3.0 to 3.1.0
slachiewicz merged PR #16: URL: https://github.com/apache/maven-pdf-plugin/pull/16 -- 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-pdf-plugin] slachiewicz merged pull request #18: Bump maven-reporting-impl from 3.0.0 to 3.1.0
slachiewicz merged PR #18: URL: https://github.com/apache/maven-pdf-plugin/pull/18 -- 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-pdf-plugin] slachiewicz merged pull request #19: Bump actions/checkout from 2 to 3
slachiewicz merged PR #19: URL: https://github.com/apache/maven-pdf-plugin/pull/19 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Created] (MNG-7456) Provide FileTransformer replacement within Maven
Tamás Cservenák created MNG-7456: Summary: Provide FileTransformer replacement within Maven Key: MNG-7456 URL: https://issues.apache.org/jira/browse/MNG-7456 Project: Maven Issue Type: Task Reporter: Tamás Cservenák Fix For: 4.0.0-alpha-1, 4.0.0 As transforming "just in time" POM for consumer POM is not really Resolver concern, that must get rid of current OOM-prone API. Maven should take care of it by itself. -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Updated] (SUREFIRE-2070) can not set line.sepator
[ https://issues.apache.org/jira/browse/SUREFIRE-2070?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] pengningjun updated SUREFIRE-2070: -- Description: If we try to set line.separator by {*}systemPropertyVariables{*}, this will be a WARN:[code]([https://github.com/apache/maven-surefire/blob/master/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java#L50])。 So I try to set line.separator by *argLine* but finally found '\r' and '\n' is replaced: [code]([https://github.com/apache/maven-surefire/blob/f6be3e648938414b222b50907b1db2d6a3cc977b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java#L256]) So what is the right way to set line.separator? Any suggestion will be great appreciated! was: If we try to set line.separator by `systemPropertyVariables`, this will be a WARN:[code](https://github.com/apache/maven-surefire/blob/master/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java#L50)。 So I try to set line.separator by `argLine`, but finally found '\r' and '\n' is replaced: [code](https://github.com/apache/maven-surefire/blob/f6be3e648938414b222b50907b1db2d6a3cc977b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java#L256) So what is the right way to set line.separator? Any suggestion will be great appreciated! > can not set line.sepator > > > Key: SUREFIRE-2070 > URL: https://issues.apache.org/jira/browse/SUREFIRE-2070 > Project: Maven Surefire > Issue Type: Bug >Reporter: pengningjun >Priority: Minor > > If we try to set line.separator by {*}systemPropertyVariables{*}, this will > be a > WARN:[code]([https://github.com/apache/maven-surefire/blob/master/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java#L50])。 > So I try to set line.separator by *argLine* but finally found '\r' and '\n' > is replaced: > [code]([https://github.com/apache/maven-surefire/blob/f6be3e648938414b222b50907b1db2d6a3cc977b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java#L256]) > So what is the right way to set line.separator? > > Any suggestion will be great appreciated! -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Created] (SUREFIRE-2070) can not set line.sepator
pengningjun created SUREFIRE-2070: - Summary: can not set line.sepator Key: SUREFIRE-2070 URL: https://issues.apache.org/jira/browse/SUREFIRE-2070 Project: Maven Surefire Issue Type: Bug Reporter: pengningjun If we try to set line.separator by `systemPropertyVariables`, this will be a WARN:[code](https://github.com/apache/maven-surefire/blob/master/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java#L50)。 So I try to set line.separator by `argLine`, but finally found '\r' and '\n' is replaced: [code](https://github.com/apache/maven-surefire/blob/f6be3e648938414b222b50907b1db2d6a3cc977b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java#L256) So what is the right way to set line.separator? Any suggestion will be great appreciated! -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Created] (SUREFIRE-2069) Utf8RecodingDeferredFileOutputStream write doesn't protect caller from privileged action
Tom Watson created SUREFIRE-2069: Summary: Utf8RecodingDeferredFileOutputStream write doesn't protect caller from privileged action Key: SUREFIRE-2069 URL: https://issues.apache.org/jira/browse/SUREFIRE-2069 Project: Maven Surefire Issue Type: Bug Components: Maven Surefire Plugin Reporter: Tom Watson See [https://github.com/eclipse-equinox/equinox.framework/issues/32] We see the following exception: {quote}Caused by: java.lang.SecurityException: Unable to create temporary file or directory at java.base/java.nio.file.TempFileHelper.create(TempFileHelper.java:142) at java.base/java.nio.file.TempFileHelper.createTempFile(TempFileHelper.java:160) at java.base/java.nio.file.Files.createTempFile(Files.java:912) at org.apache.maven.plugin.surefire.report.Utf8RecodingDeferredFileOutputStream.write(Utf8RecodingDeferredFileOutputStream.java:69) at org.apache.maven.plugin.surefire.report.TestSetRunListener.writeTestOutput(TestSetRunListener.java:180) at org.apache.maven.plugin.surefire.report.TestSetRunListener.writeTestOutput(TestSetRunListener.java:49) at org.apache.maven.surefire.junitplatform.RunListenerAdapter.writeTestOutput(RunListenerAdapter.java:379) at org.apache.maven.surefire.api.report.ConsoleOutputCapture$ForwardingPrintStream.println(ConsoleOutputCapture.java:138) at security.b.Activator.start(Activator.java:28) {quote} Where the class security.b.Activator doesn't have permission to create files in the directory there. -- This message was sent by Atlassian Jira (v8.20.1#820001)
[GitHub] [maven-pdf-plugin] slachiewicz merged pull request #22: Bump actions/setup-java from 2 to 3
slachiewicz merged PR #22: URL: https://github.com/apache/maven-pdf-plugin/pull/22 -- 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-pdf-plugin] dependabot[bot] opened a new pull request, #22: Bump actions/setup-java from 2 to 3
dependabot[bot] opened a new pull request, #22: URL: https://github.com/apache/maven-pdf-plugin/pull/22 Bumps [actions/setup-java](https://github.com/actions/setup-java) from 2 to 3. Release notes Sourced from https://github.com/actions/setup-java/releases";>actions/setup-java's releases. v3.0.0 In scope of this release we changed version of the runtime Node.js for the setup-java action and updated package-lock.json file to v2. Breaking Changes With the update to Node 16 in https://github-redirect.dependabot.com/actions/setup-java/pull/290";>#290, all scripts will now be run with Node 16 rather than Node 12. v2.5.0 In scope of this pull request we add support for Microsoft Build of OpenJDK (https://github-redirect.dependabot.com/actions/setup-java/pull/252";>actions/setup-java#252). steps: - name: Checkout uses: actions/checkout@v2 - name: Setup-java uses: actions/setup-java@v2 with: distribution: microsoft java-version: 11 Supported distributions Currently, the following distributions are supported: Keyword Distribution Official site License temurin Eclipse Temurin https://adoptium.net/";>Link https://adoptium.net/about.html";>Link zulu Zulu OpenJDK https://www.azul.com/downloads/zulu-community/?package=jdk";>Link https://www.azul.com/products/zulu-and-zulu-enterprise/zulu-terms-of-use/";>Link adopt or adopt-hotspot Adopt OpenJDK Hotspot https://adoptopenjdk.net/";>Link https://adoptopenjdk.net/about.html";>Link adopt-openj9 Adopt OpenJDK OpenJ9 https://adoptopenjdk.net/";>Link https://adoptopenjdk.net/about.html";>Link liberica Liberica JDK https://bell-sw.com/";>Link https://bell-sw.com/liberica_eula/";>Link microsoft Microsoft Build of OpenJDK https://www.microsoft.com/openjdk";>Link https://docs.microsoft.com/java/openjdk/faq";>Link v2.4.0 In scope of this pull request we add support for Liberica JDK (https://github-redirect.dependabot.com/actions/setup-java/pull/225";>actions/setup-java#225). steps: - name: Checkout uses: actions/checkout@v2 - name: Setup-java uses: actions/setup-java@v2 with: distribution: liberica java-version: 11 Supported distributions Currently, the following distributions are supported: Keyword Distribution Official site License zulu Zulu OpenJDK https://www.azul.com/downloads/zulu-community/?package=jdk";>Link https://www.azul.com/products/zulu-and-zulu-enterprise/zulu-terms-of-use/";>Link adopt or adopt-hotspot Adopt OpenJDK Hotspot https://adoptopenjdk.net/";>Link https://adoptopenjdk.net/about.html";>Link adopt-openj9 Adopt OpenJDK OpenJ9 https://adoptopenjdk.net/";>Link https://adoptopenjdk.net/about.html";>Link temurin Eclipse Temurin https://adoptium.net/";>Link https://adoptium.net/about.html";>Link ... (truncated) Commits https://github.com/actions/setup-java/commit/0aa6f2a84f8634ac1a1bd81dfdf6d5aab98c70f1";>0aa6f2a Bump minimist from 1.2.5 to 1.2.6 (https://github-redirect.dependabot.com/actions/setup-java/issues/303";>#303) https://github.com/actions/setup-java/commit/dc1a9f27915005c4867178213f98cc27415de97a";>dc1a9f2 Caching on GHES (https://github-redirect.dependabot.com/actions/setup-java/issues/308";>#308) https://github.com/actions/setup-java/commit/e886040dc21d1d2c3f71482e1b6518445ef5e620";>e886040 Update zulu-installer.test.ts (https://github-redirect.dependabot.com/actions/setup-java/issues/310";>#310) https://github.com/actions/setup-java/commit/efbea1411b18823f99d704f247a3090511af93db";>efbea14 Update util.ts https://github.com/actions/setup-java/commit/c41070eda4f4d598540a89ad4a0e333b2b5bba07";>c41070e Update util.ts https://github.com/actions/setup-java/commit/f69f00b5e5324696b07f6b1c92f0470a6df00780";>f69f00b Update lockfileVersion (https://github-redirect.dependabot.com/actions/setup-java/issues/293";>#293) https://github.com/actions/setup-java/commit/2e1dfa1fb43424fa6465aaeacd047e9ef2f69961";>2e1dfa1 Update Default runtime to node16 (https://github-redirect.dependabot.com/actions/setup-java/issues/290";>#290) https://github.com/actions/setup-java/commit/a12e082d834968c1847f782019214fadd20719f6";>a12e082 Merge pull request https://github-redirect.dependabot.com/actions/setup-java/issues/224";>#224 from KengoTODA/remove-husky https://github.com/actions/setup-java/commit/04d53533c260c5d4b63a5c354d85d12ee217ebd6";>04d5353 Merge pull request https://github-redirect.dependabot.com/actions/setup-java/issues/215";>#215 from beatngu13/update-readme-cache-key https://github.com/actions/setup-java/commit/d8da887cad432a14fdb5025b0f7ebde23972b258
[GitHub] [maven-mvnd] gnodet commented on pull request #574: Refactor build and release workflows
gnodet commented on PR #574: URL: https://github.com/apache/maven-mvnd/pull/574#issuecomment-1095022367 I've reverted the merge. I've raised https://issues.apache.org/jira/browse/INFRA-23128 to whitelist the required action before we can attempt to merge again. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Commented] (MNG-7455) IllegalStateException in SessionScope during guice injection in multithreaded build
[ https://issues.apache.org/jira/browse/MNG-7455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17520554#comment-17520554 ] Michael Osipov commented on MNG-7455: - [~Abel S.Romero], we need to find out whether this is truly a regression or simply a bug trigged in the plugin which was not visible before. > IllegalStateException in SessionScope during guice injection in multithreaded > build > --- > > Key: MNG-7455 > URL: https://issues.apache.org/jira/browse/MNG-7455 > Project: Maven > Issue Type: Bug > Components: Core >Affects Versions: 3.8.5 >Reporter: Emond Papegaaij >Priority: Major > > Since Maven 3.8.5 we are seeing intermittent failures with the stacktrace > below. With 3.8.4 we did not have this issue. Looking at the changelog I > suspect this regression is caused by MNG-7347. > {code:java} > 09:36:53 [mvn-builder-keyhub-manual] [INFO] --- > asciidoctor-maven-plugin:2.2.2:process-asciidoc (output-html-nl) @ > keyhub-manual --- > 09:36:53 [mvn-builder-keyhub-manual] [WARNING] Error injecting: > org.asciidoctor.maven.AsciidoctorMojo > com.google.inject.ProvisionException: Unable to provision, see the following > errors: > 1) Error in custom provider, java.lang.IllegalStateException > at > org.apache.maven.session.scope.internal.SessionScopeModule.configure(SessionScopeModule.java:64) > (via modules: org.eclipse.sisu.wire.WireModule -> > org.apache.maven.session.scope.internal.SessionScopeModule) > while locating org.apache.maven.execution.MavenSession > for field at org.asciidoctor.maven.AsciidoctorMojo.session(Unknown Source) > while locating org.asciidoctor.maven.AsciidoctorMojo > 1 error > at > com.google.inject.internal.InternalProvisionException.toProvisionException > (InternalProvisionException.java:226) > at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1053) > at com.google.inject.internal.InjectorImpl.getInstance > (InjectorImpl.java:1086) > at org.eclipse.sisu.space.AbstractDeferredClass.get > (AbstractDeferredClass.java:48) > at com.google.inject.internal.ProviderInternalFactory.provision > (ProviderInternalFactory.java:85) > at > com.google.inject.internal.InternalFactoryToInitializableAdapter.provision > (InternalFactoryToInitializableAdapter.java:57) > at com.google.inject.internal.ProviderInternalFactory$1.call > (ProviderInternalFactory.java:66) > at > com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision > (ProvisionListenerStackCallback.java:112) > at > com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision > (ProvisionListenerStackCallback.java:127) > at com.google.inject.internal.ProvisionListenerStackCallback.provision > (ProvisionListenerStackCallback.java:66) > at com.google.inject.internal.ProviderInternalFactory.circularGet > (ProviderInternalFactory.java:61) > at com.google.inject.internal.InternalFactoryToInitializableAdapter.get > (InternalFactoryToInitializableAdapter.java:47) > at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1050) > at org.eclipse.sisu.inject.Guice4$1.get (Guice4.java:162) > at org.eclipse.sisu.inject.LazyBeanEntry.getValue (LazyBeanEntry.java:81) > at org.eclipse.sisu.plexus.LazyPlexusBean.getValue > (LazyPlexusBean.java:51) > at org.codehaus.plexus.DefaultPlexusContainer.lookup > (DefaultPlexusContainer.java:263) > at org.codehaus.plexus.DefaultPlexusContainer.lookup > (DefaultPlexusContainer.java:255) > at > org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo > (DefaultMavenPluginManager.java:520) > at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo > (DefaultBuildPluginManager.java:124) > at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute > (MojoExecutor.java:301) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:211) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:165) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:157) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:121) > at > org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call > (MultiThreadedBuilder.java:210) > at > org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call > (MultiThreadedBuilder.java:195) > at java.util.concurrent.FutureTask.run (FutureTask.java:264) > at java.util.concurrent.Executors$RunnableAdapter.call > (Executors.java:539) > at java.util.concurrent.FutureTask.run (FutureTask.java:264) > a
[GitHub] [maven-integration-testing] michael-o commented on a diff in pull request #143: [MNG-5222] IT test - warn about deprecated plugin params
michael-o commented on code in PR #143: URL: https://github.com/apache/maven-integration-testing/pull/143#discussion_r847284984 ## core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java: ## @@ -190,6 +190,7 @@ public static Test suite() suite.addTestSuite( MavenITmng5280SettingsProfilesRepositoriesOrderTest.class ); suite.addTestSuite( MavenITmng5230MakeReactorWithExcludesTest.class ); suite.addTestSuite( MavenITmng5224InjectedSettings.class ); +suite.addTestSuite( MavenITmng5222MojoDeprecatedParamsTest.class ); Review Comment: Correct, we had a discussion some time ago. We wanted recently fixed fail fast. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [maven-integration-testing] slawekjaranowski commented on a diff in pull request #143: [MNG-5222] IT test - warn about deprecated plugin params
slawekjaranowski commented on code in PR #143: URL: https://github.com/apache/maven-integration-testing/pull/143#discussion_r847284138 ## core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java: ## @@ -190,6 +190,7 @@ public static Test suite() suite.addTestSuite( MavenITmng5280SettingsProfilesRepositoriesOrderTest.class ); suite.addTestSuite( MavenITmng5230MakeReactorWithExcludesTest.class ); suite.addTestSuite( MavenITmng5224InjectedSettings.class ); +suite.addTestSuite( MavenITmng5222MojoDeprecatedParamsTest.class ); Review Comment: ok, so sentence "it counts down to zero" it is not always true with - reverse chronological of fix date ... line 90 😄 -- 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 #705: [MNG-5222] Maven 3 no longer logs warnings about deprecated plugin parameters
michael-o commented on PR #705: URL: https://github.com/apache/maven/pull/705#issuecomment-1094996825 I'd also say this must be on 3.9.x. -- 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 a diff in pull request #705: [MNG-5222] Maven 3 no longer logs warnings about deprecated plugin parameters
michael-o commented on code in PR #705: URL: https://github.com/apache/maven/pull/705#discussion_r847271045 ## maven-core/src/main/java/org/apache/maven/plugin/internal/ValidatingConfigurationListener.java: ## @@ -92,6 +109,97 @@ private void notify( String fieldName, Object value ) { missingParameters.remove( fieldName ); } + +if ( logger.isWarnEnabled() ) +{ +warnDeprecated( fieldName, value ); +} +} + +private void warnDeprecated( String fieldName, Object value ) +{ +Parameter parameter = mojoDescriptor.getParameterMap().get( fieldName ); +String deprecated = parameter.getDeprecated(); +if ( deprecated != null && !deprecated.isEmpty() ) +{ +Object defaultValue = evaluateValue( parameter.getDefaultValue() ); +if ( !Objects.equals( toString( value ), defaultValue ) ) +{ +StringBuilder sb = new StringBuilder( " Parameter '" ); +sb.append( fieldName ).append( '\'' ); +if ( parameter.getExpression() != null ) +{ +String userProperty = parameter.getExpression().replace( "${", "'" ).replace( '}', '\'' ); +sb.append( " (User Property " ).append( userProperty ).append( ")" ); Review Comment: "(user property ..." -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [maven-integration-testing] michael-o commented on a diff in pull request #143: [MNG-5222] IT test - warn about deprecated plugin params
michael-o commented on code in PR #143: URL: https://github.com/apache/maven-integration-testing/pull/143#discussion_r847263866 ## core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java: ## @@ -190,6 +190,7 @@ public static Test suite() suite.addTestSuite( MavenITmng5280SettingsProfilesRepositoriesOrderTest.class ); suite.addTestSuite( MavenITmng5230MakeReactorWithExcludesTest.class ); suite.addTestSuite( MavenITmng5224InjectedSettings.class ); +suite.addTestSuite( MavenITmng5222MojoDeprecatedParamsTest.class ); Review Comment: This should be as first since we have agreed that the ITs are in reverse chronological of fix date. -- 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-mvnd] gnodet commented on issue #615: Update to latest maven 3.8.5?
gnodet commented on issue #615: URL: https://github.com/apache/maven-mvnd/issues/615#issuecomment-1094984628 See https://github.com/apache/maven-mvnd/pull/616 -- 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 a diff in pull request #705: [MNG-5222] Maven 3 no longer logs warnings about deprecated plugin parameters
michael-o commented on code in PR #705: URL: https://github.com/apache/maven/pull/705#discussion_r847258321 ## maven-core/src/main/java/org/apache/maven/plugin/internal/ValidatingConfigurationListener.java: ## @@ -92,6 +109,97 @@ private void notify( String fieldName, Object value ) { missingParameters.remove( fieldName ); } + +if ( logger.isWarnEnabled() ) +{ +warnDeprecated( fieldName, value ); +} +} + +private void warnDeprecated( String fieldName, Object value ) +{ +Parameter parameter = mojoDescriptor.getParameterMap().get( fieldName ); +String deprecated = parameter.getDeprecated(); +if ( deprecated != null && !deprecated.isEmpty() ) Review Comment: So the empty check is not necessary. It will be never empty when not `null`. ## maven-core/src/main/java/org/apache/maven/plugin/internal/ValidatingConfigurationListener.java: ## @@ -80,18 +95,83 @@ public void notifyFieldChangeUsingReflection( String fieldName, Object value, Ob { delegate.notifyFieldChangeUsingReflection( fieldName, value, target ); -if ( mojo == target ) +if ( mojo == target && value != null ) { notify( fieldName, value ); } } private void notify( String fieldName, Object value ) { -if ( value != null ) +missingParameters.remove( fieldName ); + +if ( logger.isWarnEnabled() ) +{ +warnDeprecated( fieldName, value ); +} +} + +private void warnDeprecated( String fieldName, Object value ) +{ +Parameter parameter = mojoDescriptor.getParameterMap().get( fieldName ); +String deprecated = parameter.getDeprecated(); +if ( deprecated != null && !deprecated.isEmpty() ) +{ +Object defaultValue = evaluateValue( parameter.getDefaultValue() ); +if ( !toString( value ).equals( toString( defaultValue ) ) ) +{ +StringBuilder sb = new StringBuilder( " Parameter '" ); +sb.append( fieldName ).append( '\'' ); +if ( parameter.getExpression() != null ) +{ +String userProperty = parameter.getExpression().replace( "${", "'" ).replace( '}', '\'' ); +sb.append( " (User Property " ).append( userProperty ).append( ")" ); +} +sb.append( " is deprecated. " ).append( deprecated ); Review Comment: I'd turn the period onto a colon. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Created] (MCOMPILER-491) testCompile goal doesn't fail the build when encoding error occurs
ieuan richards created MCOMPILER-491: Summary: testCompile goal doesn't fail the build when encoding error occurs Key: MCOMPILER-491 URL: https://issues.apache.org/jira/browse/MCOMPILER-491 Project: Maven Compiler Plugin Issue Type: Bug Affects Versions: 3.10.1 Environment: Windows/Linux Reporter: ieuan richards I have a java test source file which is encoded as ANSI and contains this character 'å' which is not mappable to UTF-8. When I run 'mvn -Dproject.build.sourceEncoding=UTF-8 clean test' the compiler plugin logs this error: "[ERROR] /TestFile.java:[88,67] unmappable character for encoding UTF-8". At this point I'd expect the mvn build to fail. However, instead it continues as if though this was just a warning and runs all of the tests which compiled succesfully omitting the one which failed. The build then succeeds as though nothing failed. -- This message was sent by Atlassian Jira (v8.20.1#820001)
[GitHub] [maven-mvnd] gnodet merged pull request #508: Mvnd with file locking
gnodet merged PR #508: URL: https://github.com/apache/maven-mvnd/pull/508 -- 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-mvnd] gnodet closed issue #542: Refactor build & release workflow
gnodet closed issue #542: Refactor build & release workflow URL: https://github.com/apache/maven-mvnd/issues/542 -- 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-mvnd] gnodet merged pull request #574: Refactor build and release workflows
gnodet merged PR #574: URL: https://github.com/apache/maven-mvnd/pull/574 -- 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-mvnd] gnodet commented on pull request #574: Refactor build and release workflows
gnodet commented on PR #574: URL: https://github.com/apache/maven-mvnd/pull/574#issuecomment-1094935251 > @aalmiray could you restore the `test-jdk11` which run tests against PRs ? Ah, sorry, I think tests are now run with the early-access script. -- 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-mvnd] gnodet commented on pull request #574: Refactor build and release workflows
gnodet commented on PR #574: URL: https://github.com/apache/maven-mvnd/pull/574#issuecomment-1094932946 @aalmiray could you restore the `test-jdk11` which run tests against PRs ? -- 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-mvnd] gnodet merged pull request #614: Handle BufferUnderflowException as a possible registry corruption
gnodet merged PR #614: URL: https://github.com/apache/maven-mvnd/pull/614 -- 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] cstamas commented on a diff in pull request #712: Provide file transformer API replacement in Maven
cstamas commented on code in PR #712: URL: https://github.com/apache/maven/pull/712#discussion_r847213990 ## maven-core/src/main/java/org/apache/maven/artifact/transform/ConsumerPomTransformer.java: ## @@ -0,0 +1,140 @@ +package org.apache.maven.artifact.transform; + +/* + * 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. + */ + +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Provider; +import javax.inject.Singleton; + +import java.io.IOException; +import java.io.InputStream; +import java.io.UncheckedIOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.attribute.FileTime; +import java.util.ArrayList; +import java.util.Collection; + +import org.apache.maven.execution.MavenSession; +import org.apache.maven.feature.Features; +import org.apache.maven.model.building.TransformerContext; +import org.codehaus.plexus.util.xml.pull.XmlPullParserException; +import org.eclipse.aether.RepositorySystemSession; +import org.eclipse.aether.artifact.Artifact; +import org.eclipse.aether.deployment.DeployRequest; +import org.eclipse.aether.installation.InstallRequest; + +/** + * Consumer POM install and deploy transformer. + */ +@Named( ConsumerPomTransformer.NAME ) +@Singleton +public class ConsumerPomTransformer implements InstallRequestTransformer, DeployRequestTransformer +{ +public static final String NAME = "consumer-pom"; + +private final Provider mavenSessionProvider; + +@Inject +public ConsumerPomTransformer( Provider mavenSessionProvider ) +{ +this.mavenSessionProvider = mavenSessionProvider; +} + +@Override +public DeployRequest transformDeployRequest( RepositorySystemSession session, + DeployRequest deployRequest ) +{ +MavenSession mavenSession = mavenSessionProvider.get(); +if ( !Features.buildConsumer( mavenSession.getUserProperties() ).isActive() ) +{ +return deployRequest; +} +return deployRequest.setArtifacts( transformArtifacts( mavenSession, deployRequest.getArtifacts() ) ); +} + +@Override +public InstallRequest transformInstallRequest( RepositorySystemSession session, + InstallRequest installRequest ) +{ +MavenSession mavenSession = mavenSessionProvider.get(); +if ( !Features.buildConsumer( mavenSession.getUserProperties() ).isActive() ) +{ +return installRequest; +} +return installRequest.setArtifacts( transformArtifacts( mavenSession, installRequest.getArtifacts() ) ); +} + +private Collection transformArtifacts( MavenSession mavenSession, Collection artifacts ) +{ +TransformerContext context = (TransformerContext) mavenSession +.getRepositorySession().getData().get( TransformerContext.KEY ); +if ( context == null ) +{ +return artifacts; +} +ArrayList result = new ArrayList<>( artifacts.size() ); +for ( Artifact artifact : artifacts ) +{ +if ( "pom".equals( artifact.getExtension() ) ) +{ +Path buildOutputDirectory = Paths.get( + mavenSession.getCurrentProject().getBuild().getDirectory() ); +Path originalPom = artifact.getFile().toPath(); +Path transformedPom = buildOutputDirectory.resolve( NAME + ".xml" ); +try +{ +FileTime originalPomTs = Files.getLastModifiedTime( originalPom ); +FileTime transformedPomTs = Files.isRegularFile( transformedPom ) +? Files.getLastModifiedTime( transformedPom ) : null; + +if ( !originalPomTs.equals( transformedPomTs ) ) +{ +// save it: either does not exist or TS differ +Files.createDirectories( transformedPom.getParent() ); +try ( InputStream inputStream = new ConsumerModelSourceTransformer() +.transform(
[GitHub] [maven] michael-o commented on a diff in pull request #705: [MNG-5222] Maven 3 no longer logs warnings about deprecated plugin parameters
michael-o commented on code in PR #705: URL: https://github.com/apache/maven/pull/705#discussion_r847030748 ## maven-core/src/main/java/org/apache/maven/plugin/internal/ValidatingConfigurationListener.java: ## @@ -80,18 +95,83 @@ public void notifyFieldChangeUsingReflection( String fieldName, Object value, Ob { delegate.notifyFieldChangeUsingReflection( fieldName, value, target ); -if ( mojo == target ) +if ( mojo == target && value != null ) { notify( fieldName, value ); } } private void notify( String fieldName, Object value ) { -if ( value != null ) +missingParameters.remove( fieldName ); + +if ( logger.isWarnEnabled() ) +{ +warnDeprecated( fieldName, value ); +} +} + +private void warnDeprecated( String fieldName, Object value ) +{ +Parameter parameter = mojoDescriptor.getParameterMap().get( fieldName ); +String deprecated = parameter.getDeprecated(); +if ( deprecated != null && !deprecated.isEmpty() ) +{ +Object defaultValue = evaluateValue( parameter.getDefaultValue() ); +if ( !toString( value ).equals( toString( defaultValue ) ) ) +{ +StringBuilder sb = new StringBuilder( " Parameter '" ); +sb.append( fieldName ).append( '\'' ); +if ( parameter.getExpression() != null ) +{ +String userProperty = parameter.getExpression().replace( "${", "'" ).replace( '}', '\'' ); +sb.append( " (User Property " ).append( userProperty ).append( ")" ); +} +sb.append( " is deprecated. " ).append( deprecated ); Review Comment: Looking into, but this feels extremely ugly and inconsistent (not your fault). `MojoDescriptor#getDeprecated()` (sic!) says `true`/`false` as string while parameter says nothing. It would expect same behavior. So if this is truly linked to `@deprecated` in Javadoc, then `MojoDescriptor` behavior is wrong. What is `@Deprecated` is given, but not `@deprecated` in Javadoc? Looking at `org.apache.maven.plugin.descriptor.PluginDescriptorBuilderTest.testBuildReader()` shows that it is not boolean. -- 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] rfscholte commented on a diff in pull request #712: Provide file transformer API replacement in Maven
rfscholte commented on code in PR #712: URL: https://github.com/apache/maven/pull/712#discussion_r847206558 ## maven-core/src/main/java/org/apache/maven/artifact/transform/ConsumerPomTransformer.java: ## @@ -0,0 +1,140 @@ +package org.apache.maven.artifact.transform; + +/* + * 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. + */ + +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Provider; +import javax.inject.Singleton; + +import java.io.IOException; +import java.io.InputStream; +import java.io.UncheckedIOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.attribute.FileTime; +import java.util.ArrayList; +import java.util.Collection; + +import org.apache.maven.execution.MavenSession; +import org.apache.maven.feature.Features; +import org.apache.maven.model.building.TransformerContext; +import org.codehaus.plexus.util.xml.pull.XmlPullParserException; +import org.eclipse.aether.RepositorySystemSession; +import org.eclipse.aether.artifact.Artifact; +import org.eclipse.aether.deployment.DeployRequest; +import org.eclipse.aether.installation.InstallRequest; + +/** + * Consumer POM install and deploy transformer. + */ +@Named( ConsumerPomTransformer.NAME ) +@Singleton +public class ConsumerPomTransformer implements InstallRequestTransformer, DeployRequestTransformer +{ +public static final String NAME = "consumer-pom"; + +private final Provider mavenSessionProvider; + +@Inject +public ConsumerPomTransformer( Provider mavenSessionProvider ) +{ +this.mavenSessionProvider = mavenSessionProvider; +} + +@Override +public DeployRequest transformDeployRequest( RepositorySystemSession session, + DeployRequest deployRequest ) +{ +MavenSession mavenSession = mavenSessionProvider.get(); +if ( !Features.buildConsumer( mavenSession.getUserProperties() ).isActive() ) +{ +return deployRequest; +} +return deployRequest.setArtifacts( transformArtifacts( mavenSession, deployRequest.getArtifacts() ) ); +} + +@Override +public InstallRequest transformInstallRequest( RepositorySystemSession session, + InstallRequest installRequest ) +{ +MavenSession mavenSession = mavenSessionProvider.get(); +if ( !Features.buildConsumer( mavenSession.getUserProperties() ).isActive() ) +{ +return installRequest; +} +return installRequest.setArtifacts( transformArtifacts( mavenSession, installRequest.getArtifacts() ) ); +} + +private Collection transformArtifacts( MavenSession mavenSession, Collection artifacts ) +{ +TransformerContext context = (TransformerContext) mavenSession +.getRepositorySession().getData().get( TransformerContext.KEY ); +if ( context == null ) +{ +return artifacts; +} +ArrayList result = new ArrayList<>( artifacts.size() ); +for ( Artifact artifact : artifacts ) +{ +if ( "pom".equals( artifact.getExtension() ) ) +{ +Path buildOutputDirectory = Paths.get( + mavenSession.getCurrentProject().getBuild().getDirectory() ); +Path originalPom = artifact.getFile().toPath(); +Path transformedPom = buildOutputDirectory.resolve( NAME + ".xml" ); +try +{ +FileTime originalPomTs = Files.getLastModifiedTime( originalPom ); +FileTime transformedPomTs = Files.isRegularFile( transformedPom ) +? Files.getLastModifiedTime( transformedPom ) : null; + +if ( !originalPomTs.equals( transformedPomTs ) ) +{ +// save it: either does not exist or TS differ +Files.createDirectories( transformedPom.getParent() ); +try ( InputStream inputStream = new ConsumerModelSourceTransformer() +.transfor
[GitHub] [maven] cstamas commented on a diff in pull request #712: Provide file transformer API replacement in Maven
cstamas commented on code in PR #712: URL: https://github.com/apache/maven/pull/712#discussion_r847184452 ## maven-core/src/main/java/org/apache/maven/artifact/transform/ConsumerPomTransformer.java: ## @@ -0,0 +1,140 @@ +package org.apache.maven.artifact.transform; + +/* + * 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. + */ + +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Provider; +import javax.inject.Singleton; + +import java.io.IOException; +import java.io.InputStream; +import java.io.UncheckedIOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.attribute.FileTime; +import java.util.ArrayList; +import java.util.Collection; + +import org.apache.maven.execution.MavenSession; +import org.apache.maven.feature.Features; +import org.apache.maven.model.building.TransformerContext; +import org.codehaus.plexus.util.xml.pull.XmlPullParserException; +import org.eclipse.aether.RepositorySystemSession; +import org.eclipse.aether.artifact.Artifact; +import org.eclipse.aether.deployment.DeployRequest; +import org.eclipse.aether.installation.InstallRequest; + +/** + * Consumer POM install and deploy transformer. + */ +@Named( ConsumerPomTransformer.NAME ) +@Singleton +public class ConsumerPomTransformer implements InstallRequestTransformer, DeployRequestTransformer +{ +public static final String NAME = "consumer-pom"; + +private final Provider mavenSessionProvider; + +@Inject +public ConsumerPomTransformer( Provider mavenSessionProvider ) +{ +this.mavenSessionProvider = mavenSessionProvider; +} + +@Override +public DeployRequest transformDeployRequest( RepositorySystemSession session, + DeployRequest deployRequest ) +{ +MavenSession mavenSession = mavenSessionProvider.get(); +if ( !Features.buildConsumer( mavenSession.getUserProperties() ).isActive() ) +{ +return deployRequest; +} +return deployRequest.setArtifacts( transformArtifacts( mavenSession, deployRequest.getArtifacts() ) ); +} + +@Override +public InstallRequest transformInstallRequest( RepositorySystemSession session, + InstallRequest installRequest ) +{ +MavenSession mavenSession = mavenSessionProvider.get(); +if ( !Features.buildConsumer( mavenSession.getUserProperties() ).isActive() ) +{ +return installRequest; +} +return installRequest.setArtifacts( transformArtifacts( mavenSession, installRequest.getArtifacts() ) ); +} + +private Collection transformArtifacts( MavenSession mavenSession, Collection artifacts ) +{ +TransformerContext context = (TransformerContext) mavenSession +.getRepositorySession().getData().get( TransformerContext.KEY ); +if ( context == null ) +{ +return artifacts; +} +ArrayList result = new ArrayList<>( artifacts.size() ); +for ( Artifact artifact : artifacts ) +{ +if ( "pom".equals( artifact.getExtension() ) ) +{ +Path buildOutputDirectory = Paths.get( + mavenSession.getCurrentProject().getBuild().getDirectory() ); +Path originalPom = artifact.getFile().toPath(); +Path transformedPom = buildOutputDirectory.resolve( NAME + ".xml" ); +try +{ +FileTime originalPomTs = Files.getLastModifiedTime( originalPom ); +FileTime transformedPomTs = Files.isRegularFile( transformedPom ) +? Files.getLastModifiedTime( transformedPom ) : null; + +if ( !originalPomTs.equals( transformedPomTs ) ) +{ +// save it: either does not exist or TS differ +Files.createDirectories( transformedPom.getParent() ); +try ( InputStream inputStream = new ConsumerModelSourceTransformer() +.transform(
[GitHub] [maven] cstamas commented on a diff in pull request #712: Provide file transformer API replacement in Maven
cstamas commented on code in PR #712: URL: https://github.com/apache/maven/pull/712#discussion_r847175597 ## maven-core/src/main/java/org/apache/maven/artifact/transform/ConsumerPomTransformer.java: ## @@ -0,0 +1,140 @@ +package org.apache.maven.artifact.transform; + +/* + * 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. + */ + +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Provider; +import javax.inject.Singleton; + +import java.io.IOException; +import java.io.InputStream; +import java.io.UncheckedIOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.attribute.FileTime; +import java.util.ArrayList; +import java.util.Collection; + +import org.apache.maven.execution.MavenSession; +import org.apache.maven.feature.Features; +import org.apache.maven.model.building.TransformerContext; +import org.codehaus.plexus.util.xml.pull.XmlPullParserException; +import org.eclipse.aether.RepositorySystemSession; +import org.eclipse.aether.artifact.Artifact; +import org.eclipse.aether.deployment.DeployRequest; +import org.eclipse.aether.installation.InstallRequest; + +/** + * Consumer POM install and deploy transformer. + */ +@Named( ConsumerPomTransformer.NAME ) +@Singleton +public class ConsumerPomTransformer implements InstallRequestTransformer, DeployRequestTransformer Review Comment: That's fine, Maven (and resolver) is already full of "internal" things, not MEANT to be extended by end users. We can make it clear here as well, but putting this code into some "internal" package instead (to not look like "API-ish thing". -- 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-mvnd] MarkvanOsch opened a new issue, #615: Update to latest maven 3.8.5?
MarkvanOsch opened a new issue, #615: URL: https://github.com/apache/maven-mvnd/issues/615 Hi all, has anybody already planned to upgrade mvnd to the latest maven 3.8.5? I see this commit to 3.8.4, but that seems not complete, or something else: https://github.com/apache/maven-mvnd/commit/a9cf00066682095af519c8f949929f39f149b06a Because on MacOS I see this output with the latest mvnd 0.7.1 version: ``` ➜ ~ mvnd --version mvnd native client 0.7.1-darwin-amd64 (97c587c11383a67b5bd0ff8388bd94c694b91c1e) Terminal: org.jline.terminal.impl.PosixSysTerminal with pty org.jline.terminal.impl.jansi.osx.OsXNativePty Apache Maven 3.8.3 (ff8e977a158738155dc465c6a97ffaf31982d739) Maven home: /usr/local/Cellar/mvnd/0.7.1/libexec/mvn Java version: 11.0.12, vendor: Homebrew, runtime: /usr/local/Cellar/openjdk@11/11.0.12/libexec/openjdk.jdk/Contents/Home Default locale: en_US, platform encoding: UTF-8 OS name: "mac os x", version: "12.3", arch: "x86_64", family: "mac" ``` -- 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.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Commented] (SUREFIRE-2061) BLOCKED in surefire-forkedjvm-stream-flusher
[ https://issues.apache.org/jira/browse/SUREFIRE-2061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17520451#comment-17520451 ] Slawomir Jaranowski commented on SUREFIRE-2061: --- There is exception in {{dumpstream}} {code} # Created at 2022-04-11T10:38:05.706 TestSet has not finished before stream error has appeared >> initializing exit by non-null configuration: EXIT java.io.EOFException at org.apache.maven.surefire.api.stream.AbstractStreamDecoder.read(AbstractStreamDecoder.java:506) at org.apache.maven.surefire.api.stream.AbstractStreamDecoder.read(AbstractStreamDecoder.java:473) at org.apache.maven.surefire.api.stream.AbstractStreamDecoder.readMessageType(AbstractStreamDecoder.java:118) at org.apache.maven.surefire.booter.stream.CommandDecoder.decode(CommandDecoder.java:87) at org.apache.maven.surefire.booter.spi.CommandChannelDecoder.decode(CommandChannelDecoder.java:67) at org.apache.maven.surefire.booter.CommandReader$CommandRunnable.run(CommandReader.java:345) at java.lang.Thread.run(Thread.java:750) {code} > BLOCKED in surefire-forkedjvm-stream-flusher > > > Key: SUREFIRE-2061 > URL: https://issues.apache.org/jira/browse/SUREFIRE-2061 > Project: Maven Surefire > Issue Type: Bug >Affects Versions: 3.0.0-M6 >Reporter: Slawomir Jaranowski >Assignee: Tibor Digana >Priority: Major > Fix For: 3.0.0-M7 > > > From time to time test execution is hung up - wait forever ... > Now I can't reproduce it, test rerun fix it. > The stack is: > {code} > 2022-04-06 13:59:05 > Full thread dump OpenJDK 64-Bit Server VM (25.322-b00 mixed mode): > "Attach Listener" #16 daemon prio=9 os_prio=31 tid=0x7fe48036a000 > nid=0x380b waiting on condition [0x] >java.lang.Thread.State: RUNNABLE > "surefire-forkedjvm-command-thread" #12 daemon prio=5 os_prio=31 > tid=0x7fe504a5c000 nid=0xa803 runnable [0x7db43000] >java.lang.Thread.State: RUNNABLE > at java.io.FileInputStream.readBytes(Native Method) > at java.io.FileInputStream.read(FileInputStream.java:255) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:284) > at java.io.BufferedInputStream.read(BufferedInputStream.java:345) > - locked <0x0005c000ccb0> (a java.io.BufferedInputStream) > at java.io.BufferedInputStream.fill(BufferedInputStream.java:246) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:286) > at java.io.BufferedInputStream.read(BufferedInputStream.java:345) > - locked <0x0005c000ccd8> (a java.io.BufferedInputStream) > at > org.apache.maven.surefire.api.util.internal.Channels$3.readImpl(Channels.java:217) > at > org.apache.maven.surefire.api.util.internal.AbstractNoninterruptibleReadableChannel.read(AbstractNoninterruptibleReadableChannel.java:54) > at > org.apache.maven.surefire.api.stream.AbstractStreamDecoder.read(AbstractStreamDecoder.java:487) > at > org.apache.maven.surefire.api.stream.AbstractStreamDecoder.read(AbstractStreamDecoder.java:473) > at > org.apache.maven.surefire.api.stream.AbstractStreamDecoder.readMessageType(AbstractStreamDecoder.java:118) > at > org.apache.maven.surefire.booter.stream.CommandDecoder.decode(CommandDecoder.java:87) > at > org.apache.maven.surefire.booter.spi.CommandChannelDecoder.decode(CommandChannelDecoder.java:67) > at > org.apache.maven.surefire.booter.CommandReader$CommandRunnable.run(CommandReader.java:345) > at java.lang.Thread.run(Thread.java:750) > "surefire-forkedjvm-stream-flusher" #10 daemon prio=5 os_prio=31 > tid=0x7fe500969000 nid=0xa903 waiting for monitor entry > [0x7da4] >java.lang.Thread.State: BLOCKED (on object monitor) > at java.io.BufferedOutputStream.write(BufferedOutputStream.java:117) > - waiting to lock <0x0005c000d498> (a java.io.BufferedOutputStream) > at > org.apache.maven.surefire.api.util.internal.Channels$4.writeImpl(Channels.java:253) > at > org.apache.maven.surefire.api.util.internal.AbstractNoninterruptibleWritableChannel.write(AbstractNoninterruptibleWritableChannel.java:72) > at > org.apache.maven.surefire.api.util.internal.AbstractNoninterruptibleWritableChannel.write(AbstractNoninterruptibleWritableChannel.java:45) > at > org.apache.maven.surefire.booter.spi.AbstractMasterProcessChannelProcessorFactory$1.run(AbstractMasterProcessChannelProcessorFactory.java:65) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThr
[GitHub] [maven-resolver] cstamas commented on pull request #163: MRESOLVER-133 unnessary poms downloadings for dependency using versio…
cstamas commented on PR #163: URL: https://github.com/apache/maven-resolver/pull/163#issuecomment-1094733016 A hard NO for now, as this needs more investigating. First of all, if you add break here, you are changing the semantics of resolver _collection_ (would return "highest version" not "all applicable"). Second, your goal to get "highest version" is already doable w/ resolver and is present in UTs, look at these tests: https://github.com/apache/maven-resolver/blob/915186d643f37cff9a217a482c62d9b47767c95d/maven-resolver-impl/src/test/java/org/eclipse/aether/internal/impl/collect/df/DfDependencyCollectorTest.java#L563 https://github.com/apache/maven-resolver/blob/915186d643f37cff9a217a482c62d9b47767c95d/maven-resolver-impl/src/test/java/org/eclipse/aether/internal/impl/collect/bf/BfDependencyCollectorTest.java#L570 So both UT end up in loop (you'd break) with SINGLE version, due to set `HighestVersionFilter`. Meaning, Resolver already have the means to achieve this if asked for. OTOH, Maven "as resolver client" does NOT use version filters, but it asks for "all" and then "mediates" based on it's own rules. This is sub-otpimal of course, but this requires more careful research to not break resolver and/or Maven, at least 3.x line. See these issues for some context please: https://issues.apache.org/jira/browse/MRESOLVER-164 https://issues.apache.org/jira/browse/MNG-7049 And an experiment done here: https://github.com/cstamas/maven/commit/99709fd8a715101e5c64ab99c651a468b37f0d15 In short: resolver CAN do this out of the box, but Maven does not USE this feature. OTOH, there are cases in Maven itself, where Maven DOES THIS, see `org.apache.maven.repository.internal.DefaultModelResolver#resolveModel(org.apache.maven.model.Dependency)` for example, so we need first to figure out why was it done like this (maybe just lack of time to properly finish integration) but it may be something else as well (like "closest wins" strategy). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Created] (MNG-7455) IllegalStateException in SessionScope during guice injection in multithreaded build
Emond Papegaaij created MNG-7455: Summary: IllegalStateException in SessionScope during guice injection in multithreaded build Key: MNG-7455 URL: https://issues.apache.org/jira/browse/MNG-7455 Project: Maven Issue Type: Bug Components: Core Affects Versions: 3.8.5 Reporter: Emond Papegaaij Since Maven 3.8.5 we are seeing intermittent failures with the stacktrace below. With 3.8.4 we did not have this issue. Looking at the changelog I suspect this regression is caused by MNG-7347. {code:java} 09:36:53 [mvn-builder-keyhub-manual] [INFO] --- asciidoctor-maven-plugin:2.2.2:process-asciidoc (output-html-nl) @ keyhub-manual --- 09:36:53 [mvn-builder-keyhub-manual] [WARNING] Error injecting: org.asciidoctor.maven.AsciidoctorMojo com.google.inject.ProvisionException: Unable to provision, see the following errors: 1) Error in custom provider, java.lang.IllegalStateException at org.apache.maven.session.scope.internal.SessionScopeModule.configure(SessionScopeModule.java:64) (via modules: org.eclipse.sisu.wire.WireModule -> org.apache.maven.session.scope.internal.SessionScopeModule) while locating org.apache.maven.execution.MavenSession for field at org.asciidoctor.maven.AsciidoctorMojo.session(Unknown Source) while locating org.asciidoctor.maven.AsciidoctorMojo 1 error at com.google.inject.internal.InternalProvisionException.toProvisionException (InternalProvisionException.java:226) at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1053) at com.google.inject.internal.InjectorImpl.getInstance (InjectorImpl.java:1086) at org.eclipse.sisu.space.AbstractDeferredClass.get (AbstractDeferredClass.java:48) at com.google.inject.internal.ProviderInternalFactory.provision (ProviderInternalFactory.java:85) at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision (InternalFactoryToInitializableAdapter.java:57) at com.google.inject.internal.ProviderInternalFactory$1.call (ProviderInternalFactory.java:66) at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:112) at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:127) at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:66) at com.google.inject.internal.ProviderInternalFactory.circularGet (ProviderInternalFactory.java:61) at com.google.inject.internal.InternalFactoryToInitializableAdapter.get (InternalFactoryToInitializableAdapter.java:47) at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1050) at org.eclipse.sisu.inject.Guice4$1.get (Guice4.java:162) at org.eclipse.sisu.inject.LazyBeanEntry.getValue (LazyBeanEntry.java:81) at org.eclipse.sisu.plexus.LazyPlexusBean.getValue (LazyPlexusBean.java:51) at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:263) at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:255) at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo (DefaultMavenPluginManager.java:520) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:124) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:301) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:211) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:165) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:157) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:121) at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:210) at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:195) at java.util.concurrent.FutureTask.run (FutureTask.java:264) at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:539) at java.util.concurrent.FutureTask.run (FutureTask.java:264) at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1136) at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:635) at java.lang.Thread.run (Thread.java:833) Caused by: java.lang.IllegalStateException at org.apache.maven.session.scope.internal.SessionScope$1.get (SessionScope.java:44) at com.google.inject.internal.ProviderInternalFactory.provision (ProviderInternalFactory.java:85) at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision (InternalFactoryToInitializableAdapter.java:57) at c
[GitHub] [maven] rfscholte commented on a diff in pull request #712: Provide file transformer API replacement in Maven
rfscholte commented on code in PR #712: URL: https://github.com/apache/maven/pull/712#discussion_r847044265 ## maven-core/src/main/java/org/apache/maven/artifact/transform/ConsumerPomTransformer.java: ## @@ -0,0 +1,140 @@ +package org.apache.maven.artifact.transform; + +/* + * 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. + */ + +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Provider; +import javax.inject.Singleton; + +import java.io.IOException; +import java.io.InputStream; +import java.io.UncheckedIOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.attribute.FileTime; +import java.util.ArrayList; +import java.util.Collection; + +import org.apache.maven.execution.MavenSession; +import org.apache.maven.feature.Features; +import org.apache.maven.model.building.TransformerContext; +import org.codehaus.plexus.util.xml.pull.XmlPullParserException; +import org.eclipse.aether.RepositorySystemSession; +import org.eclipse.aether.artifact.Artifact; +import org.eclipse.aether.deployment.DeployRequest; +import org.eclipse.aether.installation.InstallRequest; + +/** + * Consumer POM install and deploy transformer. + */ +@Named( ConsumerPomTransformer.NAME ) +@Singleton +public class ConsumerPomTransformer implements InstallRequestTransformer, DeployRequestTransformer Review Comment: One of my concerns was regarding how open this should be, as it is very powerful. At first I don't want other custom components to interfere and keep Maven in full control. ## maven-core/src/main/java/org/apache/maven/artifact/transform/ConsumerPomTransformer.java: ## @@ -0,0 +1,140 @@ +package org.apache.maven.artifact.transform; + +/* + * 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. + */ + +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Provider; +import javax.inject.Singleton; + +import java.io.IOException; +import java.io.InputStream; +import java.io.UncheckedIOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.attribute.FileTime; +import java.util.ArrayList; +import java.util.Collection; + +import org.apache.maven.execution.MavenSession; +import org.apache.maven.feature.Features; +import org.apache.maven.model.building.TransformerContext; +import org.codehaus.plexus.util.xml.pull.XmlPullParserException; +import org.eclipse.aether.RepositorySystemSession; +import org.eclipse.aether.artifact.Artifact; +import org.eclipse.aether.deployment.DeployRequest; +import org.eclipse.aether.installation.InstallRequest; + +/** + * Consumer POM install and deploy transformer. + */ +@Named( ConsumerPomTransformer.NAME ) +@Singleton +public class ConsumerPomTransformer implements InstallRequestTransformer, DeployRequestTransformer +{ +public static final String NAME = "consumer-pom"; + +private final Provider mavenSessionProvider; + +@Inject +public ConsumerPomTransformer( Provider mavenSessionProvider ) +{ +this.mavenSessionProvider = mavenSessionProvider; +} + +@Override +public DeployRequest transformDeployRequest( RepositorySystemSession session, + DeployRequest deployRequest ) +{ +MavenSession mavenSession = mavenSessionProvider.get(); +if ( !Features.buildConsumer( mavenSession.getUserProperti
[GitHub] [maven] slawekjaranowski commented on a diff in pull request #705: [MNG-5222] Maven 3 no longer logs warnings about deprecated plugin parameters
slawekjaranowski commented on code in PR #705: URL: https://github.com/apache/maven/pull/705#discussion_r847024713 ## maven-core/src/main/java/org/apache/maven/plugin/internal/ValidatingConfigurationListener.java: ## @@ -80,18 +95,83 @@ public void notifyFieldChangeUsingReflection( String fieldName, Object value, Ob { delegate.notifyFieldChangeUsingReflection( fieldName, value, target ); -if ( mojo == target ) +if ( mojo == target && value != null ) { notify( fieldName, value ); } } private void notify( String fieldName, Object value ) { -if ( value != null ) +missingParameters.remove( fieldName ); + +if ( logger.isWarnEnabled() ) +{ +warnDeprecated( fieldName, value ); +} +} + +private void warnDeprecated( String fieldName, Object value ) +{ +Parameter parameter = mojoDescriptor.getParameterMap().get( fieldName ); +String deprecated = parameter.getDeprecated(); +if ( deprecated != null && !deprecated.isEmpty() ) +{ +Object defaultValue = evaluateValue( parameter.getDefaultValue() ); +if ( !toString( value ).equals( toString( defaultValue ) ) ) +{ +StringBuilder sb = new StringBuilder( " Parameter '" ); +sb.append( fieldName ).append( '\'' ); +if ( parameter.getExpression() != null ) +{ +String userProperty = parameter.getExpression().replace( "${", "'" ).replace( '}', '\'' ); +sb.append( " (User Property " ).append( userProperty ).append( ")" ); +} +sb.append( " is deprecated. " ).append( deprecated ); Review Comment: `parameter.getDeprecated()` contains reason of depracation from plugin documentation. message will be: ``` is deprecated. Reason provided by author ... ``` please look at IT tests -- 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] slawekjaranowski commented on a diff in pull request #705: [MNG-5222] Maven 3 no longer logs warnings about deprecated plugin parameters
slawekjaranowski commented on code in PR #705: URL: https://github.com/apache/maven/pull/705#discussion_r847020950 ## maven-core/src/main/java/org/apache/maven/plugin/internal/ValidatingConfigurationListener.java: ## @@ -41,12 +50,20 @@ private final ConfigurationListener delegate; +private final MojoDescriptor mojoDescriptor; +private final ExpressionEvaluator expressionEvaluator; + +private final Logger logger = LoggerFactory.getLogger( getClass() ); Review Comment: No reason. As I see it is mixed in code. I didn't analize it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [maven] michael-o commented on a diff in pull request #705: [MNG-5222] Maven 3 no longer logs warnings about deprecated plugin parameters
michael-o commented on code in PR #705: URL: https://github.com/apache/maven/pull/705#discussion_r847009177 ## maven-core/src/main/java/org/apache/maven/plugin/internal/ValidatingConfigurationListener.java: ## @@ -41,12 +50,20 @@ private final ConfigurationListener delegate; +private final MojoDescriptor mojoDescriptor; +private final ExpressionEvaluator expressionEvaluator; + +private final Logger logger = LoggerFactory.getLogger( getClass() ); Review Comment: Why not use a static logger, any reason to have a per-instance? ## maven-core/src/main/java/org/apache/maven/plugin/internal/ValidatingConfigurationListener.java: ## @@ -80,18 +95,83 @@ public void notifyFieldChangeUsingReflection( String fieldName, Object value, Ob { delegate.notifyFieldChangeUsingReflection( fieldName, value, target ); -if ( mojo == target ) +if ( mojo == target && value != null ) { notify( fieldName, value ); } } private void notify( String fieldName, Object value ) { -if ( value != null ) +missingParameters.remove( fieldName ); + +if ( logger.isWarnEnabled() ) +{ +warnDeprecated( fieldName, value ); +} +} + +private void warnDeprecated( String fieldName, Object value ) +{ +Parameter parameter = mojoDescriptor.getParameterMap().get( fieldName ); +String deprecated = parameter.getDeprecated(); +if ( deprecated != null && !deprecated.isEmpty() ) +{ +Object defaultValue = evaluateValue( parameter.getDefaultValue() ); +if ( !toString( value ).equals( toString( defaultValue ) ) ) +{ +StringBuilder sb = new StringBuilder( " Parameter '" ); +sb.append( fieldName ).append( '\'' ); +if ( parameter.getExpression() != null ) +{ +String userProperty = parameter.getExpression().replace( "${", "'" ).replace( '}', '\'' ); +sb.append( " (User Property " ).append( userProperty ).append( ")" ); +} +sb.append( " is deprecated. " ).append( deprecated ); Review Comment: This still doesn't make sense. The API says: @param deprecated true to deprecate the Mojo, false otherwise. So the output will read: ...is deprecated. true" Why not `"true"equals(deprecated)`? -- 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-surefire] zoltanmeze opened a new pull request, #518: [SUREFIRE-2058] - Corrupted STDOUT by directly writing to native stream in forked JVM 1 with UTF-8 console logging
zoltanmeze opened a new pull request, #518: URL: https://github.com/apache/maven-surefire/pull/518 Two cases are covered here: * Test run swallowing some of the outputs and finishing with the following warning: ``` [WARNING] Corrupted channel by directly writing to native stream in forked JVM 1. ``` * Test run getting completely stuck Both cases are caused by the same issue, output buffer overflow in [AbstractStreamDecoder#readString(Memento, int)](https://github.com/apache/maven-surefire/blob/master/surefire-api/src/main/java/org/apache/maven/surefire/api/stream/AbstractStreamDecoder.java#L302), because output char buffer is not cleared if it's not completely full. Added unit tests: * AbstractStreamDecoderTest#shouldReadStringOverflowOnNewLine: Input buffer of 1026 bytes: 1023 x 1-byte + 1 x 2-bytes encoded character + new line (LF). * In first iteration it decodes the first 1023 bytes from the input buffer without clearing the output buffer. * In second iteration `decodeString` returns an overflow, but it still force reads the 2-byte encoded character from input to output. `readString` ends up with 1 remaining byte (LF) on input buffer causing channel to become corrupted. * AbstractStreamDecoderTest#shouldReadStringOverflowOn4BytesEncodedSymbol: Input buffer of 1027 bytes: 1023 x 1 byte + 1 x 4-bytes encoded characters. * In first iteration it decodes the first 1023 bytes from the input buffer without clearing the output buffer. * In second iteration `decodeString` returns an overflow, without reading anything from input buffer. This is causing an infinite loop in `readString`, it never exits. Following this checklist to help us incorporate your contribution quickly and easily: - [x] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/SUREFIRE) filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes. - [x] Each commit in the pull request should have a meaningful subject line and body. - [x] Format the pull request title like `[SUREFIRE-XXX] - Fixes bug in ApproximateQuantiles`, where you replace `SUREFIRE-XXX` with the appropriate JIRA issue. Best practice is to use the JIRA issue title in the pull request title and in the first line of the commit message. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Run `mvn clean install` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically. - [x] You have run the integration tests successfully (`mvn -Prun-its clean install`). If your pull request is about ~20 lines of code you don't need to sign an [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure please ask on the developers list. To make clear that you license your contribution under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0) you have to acknowledge this by using the following check-box. - [x] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0) - [ ] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Commented] (MRESOLVER-244) Deprecate FileTransformer API
[ https://issues.apache.org/jira/browse/MRESOLVER-244?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17520342#comment-17520342 ] Hudson commented on MRESOLVER-244: -- Build succeeded in Jenkins: Maven » Maven TLP » maven-resolver » master #18 See https://ci-maven.apache.org/job/Maven/job/maven-box/job/maven-resolver/job/master/18/ > Deprecate FileTransformer API > - > > Key: MRESOLVER-244 > URL: https://issues.apache.org/jira/browse/MRESOLVER-244 > Project: Maven Resolver > Issue Type: Task > Components: Resolver >Reporter: Tamás Cservenák >Assignee: Tamás Cservenák >Priority: Major > Fix For: 1.8.0 > > > The FileTransformer API has serious issues about making resolver itself OOM > prone. Also, while this API was made part of Resolver public API, it is > really unused in resolver (sans that OOM-prone bit). > For now deprecate without replacement, and for Maven 4 let's see will we end > up with Maven API or provide some different, more usable and safe replacement. -- This message was sent by Atlassian Jira (v8.20.1#820001)