Skip to content
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 · 3 comments
Closed

No proto files to compile. #32

magick93 opened this issue Sep 21, 2017 · 3 comments

Comments

@magick93
Copy link

@magick93 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
Copy link
Author

@magick93 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
Copy link

@NathanPelli NathanPelli commented Oct 18, 2018

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

@nikoo28
Copy link

@nikoo28 nikoo28 commented Apr 1, 2020

thank you very much for this solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants