Skip to main content
Last updated March 31, 2011 09:38, by Amanj Sherwany

Using Loci as a Maven Plugin

If your project uses Maven, you can use Loci to type check it, by adding the following parts to your pom.xml

1- First you need to declare Loci as a dependency:

        <!-- Loci annotation processor -->

        <!-- other dependencies -->

2- And finally, you need to attach the plugin to your build lifecycle:

                            <!-- run Loci after compilation; this can also be any later phase -->
                        <!-- required configuration options -->

                        <!-- other optional configuration -->
                        <!-- full path to a java executable that should be used to create the forked JVM -->
                        <!-- should an error reported by Loci cause a build failure, or only be logged as a warning; defaults to true -->
                        <!-- a list of patterns to include, in the standard maven syntax; defaults to **/*.java -->
                        <!-- a list of patterns to exclude, in the standard maven syntax; defaults to an empty list -->
                        <!-- additional parameters passed to the JSR308 java compiler -->
                        <!-- additional parameters to pass to the forked JVM -->
                        <!-- versions of JSR308 to use; defaults to the current newest version: 1.1.2, You cannot provide pre (1.1.2) -->
            <!-- other plugins -->
The plugin was contributed by Adam Warski to the Checker framework team, and Amanj Sherwany forked it to suit Loci's need.

Please Confirm