Skip to content

Fix task ordering for checkstyle Java 9 #28376

@jasontedor

Description

@jasontedor

The checkstyle configuration here is broken:

  • we are not configuring checkstyle for Java 9
  • the source set for Java 9 is not configured until after we have configured the checkstyle task

This can lead to bad ordering:

:server:checkstyleJava9 SKIPPED
:server:copyCheckstyleConf SKIPPED
:server:checkstyleMain SKIPPED

so the :server:checkstyleJava9 can fail with

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':server:checkstyleJava9'.
> Unable to create Root Module: configLocation {/home/jason/src/elastic/elasticsearch/server/build/checkstyle/checkstyle.xml}, classpath {/home/jason/src/elastic/elasticsearch/server/build/classes/java/java9:/home/jason/src/elastic/elasticsearch/server/build/resources/java9:/home/jason/src/elastic/elasticsearch/server/build/classes/java/main:/home/jason/src/elastic/elasticsearch/server/build/resources/main}.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions