首页 > 解决方案 > 使用 Vue.js 将 Spring Boot 部署到 Heroku 构建成功,但无法启动

问题描述

我有一个Spring Boot带有Vue.js前端集成的应用程序。我正在尝试将其部署到Heroku.

该应用程序在 Heroku 上成功构建,但我没有看到 Heroku 甚至尝试启动该应用程序的迹象。

以下是我使用git push <my-heroku-branch>.

➜  MobstersREST git:(master) ✗ git push heroku-staging
Counting objects: 17, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (12/12), done.
Writing objects: 100% (17/17), 1.45 KiB | 1.45 MiB/s, done.
Total 17 (delta 6), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Java app detected
remote: -----> Installing JDK 1.8... done
remote: -----> Installing Maven 3.3.9... done
remote: -----> Executing: mvn -DskipTests clean dependency:list install
remote:        [INFO] Scanning for projects...
remote:        [INFO] ------------------------------------------------------------------------
remote:        [INFO] Reactor Build Order:
remote:        [INFO]
remote:        [INFO] mobsters-bot
remote:        [INFO] frontend
remote:        [INFO] backend
remote:        [INFO]
remote:        [INFO] ------------------------------------------------------------------------
remote:        [INFO] Building mobsters-bot 0.0.1-SNAPSHOT
remote:        [INFO] ------------------------------------------------------------------------
remote:        [INFO]
remote:        [INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ mobsters-bot ---
remote:        [INFO]
remote:        [INFO] --- maven-dependency-plugin:3.0.2:list (default-cli) @ mobsters-bot ---
remote:        [INFO]
remote:        [INFO] --- jacoco-maven-plugin:0.7.9:prepare-agent (pre-unit-test) @ mobsters-bot ---
remote:        [INFO] argLine set to -javaagent:/app/tmp/cache/.m2/repository/org/jacoco/org.jacoco.agent/0.7.9/org.jacoco.agent-0.7.9-runtime.jar=destfile=/tmp/build_03ad6ae5935b0f49e57a32488d6a1f6d/target/jacoco.exec
remote:        [INFO]
remote:        [INFO] --- jacoco-maven-plugin:0.7.9:report (post-unit-test) @ mobsters-bot ---
remote:        [INFO] Skipping JaCoCo execution due to missing execution data file.
remote:        [INFO]
remote:        [INFO] --- maven-install-plugin:2.5.2:install (default-install) @ mobsters-bot ---
remote:        [INFO] Installing /tmp/build_03ad6ae5935b0f49e57a32488d6a1f6d/pom.xml to /app/tmp/cache/.m2/repository/com/adrian/mobsters-bot/0.0.1-SNAPSHOT/mobsters-bot-0.0.1-SNAPSHOT.pom
remote:        [INFO]
remote:        [INFO] ------------------------------------------------------------------------
remote:        [INFO] Building frontend 0.0.1-SNAPSHOT
remote:        [INFO] ------------------------------------------------------------------------
remote:        [INFO]
remote:        [INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ frontend ---
remote:        [INFO] Deleting /tmp/build_03ad6ae5935b0f49e57a32488d6a1f6d/frontend/target
remote:        [INFO]
remote:        [INFO] --- maven-dependency-plugin:3.0.2:list (default-cli) @ frontend ---
remote:        [INFO]
remote:        [INFO] --- jacoco-maven-plugin:0.7.9:prepare-agent (pre-unit-test) @ frontend ---
remote:        [INFO] argLine set to -javaagent:/app/tmp/cache/.m2/repository/org/jacoco/org.jacoco.agent/0.7.9/org.jacoco.agent-0.7.9-runtime.jar=destfile=/tmp/build_03ad6ae5935b0f49e57a32488d6a1f6d/frontend/target/jacoco.exec
remote:        [INFO]
remote:        [INFO] --- frontend-maven-plugin:1.6:install-node-and-npm (install node and npm) @ frontend ---
remote:        [INFO] Installing node version v9.11.1
remote:        [INFO] Unpacking /app/tmp/cache/.m2/repository/com/github/eirslett/node/9.11.1/node-9.11.1-linux-x64.tar.gz into /tmp/build_03ad6ae5935b0f49e57a32488d6a1f6d/frontend/node/tmp
remote:        [INFO] Copying node binary from /tmp/build_03ad6ae5935b0f49e57a32488d6a1f6d/frontend/node/tmp/node-v9.11.1-linux-x64/bin/node to /tmp/build_03ad6ae5935b0f49e57a32488d6a1f6d/frontend/node/node
remote:        [INFO] Extracting NPM
remote:        [INFO] Installed node locally.
remote:        [INFO]
remote:        [INFO] --- frontend-maven-plugin:1.6:npm (npm install) @ frontend ---
remote:        [INFO] Running 'npm install' in /tmp/build_03ad6ae5935b0f49e57a32488d6a1f6d/frontend
remote:        [WARNING] npm WARN notice [SECURITY] ws has 1 high vulnerability. Go here for more details: https://nodesecurity.io/advisories?search=ws&version=1.1.2 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
remote:        [WARNING] npm WARN notice [SECURITY] mime has 1 moderate vulnerability. Go here for more details: https://nodesecurity.io/advisories?search=mime&version=1.3.6 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
remote:        [WARNING] npm WARN notice [SECURITY] debug has 1 low vulnerability. Go here for more details: https://nodesecurity.io/advisories?search=debug&version=2.3.3 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
remote:        [WARNING] npm WARN notice [SECURITY] debug has 1 low vulnerability. Go here for more details: https://nodesecurity.io/advisories?search=debug&version=2.2.0 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
remote:        [WARNING] npm WARN notice [SECURITY] debug has 1 low vulnerability. Go here for more details: https://nodesecurity.io/advisories?search=debug&version=2.3.3 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
remote:        [WARNING] npm WARN notice [SECURITY] debug has 1 low vulnerability. Go here for more details: https://nodesecurity.io/advisories?search=debug&version=2.3.3 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
remote:        [WARNING] npm WARN notice [SECURITY] parsejson has 1 high vulnerability. Go here for more details: https://nodesecurity.io/advisories?search=parsejson&version=0.0.3 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
remote:        [WARNING] npm WARN notice [SECURITY] debug has 1 low vulnerability. Go here for more details: https://nodesecurity.io/advisories?search=debug&version=2.6.8 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
remote:        [WARNING] npm WARN notice [SECURITY] https-proxy-agent has 1 high vulnerability. Go here for more details: https://nodesecurity.io/advisories?search=https-proxy-agent&version=1.0.0 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
remote:        [WARNING] npm WARN notice [SECURITY] http-proxy-agent has 1 high vulnerability. Go here for more details: https://nodesecurity.io/advisories?search=http-proxy-agent&version=1.0.0 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
remote:        [WARNING] npm WARN notice [SECURITY] macaddress has 1 critical vulnerability. Go here for more details: https://nodesecurity.io/advisories?search=macaddress&version=0.2.8 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
remote:        [WARNING] npm WARN notice [SECURITY] lodash has 1 low vulnerability. Go here for more details: https://nodesecurity.io/advisories?search=lodash&version=3.10.1 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
remote:        [WARNING] npm WARN notice [SECURITY] growl has 1 critical vulnerability. Go here for more details: https://nodesecurity.io/advisories?search=growl&version=1.9.2 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
remote:        [INFO]
remote:        [INFO] > phantomjs-prebuilt@2.1.16 install /tmp/build_03ad6ae5935b0f49e57a32488d6a1f6d/frontend/node_modules/phantomjs-prebuilt
remote:        [INFO] > node install.js
remote:        [INFO]
remote:        [INFO] PhantomJS not found on PATH
remote:        [INFO] Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2
remote:        [INFO] Saving to /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
remote:        [INFO] Receiving...
remote:        [INFO]
remote:        [INFO] Received 22866K total.
remote:        [INFO] Extracting tar contents (via spawned process)
remote:        [INFO] Removing /tmp/build_03ad6ae5935b0f49e57a32488d6a1f6d/frontend/node_modules/phantomjs-prebuilt/lib/phantom
remote:        [INFO] Copying extracted folder /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1526755629983/phantomjs-2.1.1-linux-x86_64 -> /tmp/build_03ad6ae5935b0f49e57a32488d6a1f6d/frontend/node_modules/phantomjs-prebuilt/lib/phantom
remote:        [INFO] Writing location.js file
remote:        [INFO] Done. Phantomjs binary available at /tmp/build_03ad6ae5935b0f49e57a32488d6a1f6d/frontend/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs
remote:        [INFO]
remote:        [INFO] > chromedriver@2.38.3 install /tmp/build_03ad6ae5935b0f49e57a32488d6a1f6d/frontend/node_modules/chromedriver
remote:        [INFO] > node install.js
remote:        [INFO]
remote:        [INFO] Downloading https://chromedriver.storage.googleapis.com/2.38/chromedriver_linux64.zip
remote:        [INFO] Saving to /tmp/chromedriver/chromedriver_linux64.zip
remote:        [INFO] Received 781K...
remote:        [INFO] Received 1568K...
remote:        [INFO] Received 2352K...
remote:        [INFO] Received 3136K...
remote:        [INFO] Received 3684K total.
remote:        [INFO] Extracting zip contents
remote:        [INFO] Copying to target path /tmp/build_03ad6ae5935b0f49e57a32488d6a1f6d/frontend/node_modules/chromedriver/lib/chromedriver
remote:        [INFO] Fixing file permissions
remote:        [INFO] Done. ChromeDriver binary available at /tmp/build_03ad6ae5935b0f49e57a32488d6a1f6d/frontend/node_modules/chromedriver/lib/chromedriver/chromedriver
remote:        [INFO]
remote:        [INFO] > uglifyjs-webpack-plugin@0.4.6 postinstall /tmp/build_03ad6ae5935b0f49e57a32488d6a1f6d/frontend/node_modules/webpack/node_modules/uglifyjs-webpack-plugin
remote:        [INFO] > node lib/post_install.js
remote:        [INFO]
remote:        [INFO]
remote:        [INFO] > sinon@4.5.0 postinstall /tmp/build_03ad6ae5935b0f49e57a32488d6a1f6d/frontend/node_modules/sinon
remote:        [INFO] > node scripts/support-sinon.js
remote:        [INFO]
remote:        [INFO] Have some ❤️ for Sinon? You can support the project via Open Collective:
remote:        [INFO]  > https://opencollective.com/sinon/donate
remote:        [INFO]
remote:        [WARNING] npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
remote:        [WARNING] npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
remote:        [ERROR]
remote:        [INFO] added 1515 packages in 32.916s
remote:        [INFO]
remote:        [INFO] --- frontend-maven-plugin:1.6:npm (npm run build) @ frontend ---
remote:        [INFO] Running 'npm run build' in /tmp/build_03ad6ae5935b0f49e57a32488d6a1f6d/frontend
remote:        [INFO]
remote:        [INFO] > frontend@1.0.0 build /tmp/build_03ad6ae5935b0f49e57a32488d6a1f6d/frontend
remote:        [INFO] > node build/build.js
remote:        [INFO]
remote:        [INFO] Hash: 5a4a6c797424a405ae0d
remote:        [INFO] Version: webpack 3.12.0
remote:        [INFO] Time: 9170ms
remote:        [INFO]                                                   Asset       Size  Chunks             Chunk Names
remote:        [INFO]                static/js/vendor.c397231b51d1afea579a.js     126 kB       0  [emitted]  vendor
remote:        [INFO]                   static/js/app.ada8a6a8238113fabbbb.js    10.5 kB       1  [emitted]  app
remote:        [INFO]              static/js/manifest.2ae2e69a05c33dfc65f8.js  857 bytes       2  [emitted]  manifest
remote:        [INFO]     static/css/app.509616311f4aa1438479df89f0d28911.css  432 bytes       1  [emitted]  app
remote:        [INFO] static/css/app.509616311f4aa1438479df89f0d28911.css.map  828 bytes          [emitted]
remote:        [INFO]            static/js/vendor.c397231b51d1afea579a.js.map     620 kB       0  [emitted]  vendor
remote:        [INFO]               static/js/app.ada8a6a8238113fabbbb.js.map    19.1 kB       1  [emitted]  app
remote:        [INFO]          static/js/manifest.2ae2e69a05c33dfc65f8.js.map    4.97 kB       2  [emitted]  manifest
remote:        [INFO]                                              index.html  510 bytes          [emitted]
remote:        [INFO]
remote:        [INFO] WARNING in ./src/components/HelloWorld.vue
remote:        [INFO]
remote:        [INFO]   ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 0 spaces but found 2
remote:        [INFO]   src/components/HelloWorld.vue:9:1
remote:        [INFO]     import {AXIOS} from './http-common'
remote:        [INFO]    ^
remote:        [INFO]
remote:        [INFO]   ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 0 spaces but found 2
remote:        [INFO]   src/components/HelloWorld.vue:11:1
remote:        [INFO]     export default {
remote:        [INFO]    ^
remote:        [INFO]
remote:        [INFO]   ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 2 spaces but found 4
remote:        [INFO]   src/components/HelloWorld.vue:12:1
remote:        [INFO]       name: 'HelloWorld',
remote:        [INFO]    ^
remote:        [INFO]
remote:        [INFO]   ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 2 spaces but found 4
remote:        [INFO]   src/components/HelloWorld.vue:13:1
remote:        [INFO]       data() {
remote:        [INFO]    ^
remote:        [INFO]
remote:        [INFO]   ✘  http://eslint.org/docs/rules/space-before-function-paren  Missing space before function parentheses
remote:        [INFO]   src/components/HelloWorld.vue:13:9
remote:        [INFO]       data() {
remote:        [INFO]            ^
remote:        [INFO]
remote:        [INFO]   ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 4 spaces but found 6
remote:        [INFO]   src/components/HelloWorld.vue:14:1
remote:        [INFO]         return {
remote:        [INFO]    ^
remote:        [INFO]
remote:        [INFO]   ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 6 spaces but found 8
remote:        [INFO]   src/components/HelloWorld.vue:15:1
remote:        [INFO]           response: [],
remote:        [INFO]    ^
remote:        [INFO]
remote:        [INFO]   ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 6 spaces but found 8
remote:        [INFO]   src/components/HelloWorld.vue:16:1
remote:        [INFO]           errors: []
remote:        [INFO]    ^
remote:        [INFO]
remote:        [INFO]   ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 4 spaces but found 6
remote:        [INFO]   src/components/HelloWorld.vue:17:1
remote:        [INFO]         }
remote:        [INFO]    ^
remote:        [INFO]
remote:        [INFO]   ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 2 spaces but found 4
remote:        [INFO]   src/components/HelloWorld.vue:18:1
remote:        [INFO]       },
remote:        [INFO]    ^
remote:        [INFO]
remote:        [INFO]   ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 2 spaces but found 4
remote:        [INFO]   src/components/HelloWorld.vue:20:1
remote:        [INFO]       methods: {
remote:        [INFO]    ^
remote:        [INFO]
remote:        [INFO]   ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 4 spaces but found 6
remote:        [INFO]   src/components/HelloWorld.vue:21:1
remote:        [INFO]         callRestService() {
remote:        [INFO]    ^
remote:        [INFO]
remote:        [INFO]   ✘  http://eslint.org/docs/rules/space-before-function-paren  Missing space before function parentheses
remote:        [INFO]   src/components/HelloWorld.vue:21:22
remote:        [INFO]         callRestService() {
remote:        [INFO]                         ^
remote:        [INFO]
remote:        [INFO]   ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 6 spaces but found 8
remote:        [INFO]   src/components/HelloWorld.vue:22:1
remote:        [INFO]           AXIOS.get(`mobsters`)
remote:        [INFO]    ^
remote:        [INFO]
remote:        [INFO]   ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 4 spaces but found 6
remote:        [INFO]   src/components/HelloWorld.vue:30:1
remote:        [INFO]         }
remote:        [INFO]    ^
remote:        [INFO]
remote:        [INFO]   ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 2 spaces but found 4
remote:        [INFO]   src/components/HelloWorld.vue:31:1
remote:        [INFO]       }
remote:        [INFO]    ^
remote:        [INFO]
remote:        [INFO]   ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 0 spaces but found 2
remote:        [INFO]   src/components/HelloWorld.vue:32:1
remote:        [INFO]     }
remote:        [INFO]    ^
remote:        [INFO]
remote:        [INFO]
remote:        [INFO] ✘ 17 problems (17 errors, 0 warnings)
remote:        [INFO]
remote:        [INFO]
remote:        [INFO] Errors:
remote:        [INFO]   15  http://eslint.org/docs/rules/indent
remote:        [INFO]    2  http://eslint.org/docs/rules/space-before-function-paren
remote:        [INFO]  @ ./src/router/index.js 3:0-49
remote:        [INFO]  @ ./src/main.js
remote:        [INFO]
remote:        [INFO]   Build complete.
remote:        [INFO]
remote:        [INFO]   Tip: built files are meant to be served over an HTTP server.
remote:        [INFO]   Opening index.html over file:// won't work.
remote:        [INFO]
remote:        [INFO]
remote:        [INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) @ frontend ---
remote:        [INFO] Using 'UTF-8' encoding to copy filtered resources.
remote:        [INFO] skip non existing resourceDirectory /tmp/build_03ad6ae5935b0f49e57a32488d6a1f6d/frontend/src/main/resources
remote:        [INFO] skip non existing resourceDirectory /tmp/build_03ad6ae5935b0f49e57a32488d6a1f6d/frontend/src/main/resources
remote:        [INFO]
remote:        [INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ frontend ---
remote:        [INFO] No sources to compile
remote:        [INFO]
remote:        [INFO] --- maven-resources-plugin:3.0.1:testResources (default-testResources) @ frontend ---
remote:        [INFO] Using 'UTF-8' encoding to copy filtered resources.
remote:        [INFO] skip non existing resourceDirectory /tmp/build_03ad6ae5935b0f49e57a32488d6a1f6d/frontend/src/test/resources
remote:        [INFO]
remote:        [INFO] --- maven-compiler-plugin:3.7.0:testCompile (default-testCompile) @ frontend ---
remote:        [INFO] No sources to compile
remote:        [INFO]
remote:        [INFO] --- maven-surefire-plugin:2.21.0:test (default-test) @ frontend ---
remote:        [INFO] Tests are skipped.
remote:        [INFO]
remote:        [INFO] --- jacoco-maven-plugin:0.7.9:report (post-unit-test) @ frontend ---
remote:        [INFO] Skipping JaCoCo execution due to missing execution data file.
remote:        [INFO]
remote:        [INFO] --- maven-jar-plugin:3.0.2:jar (default-jar) @ frontend ---
remote:        [WARNING] JAR will be empty - no content was marked for inclusion!
remote:        [INFO] Building jar: /tmp/build_03ad6ae5935b0f49e57a32488d6a1f6d/frontend/target/frontend-0.0.1-SNAPSHOT.jar
remote:        [INFO]
remote:        [INFO] --- maven-install-plugin:2.5.2:install (default-install) @ frontend ---
remote:        [INFO] Installing /tmp/build_03ad6ae5935b0f49e57a32488d6a1f6d/frontend/target/frontend-0.0.1-SNAPSHOT.jar to /app/tmp/cache/.m2/repository/com/adrian/frontend/0.0.1-SNAPSHOT/frontend-0.0.1-SNAPSHOT.jar
remote:        [INFO] Installing /tmp/build_03ad6ae5935b0f49e57a32488d6a1f6d/frontend/pom.xml to /app/tmp/cache/.m2/repository/com/adrian/frontend/0.0.1-SNAPSHOT/frontend-0.0.1-SNAPSHOT.pom
remote:        [INFO]
remote:        [INFO] ------------------------------------------------------------------------
remote:        [INFO] Building backend 0.0.1-SNAPSHOT
remote:        [INFO] ------------------------------------------------------------------------
remote:        [INFO]
remote:        [INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ backend ---
remote:        [INFO]
remote:        [INFO] --- maven-dependency-plugin:3.0.2:list (default-cli) @ backend ---
remote:        [INFO]
remote:        [INFO] --- jacoco-maven-plugin:0.7.9:prepare-agent (pre-unit-test) @ backend ---
remote:        [INFO] argLine set to -javaagent:/app/tmp/cache/.m2/repository/org/jacoco/org.jacoco.agent/0.7.9/org.jacoco.agent-0.7.9-runtime.jar=destfile=/tmp/build_03ad6ae5935b0f49e57a32488d6a1f6d/backend/target/jacoco.exec
remote:        [INFO]
remote:        [INFO] --- maven-resources-plugin:3.0.1:copy-resources (copy Vue.js frontend content) @ backend ---
remote:        [INFO] Using 'UTF-8' encoding to copy filtered resources.
remote:        [INFO] Copying 9 resources
remote:        [INFO]
remote:        [INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) @ backend ---
remote:        [INFO] Using 'UTF-8' encoding to copy filtered resources.
remote:        [INFO] Copying 0 resource
remote:        [INFO] Copying 12 resources
remote:        [INFO]
remote:        [INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ backend ---
remote:        [INFO] Changes detected - recompiling the module!
remote:        [INFO] Compiling 59 source files to /tmp/build_03ad6ae5935b0f49e57a32488d6a1f6d/backend/target/classes
remote:        [INFO]
remote:        [INFO] --- maven-resources-plugin:3.0.1:testResources (default-testResources) @ backend ---
remote:        [INFO] Using 'UTF-8' encoding to copy filtered resources.
remote:        [INFO] skip non existing resourceDirectory /tmp/build_03ad6ae5935b0f49e57a32488d6a1f6d/backend/src/test/resources
remote:        [INFO]
remote:        [INFO] --- maven-compiler-plugin:3.7.0:testCompile (default-testCompile) @ backend ---
remote:        [INFO] Changes detected - recompiling the module!
remote:        [INFO] Compiling 6 source files to /tmp/build_03ad6ae5935b0f49e57a32488d6a1f6d/backend/target/test-classes
remote:        [INFO] /tmp/build_03ad6ae5935b0f49e57a32488d6a1f6d/backend/src/test/java/com/adrian/mobstersrest/mobsters/services/MobsterServiceImplTest.java: Some input files use unchecked or unsafe operations.
remote:        [INFO] /tmp/build_03ad6ae5935b0f49e57a32488d6a1f6d/backend/src/test/java/com/adrian/mobstersrest/mobsters/services/MobsterServiceImplTest.java: Recompile with -Xlint:unchecked for details.
remote:        [INFO]
remote:        [INFO] --- maven-surefire-plugin:2.21.0:test (default-test) @ backend ---
remote:        [INFO] Tests are skipped.
remote:        [INFO]
remote:        [INFO] --- jacoco-maven-plugin:0.7.9:report (post-unit-test) @ backend ---
remote:        [INFO] Skipping JaCoCo execution due to missing execution data file.
remote:        [INFO]
remote:        [INFO] --- maven-jar-plugin:3.0.2:jar (default-jar) @ backend ---
remote:        [INFO] Building jar: /tmp/build_03ad6ae5935b0f49e57a32488d6a1f6d/backend/target/backend-0.0.1-SNAPSHOT.jar
remote:        [INFO]
remote:        [INFO] --- spring-boot-maven-plugin:2.0.1.RELEASE:repackage (default) @ backend ---
remote:        [INFO]
remote:        [INFO] --- maven-install-plugin:2.5.2:install (default-install) @ backend ---
remote:        [INFO] Installing /tmp/build_03ad6ae5935b0f49e57a32488d6a1f6d/backend/target/backend-0.0.1-SNAPSHOT.jar to /app/tmp/cache/.m2/repository/com/adrian/backend/0.0.1-SNAPSHOT/backend-0.0.1-SNAPSHOT.jar
remote:        [INFO] Installing /tmp/build_03ad6ae5935b0f49e57a32488d6a1f6d/backend/pom.xml to /app/tmp/cache/.m2/repository/com/adrian/backend/0.0.1-SNAPSHOT/backend-0.0.1-SNAPSHOT.pom
remote:        [INFO] ------------------------------------------------------------------------
remote:        [INFO] Reactor Summary:
remote:        [INFO]
remote:        [INFO] mobsters-bot ....................................... SUCCESS [  1.771 s]
remote:        [INFO] frontend ........................................... SUCCESS [ 50.362 s]
remote:        [INFO] backend ............................................ SUCCESS [  7.348 s]
remote:        [INFO] ------------------------------------------------------------------------
remote:        [INFO] BUILD SUCCESS
remote:        [INFO] ------------------------------------------------------------------------
remote:        [INFO] Total time: 01:00 min
remote:        [INFO] Finished at: 2018-05-19T18:47:38+00:00
remote:        [INFO] Final Memory: 56M/418M
remote:        [INFO] ------------------------------------------------------------------------
remote: -----> Discovering process types
remote:        Procfile declares types -> (none)
remote:
remote: -----> Compressing...
remote:        Done: 197.5M
remote: -----> Launching...
remote:        Released v5
remote:        https://shrouded-mountain-23800.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/shrouded-mountain-23800.git
   795913a..a8e3547  master -> master

然后我运行heroku logs --tail

➜  MobstersREST git:(master) ✗ heroku logs --tail
(node:12986) [MODULE_NOT_FOUND] Error Plugin: @heroku-cli/plugin-build: Cannot find module 'globby'
module: @oclif/config@1.6.18
task: not loading commands, globby not found
plugin: @heroku-cli/plugin-build
root: /usr/local/Cellar/heroku/7.0.40/libexec/lib/node_modules/heroku/node_modules/@heroku-cli/plugin-build
 ›   Warning: heroku update available from 7.0.40 to 7.0.47

我的完整项目设置可以在这里找到。

我正在关注位于此处的教程。Heroku 部分有点模糊。

标签: springspring-bootherokuvue.js

解决方案


问题是我的项目结构不受Procfile正在查看的默认配置的支持target/my-jar-file.jar,并且需要针对我不寻常的项目结构进行更改:backend/target/my-jar-file.jar.

web: java -jar backend/target/my-jar-file.jarProcfile我的应用程序的根目录中。


推荐阅读