Here's my protoc jar plugin -
<plugin>
<groupId>com.github.os72</groupId>
<artifactId>protoc-jar-maven-plugin</artifactId>
<version>${protoc-maven-plugin.version}</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<protocVersion>${protobuf.version}</protocVersion>
<includeStdTypes>true</includeStdTypes>
<includeDirectories>
<include>src/main/resources</include>
</includeDirectories>
<inputDirectories>
<include>src/main/resources</include>
</inputDirectories>
</configuration>
</execution>
</executions>
</plugin>
I want to include some import statements from a maven repository available on nexus - which contains a bunch of proto files and their java compiled versions. It's a jar that includes proto files.
How can I include these proto files (packaged in a jar) in the protoc path such that the proto files can be imported in my current working directory?
The issue is that the import keeps failing when I mavenize my project - .proto files cannot be found.
My proto command being used as a part of the protoc looks like - protoc-jar: executing: [C:\protocjar3624070738032398618\bin\protoc.exe, -IC:\protocjar3624070738032398618\include, -IC:myproject\src\main\resources, --java_out=C:\myproject\target\generated-sources, C:\myproject\somedummy.proto]
The command cannot reach out to the com.custom.proto package of the jar that I am importing and I am not sure what to add to the inputDirectories setting in the configuration above to get this package included in the protoc command.
P.S. I am able to use this setting true to get google.protobuf package files included. However, it does not work for other maven dependencies which include proto files (non-standard)