You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi we use this plugin in a project with a lot of gradle modules. Sometime we get build errors with this error:
Fatal error during transformation using /home/jenkins/workdir/workspace/amodule/build/quality-configs/spotbugs/html-report-style.xsl: The processing instruction target matching "[xX][mM][lL]" is not allowed.
If we look in the html-report-style.xsl we see the same content two times like:
I did some digging in the source code and i think it could be a concurrency problem:
:spotbugsMain and :spotbugsTest are executed at the same time for one module
so
ru.vyarus.gradle.plugin.quality.ConfigLoader#copyConfig
is executed by two threads
private File copyConfig(File parent, String path, boolean override) {
File target = new File(parent, path)
if (target.exists() && !override) {
return target
}
if (!target.parentFile.exists() && !target.parentFile.mkdirs()) {
throw new IllegalStateException("Failed to create directories: $target.parentFile.absolutePath")
}
InputStream stream = getClass().getResourceAsStream("/ru/vyarus/quality/config/$path")
if (stream == null) {
throw new IllegalStateException("Default config file not found in classpath: $path")
}
target << stream.text
return target
}
This could explain the observed behavior.
What do you think?
Even with lots of gradle modules and a lot of builds this does not happen often so it's hard to come up with a testcase for this.
Thx
The text was updated successfully, but these errors were encountered:
Hi we use this plugin in a project with a lot of gradle modules. Sometime we get build errors with this error:
Fatal error during transformation using /home/jenkins/workdir/workspace/amodule/build/quality-configs/spotbugs/html-report-style.xsl: The processing instruction target matching "[xX][mM][lL]" is not allowed.
If we look in the html-report-style.xsl we see the same content two times like:
I did some digging in the source code and i think it could be a concurrency problem:
:spotbugsMain and :spotbugsTest are executed at the same time for one module
so
ru.vyarus.gradle.plugin.quality.ConfigLoader#copyConfig
is executed by two threads
This could explain the observed behavior.
What do you think?
Even with lots of gradle modules and a lot of builds this does not happen often so it's hard to come up with a testcase for this.
Thx
The text was updated successfully, but these errors were encountered: