Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,28 @@ build:
- merged-gl-code-quality-report.json
----

== CLI usage

The plugin may also be used and configured using the Maven CLI. Available configuration properties are:

* `glcqp.spotbugsEnabled`
* `glcqp.spotbugsInputFile`
* `glcqp.checkstyleEnabled`
* `glcqp.checkstyeInputFile`
* `glcqp.outputFile`

They are used like this:

[source,shell,subs="+attributes"]
----
mvn de.chkal.maven:gitlab-code-quality-plugin:{version_stable}:check \
-Dglcqp.spotbugsEnabled=true \
-Dglcqp.spotbugsInputFile=target/spotbugsXml.xml \
-Dglcqp.checkstyleEnabled=true \
-Dglcqp.checkstyeInputFile=target/checkstyle-result.xml \
-Dglcqp.outputFile=target/gl-code-quality-report.json
----

== Using the latest snapshots

The latest snapshots of this plugin are deployed to the Sonatype OSSRH repository.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@
@Mojo(name = "generate", defaultPhase = LifecyclePhase.VERIFY, threadSafe = true)
public class GenerateMojo extends AbstractMojo {

@Parameter(defaultValue = "true")
@Parameter(property = "glcqp.spotbugsEnabled", defaultValue = "true")
public boolean spotbugsEnabled;

@Parameter(defaultValue = "${project.build.directory}/spotbugsXml.xml")
@Parameter(property = "glcqp.spotbugsInputFile", defaultValue = "${project.build.directory}/spotbugsXml.xml")
public File spotbugsInputFile;

@Parameter(defaultValue = "true")
@Parameter(property = "glcqp.checkstyleEnabled", defaultValue = "true")
public boolean checkstyleEnabled;

@Parameter(defaultValue = "${project.build.directory}/checkstyle-result.xml")
@Parameter(property = "glcqp.checkstyeInputFile", defaultValue = "${project.build.directory}/checkstyle-result.xml")
public File checkstyleInputFile;

@Parameter(defaultValue = "${project.build.directory}/gl-code-quality-report.json")
@Parameter(property = "glcqp.outputFile", defaultValue = "${project.build.directory}/gl-code-quality-report.json")
public File outputFile;

@Parameter(defaultValue = "${project}", readonly = true, required = true)
Expand Down