1

Following up on my question here, I noticed still some files are not created. The files not created are for the services. The messages are created perfectly.

A quick example to reproduce my problem: clone for example this github repo.

rm -rf src/main/java (remove java files to avoid other compilation issues)
mv src/main/proto src/test/proto (move the proto file to test)
add the following goal to pom for plugin maven-protoc-plugin: <goal>test-compile</goal>
mvn clean package

So the pom file should like this: enter image description here

It will create these java files correctly: enter image description here but missing the GreeterGrpc (which is the service, and was created when it was in src/main/proto): enter image description here

So I am wondering how I can make the java file for service to be created when proto file is moved to test folder.

Eric Anderson
  • 24,057
  • 5
  • 55
  • 76
apadana
  • 13,456
  • 15
  • 82
  • 98

1 Answers1

1

Actually I realized I had only added test-compile, but not test-compile-custom. That was also needed for compiling the service java files.

apadana
  • 13,456
  • 15
  • 82
  • 98