Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package net.dongliu.prettypb.maven;
 
 
 import java.io.File;
 import java.util.Set;

This mojo executes the protoc compiler for genemaven-javadoc-pluginrating java sources from protocol buffer definitions. It also searches dependency artifacts for proto files and includes them in the protopath so that they can be referenced. Finally, it adds the proto files to the project as resources so that they are included in the final artifact.

Phase:
generate-sources
Goal:
compile
RequiresDependencyResolution:
compile
public final class ProtocCompileMojo extends AbstractProtocMojo {

    
The source directories containing the sources to be compiled.

Parameter:
default-value="${basedir}/src/main/proto"
Required:
    private File protoSourceRoot;

    
This is the directory into which the .java will be created.

Parameter:
default-value="${project.build.directory}/generated-sources/protoc"
Required:
    private File outputDirectory;
    @Override
    protected Set<ArtifactgetDependencyArtifacts() {
        //TODO: is this correct for test compile?
        return .getDependencyArtifacts();
    }
    @Override
    protected File getOutputDirectory() {
        return ;
    }
    @Override
    protected File getProtoSourceRoot() {
        return ;
    }
    @Override
    protected void attachFiles() {
                Arrays.asList("**/*.proto"), Collections.emptyList());
    }
New to GrepCode? Check out our FAQ X