我想在heroku上部署我的应用程序。我的项目树如下所示:
-parent
---pom.xml
----server
------pom.xml
----client
------pom.xml
我的poms看起来像: 父母:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.8.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.sample.app</groupId>
<artifactId>app</artifactId>
<version>0.0.1-snAPSHOT</version>
<name>app</name>
<description>Demo project for Spring Boot</description>
<packaging>pom</packaging>
服务器(春季):
<parent>
<groupId>com.sample.app</groupId>
<artifactId>app</artifactId>
<version>0.0.1-snAPSHOT</version>
</parent>
<artifactId>server</artifactId>
<version>0.0.1-snAPSHOT</version>
<name>server</name>
<description>Demo project for Spring Boot</description>
<packaging>jar</packaging>
客户:
<parent>
<groupId>com.ithub.app</groupId>
<artifactId>ithub</artifactId>
<version>0.0.1-snAPSHOT</version>
</parent>
<artifactId>client</artifactId>
<name>client</name>
在推动heroku时出现错误:
[ERROR] The build could not read 1 project -> [Help 1]
remote: [ERROR]
remote: [ERROR] The project com.sample.app.server:server:0.0.1-snAPSHOT (/tmp/build_32d4e17f5e3650384ae11dd736c10d30/server/pom.xml) has 1 error
remote: [ERROR] Non-resolvable parent POM for com.sample.app.server:server:0.0.1-snAPSHOT: Could not find artifact com.sample.app:sample:pom:0.0.1-snAPSHOT and 'parent.relativePath' points at no local POM @ line 5,column 13 -> [Help 2]
我什至尝试过:
<relativePath>../pom.xml</relativePath>
在server.xml的<parent>
中,但仍然相同。
我不知道该怎么做,我正在努力约4小时。
谢谢。