Closed tarekoraby closed 3 years ago
Thank you! The problem seems to be that the FileUtils.forceMkdirParent()
method is missing, which suggests that something pulls in older commons-io
onto the Vaadin plugin's classpath.
If you run ./gradlew buildEnvironment
then you can see that the Gretty plugin 3.0.4 is indeed pulling in commons-io:2.4, while Vaadin Gradle plugin requires commons-io:2.5.
In order to fix this, make sure to apply the Vaadin Gradle plugin in the root project as follows:
root build.gradle
:
plugins {
id 'org.gretty' version '3.0.4'
id 'com.vaadin' version '0.14.5.1' apply false
}
repositories {
mavenCentral()
}
subproject's build.gradle
:
plugins {
id 'war'
id 'com.vaadin'
}
Now you can verify via ./gradlew buildEnvironment
that the Vaadin Gradle plugin causes Gradle to use commons-io:2.5 also for Gretty plugin (which is okay since commons-io is backward compatible):
/gradlew buildEnvironment|grep commons-io
| | +--- commons-io:commons-io:2.4 -> 2.5
| | +--- commons-io:commons-io:2.5
Therefore, it's not really a bug in the plugin, but rather in how Gradle constructs plugin classpath for subprojects.
The solution is therefore to declare the com.vaadin
plugin in the root project and only apply it in appropriate subprojects.
Since it's not a bug in the plugin, closing as won't fix.
Desktop (please complete the following information):
Describe the bug Attempting a multi-project build, produces an error
To Reproduce Unzip the attached base-starter-gradle-submodule-test.zip and run vaadinPrepareFrontend
Expected behavior The project runs
Actual behavior The following error is produced