After reading the attached GitHub Issue more carefully, it appeared that setting the cleanOutputFolder
configuration in the protobuf-maven-plugin did the trick. Here is an example XML of using the plugin (version is irrelevant):
<plugin>
<groupId>com.github.igor-petruk.protobuf</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<version>0.6.3</version>
<configuration>
<cleanOutputFolder>false</cleanOutputFolder>
</configuration>
</plugin>
This means that Eclipse will not run into an infinite build loop because the Maven Project Builder will not have to keep recompiling the same protobuf generated folder, which is in /target/generated-sources
. Meanwhile, not having cleanOutputFolder
enabled doesn't completely disable the project from picking up proto file outputs and generating new sources based on those files; as long as a Maven build command is run with the clean goal (such as mvn clean install
), then the generated-sources
directory will still be regenerated since the target
directory had already been deleted.