jixuan1989 commented on pull request #1217:
URL: https://github.com/apache/incubator-iotdb/pull/1217#issuecomment-646615881


   Hi @giorgiozoppi ,
   
   you can add the following codes in root/pom.xml (search 
"<artifactId>maven-thrift-plugin</artifactId>" and you will know where to put 
the codes to,), 
   
   ```
   <execution>
                                   <id>generate-thrift-sources-csharp</id>
                                   <phase>generate-sources</phase>
                                   <goals>
                                       <goal>compile</goal>
                                   </goals>
                                   <configuration>
                                       <generator>csharp</generator>
                                       
<thriftExecutable>${thrift.exec.absolute.path}</thriftExecutable>
                                       
<thriftSourceRoot>${basedir}/src/main/thrift</thriftSourceRoot>
                                       
<outputDirectory>${project.build.directory}/generated-sources-csharp</outputDirectory>
                                   </configuration>
                               </execution>
   ```
   
   Then, running  `mvn generate-sources -DskipTests -pl service-rpc` (if 
failed, just use `mvn package -DskipTests`), you will get *.cs files under 
root/service-rpc/target/generated-sources-csharp. 
   
   It will be better than using`compile.sh` because in this way, users do not 
need to install thrift (maven will download the thrift compiler if needed).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to