java - Vaadin 8 alpha/beta 预发布失败,出现“不可解析的导入 POM:找不到”错误
问题描述
我无法尝试 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
文件夹。没有帮助。
解决方案
我看到两个问题:
.
版本字符串中缺少一个。它应该8.6.0.beta1
代替8.6.0beta1
.- 预发布存储库仅为配置
vaadin-prerelease
文件配置,默认情况下未启用。您需要更改您pom.xml
的始终启用配置文件或在构建应用程序时手动启用它(例如-Pvaadin-prerelease
从命令行使用)。出于性能原因,默认情况下不启用配置文件。
请参阅IntelliJ 2018 的此屏幕截图,显示:
vaadin-prerelease
复选框启用的配置文件。vaadin-version
POM 文件元素中的有效值。
推荐阅读
- laravel - Expo React Native 在后端将图像上传到 Laravel
- python-3.x - 代码在一个 .py 中创建新的 .txt 文件,但不在另一个 .py 中
- python - 创建一个包含目录中所有文件的 tar 文件
- java - java.net.SocketException:连接重置。我测试域名的ip,其他电脑访问同一个域名
- angularjs - AngularJS 找不到嵌套的模板文件
- javascript - 如何在反应中从数组中映射出预加载的图像?
- node.js - MongoDB,Mongoose:迭代查找结果
- ibm-cloud - IBM Watson Assistant:如何从选定的对话框选项中检索输入值?
- angular - 根据从查询中选择的单选 id 在过滤表上显示正在加载的 pinner
- reactjs - 当父母道具改变时反应孩子不会重新渲染