calcite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject calcite-avatica git commit: [CALCITE-2073] Allow disabling of the maven-protobuf-plugin.
Date Thu, 30 Nov 2017 19:29:13 GMT
Repository: calcite-avatica
Updated Branches:
  refs/heads/master c148b4164 -> cc3605e2a


[CALCITE-2073] Allow disabling of the maven-protobuf-plugin.

Updates website with instructions on how to do this.

Closes apache/calcite-avatica#19


Project: http://git-wip-us.apache.org/repos/asf/calcite-avatica/repo
Commit: http://git-wip-us.apache.org/repos/asf/calcite-avatica/commit/cc3605e2
Tree: http://git-wip-us.apache.org/repos/asf/calcite-avatica/tree/cc3605e2
Diff: http://git-wip-us.apache.org/repos/asf/calcite-avatica/diff/cc3605e2

Branch: refs/heads/master
Commit: cc3605e2af6ee242c70f72e330f2c12a77b8bf44
Parents: c148b41
Author: Josh Elser <elserj@apache.org>
Authored: Thu Nov 30 13:11:15 2017 -0500
Committer: Josh Elser <elserj@apache.org>
Committed: Thu Nov 30 13:19:27 2017 -0500

----------------------------------------------------------------------
 core/pom.xml          | 38 +++++++++++++++++++++++++-------------
 site/develop/index.md | 21 +++++++++++++++++++++
 2 files changed, 46 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/calcite-avatica/blob/cc3605e2/core/pom.xml
----------------------------------------------------------------------
diff --git a/core/pom.xml b/core/pom.xml
index 7f41347..887077b 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -179,19 +179,6 @@ limitations under the License.
         </executions>
       </plugin>
       <plugin>
-        <groupId>org.xolstice.maven.plugins</groupId>
-        <artifactId>protobuf-maven-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>compile-protoc</id>
-            <phase>generate-sources</phase>
-            <goals>
-              <goal>compile</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
         <groupId>org.apache.rat</groupId>
         <artifactId>apache-rat-plugin</artifactId>
         <configuration>
@@ -203,4 +190,29 @@ limitations under the License.
       </plugin>
     </plugins>
   </build>
+  <profiles>
+    <profile>
+      <id>compile-protobuf</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.xolstice.maven.plugins</groupId>
+            <artifactId>protobuf-maven-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>compile-protoc</id>
+                <phase>generate-sources</phase>
+                <goals>
+                  <goal>compile</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
 </project>

http://git-wip-us.apache.org/repos/asf/calcite-avatica/blob/cc3605e2/site/develop/index.md
----------------------------------------------------------------------
diff --git a/site/develop/index.md b/site/develop/index.md
index 13f3390..6942f8b 100644
--- a/site/develop/index.md
+++ b/site/develop/index.md
@@ -57,6 +57,27 @@ The HOWTO describes how to
 [run more or fewer tests]({{ site.baseurl }}/docs/howto.html#running-tests) and
 [run integration tests]({{ site.baseurl }}/docs/howto.html#running-integration-tests).
 
+### Disabling protobuf generation
+
+On older operating systems, developers trying to build Avatica may experience
+issues with the Xolstice maven-protobuf-plugin, similar to the following:
+
+```
+[INFO] Compiling 3 proto file(s) to /avatica/core/src/main/java
+[ERROR] PROTOC FAILED: /avatica/core/target/protoc-plugins/protoc-3.1.0-linux-x86_64.exe:
/lib64/libc.so.6: version `GLIBC_2.14' not found (required by /avatica/core/target/protoc-plugins/protoc-3.1.0-linux-x86_64.exe)
+[ERROR] /avatica/core/src/main/protobuf/common.proto [0:0]: /avatica/core/target/protoc-plugins/protoc-3.1.0-linux-x86_64.exe:
/lib64/libc.so.6: version `GLIBC_2.14' not found (required by /avatica/core/target/protoc-plugins/protoc-3.1.0-linux-x86_64.exe)
+[ERROR] /avatica/core/src/main/protobuf/responses.proto [0:0]: /avatica/core/target/protoc-plugins/protoc-3.1.0-linux-x86_64.exe:
/lib64/libc.so.6: version `GLIBC_2.14' not found (required by /avatica/core/target/protoc-plugins/protoc-3.1.0-linux-x86_64.exe)
+[ERROR] /avatica/core/src/main/protobuf/requests.proto [0:0]: /avatica/core/target/protoc-plugins/protoc-3.1.0-linux-x86_64.exe:
/lib64/libc.so.6: version `GLIBC_2.14' not found (required by /avatica/core/target/protoc-plugins/protoc-3.1.0-linux-x86_64.exe)
+```
+
+In most cases, it is unnecessary to re-generate the Protobuf messages into Java code. Developers
+can side-step this issue by disabling the `compile-protobuf` profile in their Maven execution.
+
+{% highlight bash %}
+$ mvn package -P!compile-protobuf
+{% endhighlight %}
+
+
 ## Contributing
 
 We welcome contributions.


Mime
View raw message