New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No proto files to compile. #32

Closed
magick93 opened this Issue Sep 21, 2017 · 2 comments

Comments

2 participants
@magick93
Copy link

magick93 commented Sep 21, 2017

Im specifying an absolute path to my proto files

<plugins>
    <plugin>
      <groupId>org.xolstice.maven.plugins</groupId>
      <artifactId>protobuf-maven-plugin</artifactId>
      <version>0.5.0</version>
      <configuration>
      <protoSourceRoot>/home/anton/git/myproject/generated/src/main/proto3/</protoSourceRoot>
        <protocArtifact>com.google.protobuf:protoc:3.3.0:exe:${os.detected.classifier}</protocArtifact>
        <pluginId>grpc-java</pluginId>
        <pluginArtifact>io.grpc:protoc-gen-grpc-java:1.4.0:exe:${os.detected.classifier}</pluginArtifact>
      </configuration>
      <executions>
        <execution>
          <goals>
            <goal>compile</goal>
            <goal>compile-custom</goal>
          </goals>
        </execution>
      </executions>
    </plugin>
  </plugins>

When there is an error in the proto files, the protofub-maven-plugin will identify this, eg,

[ERROR] /home/anton/git/myproject/generated/src/main/proto3/myproject/enums/ConfirmModes.proto [0:0]: myproject/enums/FeederModes.proto:3:1: Expected ";".

But, when this syntax error in the proto file is fixed, and I run again, I get:

No proto files to compile.

@magick93

This comment has been minimized.

Copy link

magick93 commented Sep 21, 2017

Ah, I was saving proto files as .proto3.

Changing file extension to .proto fixed it.

@magick93 magick93 closed this Sep 21, 2017

@NathanPelli

This comment has been minimized.

Copy link

NathanPelli commented Oct 18, 2018

thank you very much,this answer solve the problem perfectly after a long time of searching.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment