running secbugs maven plugin from command line/ maven plugin configuration parameters in command line

93 Views Asked by At

maybe this is a generic question with regards to how to transfer maven plugin paramters from the pom.xml to the commandline, but I have usually done this without problems using the method below. For the find-security-bugs plugin, however, it is not working.

The find-security-bugs plugin docu says that you can configure the plugin in your pom.xml as follows:

<plugins>
    [...]
    <plugin>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-maven-plugin</artifactId>
        <version>4.7.2.1</version>
        <configuration>
            <includeFilterFile>spotbugs-security-include.xml</includeFilterFile>
            <plugins>
                <plugin>
                    <groupId>com.h3xstream.findsecbugs</groupId>
                    <artifactId>findsecbugs-plugin</artifactId>
                    <version>1.12.0</version>
                </plugin>
            </plugins>
        </configuration>
    </plugin>
</plugins>

I would like to do the same, but cannot do any changes to the pom.xml I'm testing, so would have to specify everything in the command line.

I'm running (from powershell, therefore the quotation marks):

mvn com.github.spotbugs:spotbugs-maven-plugin:4.7.2.1:check -"Dplugins.plugin.groupId=com.h3xstream.findsecbugs"   -"Dplugins.plugin.artifactId=findsecbugs-plugin"  -"Dplugins.plugin.version=1.12.0" -"DincludeFilterFile=secbugsfilter.xml"

but the parameters are not used. Is there any way to run a plugin with a configuration like this from the command line without specifying anything in the pom?

0

There are 0 best solutions below