org.apache.thrift.maven
Class ThriftCompileMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
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 |
| 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 |
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.
ThriftCompileMojo
public ThriftCompileMojo()
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.