Name: Maven Thrift Plugin Description: (no description available) Group Id: org.apache.thrift.tools Artifact Id: maven-thrift-plugin Version: 0.1.10 Goal Prefix: thrift
This plugin has 2 goals:
thrift:compile Description: 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. Implementation: org.apache.thrift.maven.ThriftCompileMojo Language: java # 这个就是默认绑定的生命周期阶段,所以上述配置中可以不写<phase>generate-sources</phase> Bound to phase: generate-sources
Available parameters:
additionalThriftPathElements (no description available)
excludes (no description available)
generator (Default: java:hashcode) This string is passed to the --gen option of the thrift parameter. By default it will generate Java output. The main reason for this option is to be able to add options to the Java generator - if you generate something else, you're on your own.
hashDependentPaths (Default: true) Required: true Set this to false to disable hashing of dependent jar paths. This plugin expands jars on the classpath looking for embedded .thrift files. Normally these paths are hashed (MD5) to avoid issues with long file names on windows. However if this property is set to false longer paths will be used.
includes (no description available)
localRepository (Default: ${localRepository}) Required: true This is the path to the local maven repository.
outputDirectory (Default: ${project.build.directory}/generated-sources/thrift) Required: true This is the directory into which the .java will be created.
temporaryThriftFileDirectory Required: true Expression: ${project.build.directory}/thrift-dependencies Since thrift cannot access jars, thrift files in dependencies are extracted to this location and deleted on exit. This directory is always cleaned during execution.
thriftExecutable (Default: thrift) Required: true This is the path to the thrift executable. By default it will search the $PATH.
thriftSourceRoot (Default: ${basedir}/src/main/thrift) Required: true The source directories containing the sources to be compiled.
thrift:testCompile Description: (no description available) Implementation: org.apache.thrift.maven.ThriftTestCompileMojo Language: java Bound to phase: generate-test-sources
Available parameters:
additionalThriftPathElements (no description available)
excludes (no description available)
generator (Default: java:hashcode) This string is passed to the --gen option of the thrift parameter. By default it will generate Java output. The main reason for this option is to be able to add options to the Java generator - if you generate something else, you're on your own.
hashDependentPaths (Default: true) Required: true Set this to false to disable hashing of dependent jar paths. This plugin expands jars on the classpath looking for embedded .thrift files. Normally these paths are hashed (MD5) to avoid issues with long file names on windows. However if this property is set to false longer paths will be used.
includes (no description available)
localRepository (Default: ${localRepository}) Required: true This is the path to the local maven repository.
outputDirectory (Default: ${project.build.directory}/generated-test-sources/thrift) Required: true This is the directory into which the .java will be created.
temporaryThriftFileDirectory Required: true Expression: ${project.build.directory}/thrift-dependencies Since thrift cannot access jars, thrift files in dependencies are extracted to this location and deleted on exit. This directory is always cleaned during execution.
thriftExecutable (Default: thrift) Required: true This is the path to the thrift executable. By default it will search the $PATH.
thriftTestSourceRoot (Default: ${basedir}/src/test/thrift) Required: true The source directories containing the sources to be compiled.