-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin 1.58 is incompatible with Spotbugs #18
Comments
Can you repeat that in an open project? And provide a link to that. |
no response, closing |
This was found when trying to get dependencies updated in a project with an urgent release. I just haven't had time yet, please re-open. |
Sorry about the nested folder, I just slapped this together quickly... Based on the Gradle template, just added Spotbugs and Changelog Plugin. With Changelog Plugin enabled (including 1.57 in this case), Spotbugs fails to launch. With Changelog Plugin commented out, Spotbugs returns an error and fails to launch.
|
You added it twice: And you should probably use the plugin DSL way of doing things:
That way, the plugins don't share classpath and you dont get this kind of error. |
Ah, so I did. I started from scratch rather than use the project from work to be sure it wasn't something odd in the project setup and made something odd instead. Removed the old style dependency statement on L15, bug persists. Based on the stacktrace, I was expecting |
I can see it also now. Perhaps it is SLF4J: spotbugs/spotbugs-gradle-plugin#11 Would be nice to shaddow the dependencies and package a fat jar of git-changelog-lib but I have been experiencing strange behavior of JGit when doing that. |
Could be, though that was supposed to be fixed in Spotbugs Plugin 1.6.5, and this is reproducible using both 1.7.1 and 2.0.0. |
This works for me: buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath("com.google.guava:guava:27.0.1-jre")
classpath("gradle.plugin.se.bjurr.gitchangelog:git-changelog-gradle-plugin:1.64") {
exclude group:"org.slf4j"
exclude group:"com.google.guava"
}
}
}
plugins {
// Apply the java-library plugin to add support for Java Library
id 'java'
id 'com.github.spotbugs' version '1.7.1'
}
apply plugin: "se.bjurr.gitchangelog.git-changelog-gradle-plugin"
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
}
spotbugs {
toolVersion = '3.1.12'
}
dependencies {
implementation 'org.apache.commons:commons-math3:3.6.1'
implementation 'com.google.guava:guava:27.0.1-jre'
testImplementation 'junit:junit:4.12'
}
task gitChangelogTask(type: se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask) {
file = new File("CHANGELOG.md");
templateContent = """
Changelog of Bug18Sample.
{{#tags}}
## {{name}}
{{#issues}}
{{#hasIssue}}
{{#hasLink}}
### {{name}} [{{issue}}]({{link}}) {{title}} {{#hasIssueType}} *{{issueType}}* {{/hasIssueType}} {{#hasLabels}} {{#labels}} *{{.}}* {{/labels}} {{/hasLabels}}
{{/hasLink}}
{{^hasLink}}
### {{name}} {{issue}} {{title}} {{#hasIssueType}} *{{issueType}}* {{/hasIssueType}} {{#hasLabels}} {{#labels}} *{{.}}* {{/labels}} {{/hasLabels}}
{{/hasLink}}
{{/hasIssue}}
{{^hasIssue}}
### {{name}}
{{/hasIssue}}
{{#commits}}
**{{{messageTitle}}}**
{{#messageBodyItems}}
* {{.}}
{{/messageBodyItems}}
[{{hash}}](https://github.com/{{ownerName}}/{{repoName}}/commit/{{hash}}) {{authorName}} *{{commitTime}}*
{{/commits}}
{{/issues}}
{{/tags}}
""";
} |
Our project uses both Spotbugs and the Changelog plugin.
Using Spotbugs 3.1.12 and the Spotbugs Gradle plugin 1.7.1 or 2.0.0 with the Changelog plugin 1.55-1.57 works fine.
Changelog plugin 1.58, 1.59, and 1.64 each appear to cause the Spotbugs worker thread to exit with an error code.
Unfortunately, the Spotbugs Worker does not return any logging or usable errors, so I am unsure what the root cause could be.
The text was updated successfully, but these errors were encountered: