0

I want to use qulice-maven-plugin and I do not want to use the default findBugs rules but to set my custom once. Is that possible? - Also, I do not want qulice-maven-plugin to fail on checkstyle violations, but I do no want to disable the plugin. How to change the default qulice-maven-plugin, checkstyle configuration?

<build>
  <plugins>
    <plugin>
      <groupId>com.qulice</groupId>
      <artifactId>qulice-maven-plugin</artifactId>
      <version>0.16.4</version>
      <configuration>
        <license>file:${basedir}/LICENSE.txt</license>
      </configuration>
      <executions>
        <execution>
          <goals>
            <goal>check</goal>
          </goals>
        </execution>
      </executions>
    </plugin>
  </plugins>
</build>
Xelian
  • 16,680
  • 25
  • 99
  • 152
  • First i would remove the license configuration based on the docs it is the default. Furthermore i would ask the creators of the qulice-maven-plugin ... – khmarbaise May 26 '16 at 10:57

1 Answers1

3

It is not possible to override the rules in qulice. The basic idea behind it is that it has a set of rules that are not changeable. So each project that uses qulice looks more/less the same.

You can only disable qulice using regexp (checkstyle:.*), like this:

<plugin>
    <groupId>com.qulice</groupId>
    <artifactId>qulice-maven-plugin</artifactId>
    <version>0.16.5</version>
    <configuration>
        <license>file:./LICENSE.txt</license>
        <excludes>
            <exclude>findbugs:~com.qulice.foo.M.*</exclude>
            <exclude>findbugs:com.qulice.foo.Bar</exclude>
            <exclude>findbugs:.*</exclude>
            <exclude>checkstyle:.*</exclude>
        </excludes>
    </configuration>
    <executions>
        <execution>
            <goals>
                <goal>check</goal>
            </goals>
        </execution>
    </executions>
</plugin>

So you can achieve only the second requirement - build won't fail if checkstyle fails. For findbugs you would need to use SuppressFBWarnings (from edu.umd.cs.findbugs.annotations) like this: @SuppressFBWarnings("JLM_JSR166_UTILCONCURRENT_MONITORENTER")

Krzysztof Krasoń
  • 26,515
  • 16
  • 89
  • 115
  • thanks. But I have some rules that are not necessary and which cause a lot of noise in the reports. I need bigger power of configuration. For now I think qulice will not fulfill the requirements of my project, it will not reduce the complexity of my maven script but will even make it more complex and will cause more troubles. – Xelian Jun 05 '16 at 09:09
  • @Xelian just use Checkstyle and PMD directly and configure them the way you need – yegor256 Sep 25 '16 at 00:55