Geomajas Community Documentation

4.1.3. Plug-in pom

The pom needs to be complete to allow proper release of the plug-in.

The following sections need to be filled in:

  • description

  • scm

  • organization

  • mailinglists

  • licenses

  • issueManagement

  • ciManagement

  • developers

  • repositories

  • pluginRepositories

The build should also include the following settings

  • properties should contain "<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>".

  • the following compiler build plug-in declaration should be used:

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
            <encoding>utf8</encoding>
            <source>1.5</source>
            <target>1.5</target>
        </configuration>
    </plugin>
  • The checkstyle plug-in should be activated, using the latest Geomajas style.

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>2.5-DF</version>
        <configuration>
            <configLocation>config/geomajas-checkstyle.xml</configLocation>
        </configuration>
        <executions>
            <execution>
                <phase>verify</phase>
                <goals>
                    <goal>check</goal>
                </goals>
            </execution>
        </executions>
        <dependencies>
            <dependency>
                <groupId>org.geomajas</groupId>
                <artifactId>geomajas-checkstyle</artifactId>
                <version>1.0.4</version>
            </dependency>
        </dependencies>
    </plugin>
    
  • A source jar should be produced.

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.1.2</version>
        <executions>
            <execution>
                <goals>
                    <goal>jar</goal>
                </goals>
                <configuration>
                    <includePom>true</includePom>
                </configuration>
            </execution>
        </executions>
    </plugin>
  • The jar should include indexes.

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
            <archive>
                <manifest>
                    <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                </manifest>
                <manifestEntries>
                    <geomajas-version>${project.version}</geomajas-version>
                    <license>AGPLv3</license>
                    <more-info>http://www.geomajas.org/ and http://www.geosparc.com/</more-info>
                </manifestEntries>
                <compress>true</compress>
                <index>true</index>
            </archive>
        </configuration>
    </plugin>

Many of these requirements can be met by inheriting from the geomajas-parent project.