Getting Started with Service-Lint

Service-Lint checks whether a component is ready for a pull request by running a set of rules against the repository and reporting violations by severity (INFO, WARNING, ERROR). This page gets you from zero to a passing (or failing) check.

What You Get

  • A single mvn service-lint:check command that validates versions, deployment files, docs, and more.

  • Automatic use of the latest rules, even when the plugin itself is a little behind.

  • A clear, severity-grouped report and a CI-friendly exit code.

Prerequisites

  • Java 17 or higher.

  • Maven 3.6 or higher.

  • The gov.va.mobile.tools plugin group registered in your Maven settings.xml (needed for the short mvn service-lint:check form):

    <pluginGroups>
      <pluginGroup>gov.va.mobile.tools</pluginGroup>
    </pluginGroups>

Add the Maven Plugin

Add the plugin to your component’s pom.xml. Declare service-lint-rules as a dependency with version RELEASE so the newest rules are always used (see Troubleshooting & Tips).

Place the service-lint-maven-plugin as the last plugin in your <plugins> block so its output appears at the end of the build.

<properties>
  <service-lint.version>1.4.4</service-lint.version>
</properties>

<build>
  <plugins>
    <!-- ... your other plugins ... -->
    <plugin>
      <groupId>gov.va.mobile.tools</groupId>
      <artifactId>service-lint-maven-plugin</artifactId>
      <version>${service-lint.version}</version>
      <dependencies>
        <dependency>
          <groupId>gov.va.mobile.tools</groupId>
          <artifactId>service-lint-rules</artifactId>
          <version>RELEASE</version>
        </dependency>
      </dependencies>
      <executions>
        <execution>
          <goals>
            <goal>check</goal>
          </goals>
        </execution>
      </executions>
    </plugin>
  </plugins>
</build>

Run Your First Check

# Run just the lint goal
mvn service-lint:check

# Or as part of a normal build lifecycle (the execution above binds it in)
mvn verify

In a multi-module project the plugin automatically runs the checks from the parent/root project directory, even when the plugin is declared in a *-service child module.

Read the Results

Violations are grouped by severity:

  • ERROR — must be fixed; fails the build (exit code 1).

  • WARNING — should be addressed; does not fail the build by default.

  • INFO — advisory (e.g. a newer service-lint version is available).

See Understanding Reports for the full severity and exit-code model.

Next Steps