However, when we're going to insert some custom code by use of insertion points mechanism, it reports error whatever path we give to plugin output path:
[2/6] thirdparty/protobuf/bin/x86_64/protoc-2.5.0 --proto_path=. -I=thirdparty --java_out=build64_release/`dirname java/com/gdt/log_process/wx_log_convertor/conf.proto` --plugin=protoc-gen-java_field_tracking=thirdparty/protobuf/bin/plugin/governance/java_field_tracking_generator --java_field_tracking_out=build64_release java/com/gdt/log_process/wx_log_convertor/conf.proto
FAILED: build64_release/java/com/gdt/log_process/wx_log_convertor/com/gdt/log_process/wx_log_convertor/Conf.java
thirdparty/protobuf/bin/x86_64/protoc-2.5.0 --proto_path=. -I=thirdparty --java_out=build64_release/`dirname java/com/gdt/log_process/wx_log_convertor/conf.proto` --plugin=protoc-gen-java_field_tracking=thirdparty/protobuf/bin/plugin/governance/java_field_tracking_generator --java_field_tracking_out=build64_release java/com/gdt/log_process/wx_log_convertor/conf.proto
com/gdt/log_process/wx_log_convertor/Conf.java: Tried to insert into file that doesn't exist.
Checking related code in protoc from the error message, we see that there are two stages here:
protoc generates native java code as before with some insertion points inside. The output location is build64_release/dirname java/com/gdt/log_process/wx_log_convertor/conf.proto denoted by dir1
protoc inserts custom code generated by the plugin. It searches for the output source from output location --java_field_tracking_out=... denote by dir2
It seems dir1 and dir2 should be the same, otherwise protoc complain that Tried to insert into file that doesn't exist.
When generating java files from protobuf, blade automatically adds target directory as output directory as below:
However, when we're going to insert some custom code by use of insertion points mechanism, it reports error whatever path we give to plugin output path:
Checking related code in protoc from the error message, we see that there are two stages here:
dirname java/com/gdt/log_process/wx_log_convertor/conf.proto
denoted by dir1It seems dir1 and dir2 should be the same, otherwise protoc complain that Tried to insert into file that doesn't exist.