Open jdelobel opened 1 year ago
Sorry to hear you're still having issues when using your VPN; we previously discussed these here if I recall correctly; anywhere else where we might have more context or leads to a potential fix?
I had a brief look using the stacktrace above; do you by chance have a larger stacktrace still? This one does not show what's contained within those grouped MavenDownloadingExceptions
. If not we might need to expand MavenDownloadingExceptions
to also print the contained exceptions somehow.
Hi @timtebeek
I don't have any other information in the logs. Ideally if we can develop the stacktraces in Open-rewrite to better target the problem that would be great!
Seems we've changed a few things around how such errors were reported, so the details might have gotten lost. I've added
When you mvn install
that branch locally, as well as the rewrite-maven-plugin, and use the snapshot versions in your project (temporarily) you should be able to uncover what the underlying exceptions are. Hope that helps you debug and potentially resolve the underlying issue.
Given that it requires your VPN to show the issue I didn't know how else to help you other than provide that code change and instructions to debug on your machine. I'm hoping you're able to provide your part of the puzzle in seeing this through.
Thanks! How I can find the snapshot version number?
Instructions for the snapshot versions are documented here: https://docs.openrewrite.org/reference/snapshot-instructions The links at the bottom of that page link to the latest snapshot versions as available through Sonatype OSS snapshots:
FYI,this stack is present on remote and in my company building. The only difference in remote is that the running takes a long time.
Do you see any additional log output isn't last week's version of the Maven plugin? https://github.com/openrewrite/rewrite-maven-plugin/releases/tag/v5.7.2 My earlier change should have made it in there such that we have more details to troubleshoot this issue.
Hi @timtebeek, I'm working with @jdelobel on the same project. And i have the same problem of resolving pom. I have the same exception : MavenDownloadingExceptions but no problem of VPN : the projet migrates in approximately in 20 minutes. To complete the investigation, i see in debug mode that markers containe the exception :
Markers(id=9cf47fb1-3eb6-432a-b771-d6fe5f32d6fa, markers=[
ParseExceptionResult(id=2fef0059-4732-491f-8c8e-688ebe720a10, parserType=MavenParser, exceptionType=MavenDownloadingExceptions, message=org.openrewrite.maven.MavenDownloadingExceptions: null
org.openrewrite.maven.MavenDownloadingExceptions.append(MavenDownloadingExceptions.java:44)
org.openrewrite.maven.tree.MavenResolutionResult.resolveDependencies(MavenResolutionResult.java:179), treeType=null),
GitProvenance(id=e3718ee9-bcd7-44ae-b36e-9ff0f7cf042e, origin=https://sgithub.xxx/xxx.git, branch=migration, change=e2e16543258b63433336509816badab2440fb86f, autocrlf=Input, eol=Native),
Windows 10 10.0 amd64,
BuildTool(id=1ff3d7e5-7c71-46a6-87db-3e8586a90465, type=Maven, version=3.9.4), \
JavaVersion(id=fab4266d-4a01-43b1-a9df-a1fa73f4318f, createdBy=1.8, vmVendor=Temurin, sourceCompatibility=1.8, targetCompatibility=1.8),
JavaProject(id=4d71a5c8-d75d-4ebf-9f72-14ef18c40450, projectName=xxx, publication=JavaProject.Publication(groupId=com.xxx, artifactId=xxx, version=7.14.3-SNAPSHOT)),
NamedStyles(id=ca5a09f9-b034-4414-8f9b-35cc74787bf7, name=org.openrewrite.xml.Autodetect, displayName=Auto-detected, description=Automatically detect styles from a repository's existing code., tags=[], styles=[TabsAndIndentsStyle(useTabCharacter=false, tabSize=1, indentSize=2, continuationIndentSize=10), GeneralFormatStyle(useCRLFNewLines=false)])])
Any link with POMs resolving problems ?
and the full stack traces of the exception in logs:
[INFO] Project [modules pom] Resolving Poms...
[DEBUG]
org.openrewrite.maven.MavenDownloadingExceptions
at org.openrewrite.maven.MavenDownloadingExceptions.append (MavenDownloadingExceptions.java:44)
at org.openrewrite.maven.tree.MavenResolutionResult.resolveDependencies (MavenResolutionResult.java:179)
at org.openrewrite.maven.MavenParser.parseInputs (MavenParser.java:107)
at org.openrewrite.Parser.parse (Parser.java:58)
at org.openrewrite.maven.MavenMojoProjectParser.parseMaven (MavenMojoProjectParser.java:412)
at org.openrewrite.maven.MavenMojoProjectParser.listSourceFiles (MavenMojoProjectParser.java:140)
at org.openrewrite.maven.AbstractRewriteMojo.loadSourceSet (AbstractRewriteMojo.java:257)
at org.openrewrite.maven.AbstractRewriteMojo.listResults (AbstractRewriteMojo.java:239)
at org.openrewrite.maven.AbstractRewriteRunMojo.execute (AbstractRewriteRunMojo.java:53)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
Suppressed: org.openrewrite.maven.MavenDownloadingException: log4j:log4j failed. No version provided
at org.openrewrite.maven.tree.ResolvedPom.resolveDependencies (ResolvedPom.java:549)
at org.openrewrite.maven.tree.ResolvedPom.resolveDependencies (ResolvedPom.java:521)
at org.openrewrite.maven.tree.MavenResolutionResult.resolveDependencies (MavenResolutionResult.java:174)
at org.openrewrite.maven.MavenParser.parseInputs (MavenParser.java:107)
at org.openrewrite.Parser.parse (Parser.java:58)
at org.openrewrite.maven.MavenMojoProjectParser.parseMaven (MavenMojoProjectParser.java:412)
at org.openrewrite.maven.MavenMojoProjectParser.listSourceFiles (MavenMojoProjectParser.java:140)
at org.openrewrite.maven.AbstractRewriteMojo.loadSourceSet (AbstractRewriteMojo.java:257)
at org.openrewrite.maven.AbstractRewriteMojo.listResults (AbstractRewriteMojo.java:239)
at org.openrewrite.maven.AbstractRewriteRunMojo.execute (AbstractRewriteRunMojo.java:53)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
Suppressed: org.openrewrite.maven.MavenDownloadingException: log4j:log4j failed. No version provided
at org.openrewrite.maven.tree.ResolvedPom.resolveDependencies (ResolvedPom.java:549)
at org.openrewrite.maven.tree.ResolvedPom.resolveDependencies (ResolvedPom.java:521)
at org.openrewrite.maven.tree.MavenResolutionResult.resolveDependencies (MavenResolutionResult.java:174)
at org.openrewrite.maven.MavenParser.parseInputs (MavenParser.java:107)
at org.openrewrite.Parser.parse (Parser.java:58)
at org.openrewrite.maven.MavenMojoProjectParser.parseMaven (MavenMojoProjectParser.java:412)
at org.openrewrite.maven.MavenMojoProjectParser.listSourceFiles (MavenMojoProjectParser.java:140)
at org.openrewrite.maven.AbstractRewriteMojo.loadSourceSet (AbstractRewriteMojo.java:257)
at org.openrewrite.maven.AbstractRewriteMojo.listResults (AbstractRewriteMojo.java:239)
at org.openrewrite.maven.AbstractRewriteRunMojo.execute (AbstractRewriteRunMojo.java:53)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
Additional information concerning the stacktrace above: No log4j:log4j dependency is present in the project when we execute the mvn dependency:tree command
In complement if i force the isAcceptable method in to true in mavenvisitor's recipe , the mavenvisitor does not work and generate this message in the stacktrace
error:org.openrewrite.internal.RecipeRunException: java.lang.IllegalStateException: Maven visitors should not be visiting XML documents without a Maven marker
......
I finally found the problem! Although the dependency tree does not containe anylog4j:log4j
deps, I still debugged your source code and we see that it is an internal library of our company that is pulling.
130 = {ResolvedPom$DependencyAndDependent@8455} "ResolvedPom.DependencyAndDependent(dependency=log4j:log4j, scope=Compile, dependent=~\.m2\repository/com/myorg/ppp/pppconst/1.3.25/pppconst-1.3.25.pom, rootDependent=com.myorg.ppp:pppconst:1.3.25, definedIn=org.openrewrite.maven.tree.ResolvedPom@4ecf7c1c)"
So I'm going to add an exclusion like this before and i think it will be good. I get you some news tommorow
- org.openrewrite.maven.ExcludeDependency:
groupId: log4j
artifactId: log4j
Thanks
When i launch mvn dependency:tree -X
on my project I have the following warnings:
[WARNING] The POM for com.myorg.cci:pppconst:jar:1.3.25 is invalid, transitive dependencies (if any) will not be available: 2 problems were encountered while building the effective model for com.myorg.ppp:pppconst:1.3.25
[ERROR] 'dependencies.dependency.version' for log4j:log4j:jar is missing. @
[ERROR] 'dependencies.dependency.version' for junit:junit:jar is missing. @
Maybe it will be better if open-rewrite keep the the same as Maven do (the build is success but just log error with -X option)?
Glad to see you were able to work out the cause of the issue; looks like the additional logging output helped.
As also discussed in Slack: it's tricky to allow faulty resolution to pass partially; is it possible to fix the internal dependency pom instead?
Thanks. Yes we can!
But imagine that this dependency is external or that is not in our hands. The problem will be still here. I think that open-rewrite must have the same behavior as Maven has on dependency resolution.
and the full stack traces of the exception in logs:
[INFO] Project [modules pom] Resolving Poms... [DEBUG] org.openrewrite.maven.MavenDownloadingExceptions at org.openrewrite.maven.MavenDownloadingExceptions.append (MavenDownloadingExceptions.java:44) at org.openrewrite.maven.tree.MavenResolutionResult.resolveDependencies (MavenResolutionResult.java:179) at org.openrewrite.maven.MavenParser.parseInputs (MavenParser.java:107) at org.openrewrite.Parser.parse (Parser.java:58) at org.openrewrite.maven.MavenMojoProjectParser.parseMaven (MavenMojoProjectParser.java:412) at org.openrewrite.maven.MavenMojoProjectParser.listSourceFiles (MavenMojoProjectParser.java:140) at org.openrewrite.maven.AbstractRewriteMojo.loadSourceSet (AbstractRewriteMojo.java:257) at org.openrewrite.maven.AbstractRewriteMojo.listResults (AbstractRewriteMojo.java:239) at org.openrewrite.maven.AbstractRewriteRunMojo.execute (AbstractRewriteRunMojo.java:53) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174) at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75) at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162) at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283) at org.apache.maven.cli.MavenCli.main (MavenCli.java:206) at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348) Suppressed: org.openrewrite.maven.MavenDownloadingException: log4j:log4j failed. No version provided at org.openrewrite.maven.tree.ResolvedPom.resolveDependencies (ResolvedPom.java:549) at org.openrewrite.maven.tree.ResolvedPom.resolveDependencies (ResolvedPom.java:521) at org.openrewrite.maven.tree.MavenResolutionResult.resolveDependencies (MavenResolutionResult.java:174) at org.openrewrite.maven.MavenParser.parseInputs (MavenParser.java:107) at org.openrewrite.Parser.parse (Parser.java:58) at org.openrewrite.maven.MavenMojoProjectParser.parseMaven (MavenMojoProjectParser.java:412) at org.openrewrite.maven.MavenMojoProjectParser.listSourceFiles (MavenMojoProjectParser.java:140) at org.openrewrite.maven.AbstractRewriteMojo.loadSourceSet (AbstractRewriteMojo.java:257) at org.openrewrite.maven.AbstractRewriteMojo.listResults (AbstractRewriteMojo.java:239) at org.openrewrite.maven.AbstractRewriteRunMojo.execute (AbstractRewriteRunMojo.java:53) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174) at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75) at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162) at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283) at org.apache.maven.cli.MavenCli.main (MavenCli.java:206) at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348) Suppressed: org.openrewrite.maven.MavenDownloadingException: log4j:log4j failed. No version provided at org.openrewrite.maven.tree.ResolvedPom.resolveDependencies (ResolvedPom.java:549) at org.openrewrite.maven.tree.ResolvedPom.resolveDependencies (ResolvedPom.java:521) at org.openrewrite.maven.tree.MavenResolutionResult.resolveDependencies (MavenResolutionResult.java:174) at org.openrewrite.maven.MavenParser.parseInputs (MavenParser.java:107) at org.openrewrite.Parser.parse (Parser.java:58) at org.openrewrite.maven.MavenMojoProjectParser.parseMaven (MavenMojoProjectParser.java:412) at org.openrewrite.maven.MavenMojoProjectParser.listSourceFiles (MavenMojoProjectParser.java:140) at org.openrewrite.maven.AbstractRewriteMojo.loadSourceSet (AbstractRewriteMojo.java:257) at org.openrewrite.maven.AbstractRewriteMojo.listResults (AbstractRewriteMojo.java:239) at org.openrewrite.maven.AbstractRewriteRunMojo.execute (AbstractRewriteRunMojo.java:53) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174) at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75) at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162) at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283) at org.apache.maven.cli.MavenCli.main (MavenCli.java:206) at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
FYI If I didn't have the rest of the stack trace like my colleagues it's because of maven. In fact I was using version 3.8.5 and he was using version 3.9.5. With the latter I can clearly see the rest of the stack trace like him. This version correct too the long duration of resolution
What version of OpenRewrite are you using?
I am using
OPEN_REWRITE_MAVEN_PLUGIN_VERSION="5.5.2" OPEN_REWRITE_MIGRATE_JAVA_VERSION="2.1.0" OPEN_REWRITE_TESTING_VERSION="2.0.11"
FYI I always have this problem even with Open Rewrite previous versions (v7)
How are you running OpenRewrite?
I am using the Maven plugin and run
mvn:rewrite:run
command, and my project is a multi modules project.What is the smallest, simplest way to reproduce the problem?
I dont known how to tell you how to reproduce the problem. The problem only occurs when i work in remote with my corporate VPN. In the company I don't have any problem.
What did you expect to see?
No exception and a speed maven resolution like when I'm in my company buildings (Resolving poms take a few seconds/minutes)
What did you see instead?
A long time blocked on log
[INFO] Project [bwd] Resolving Poms...
It can vary from 30 minutes to 2 hours. After this time elapsed all my recipes run correctlyWhat is the full stack trace of any errors you encountered?
Are you interested in contributing a fix to OpenRewrite?