Skip to content

Sample Configuration

gjwiley edited this page Sep 13, 2010 · 2 revisions

This configuration works for me in Windows (protoc.exe is on path):



    <project>
        <!-- ... -->
        <build>
            <!-- ... -->
            <plugins>
                <!-- ... -->
                <plugin>
                    <groupId>com.google.protobuf.tools</groupId>
                    <artifactId>maven-protoc-plugin</artifactId>
                    <executions>
                        <execution>
                            <phase>generate-sources</phase>
                                <goals>
                                    <goal>compile</goal>
                                </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <executable>protoc.exe</executable>
                        <javaOutputDirectory>${project.build.directory}/generated-sources/protoc</javaOutputDirectory>
                        <protoFiles>${basedir}/src/main/proto</protoFiles>
                        <protoPath>${basedir}/src/main/proto</protoPath>
                    </configuration>
                </plugin>
                <!-- ... -->
            </plugins>
            <!-- ... -->
        </build>
        <!-- ... -->
    </project>


Clone this wiki locally