java - Protocol buffers compiler maven plugin -
i have protocol buffers compiler plugin configured in pom executed whenever project built. complier plugin works fine in windows moved project ubuntu pc & need used suitable alterntive this.
<plugin> <artifactid>maven-antrun-plugin</artifactid> <executions> <execution> <id>compile-protoc</id> <phase>generate-sources</phase> <configuration> <tasks> <mkdir dir="src/main/resources/protocolbuffers/compiled" /> <path id="proto.path"> <fileset dir="src/main/proto"> <include name="**/*.proto" /> </fileset> </path> <pathconvert pathsep=" " property="proto.files" refid="proto.path" /> <exec executable="src/main/resources/protocolbuffers/compiler/protoc" failonerror="true"> <arg value="--java_out=src/main/resources/" /> <arg value="-i${project.basedir}/" /> <arg line="${proto.files}"/> </exec> </tasks> </configuration> <goals> <goal>run</goal> </goals> </execution> </executions> </plugin>
i see following output when trying build project in ubuntu netbeans
--- maven-antrun-plugin:1.3:run (compile-protoc) @ px10app --- executing tasks ------------------------------------------------------------------------ build failure ------------------------------------------------------------------------ total time: 5.638s finished at: tue mar 25 final memory: 9m/105m ------------------------------------------------------------------------ failed execute goal org.apache.maven.plugins:maven-antrun-plugin:1.3:run (compile-protoc) on project px10app: ant buildexception has occured: execute failed: java.io.ioexception: cannot run program "src/main/resources/protocolbuffers/compiler/protoc": error=2, no such file or directory -> [help 1]
how make compiler plugin work in ubuntu netbeans ?
your protoc executable not executed on linux. should download , compile protoc linux , once able use maven plug-in using on windows.
you have detailed instruction here
Comments
Post a Comment