Skip to content

Schahen/processit-maven-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maven Processit Plugin

Processit is a maven plugin intentionally designed to be as simple as possible. Basically it does one thing - it provides interface for implementing you own processor logic, whatever this logic will be.

Usage

Here's example of it's usage:

<build>
    <plugins>
      <plugin>
        <groupId>org.shabunc.maven</groupId>
        <artifactId>processit</artifactId>
        <!-- This is indeed the latest version -->
        <version>1.0.2</version>
        <dependencies>
          <dependency>
            <groupId>my.very.own.processors.collection</groupId>
            <artifactId>processor</artifactId>
            <version>1.0-SNAPSHOT</version>
          </dependency>
        </dependencies>
        <executions>
          <execution>
            <id>process</id>
            <goals>
              <goal>run</goal>
            </goals>
            <phase>generate-sources</phase>
          </execution>
        </executions>
        <configuration>
          <processors>
            <processor>my.very.own.processors.collection.Processor</processor>
          </processors>
        </configuration>
      </plugin>
    <plugins>
</build>

Basically if your processor must implement a very simple interface, org.shabunc.maven.Processor which have following method declarations:

void setProject(MavenProject mavenProject);
Iterator<File> getFiles();
void process(File file);

so, in getFiles you collect files you want to, in process - well, process (you do not have to call process in getFiles - plugin will iterate through getFiles).

That's basically it.

Now you can just run mvn generate-sources (or whatever phase you will declare) Also, you can just run mvn processit:run

Oh, one more thing.

Installation

Maven Processit Plugin lives in a separate repository one can invoke by using following definition in your pom.xml file:

<repositories>
    <repository>
      <id>schahen-mvn-repo</id>
      <url>https://raw.github.com/schahen/processit-maven-plugin/mvn-repo/</url>
    </repository>
</repositories>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages