我的Maven项目出了点问题。我正在尝试使用命令"mvn clean install“,但是没有成功。我已经在Eclipse IDE中更新并清理了Maven项目。我还删除了".m2“目录中的"repository”文件夹。这将再次创建文件夹,但我仍然收到相同的错误:

我的pom.xml文件:
<properties>
<version.thorntail>2.2.0.Final</version.thorntail>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<failOnMissingWebXml>false</failOnMissingWebXml>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.thorntail</groupId>
<artifactId>bom-all</artifactId>
<version>${version.thorntail}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<finalName>demo</finalName>
<plugins>
<plugin>
<groupId>io.thorntail</groupId>
<artifactId>thorntail-maven-plugin</artifactId>
<version>${version.thorntail}</version>
<executions>
<execution>
<goals>
<goal>package</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>io.thorntail</groupId>
<artifactId>jaxrs</artifactId>
</dependency>
<dependency>
<groupId>io.thorntail</groupId>
<artifactId>cdi</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate.ogm</groupId>
<artifactId>hibernate-ogm-mongodb</artifactId>
<version>5.0.0.Final</version>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
<version>3.8.0</version>
</dependency>
</dependencies>任何帮助都会非常感谢!
发布于 2018-11-24 08:24:49
问题出在Maven版的上(顺便说一下,你用的是哪一个?)
当我使用eclipse的嵌入式maven (version 3.5.3 )运行我的Thorntail项目时,它工作在上。
当我使用本地maven (版本3.6.0) 运行它时,我得到了同样的错误。
maven Solution:使用兼容版本的。( try 3.5.3或3.5.4) 与thorntail都可以正常工作。
如果您想配置不同的eclipse maven版本,请访问:
Eclipse ->首选项-> Maven ->安装
在那里您可以添加一个新的。
发布于 2019-01-04 19:40:43
Thorntail 2.x中的第三方依赖项存在问题,这与最新的Maven版本不兼容。一旦发布,新的Thorntail版本应该是2.3.0 should。
在GitHub上,您可以跟踪status of the issue here
https://stackoverflow.com/questions/53126325
复制相似问题