Version 6

    Description

    The JBoss Maven SpellChecker Plugin is a simple spell checker. The plugin is based on the Java Open Source spell checker Jazzy. The aim of this Maven project is to integrate spell checking in the documentation building process and report spelling mistakes. Current plugin version has been tested with files written in US and UK English.

    You could easily configure this plug-in in your POM.

    Integration

     

    There are 3 steps for successful maven-spellChecker-plugin integration:

     

    1. Add JBoss Repositories for Maven plugins to your pom.xml:

    <pluginRepositories>
         <pluginRepository>
              <id>maven.jboss.org</id>
              <name>JBoss Repository for Maven Snapshots</name>
              <url>http://snapshots.jboss.org/maven2/</url>
              <releases>
                   <enabled>false</enabled>
              </releases>
              <snapshots>
                   <enabled>true</enabled>
                   <updatePolicy>always</updatePolicy>
              </snapshots>
         </pluginRepository>
         <pluginRepository>
              <id>repository.jboss.com</id>
              <name>Jboss Repository for Maven</name>
              <url>http://repository.jboss.com/maven2/</url>
              <layout>default</layout>
              <releases>
                   <enabled>true</enabled>
              </releases>
              <snapshots>
                   <enabled>false</enabled>
                   <updatePolicy>never</updatePolicy>
              </snapshots>
         </pluginRepository>
    </pluginRepositories>

     

    2. Add maven-spellChecker-plugin to the <pluginManagement> section in the pom.xml:

     

    <pluginManagement>
         <plugins>
              <plugin>
                   <groupId>org.jboss.maven.plugins</groupId>
                   <artifactId>maven-spellChecker-plugin</artifactId>
                   <version>1.2-SNAPSHOT</version>
                   <executions>
                        <execution>
                             <id>spellChecker:check</id>
                             <phase>package</phase>
                             <goals>
                                  <goal>check</goal>
                             </goals>
                        </execution>
                   </executions>    
                   <configuration>
                        <outputDir>${project.build.directory}/log</outputDir>
                        <reportFileName>log.txt</reportFileName>
                        <dirForScan>${basedir}</dirForScan>
                        <excludes>     
                             <exclude>**/*.svn</exclude>
                        </excludes>
                        <includes>
                             <include>**/*.xml</include>
                             <include>**/*.html</include>
                        </includes>
                   </configuration>
              </plugin>
         </plugins>
    </pluginManagement>

     

    3. Finally you could execute the following command in the terminal from your project folder:

     

    mvn clean install

     

    After the building process the log.txt file with spelling errors appears in the ${project.build.directory}/log folder specified in the plugin configuration section.

     

    Configuration

     

    • <outputDir> defines the directory where the report file will be placed
    • <reportFileName> defines the report file name
    • <dirForScan>  defines the directory with files for checking
    • <dictionaryFile> defines a custom dictionary file that will be used instead of a standard build-in dictionary. Actually the dictionary file has a very simple format: a list of words separated with ENTER.
    • <excludes> specifies the exclusion patterns for files
    • <includes> specifies the inclusion for files