質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

Gradle

Gradleは、ビルド自動化ツールです。 ソフトウェアパッケージやドキュメント、 または実際に何か他の種類のプロジェクトの構築、テスト、公開、展開などを自動化が出来ます

Spring Boot

Spring Bootは、Javaのフレームワークの一つ。Springプロジェクトが提供する様々なフレームワークを統合した、アプリケーションを高速で開発するために設計されたフレームワークです。

Q&A

0回答

512閲覧

SpringBootアプリのHerokuデプロイ時にspring-boot-gradle-pluginが取得できない

Ayaka1005

総合スコア7

Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

Gradle

Gradleは、ビルド自動化ツールです。 ソフトウェアパッケージやドキュメント、 または実際に何か他の種類のプロジェクトの構築、テスト、公開、展開などを自動化が出来ます

Spring Boot

Spring Bootは、Javaのフレームワークの一つ。Springプロジェクトが提供する様々なフレームワークを統合した、アプリケーションを高速で開発するために設計されたフレームワークです。

0グッド

0クリップ

投稿2019/01/16 12:42

編集2019/01/16 12:44

バージョン情報

  • JDK 1.8.0_172
  • Gradle 4.10

解決したいこと

HerokuにSpringBootで作ったアプリをデプロイしようとしたのですが、
下記のエラーが出てソースコードのpushに失敗します。

-----> Gradle Wrapper app detected -----> Installing OpenJDK 1.8... done -----> Building Gradle app... WARNING: The Gradle buildpack is currently in Beta. -----> executing ./gradlew Downloading https://services.gradle.org/distributions/gradle-4.10-all.zip ............................................................................................................... Welcome to Gradle 4.10! Here are the highlights of this release: - Incremental Java compilation by default - Periodic Gradle caches cleanup - Gradle Kotlin DSL 1.0-RC3 - Nested included builds - SNAPSHOT plugin versions in the `plugins {}` block For more details see https://docs.gradle.org/4.10/release-notes.html Starting a Gradle Daemon (subsequent builds will be faster) FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring root project 'KakeiboApp'. > Could not resolve all artifacts for configuration ':classpath'. > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:2.0.5.RELEASE. Required by: project : > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:2.0.5.RELEASE. > Could not get resource 'https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-gradle-plugin/2.0.5.RELEASE/spring-boot-gradle-plugin-2.0.5.RELEASE.pom'. > Could not GET 'https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-gradle-plugin/2.0.5.RELEASE/spring-boot-gradle-plugin-2.0.5.RELEASE.pom'. > Received fatal alert: protocol_version * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 12s ! Failed to build app ! Push rejected, failed to compile Gradle Wrapper app. ! Push failed

build.gradleに記載したspring-boot-gradle-pluginが取得できていないようなのですが、
どのように修正すればよいのか分からずに詰まっています。

もし解決策をご存知の方がいらっしゃいましたら、ご教示頂けますと幸いです。

各種設定ファイル

build.gradle

buildscript { repositories { mavenCentral() } dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:2.0.5.RELEASE") } } apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'idea' apply plugin: 'org.springframework.boot' apply plugin: 'io.spring.dependency-management' bootJar { baseName = 'gs-serving-web-content' version = '0.1.0' } repositories { mavenCentral() } sourceCompatibility = 1.8 targetCompatibility = 1.8 dependencies { compile("org.springframework.boot:spring-boot-starter-web") compile("org.springframework.boot:spring-boot-starter-thymeleaf") compile("org.springframework.boot:spring-boot-devtools") compile("org.springframework.boot:spring-boot-starter-jetty") // JPA Data (We are going to use Repositories, Entities, Hibernate, etc...) compile 'org.springframework.boot:spring-boot-starter-data-jpa' // Use MySQL Connector-J compile 'mysql:mysql-connector-java' compile 'postgresql' testCompile("junit:junit") } //デプロイ時のデフォルトタスク defaultTasks "clean", "build" task stage(dependsOn: ['build', 'clean']) build.mustRunAfter clean

system.properties

java.runtime.version=1.8.0_172

Procfile

web: java -jar build/libs/KakeiboApp-1.0.jar --server.port=$PORT

ディレクトリ構成

. ├── .gitignore ├── .system.properties ├── Procfile ├── build.gradle ├── setting.gradle ├── gradlew ├── build │   ├── classes │   │   └── java │   │   └── main │   │   └── income_outgo │   ├── libs │   ├── resources │   │   └── main │   │   ├── static │   │   │   ├── css │   │   │   ├── img │   │   │   └── js │   │   └── templates │   │   ├── category │   │   └── income_outgo │   └── tmp │   ├── bootJar │   └── compileJava ├── gradle │   └── wrapper ├── out │   └── production └── src ├── main │   ├── java │   │   └── income_outgo │   └── resources │   ├── static │   │   ├── css │   │   ├── img │   │   └── js │   └── templates │   ├── category │   └── income_outgo └── test ├── java └── resources

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問