gradle: Skipping task ':compileJava' as it has no source files

roroco

i try gradle -d compileJava in my try project, and gradle raise "Skipping task ':compileJava' as it has no source files.". the worse thing is that i can't see anything created in build/. i create this project only with running gradle init and creating a "src/Ex.java".

my question is:

How to load default "compileJava" or define my "compileJava" to fix this warning.

Peter Niederwieser

By default, Java source files need to go into src/main/java (or src/test/java for test sources). Either adapt your directory structure accordingly, or reconfigure the source directory as follows:

sourceSets {
    main {
        java {
            srcDirs = ["src"]
        }
    }
}

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

Eclipse - Java - Gradle is skipping jacocoTestReport

分類Dev

GradleのcompileJava DEPENDSON spotlessApplyを作ります

分類Dev

gradle compileJava error: package org.junit does not exist

分類Dev

GradleにcompileJavaタスクを追加するプラグイン

分類Dev

Unzip skipping all files when extracting archive

分類Dev

Gradle Heroku Task 'stage'

分類Dev

Modify an existing gradle task

分類Dev

Modify an existing gradle task

分類Dev

Visualize gradle task dependencies

分類Dev

Gradle compileJavaタスク警告:[オプション]ブートストラップクラスパスが-source 1.6と組み合わせて設定されていません

分類Dev

how to tell rsync to preserve time stamp on files when source tree has a mounted point

分類Dev

IntelliJアイデア - のGradle:実行タスクに失敗しました ':compileJava'

分類Dev

gradleビルド、失敗タスク ':compileJava'の実行に失敗しました

分類Dev

Passing in tags to Gradle cucumber task

分類Dev

Override Task in build.gradle

分類Dev

Passing parameter to custom Gradle task

分類Dev

Convert ant signJar task to gradle

分類Dev

gradle:ソースファイルがないため、タスク ':compileJava'をスキップします

分類Dev

Gradle build: Execution failed for task ':app:lint'

分類Dev

Gradle build: Execution failed for task ':app:lint'

分類Dev

Android - what is gradle task connectedCheck used for

分類Dev

Gradle leftshift << operator with Task needed? (Is it superfluous)

分類Dev

Gradle: custom task with jvm arguments for Spring Boot

分類Dev

Could not get unknown property for task in Gradle?

分類Dev

Run gradle build(test) in subprojects in a custom task

分類Dev

Cannot exclude directories for a Gradle copy task

分類Dev

Gradle: execute tasks sequentially in some task

分類Dev

Use withType() for configuring Gradle task not compiling in IntelliJ

分類Dev

Use non-static method as source for Task

Related 関連記事

  1. 1

    Eclipse - Java - Gradle is skipping jacocoTestReport

  2. 2

    GradleのcompileJava DEPENDSON spotlessApplyを作ります

  3. 3

    gradle compileJava error: package org.junit does not exist

  4. 4

    GradleにcompileJavaタスクを追加するプラグイン

  5. 5

    Unzip skipping all files when extracting archive

  6. 6

    Gradle Heroku Task 'stage'

  7. 7

    Modify an existing gradle task

  8. 8

    Modify an existing gradle task

  9. 9

    Visualize gradle task dependencies

  10. 10

    Gradle compileJavaタスク警告:[オプション]ブートストラップクラスパスが-source 1.6と組み合わせて設定されていません

  11. 11

    how to tell rsync to preserve time stamp on files when source tree has a mounted point

  12. 12

    IntelliJアイデア - のGradle:実行タスクに失敗しました ':compileJava'

  13. 13

    gradleビルド、失敗タスク ':compileJava'の実行に失敗しました

  14. 14

    Passing in tags to Gradle cucumber task

  15. 15

    Override Task in build.gradle

  16. 16

    Passing parameter to custom Gradle task

  17. 17

    Convert ant signJar task to gradle

  18. 18

    gradle:ソースファイルがないため、タスク ':compileJava'をスキップします

  19. 19

    Gradle build: Execution failed for task ':app:lint'

  20. 20

    Gradle build: Execution failed for task ':app:lint'

  21. 21

    Android - what is gradle task connectedCheck used for

  22. 22

    Gradle leftshift << operator with Task needed? (Is it superfluous)

  23. 23

    Gradle: custom task with jvm arguments for Spring Boot

  24. 24

    Could not get unknown property for task in Gradle?

  25. 25

    Run gradle build(test) in subprojects in a custom task

  26. 26

    Cannot exclude directories for a Gradle copy task

  27. 27

    Gradle: execute tasks sequentially in some task

  28. 28

    Use withType() for configuring Gradle task not compiling in IntelliJ

  29. 29

    Use non-static method as source for Task

ホットタグ

アーカイブ