我有这个错误:
项目生成错误:无法解析的父POM:找不到项目com.playtech.simator:Net:POM:1.0-SNAPSHOT和‘parent.relativePath’指向错误的本地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">
<parent>
<groupId>com.playtech.simulator</groupId>
<artifactId>net</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.playtech.simulator.net</groupId>
<artifactId>server</artifactId>
<dependencies>
<dependency>
<groupId>com.ogp</groupId>
<artifactId>com.playtech.openapi.core</artifactId>
<version>${ogw.version}</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.9</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.0.13</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>3.2.2.RELEASE</version>
</dependency>
<dependency>
<groupId>com.playtech.simulator</groupId>
<artifactId>simulator-app</artifactId>
<version>1.0-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.ogp</groupId>
<artifactId>com.playtech.openapi.core.hazelcast</artifactId>
<version>${ogw.version}</version>
</dependency>
<dependency>
<groupId>com.ogp</groupId>
<artifactId>com.playtech.openapi.core.frontend.http.socketio</artifactId>
<version>${ogw.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>attached</goal>
</goals>
<phase>package</phase>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>com.playtech.openapi.simulator.SimulatorServer</mainClass>
</manifest>
</archive>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
3条答案
按热度按时间sxissh061#
通常,项目在父节中的POM包含以下信息,如果您碰巧使用了Eclipse,您可以很容易地看到这些信息:
相对路径表示与表单中项目文件夹位置相关的路径,例如
../main-project/parent
在您的POM中,您的
<parent>
声明中应该有另一行:因此,修改你的目标,注意项目设置在哪里。
hgtggwj02#
请务必安装:
k3bvogb13#
您可以在项目中禁用maven支持并手动提供这些依赖项。这可能是因为pom.xml没有获得父级pomp。