This is an automated email from the ASF dual-hosted git repository.

sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git


The following commit(s) were added to refs/heads/master by this push:
     new e713953  ISSUE #691: Move generated files into their own module
e713953 is described below

commit e713953aec8523e1018e0eba458c019ec9ba1f9f
Author: Ivan Kelly <[email protected]>
AuthorDate: Fri Nov 10 16:51:29 2017 -0800

    ISSUE #691: Move generated files into their own module
    
    Upcoming changes are using GRpc in conjunction with protobuf. GRpc
    generates code that created deprecation warnings when compiled with
    java 8, so this change moves all generated code out to another module,
    so that we don't have to turn off -Werror for all code.
    
    In any case, at some point we should split the bookkeeper client out
    from the server module, at which point we would need the definitions
    on a common place.
    
    Author: Ivan Kelly <[email protected]>
    
    Reviewers: Enrico Olivelli <[email protected]>, Jia Zhai <None>, Sijie 
Guo <[email protected]>
    
    This closes #711 from ivankelly/proto-module, closes #691
---
 bookkeeper-proto/pom.xml                           | 69 ++++++++++++++++++++++
 .../src/main/proto/BookkeeperProtocol.proto        |  0
 .../src/main/proto/DataFormats.proto               |  0
 bookkeeper-server/pom.xml                          | 25 +-------
 pom.xml                                            |  1 +
 5 files changed, 73 insertions(+), 22 deletions(-)

diff --git a/bookkeeper-proto/pom.xml b/bookkeeper-proto/pom.xml
new file mode 100644
index 0000000..02bf4ce
--- /dev/null
+++ b/bookkeeper-proto/pom.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>bookkeeper</artifactId>
+    <groupId>org.apache.bookkeeper</groupId>
+    <version>4.6.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>bookkeeper-proto</artifactId>
+  <name>Apache BookKeeper :: Protocols</name>
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+  <dependencies>
+    <dependency>
+      <groupId>com.google.protobuf</groupId>
+      <artifactId>protobuf-java</artifactId>
+      <version>${protobuf.version}</version>
+      <scope>compile</scope>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.rat</groupId>
+        <artifactId>apache-rat-plugin</artifactId>
+        <configuration>
+          <excludes>
+            <!-- exclude generated file //-->
+            <exclude>**/DataFormats.java</exclude>
+            <exclude>**/BookkeeperProtocol.java</exclude>
+          </excludes>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.xolstice.maven.plugins</groupId>
+        <artifactId>protobuf-maven-plugin</artifactId>
+        <version>0.5.0</version>
+        <configuration>
+          
<protocArtifact>com.google.protobuf:protoc:3.4.0:exe:${os.detected.classifier}</protocArtifact>
+          <checkStaleness>true</checkStaleness>
+        </configuration>
+        <executions>
+          <execution>
+            <goals>
+              <goal>compile</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/bookkeeper-server/src/main/proto/BookkeeperProtocol.proto 
b/bookkeeper-proto/src/main/proto/BookkeeperProtocol.proto
similarity index 100%
rename from bookkeeper-server/src/main/proto/BookkeeperProtocol.proto
rename to bookkeeper-proto/src/main/proto/BookkeeperProtocol.proto
diff --git a/bookkeeper-server/src/main/proto/DataFormats.proto 
b/bookkeeper-proto/src/main/proto/DataFormats.proto
similarity index 100%
rename from bookkeeper-server/src/main/proto/DataFormats.proto
rename to bookkeeper-proto/src/main/proto/DataFormats.proto
diff --git a/bookkeeper-server/pom.xml b/bookkeeper-server/pom.xml
index 2adc3ee..2dbef79 100644
--- a/bookkeeper-server/pom.xml
+++ b/bookkeeper-server/pom.xml
@@ -35,10 +35,9 @@
       <version>${project.parent.version}</version>
     </dependency>
     <dependency>
-      <groupId>com.google.protobuf</groupId>
-      <artifactId>protobuf-java</artifactId>
-      <version>${protobuf.version}</version>
-      <scope>compile</scope>
+      <groupId>org.apache.bookkeeper</groupId>
+      <artifactId>bookkeeper-proto</artifactId>
+      <version>${project.parent.version}</version>
     </dependency>
     <dependency>
       <groupId>org.slf4j</groupId>
@@ -294,8 +293,6 @@
         <configuration>
           <excludes>
             <!-- exclude generated file //-->
-            <exclude>**/DataFormats.java</exclude>
-            <exclude>**/BookkeeperProtocol.java</exclude>
             <exclude>**/target/**/*</exclude>
             <exclude>**/.classpath</exclude>
             <exclude>**/.gitignore</exclude>
@@ -373,22 +370,6 @@
         </executions>
       </plugin>
       <plugin>
-        <groupId>org.xolstice.maven.plugins</groupId>
-        <artifactId>protobuf-maven-plugin</artifactId>
-        <version>0.5.0</version>
-        <configuration>
-          
<protocArtifact>com.google.protobuf:protoc:3.4.0:exe:${os.detected.classifier}</protocArtifact>
-          <checkStaleness>true</checkStaleness>
-        </configuration>
-        <executions>
-          <execution>
-            <goals>
-              <goal>compile</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-checkstyle-plugin</artifactId>
         <version>${maven-checkstyle-plugin.version}</version>
diff --git a/pom.xml b/pom.xml
index 2e1cc95..13cbabe 100644
--- a/pom.xml
+++ b/pom.xml
@@ -52,6 +52,7 @@
   </ciManagement>
   <modules>
     <module>buildtools</module>
+    <module>bookkeeper-proto</module>
     <module>bookkeeper-common</module>
     <module>bookkeeper-stats</module>
     <module>bookkeeper-server</module>

-- 
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].

Reply via email to