我正在尝试here中所述的Baeldung Drools Spring Integration 。但是,在解决Maven依赖关系的第一步中,出现以下错误:
[错误]项目com.baeldung:spring-drools:1.0.0-SNAPSHOT(spring-drools \ pom.xml)有1个错误 [错误] com.baeldung:spring-drools:1.0.0-SNAPSHOT的不可解析的父POM:找不到工件com.baeldung:parent-modules:pom:1.0.0-SNAPSHOT和'parent.relativePath'点位于错误的本地POM @第9行,第13列-> [帮助2]
pom.xml:
<?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.baeldung</groupId>
<artifactId>spring-drools</artifactId>
<version>1.0.0-SNAPSHOT</version>
<parent>
<groupId>com.baeldung</groupId>
<artifactId>parent-modules</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<dependencies>
<!-- ... -->
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-ci</artifactId>
<version>${drools-version}</version>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-decisiontables</artifactId>
<version>${drools-version}</version>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-core</artifactId>
<version>${drools-version}</version>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-compiler</artifactId>
<version>${drools-version}</version>
</dependency>
<!--spring integration -->
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-spring</artifactId>
<version>${drools-version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring-framework.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<properties>
<drools-version>7.0.0.Final</drools-version>
<spring-framework.version>4.3.3.RELEASE</spring-framework.version>
</properties>
</project>
答案 0 :(得分:1)
以下因素导致了问题
<parent>
<groupId>com.baeldung</groupId>
<artifactId>parent-modules</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
该父pom应该在本地Maven存储库中可用。请检查您本地的Maven存储库。