On Thu, Nov 3, 2016 at 11:40 PM Orion Poplawski <orion@cora.nwra.com> wrote:
I can't figure out why the protobuf maven java builds are failing.
Could some java/maven expert please take a look?

https://www.cora.nwra.com/~orion/fedora/protobuf-3.1.0-1.fc26.src.rpm

http://koji.fedoraproject.org/koji/taskinfo?taskID=16285661

Thanks!


Wow, protobuf build is messy!

In any case, the build breaks as of maven-compiler-plugin version 3.5.1 and later. I believe it's because of the change for https://issues.apache.org/jira/browse/MCOMPILER-240

The proper way to add source directories to the compile classpath is to use the build-helper-maven-plugin.
In the core/pom.xml, replace the maven-compiler-plugin section with:

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.9.1</version>
        <executions>
          <execution>
            <id>add-generated-sources</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>${generated.sources.dir}</source>
              </sources>
            </configuration>
          </execution>
          <execution>
            <id>add-generated-test-sources</id>
            <phase>generate-test-sources</phase>
            <goals>
              <goal>add-test-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>${generated.testsources.dir}</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>