スキルレベル
・開発未経験。独学。
・Java SE Gold試験勉強中。ITエンジニア就職に向けてポートフォリオ制作初期段階。
前提
eclipseで作成した動的webプロジェクトをWARファイルとしてデスクトップにエクスポート
→以下の通り、ユーザー[pddad]ディレクトリにて、同一ディレクトリにあるWARファイル[227_sj0803]を、コマンド[heroku war:deploy]でデプロイ実行
C:\Users\pddad>heroku war:deploy C:\Users\pddad --app 227_sj0803
→ [Warning: war:deploy is not a heroku command.]とワーニングメッセージ等が表示される
実現したいこと
eclipseの動的webプロジェクトのWARファイルを、herokuにデプロイしたい。
発生している問題・エラーメッセージ
エラーメッセージ » Warning: war:deploy is not a heroku command. Did you mean ci:debug? [y/n]: » Error: Run heroku help for a list of available commands.
該当のソースコード
試したこと
・メッセージの通り、herokuコマンドが有効になっていない(仮説)。よってheroku java CLIプラグインをインストールする為、[heroku plugins:install java]コマンド実行
→下記エラー[Installing plugin java... failed]となり、インストール失敗。
エラーメッセージ C:\Users\pddad>heroku plugins:install java error C:\Users\pddad\AppData\Local\heroku\node_modules\java: Command failed. Exit code: 1 Command: node-gyp rebuild Arguments: Directory: C:\Users\pddad\AppData\Local\heroku\node_modules\java Output: gyp info it worked if it ends with ok gyp info using node-gyp@9.3.0 gyp info using node@14.19.0 | win32 | x64 gyp ERR! find Python gyp ERR! find Python Python is not set from command line or npm configuration (中略) gyp ERR! not ok Installing plugin java... failed Error: yarn add java@latest --non-interactive --mutex=file:C:/Users/pddad/AppData/Local/heroku/yarn.lock --preferred-cache-folder=C:/Users/pddad/AppData/Local/heroku/yarn --check-files --registry=https://registry.npmjs.org exited with code 1 at ChildProcess.<anonymous> (C:/Users/pddad/AppData/Local/heroku/client/7.66.4/node_modules/@oclif/plugin-plugins/lib/yarn.js:31:28)
・また[Did you mean ci:debug? [y/n]: ]でy入力実行で、下記エラーメッセージとなる。
» Error: Unexpected argument: C:\Users\pddad » See more help with --help
・さらに[Unexpected argument: C:\Users\pddad]とあるので、[heroku war:deploy --app 227_sj0803]入力実行すると、下記エラーメッセージとなる。
» Warning: war:deploy is not a heroku command. Did you mean ci:debug? [y/n]: y ! Couldn't find that app.
[Couldn't find that app]とあるが、実際Webアプリの入ったWebプロジェクトをWAR化しているので、アプリは見つかっていると考えています。
・・・これ以上、解決策が見つかりませんので、ご教授いただければ幸いです。
※現在調査中。情報がわかり次第、コメントは今後も追記します。
参考サイト
https://devcenter.heroku.com/ja/articles/war-deployment
補足情報(FW/ツールのバージョンなど)
OpenJDK Runtime Environment 18.9
windows10 64bit
java se 11
tomcat9
あなたの回答
tips
プレビュー