logo Apt Maven Plugin

Maven Plugin for Annotation Processing Tool (apt).

homepage: mojo.codehaus.org
fresh index:
last release: 6 years ago, first release: 1 decade ago
packaging: maven-plugin
get this artifact from: central
see this artifact on: search.maven.org




This chart shows how much is this artifact used as a dependency in other Maven artifacts in Central repository and GitHub:


select version:

Add this snippet into pom.xml inside tag <project><build><plugins>:




Switch to artifact.
goals:
apt:process (phase: generate-resources)

Executes apt on project sources.

apt:eclipse (phase: generate-resources)

Generates Eclipse files for apt integration.

apt:help

Display help information on apt-maven-plugin. Call mvn apt:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.

apt:test-process (phase: generate-test-resources)

Executes apt on project test sources.

Often used code snippets:

<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>apt-maven-plugin</artifactId>
  <version>1.0-alpha-4</version>
  <inherited>false</inherited>
  <configuration>
    <fork>true</fork>
    <factory>com.sun.enterprise.tools.apt.MetainfServiceGenerator</factory>
    <outputDirectory>${project.build.outputDirectory}</outputDirectory>
  </configuration>
  <dependencies>
    <dependency>
      <groupId>org.glassfish.hk2</groupId>
      <artifactId>auto-depends-plugin</artifactId>
      <version>${project.version}</version>
    </dependency>
  </dependencies>
  <executions>
    <execution>
      <goals>
        <goal>process</goal>
      </goals>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>apt-maven-plugin</artifactId>
  <inherited>false</inherited>
  <configuration>
    <fork>true</fork>
    <factory>com.sun.enterprise.tools.apt.MetainfServiceGenerator</factory>
    <outputDirectory>${project.build.outputDirectory}</outputDirectory>
  </configuration>
  <dependencies>
    <dependency>
      <groupId>com.sun.enterprise</groupId>
      <artifactId>auto-depends-plugin</artifactId>
      <version>${project.version}</version>
    </dependency>
  </dependencies>
  <executions>
    <execution>
      <goals>
        <goal>process</goal>
      </goals>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>apt-maven-plugin</artifactId>
  <dependencies>
    <dependency>
      <groupId>org.jfrog.maven.annomojo</groupId>
      <artifactId>maven-plugin-tools-anno</artifactId>
      <version>1.3.1</version>
      <exclusions>
        <exclusion>
          <groupId>com.sun</groupId>
          <artifactId>tools</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>cobertura-maven-plugin</artifactId>
      <version>2.4</version>
    </dependency>
  </dependencies>
  <executions>
    <execution>
      <id>process</id>
      <goals>
        <goal>process</goal>
      </goals>
      <phase>generate-sources</phase>
      <configuration>
        <factory>org.distributeme.processors.GeneratorProcessorFactory</factory>
        <encoding>UTF-8</encoding>
        <verbose>true</verbose>
        <outputDirectory>${project.basedir}/generated/java</outputDirectory>
      </configuration>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>apt-maven-plugin</artifactId>
  <version>1.0-alpha-2</version>
  <configuration>
    <force>true</force>
    <factory>org.jvnet.hudson.tools.ExtensionPointListerFactory</factory>
    <options>
      <option>page=Extension points</option>
      <option>target=${project.basedir}/target/extension-points.wiki</option>
    </options>
  </configuration>
  <dependencies>
    <dependency>
      <groupId>org.jvnet.hudson.tools</groupId>
      <artifactId>extension-point-lister</artifactId>
      <version>1.5</version>
      <exclusions>
        <exclusion>
          <groupId>com.sun</groupId>
          <artifactId>tools</artifactId>
        </exclusion>
        <exclusion>
          <groupId>commons-logging</groupId>
          <artifactId>commons-logging</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
</plugin>
<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>apt-maven-plugin</artifactId>
  <version>1.0-alpha-2</version>
  <configuration>
    <force>true</force>
    <factory>org.jvnet.hudson.tools.ExtensionPointListerFactory</factory>
    <options>
      <option>page=Extension points</option>
      <option>target=${project.basedir}/target/extension-points.wiki</option>
    </options>
  </configuration>
  <dependencies>
    <dependency>
      <groupId>org.jvnet.hudson.tools</groupId>
      <artifactId>extension-point-lister</artifactId>
      <version>1.7</version>
      <exclusions>
        <exclusion>
          <groupId>com.sun</groupId>
          <artifactId>tools</artifactId>
        </exclusion>
        <exclusion>
          <groupId>commons-logging</groupId>
          <artifactId>commons-logging</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
</plugin>

© Jiri Pinkas 2015 - 2018. All rights reserved. Admin login To submit bugs / feature requests please use this github page
related: JavaVids | Top Java Blogs | Java školení | 4npm - npm search | monitored using: sitemonitoring
Apache and Apache Maven are trademarks of the Apache Software Foundation. The Central Repository is a service mark of Sonatype, Inc.