@Override
    public void execute() throws MojoExecutionException, MojoFailureException
    {
        if (skipMojo())
        {
            return;
        }

        assert baseDir != null && baseDir.exists() && baseDir.isDirectory();

        CachingProtoLoader loader = cacheProtos ? new CachingProtoLoader() : null;

        try
        {
            setSystemProperties();
            if (modulesFile == null)
            {
                if (protoModules == null)
                {
                    throw new MojoExecutionException("Either <modules> or <modulesFile> " +
                            "should be provided.");
                }
                try
                {
                    for (ProtoModule m : protoModules)
                    {
                        if (m.getOutput() == null || m.getOutput().isEmpty())
                        {
                            throw new MojoExecutionException("Module parameter <output> is not set.");
                        }
                        m.setCachingProtoLoader(loader);
                        updateRelativeOutputLocation(m);
                        CompilerMain.compile(m);

                        // enabled by default unless overridden
                        if (m.isAddToCompileSourceRoot())
                        {
                            // Include generated directory to the list of compilation sources
                            if (GENERATE_TEST_SOURCES_PHASE.equals(execution.getLifecyclePhase()))
                            {
                                project.addTestCompileSourceRoot(m.getOutputDir().getAbsolutePath());
                            }
                            else
                            {
                                project.addCompileSourceRoot(m.getOutputDir().getAbsolutePath());
                            }
                        }

                    }
                }
                catch (Exception e)
                {
                    throw new MojoExecutionException(e.getMessage(), e);
                }
            }
            else
            {
                try
                {
                    if (protoModules != null)
                    {
                        for (ProtoModule m : protoModules)
                        {
                            m.setCachingProtoLoader(loader);
                            CompilerMain.compile(m);

                            // enabled by default unless overridden
                            if (m.isAddToCompileSourceRoot())
                            {
                                // Include generated directory to the list of compilation sources
                                if (GENERATE_TEST_SOURCES_PHASE.equals(execution.getLifecyclePhase()))
                                {
                                    project.addTestCompileSourceRoot(m.getOutputDir().getAbsolutePath());
                                }
                                else
                                {
                                    project.addCompileSourceRoot(m.getOutputDir().getAbsolutePath());
                                }
                            }
                        }
                    }

                    if (!modulesFile.exists())
                        throw new MojoExecutionException(modulesFile + " does not exist.");

                    File parent = modulesFile.getParentFile();
                    File sourceBaseDir = this.sourceBaseDir, outputBaseDir = this.outputBaseDir;

                    if (sourceBaseDir == null)
                        sourceBaseDir = parent;

                    if (outputBaseDir == null)
                        outputBaseDir = parent;

                    CompilerMain.compile(CompilerMain.loadModules(modulesFile,
                            sourceBaseDir, outputBaseDir));
                }
                catch (Exception e)
                {
                    throw new MojoExecutionException(e.getMessage(), e);
                }
            }
        }
        finally
        {
            resetSystemProperties();
        }
    }
Plugin properties that are passed to the compiler

@since 1.3.1
protostuff-maven-plugin/src/main/java/io/protostuff/mojo/ProtoCompilerMojo.java