【问题标题】:Could not find a pom.xml file - Heroku找不到 pom.xml 文件 - Heroku
【发布时间】:2019-04-01 23:07:54
【问题描述】:

我正在尝试将我的 maven/springboot 应用程序(包含在 RideSharing-backend 中)部署到 Heroku,但是自从我将两个新的 Android 应用程序文件夹添加到 git 存储库的根目录之后,我的 pom.xml 文件似乎可以无法定位。 pom 文件位于RideSharing-backend 中,Android 应用程序文件夹为DriverPassenger。有没有办法从RideSharingv2(父目录)定义pom文件的路径?

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.example</groupId>
    <artifactId>RideSharing-backend</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>RideSharing</name>
    <description>Demo project for Spring Boot</description>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.0.6.RELEASE</version>
        <relativePath /> <!-- lookup parent from repository -->
    </parent>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>


</project>

【问题讨论】:

    标签: spring maven heroku pom.xml


    【解决方案1】:

    您可以使用 heroku.yml https://devcenter.heroku.com/articles/buildpack-builds-heroku-yml#run-defining-the-process-to-run 或 procfile https://devcenter.heroku.com/articles/procfile 自定义部署。 使用这些,您可以指定您希望如何运行应用程序。

    【讨论】:

      猜你喜欢
      • 2021-01-19
      • 1970-01-01
      • 1970-01-01
      • 2019-11-23
      • 2022-12-18
      • 1970-01-01
      • 1970-01-01
      • 2018-09-02
      • 2017-07-12
      相关资源
      最近更新 更多