You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it failed with this error: MavenDownloadingException: org.jetbrains:annotations failed. No version provided
To reproduce the problem, I create an exemple from my project.
Unzip this (only poms inside): openrewrite-bug.zip
and run these commands:
cd lib
mvn clean install
cd ../app
mvn clean install
mvn dependency:tree
mvn org.openrewrite.maven:rewrite-maven-plugin:run -Drewrite.activeRecipes=org.openrewrite.maven.BestPractices
What did you expect to see?
No errors :-)
What did you see instead?
This error, it can't find version of org.jetbrains:annotations dependency:
[ERROR] Failed to execute goal org.openrewrite.maven:rewrite-maven-plugin:5.40.2:run (default-cli) on project module1: Failed to parse or resolve the Maven POM file or one of its dependencies; We can not reliably continue without this information.: Failed to parse or resolve the Maven POM file or one of its dependencies; We can not reliably continue without this information.
[ERROR] <?xml version="1.0" encoding="UTF-8"?>
[ERROR] <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
[ERROR] xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
[ERROR] <modelVersion>4.0.0</modelVersion>
[ERROR]
[ERROR] <parent>
[ERROR] <groupId>org.openrewrite.test</groupId>
[ERROR] <artifactId>app</artifactId>
[ERROR] <version>1.1-SNAPSHOT</version>
[ERROR] </parent>
[ERROR]
[ERROR] <groupId>org.openrewrite.test</groupId>
[ERROR] <artifactId>module1</artifactId>
[ERROR] <packaging>jar</packaging>
[ERROR]
[ERROR] <dependencies>
[ERROR] <!--~~(org.jetbrains:annotations failed. No version provided)~~>--><dependency>
[ERROR] <groupId>org.openrewrite.test</groupId>
[ERROR] <artifactId>starter-security-client-webmvc</artifactId>
[ERROR] <version>1.0</version>
[ERROR] <scope>compile</scope>
[ERROR] </dependency>
[ERROR] </dependencies>
[ERROR] </project>
[ERROR] org.openrewrite.maven.MavenDownloadingExceptions: null
[ERROR] org.openrewrite.maven.MavenDownloadingExceptions.append(MavenDownloadingExceptions.java:44)
[ERROR] org.openrewrite.maven.tree.MavenResolutionResult.resolveDependencies(MavenResolutionResult.java:178)
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :module1
What is the full stack trace of any errors you encountered?
[INFO] Project [app] Resolving Poms...
[DEBUG] Downloaded org.openrewrite.test:java:1.0 from org.openrewrite.test:app:1.1-SNAPSHOT
[DEBUG] Downloaded org.openrewrite.test:pom:1.0 from org.openrewrite.test:app:1.1-SNAPSHOT
[DEBUG] Downloaded org.openrewrite.test:bom-pom:1.0 from org.openrewrite.test:app:1.1-SNAPSHOT
[DEBUG] Downloaded org.openrewrite.test:lib:1.0 from org.openrewrite.test:app:1.1-SNAPSHOT
[DEBUG] Downloaded org.openrewrite.test:all-bom:1.0 from org.openrewrite.test:app:1.1-SNAPSHOT
[DEBUG] Downloaded org.openrewrite.test:bom:1.0 from org.openrewrite.test:all-bom:1.0
[DEBUG] Downloaded org.openrewrite.test:commons-bom:1.0 from org.openrewrite.test:all-bom:1.0
[DEBUG] Downloaded org.openrewrite.test:libs-bom:1.0 from org.openrewrite.test:all-bom:1.0
[DEBUG] Downloaded org.openrewrite.test:starter-security-client-webmvc:1.0 from org.openrewrite.test:module1:1.1-SNAPSHOT
[DEBUG] Downloaded org.openrewrite.test:starter-security:1.0 from org.openrewrite.test:starter-security-client-webmvc:1.0
[DEBUG] Downloaded org.openrewrite.test:starters:1.0 from org.openrewrite.test:starter-security-client-webmvc:1.0
[DEBUG] Downloaded org.openrewrite.test:starter-security-common:1.0 from org.openrewrite.test:starter-security-client-webmvc:1.0
[DEBUG]
org.openrewrite.maven.MavenDownloadingExceptions
at org.openrewrite.maven.MavenDownloadingExceptions.append (MavenDownloadingExceptions.java:44)
at org.openrewrite.maven.tree.MavenResolutionResult.resolveDependencies (MavenResolutionResult.java:178)
at org.openrewrite.maven.MavenParser.parseInputs (MavenParser.java:116)
at org.openrewrite.Parser.parse (Parser.java:59)
at org.openrewrite.maven.MavenMojoProjectParser.parseMaven (MavenMojoProjectParser.java:553)
at org.openrewrite.maven.MavenMojoProjectParser.listSourceFiles (MavenMojoProjectParser.java:146)
at org.openrewrite.maven.AbstractRewriteBaseRunMojo.loadSourceSet (AbstractRewriteBaseRunMojo.java:236)
at org.openrewrite.maven.AbstractRewriteBaseRunMojo.listResults (AbstractRewriteBaseRunMojo.java:152)
at org.openrewrite.maven.AbstractRewriteRunMojo.execute (AbstractRewriteRunMojo.java:64)
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:903)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:280)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:203)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke (Method.java:580)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:255)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:201)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:361)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:314)
Suppressed: org.openrewrite.maven.MavenDownloadingException: org.jetbrains:annotations failed. No version provided
at org.openrewrite.maven.tree.ResolvedPom.resolveDependencies (ResolvedPom.java:874)
at org.openrewrite.maven.tree.ResolvedPom.resolveDependencies (ResolvedPom.java:845)
at org.openrewrite.maven.tree.MavenResolutionResult.resolveDependencies (MavenResolutionResult.java:173)
at org.openrewrite.maven.MavenParser.parseInputs (MavenParser.java:116)
at org.openrewrite.Parser.parse (Parser.java:59)
at org.openrewrite.maven.MavenMojoProjectParser.parseMaven (MavenMojoProjectParser.java:553)
at org.openrewrite.maven.MavenMojoProjectParser.listSourceFiles (MavenMojoProjectParser.java:146)
at org.openrewrite.maven.AbstractRewriteBaseRunMojo.loadSourceSet (AbstractRewriteBaseRunMojo.java:236)
at org.openrewrite.maven.AbstractRewriteBaseRunMojo.listResults (AbstractRewriteBaseRunMojo.java:152)
at org.openrewrite.maven.AbstractRewriteRunMojo.execute (AbstractRewriteRunMojo.java:64)
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:903)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:280)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:203)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke (Method.java:580)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:255)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:201)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:361)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:314)
The text was updated successfully, but these errors were encountered:
Hi @philippe-granet ; Appreciate the level of detail in your report. Is there any way to reproduce the problem in a smaller example? Since 14 poms is quite a bit to wrap my head around. Ideally this is reproduced in a unit test. Note that we have mechanisms to reproduce this in unit tests in openrewrite/rewrite in our Assertions classes
What version of OpenRewrite are you using?
I am using latest maven plugin version v5.40.2
How are you running OpenRewrite?
I am using the Maven plugin in CLI
What is the smallest, simplest way to reproduce the problem?
When I run
mvn dependency:tree
, I see my app depends onorg.jetbrains:annotations:jar:24.1.0:compile
:But when I run openrewrite on my app with this command:
it failed with this error:
MavenDownloadingException: org.jetbrains:annotations failed. No version provided
To reproduce the problem, I create an exemple from my project.
Unzip this (only poms inside): openrewrite-bug.zip
and run these commands:
What did you expect to see?
No errors :-)
What did you see instead?
This error, it can't find version of org.jetbrains:annotations dependency:
What is the full stack trace of any errors you encountered?
The text was updated successfully, but these errors were encountered: