ci.gradle icon indicating copy to clipboard operation
ci.gradle copied to clipboard

NPE in libertyDev task when no Java plugin is applied

Open dgeissl opened this issue 4 years ago • 0 comments

The libertyDev task tries to access the current projects SourceSets. https://github.com/OpenLiberty/ci.gradle/blob/37a4c60f0e557e48262f4a7f8eb882ab4d38d37f/src/main/groovy/io/openliberty/tools/gradle/tasks/DevTask.groovy#L867-L874

However SourceSets are a concept that is only available with the JavaBasePlugin and the main and tests SourceSets are only configured if the java plugin is applied. This is especially not the case then using ear projects, where the java plugin is by default unnecessary.

Accessing the sourceSets should be null-pointer-proof and only be done when the project has the JavaBasePlugin applied.

dgeissl avatar Sep 06 '21 05:09 dgeissl