org.apache.thrift.maven
Class ThriftCompileMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.thrift.maven.ThriftCompileMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public final class ThriftCompileMojo
extends org.apache.maven.plugin.AbstractMojo

This mojo executes the thrift compiler for generating java sources from thrift definitions. It also searches dependency artifacts for thrift files and includes them in the thriftPath so that they can be referenced. Finally, it adds the thrift files to the project as resources so that they are included in the final artifact.


Field Summary
protected  org.apache.maven.project.MavenProject project
          The current Maven project.
protected  org.apache.maven.project.MavenProjectHelper projectHelper
          A helper used to add resources to the project.
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
ThriftCompileMojo()
           
 
Method Summary
protected  void attachFiles()
           
 void execute()
          Executes the mojo.
protected  List<org.apache.maven.artifact.Artifact> getDependencyArtifacts()
           
protected  File getOutputDirectory()
           
protected  File getThriftSourceRoot()
           
static String toHexString(byte[] byteArray)
           
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

project

protected org.apache.maven.project.MavenProject project
The current Maven project.


projectHelper

protected org.apache.maven.project.MavenProjectHelper projectHelper
A helper used to add resources to the project.

Constructor Detail

ThriftCompileMojo

public ThriftCompileMojo()
Method Detail

getDependencyArtifacts

protected List<org.apache.maven.artifact.Artifact> getDependencyArtifacts()

getOutputDirectory

protected File getOutputDirectory()

getThriftSourceRoot

protected File getThriftSourceRoot()

attachFiles

protected void attachFiles()

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException,
                    org.apache.maven.plugin.MojoFailureException
Executes the mojo.

Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

toHexString

public static String toHexString(byte[] byteArray)


Copyright © 2012–2013 Facebook, Inc.. All rights reserved.