gpt4 book ai didi

java - Vaadin 8 alpha/beta 预发布失败并出现 “Non-resolvable import POM: Failure to find” 错误

转载 作者:行者123 更新时间:2023-12-02 10:45:53 26 4
gpt4 key购买 nike

我无法尝试 Vaadin 8 的 alpha 和 beta 版本。

➥ 我到底需要做什么才能将正在运行的 Vaadin 8.5.2 项目更改为使用 Vaadin 8.6.0beta1

场景

我使用的是 IntelliJ 2018.3,配置为使用外部 Maven 3.5.4。

我按照以下网址中的说明进行操作: https://vaadin.com/framework/releases/8.6.0.beta1

实际上,我的 POM 已经有一对 <id>vaadin-prereleases</id>该页面上显示的条目:

<repositories>
<!-- ... -->

<repository>
<id>vaadin-prereleases</id>
<name>Vaadin Pre-releases</name>
<url>https://maven.vaadin.com/vaadin-prereleases</url>
</repository>

</repositories>

<pluginRepositories>
<!-- ... -->

<pluginRepository>
<id>vaadin-prereleases</id>
<name>Vaadin Pre-releases</name>
<url>https://maven.vaadin.com/vaadin-prereleases</url>
</pluginRepository>

</pluginRepositories>

问题

当我改变时:

<vaadin.version>8.5.2</vaadin.version>
<vaadin.plugin.version>8.5.2</vaadin.plugin.version>

至:

<vaadin.version>8.6.0beta1</vaadin.version>
<vaadin.plugin.version>8.6.0beta1</vaadin.plugin.version>

...运行 Maven 时出现以下错误 clean ,基本上是关于Non-resolvable import POM: Failure to find com.vaadin:vaadin-bom:pom:8.6.0beta1

控制台:

[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Non-resolvable import POM: Failure to find com.vaadin:vaadin-bom:pom:8.6.0beta1 in http://maven.vaadin.com/vaadin-addons was cached in the local repository, resolution will not be reattempted until the update interval of vaadin-addons has elapsed or updates are forced @ line 41, column 25
[ERROR] 'dependencies.dependency.version' for com.vaadin:vaadin-server:jar is missing. @ line 58, column 21
[ERROR] 'dependencies.dependency.version' for com.vaadin:vaadin-push:jar is missing. @ line 62, column 21
[ERROR] 'dependencies.dependency.version' for com.vaadin:vaadin-client-compiled:jar is missing. @ line 66, column 21
[ERROR] 'dependencies.dependency.version' for com.vaadin:vaadin-themes:jar is missing. @ line 70, column 21
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.basilbourque.example:grid-refresh:1.0-SNAPSHOT (/Users/basilbourque/IdeaProjects/GridRefresh/pom.xml) has 5 errors
[ERROR] Non-resolvable import POM: Failure to find com.vaadin:vaadin-bom:pom:8.6.0beta1 in http://maven.vaadin.com/vaadin-addons was cached in the local repository, resolution will not be reattempted until the update interval of vaadin-addons has elapsed or updates are forced @ line 41, column 25 -> [Help 2]
[ERROR] 'dependencies.dependency.version' for com.vaadin:vaadin-server:jar is missing. @ line 58, column 21
[ERROR] 'dependencies.dependency.version' for com.vaadin:vaadin-push:jar is missing. @ line 62, column 21
[ERROR] 'dependencies.dependency.version' for com.vaadin:vaadin-client-compiled:jar is missing. @ line 66, column 21
[ERROR] 'dependencies.dependency.version' for com.vaadin:vaadin-themes:jar is missing. @ line 70, column 21
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

将这两行更改为官方版本(例如8.5.0)时,我没有遇到这些问题或8.5.1 。问题仅在于 alpha 和 beta 预发行版。

这是一个 POM 文件示例。

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.basilbourque.example</groupId>
<artifactId>grid-refresh</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>grid-refresh</name>

<prerequisites>
<maven>3</maven>
</prerequisites>

<properties>
<!-- Changing this… -->
<!--<vaadin.version>8.5.2</vaadin.version>-->
<!--<vaadin.plugin.version>8.5.2</vaadin.plugin.version>-->
<!-- …to this… -->
<vaadin.version>8.6.0beta1</vaadin.version>
<vaadin.plugin.version>8.6.0beta1</vaadin.plugin.version>
<!-- …fails with an error message: Non-resolvable import POM: Failure to find com.vaadin:vaadin-bom:pom:8.6.0beta1 in http://maven.vaadin.com/vaadin-addons was cached in the local repository, resolution will not be reattempted until the update interval of vaadin-addons has elapsed or updates are forced @ line 41, column 25 -->
<jetty.plugin.version>9.4.12.v20180830</jetty.plugin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>10</maven.compiler.source>
<maven.compiler.target>10</maven.compiler.target>
<!-- If there are no local customizations, this can also be "fetch" or "cdn" -->
<vaadin.widgetset.mode>local</vaadin.widgetset.mode>
</properties>

<repositories>
<repository>
<id>vaadin-addons</id>
<url>http://maven.vaadin.com/vaadin-addons</url>
</repository>
</repositories>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-bom</artifactId>
<version>${vaadin.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-server</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-push</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-client-compiled</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-themes</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.2</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<!-- Exclude an unnecessary file generated by the GWT compiler. -->
<packagingExcludes>WEB-INF/classes/VAADIN/widgetsets/WEB-INF/**</packagingExcludes>
</configuration>
</plugin>
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.plugin.version}</version>
<executions>
<execution>
<goals>
<goal>update-theme</goal>
<goal>update-widgetset</goal>
<goal>compile</goal>
<!-- Comment out compile-theme goal to use on-the-fly theme compilation -->
<goal>compile-theme</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
<!-- Clean up also any pre-compiled themes -->
<configuration>
<filesets>
<fileset>
<directory>src/main/webapp/VAADIN/themes</directory>
<includes>
<include>**/styles.css</include>
<include>**/styles.scss.cache</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>

<!-- The Jetty plugin allows us to easily test the development build by
running jetty:run on the command line. -->
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>${jetty.plugin.version}</version>
<configuration>
<scanIntervalSeconds>2</scanIntervalSeconds>
</configuration>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<!-- Vaadin pre-release repositories -->
<id>vaadin-prerelease</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>

<repositories>
<repository>
<id>vaadin-prereleases</id>
<name>Vaadin Pre-releases</name>
<url>http://maven.vaadin.com/vaadin-prereleases</url>
</repository>
<repository>
<id>vaadin-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>vaadin-prereleases</id>
<name>Vaadin Pre-releases</name>
<url>http://maven.vaadin.com/vaadin-prereleases</url>
</pluginRepository>
<pluginRepository>
<id>vaadin-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>

</project>

我尝试删除 .m2 > repository我的主文件夹中的文件夹。没有帮助。

最佳答案

我看到两个问题:

  1. 版本字符串中缺少 .。它应该是 8.6.0.beta1 而不是 8.6.0beta1
  2. 预发布存​​储库仅针对 vaadin-prerelease 配置文件进行配置,默认情况下不启用。您需要更改您的pom.xml以始终启用配置文件或在构建应用程序时手动启用它(例如从命令行使用-Pvaadin-prerelease)。出于性能原因,默认情况下不会启用该配置文件。

请参阅 IntelliJ 的屏幕截图2018 年,显示:

  • 通过复选框启用的 vaadin-prerelease 配置文件。
  • POM 文件的 vaadin-version 元素中的有效值。

screenshot of IntelliJ 2018 showing POM file in editor along with "vaadin-prelease" selected in "Maven" panel

关于java - Vaadin 8 alpha/beta 预发布失败并出现 “Non-resolvable import POM: Failure to find” 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52583609/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com