我正在尝试将我的项目从 Vaadin 7.1.0 迁移到 Vaadin 8.26.0,但出现错误
[INFO] Downloading vaadin-compatibility-server 8.26.0 from Maven to null/.m2/repository
[ERROR] SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
[ERROR] SLF4J: Defaulting to no-operation (NOP) logger implementation
[ERROR] SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[ERROR] Exception in thread "main" java.lang.RuntimeException: org.eclipse.aether.resolution.DependencyResolutionException: Failed to read artifact descriptor for com.vaadin:vaadin-compatibility-server:jar:8.26.0
[ERROR] at com.vaadin.framework8.migrate.MavenResolver.resolve(MavenResolver.java:73)
[ERROR] at com.vaadin.framework8.migrate.VadinJarFinder.download(VadinJarFinder.java:55)
[ERROR] at com.vaadin.framework8.migrate.VadinJarFinder.lambda$get$1(VadinJarFinder.java:22)
[ERROR] at java.util.Optional.orElseGet(Optional.java:267)
[ERROR] at com.vaadin.framework8.migrate.VadinJarFinder.get(VadinJarFinder.java:22)
[ERROR] at com.vaadin.framework8.migrate.Migrate.main(Migrate.java:45)
[ERROR] Caused by: org.eclipse.aether.resolution.DependencyResolutionException: Failed to read artifact descriptor for com.vaadin:vaadin-compatibility-server:jar:8.26.0
[ERROR] at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:387)
[ERROR] at com.vaadin.framework8.migrate.MavenResolver.resolve(MavenResolver.java:68)
[ERROR] ... 5 more
[ERROR] Caused by: org.eclipse.aether.collection.DependencyCollectionException: Failed to read artifact descriptor for com.vaadin:vaadin-compatibility-server:jar:8.26.0
[ERROR] at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:208)
[ERROR] at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:341)
[ERROR] ... 6 more
[ERROR] Caused by: org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for com.vaadin:vaadin-compatibility-server:jar:8.26.0
[ERROR] at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:282)
[ERROR] at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:198)
[ERROR] at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:202)
[ERROR] ... 7 more
[ERROR] Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact com.vaadin:vaadin-compatibility-server:pom:8.26.0 from/to central (http://central.maven.org/maven2/): central.maven.org
[ERROR] at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
[ERROR] at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
[ERROR] at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
[ERROR] at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:267)
[ERROR] ... 9 more
[ERROR] Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact com.vaadin:vaadin-compatibility-server:pom:8.26.0 from/to central (http://central.maven.org/maven2/): central.maven.org
[ERROR] at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:43)
[ERROR] at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)
[ERROR] at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
[ERROR] at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)
[ERROR] at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:249)
[ERROR] at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)
[ERROR] at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
[ERROR] ... 12 more
[ERROR] Caused by: java.net.UnknownHostException: central.maven.org
[ERROR] at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
[ERROR] at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:929)
[ERROR] at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1335)
[ERROR] at java.net.InetAddress.getAllByName0(InetAddress.java:1288)
[ERROR] at java.net.InetAddress.getAllByName(InetAddress.java:1203)
[ERROR] at java.net.InetAddress.getAllByName(InetAddress.java:1127)
[ERROR] at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:44)
[ERROR] at org.apache.http.impl.conn.DefaultClientConnectionOperator.resolveHostname(DefaultClientConnectionOperator.java:259)
[ERROR] at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:159)
[ERROR] at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:304)
[ERROR] at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:611)
[ERROR] at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446)
[ERROR] at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)
[ERROR] at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
[ERROR] at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57)
[ERROR] at org.apache.http.impl.client.DecompressingHttpClient.execute(DecompressingHttpClient.java:158)
[ERROR] at org.eclipse.aether.transport.http.HttpTransporter.execute(HttpTransporter.java:318)
[ERROR] at org.eclipse.aether.transport.http.HttpTransporter.implGet(HttpTransporter.java:274)
[ERROR] at org.eclipse.aether.spi.connector.transport.AbstractTransporter.get(AbstractTransporter.java:59)
[ERROR] at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask(BasicRepositoryConnector.java:447)
[ERROR] at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:350)
[ERROR] ... 17 more
[ERROR] Migration to Vaadin 8 failed
org.codehaus.mojo.gwt.shell.JavaCommandException: Command [[
C:\Program Files\Java\jdk1.8.0_361\jre\bin\java -Xmx4G -Xss1024k com.vaadin.framework8.migrate.Migrate -version=8.26.0
]] failed with status 1
at org.codehaus.mojo.gwt.shell.JavaCommand.execute (JavaCommand.java:330)
at com.vaadin.integration.maven.Vaadin8UpgradeMojo.doExecute (Vaadin8UpgradeMojo.java:85)
at org.codehaus.mojo.gwt.shell.AbstractGwtShellMojo.execute (AbstractGwtShellMojo.java:181)
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)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.650 s
[INFO] Finished at: 2024-08-01T11:11:00+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.vaadin:vaadin-maven-plugin:8.26.0:upgrade8 (default-cli) on project quicktickets-dashboard: Problem migrating the project: Command [[
[ERROR] C:\Program Files\Java\jdk1.8.0_361\jre\bin\java -Xmx4G -Xss1024k com.vaadin.framework8.migrate.Migrate -version=8.26.0
[ERROR] ]] failed with status 1
[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
我尝试添加
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.32</version>
</dependency>
到 pom.xml 但没有工作。请有人帮我解决这个问题。
编辑
我正在使用 Eclipse 版本:2024-06 (4.32.0) 内部版本号:20240606-1231,Java jdk 1.8.0_361。尝试从存储库中删除所有文件,但出现相同的错误。尝试使用另一个版本的JDK同样的错误。我在项目终端中使用 mvn vaadin:upgrade8 命令。
我在处理 2 个项目时遇到了这个问题,第一个是 vaadin 14,另一个是最新的 Vaadin 24。
问题与您位于
.Vaadin
的
/Users/..../.Vaadin
文件夹有关
您必须删除
.Vaadin
文件夹才能下载新的依赖项