QSTools Maven Plugin

This a Maven Plugin that helps JBoss Developer quickstarts maintenance. You can use it to verify if your project/quickstart follow the JBoss Developer Guidelines. It will run all JBoss Developer Guideline checkers and generate a report that provides information about any violations that your project/quickstarts has.

License

License

Categories

Categories

JBoss Container Application Servers Maven Build Tools
GroupId

GroupId

org.jboss.maven.plugins
ArtifactId

ArtifactId

qstools
Last Version

Last Version

1.6.3.Final
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

QSTools Maven Plugin
This a Maven Plugin that helps JBoss Developer quickstarts maintenance. You can use it to verify if your project/quickstart follow the JBoss Developer Guidelines. It will run all JBoss Developer Guideline checkers and generate a report that provides information about any violations that your project/quickstarts has.
Project URL

Project URL

http://www.jboss.org/developer-materials/
Source Code Management

Source Code Management

http://github.com/jboss-developer/maven-qstools-plugin

Download qstools

How to add to project

<plugin>
    <groupId>org.jboss.maven.plugins</groupId>
    <artifactId>qstools</artifactId>
    <version>1.6.3.Final</version>
</plugin>

Dependencies

compile (17)

Group / Artifact Type Version
org.apache.maven.shared : maven-shared-utils jar 0.7
org.eclipse.jgit : org.eclipse.jgit jar 3.7.0.201502260915-r
org.eclipse.text : org.eclipse.text jar 3.5.101
org.eclipse.jdt : org.eclipse.jdt.core jar 3.7.1
org.apache.maven : maven-aether-provider jar 3.2.5
com.google.guava : guava jar 18.0
org.eclipse.aether : aether-util jar 0.9.0.M1
org.eclipse.aether : aether-spi jar 0.9.0.M1
org.twdata.maven : mojo-executor jar 2.2.0
org.yaml : snakeyaml jar 1.11
org.apache.httpcomponents : httpclient jar 4.5.2
org.jboss.jdf : stacks-client jar 1.0.3.Final
com.googlecode.juniversalchardet : juniversalchardet jar 1.0.3
commons-io : commons-io jar 2.4
commons-lang : commons-lang jar 2.6
org.jboss.shrinkwrap.resolver : shrinkwrap-resolver-depchain pom 2.1.1
org.apache.maven.plugins : maven-checkstyle-plugin jar 2.9.1

provided (7)

Group / Artifact Type Version
org.apache.maven : maven-core jar 3.2.5
org.apache.maven : maven-settings jar 3.2.5
org.apache.maven.reporting : maven-reporting-impl jar 2.3
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.4
org.codehaus.plexus : plexus-interpolation jar 1.22
org.apache.maven.plugins : maven-jxr-plugin maven-plugin 2.5
org.apache.maven.plugins : maven-site-plugin jar 3.3

Project Modules

There are no modules declared in this project.

Quickstarts tools maven plugin

Author: Rafael Benevides Summary: Maven plugin that helps JBoss Developer materials maintenance

What is it?

This a Maven Plugin that helps JBoss Developer materials maintenance.

You can use it to verify if your project/quickstart follow the JBoss Developer Guidelines. It will run all JBoss Developer Guideline checkers and generate a report that provides information about any violations that your project/quickstarts has.

For Maven BOMs,it can be used to verify if your Maven BOM has all dependencies being resolved.

You can also use QSTools to synchronize an Maven Archetype with and existing project.

System requirements

All you need is Apache Maven 3.0.X and a working internet connection.

Checking the quickstarts made easy

Select a Maven project and run:

mvn -U org.jboss.maven.plugins:qstools:check

This will check your project and all modules to seek for potential violations.

The report will be generated at: MAVEN_PROJECT/target/site/qschecker.html

Configuring QSTools

QSTools configuration is made by editing the online file https://github.com/jboss-developer/maven-qstools-plugin/blob/master/config/qstools_config.yaml

You can use a local config file by overwriting qstools property:

mvn -U org.jboss.maven.plugins:qstools:check
     -Dqstools.configFileURL=file:///Users/rafaelbenevides/path/qstools_config.yaml

Using a custom stacks.yaml definition

Stacks is used to check the BOM versions used on you project.

If you need to use a custom Stacks.yaml definition you can overwrite the stacks url adding the property qstools.stacks.url to the command line:

mvn -U org.jboss.maven.plugins:qstools:check
   -Dqstools.stacks.url=file:/somewhere/on/your/disk/stacks.yaml

or

mvn -U org.jboss.maven.plugins:qstools:(check)
   -Dqstools.stacks.url=http://www.somewhere.net/somepath/stacks.yaml

Automatically fixing the quickstarts

QSTools can fix most of the violations.

You can run:

mvn -U org.jboss.maven.plugins:qstools:fix

NOTE: It's high recommended that you have your changes saved before running this plugin because it modifies your pom files.

Setup JBoss Maven approved repositories

QSTools can add/remove the section on pom.xml files. It uses Approved JBoss Maven Repositories list.

You can run:

mvn -U org.jboss.maven.plugins:qstools:repositories

NOTE: It's high recommended that you have your changes saved before running this plugin because it modifies your pom files.

If you need to update quickstarts BOMs

This goal will check the Expected BOM Version and update the BOM versions to the expected version.

It will also replace any community BOMs by the Product BOMs if it is specified under project-boms-migration sections of QSTools configuration file

NOTE: It's high recommended that you have your changes saved before running this plugin because it modifies your pom files.

To run the plugin:

mvn -U org.jboss.maven.plugins:qstools:updateBoms

Checking the BOM dependencies

This goal will check the given BOM project if all declared dependencies under section is resolvable.

To run the plugin:

mvn -U org.jboss.maven.plugins:qstools:bom-check

If you need to ignore certain known dependencies from being checked, you can use the qstools.bom-check.ignoredDependencies property.

Example:

mvn -U org.jboss.maven.plugins:qstools:bom-check 
   -Dqstools.bom-check.ignoredDependencies=<groupId 1>:<artifactId 1>:jar:<version 1>,<groupId 2>:<artifactId 2>:jar:<version 2>

By default, the project build will fail if some managed dependency is not resolvable. You can overwrite this behavior by using qstools.bom-check.failbuild property. This will run on REPORT ONLY mode.

Example:

mvn -U org.jboss.maven.plugins:qstools:bom-check 
   -Dqstools.bom-check.failbuild=false

To specify a custom settings.xml file you must use org.apache.maven.user-settings property. This is because Shrinkwrap Resolver doesn't consume settings.xml you specified on command line (-s settings.xml) or in the IDE. It reads settings.xml files at their standard locations, which are ~/.m2/settings.xml and $M2_HOME/conf/settings.xml unless overridden in the API or via System property.

Example:

mvn -U org.jboss.maven.plugins:qstools:bom-check 
   -Dorg.apache.maven.user-settings=<your custom settings.xml>

Synchronizing Archetypes with Quickstarts

QSTools can be used on archetype to synchronize the archetype-resources with a given project

This is an example of configuration:

    <plugins>
        <plugin>
            <groupId>org.jboss.maven.plugins</groupId>
            <artifactId>qstools</artifactId>
            <version>1.7.0-SNAPSHOT</version>
            <configuration>
                <projectGitRepo>git://github.com/jboss-developer/jboss-eap-quickstarts.git</projectGitRepo>
                <projectPath>kitchensink-ear</projectPath>
                <rootPackage>org.jboss.as.quickstarts.kitchensink_ear</rootPackage>
                <multiModuleProject>true</multiModuleProject>
                <applyPatch>A-patch-file.patch</applyPatch>
                <branch>[a branch name or a commit hash]</branch>
                <-- Replace the following strings by {archetypeId} or __artifactId__ in file name
                <archetypeExpressionReplaceValues>
                    <archetypeExpressionReplaceValue>jboss-as-kitchensink-ear</archetypeExpressionReplaceValue>
                    <archetypeExpressionReplaceValue>kitchensink-ear-quickstart</archetypeExpressionReplaceValue>
                    <archetypeExpressionReplaceValue>kitchensink-quickstart</archetypeExpressionReplaceValue>
                    <archetypeExpressionReplaceValue>KitchensinkEarQuickstart</archetypeExpressionReplaceValue>
                    <archetypeExpressionReplaceValue>JBoss EAP Quickstart: kitchensink-ear</archetypeExpressionReplaceValue>
                </archetypeExpressionReplaceValues>
                <!-- Expressions that will be ignored during the replacement -->
                <ignoredArchetypeExpressionReplaceValues>
                          <ignoredArchetypeExpressionReplaceValue>https://github.com/wildfly/quickstart/tree/master/</ignoredArchetypeExpressionReplaceValue>
                </ignoredArchetypeExpressionReplaceValues>
                <!-- Replace the html5mobi string by {tableSuffix} -->
                <replaceValueWithExpression>
                    <html5mobi>tableSuffix</html5mobi>
                </replaceValueWithExpression>
            </configuration>
            <executions>
                <execution>
                    <phase>generate-sources</phase>
                    <goals>
                        <goal>archetypeSync</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>

The archetypeExpressionReplaceValues argument is used to replace the given expression to the ${artifactId} expression or __artifactId__ in file name.

In some situations will may want to ignore a line to be replaced. You can specify the line content on the ignoredArchetypeExpressionReplaceValues argument.

Plugin Documentation

The plugin documentation generated from mvn site is available here

Troubleshooting

You can turn on debugging messages:

mvn -U org.jboss.maven.plugins:qstools:check -X
org.jboss.maven.plugins

JBoss Developer

Versions

Version
1.6.3.Final
1.6.2.Final
1.6.1.Final
1.6.0.Final
1.6.0.CR4
1.6.0.CR3
1.6.0.CR2
1.6.0.CR1
1.5.3.Final
1.5.2.Final
1.5.1.Final
1.5.0.Final
1.5.0.CR3
1.5.0.CR2
1.5.0.CR1
1.0.0.CR1