Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
OrganizationAdvent CalendarQiitadon (β)
Qiita JobsQiita ZineQiita Blog
Report this question
Subscribe question
Help us understand the problem. What is going on with this question?



VSCODEのターミナルに--warning-mode allを実行してみろ的なエラーが出ていたので実行してみたところ次のようなエラーが出ました。


PS C:\workspace\board-app-sample> gradle :build:app:war --warning-mode all             

> Configure project :app
The compile configuration has been deprecated for dependency declaration. This will fail with an error in Gradle 7.0. Please use the implementation configuration instead. Consult the upgrading guide for further information: https://docs.gradle.org/6.8.2/userguide/upgrading_version_5.html#dependencies_should_no_longer_be_declared_using_the_compile_and_runtime_configurations
        at build_44phxzx733luf61bnicjmj8p0$_run_closure2.doCall(C:\workspace\board-app-sample\app\build.gradle:33)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)
The AbstractArchiveTask.archiveName property has been deprecated. This is scheduled to be removed in Gradle 7.0. Please use the archiveFileName property instead. See https://docs.gradle.org/6.8.2/dsl/org.gradle.api.tasks.bundling.AbstractArchiveTask.html#org.gradle.api.tasks.bundling.AbstractArchiveTask:archiveName for more details.
        at build_44phxzx733luf61bnicjmj8p0$_run_closure5.doCall(C:\workspace\board-app-sample\app\build.gradle:48)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)

FAILURE: Build failed with an exception.

* What went wrong:
Project 'build' not found in root project 'board-app-sample'.

* 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



 * This file was generated by the Gradle 'init' task.
 * This generated file contains a sample Java application project to get you started.
 * For more details take a look at the 'Building Java & JVM projects' chapter in the Gradle
 * User Manual available at https://docs.gradle.org/6.7/userguide/building_java_projects.html

plugins {
    // Apply the application plugin to add support for building a CLI application in Java.
    id 'application'

    id 'war' // add

repositories {
    // Use JCenter for resolving dependencies.

dependencies {
    // Use JUnit Jupiter API for testing.
    testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.2'

    // Use JUnit Jupiter Engine for testing.
    testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'

    // This dependency is used by the application.
    implementation 'com.google.guava:guava:29.0-jre'

    providedCompile 'javax.servlet:javax.servlet-api:3.1.0' // add

   33行目ここでエラーが出ている compile group: 'mysql', name: 'mysql-connector-java', version: '5.1.49' // add

application {
    // Define the main class for the application.
    mainClass = 'board.app.sample.App'

tasks.named('test') {
    // Use junit platform for unit tests.

// ファイル末尾に追記
war {
   48行目ここでエラーが出ている archiveName 'boardsample.war'
tasks.withType(JavaCompile) {
    options.encoding = 'UTF-8'



No Answers yet.
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login