Depot Maven Plugin

A collection of Java utilities.

License

License

Categories

Categories

Maven Build Tools
GroupId

GroupId

com.samskivert
ArtifactId

ArtifactId

depot-maven-plugin
Last Version

Last Version

1.0.4
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

Depot Maven Plugin
A collection of Java utilities.
Project URL

Project URL

http://github.com/samskivert/depot-maven-plugin
Source Code Management

Source Code Management

http://github.com/samskivert/depot-maven-plugin/

Download depot-maven-plugin

How to add to project

<plugin>
    <groupId>com.samskivert</groupId>
    <artifactId>depot-maven-plugin</artifactId>
    <version>1.0.4</version>
</plugin>

Dependencies

compile (5)

Group / Artifact Type Version
com.samskivert : depot jar 1.7.3
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.1
org.apache.maven : maven-plugin-api jar 2.2.0
org.apache.maven : maven-project jar 2.2.0
org.apache.maven : maven-artifact jar 2.2.0

test (1)

Group / Artifact Type Version
junit : junit jar 4.10

Project Modules

There are no modules declared in this project.

Depot Maven Plugin

A simple Mojo for running Depot's code generation phase in a Maven build.

To add this to your build, add the following to your pom.xml:

  <build>
    <plugins>
      <plugin>
        <groupId>com.samskivert</groupId>
        <artifactId>depot-maven-plugin</artifactId>
        <version>1.0.2</version>
        <executions>
          <execution>
            <id>genrecord</id>
            <phase>process-classes</phase>
            <goals>
              <goal>genrecord</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

The plugin has to run after the compile phase because it operates on the compiled *Record.class files. The above configuration runs it during the process-classes phase (which immediately follows compile). Thus to trigger it, you need to invoke either mvn package (which includes the process-classes phase), or mvn process-classes directly (which is not a phase one normally runs on the command line).

Includes/Excludes

By default, it searches your source directory for all files matching *Record.java. You can change this behavior like so:

        <!-- ... -->
          <execution>
            <!-- ... -->
            <configuration>
              <!-- include something instead of *Record.java -->
              <includes>
                <include>**/*Barzle.java</include>
              </includes>
              <!-- or exclude one or more files -->
              <excludes>
                <exclude>**/NotActuallyARecord.java</exclude>
              </excludes>
            </configuration>
          </execution>
        <!-- ... -->

Indent width

You can configure the number of spaces per indent level in the generated code like so:

        <!-- ... -->
          <execution>
            <!-- ... -->
            <configuration>
              <indentWidth>2</indentWidth>
            </configuration>
          </execution>
        <!-- ... -->

Discuss

Questions and comments can be directed to the OOO Google Group.

License

Depot Maven Plugin is released under the BSD License. See the LICENSE file for details.

Versions

Version
1.0.4
1.0.3
1.0.2
1.0