Repository: hbase-thirdparty
Updated Branches:
  refs/heads/master 8b127cb75 -> 2e4b2473b


We were not compiling the patched pb -- used javap to prove it


Project: http://git-wip-us.apache.org/repos/asf/hbase-thirdparty/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase-thirdparty/commit/2e4b2473
Tree: http://git-wip-us.apache.org/repos/asf/hbase-thirdparty/tree/2e4b2473
Diff: http://git-wip-us.apache.org/repos/asf/hbase-thirdparty/diff/2e4b2473

Branch: refs/heads/master
Commit: 2e4b2473b2962a7c2dfb165625a8b0e7a8062d5e
Parents: 8b127cb
Author: Michael Stack <st...@apache.org>
Authored: Fri Jun 23 15:43:23 2017 -0700
Committer: Michael Stack <st...@apache.org>
Committed: Fri Jun 23 15:43:23 2017 -0700

----------------------------------------------------------------------
 .../dependency-reduced-pom.xml                  |  65 ++++---
 hbase-shaded-protobuf/pom.xml                   | 173 +++++++++----------
 2 files changed, 111 insertions(+), 127 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase-thirdparty/blob/2e4b2473/hbase-shaded-protobuf/dependency-reduced-pom.xml
----------------------------------------------------------------------
diff --git a/hbase-shaded-protobuf/dependency-reduced-pom.xml 
b/hbase-shaded-protobuf/dependency-reduced-pom.xml
index 443bc26..284ec9c 100644
--- a/hbase-shaded-protobuf/dependency-reduced-pom.xml
+++ b/hbase-shaded-protobuf/dependency-reduced-pom.xml
@@ -8,7 +8,7 @@
   <modelVersion>4.0.0</modelVersion>
   <artifactId>hbase-shaded-protobuf</artifactId>
   <name>Apache HBase Patched &amp; Relocated (Shaded) Protobuf</name>
-  <description>Pulls down protobuf, patches it, relocates/shades, and then 
bundles it up in a new jar.</description>
+  <description>Pulls down protobuf, patches it, compiles, and then 
relocates/shades.</description>
   <build>
     <plugins>
       <plugin>
@@ -38,44 +38,12 @@
         </configuration>
       </plugin>
       <plugin>
-        <artifactId>maven-jar-plugin</artifactId>
-        <version>3.0.2</version>
-        <configuration>
-          <finalName>${jar.finalName}</finalName>
-        </configuration>
-      </plugin>
-      <plugin>
-        <artifactId>maven-shade-plugin</artifactId>
-        <version>3.0.0</version>
-        <executions>
-          <execution>
-            <phase>package</phase>
-            <goals>
-              <goal>shade</goal>
-            </goals>
-            <configuration>
-              <shadeSourcesContent>true</shadeSourcesContent>
-              <createSourcesJar>true</createSourcesJar>
-              <relocations>
-                <relocation>
-                  <pattern>com.google</pattern>
-                  <shadedPattern>${rename.offset}.com.google</shadedPattern>
-                </relocation>
-              </relocations>
-              <artifactSet>
-                <excludes />
-              </artifactSet>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
         <artifactId>maven-dependency-plugin</artifactId>
         <version>2.10</version>
         <executions>
           <execution>
             <id>unpack</id>
-            <phase>package</phase>
+            <phase>generate-sources</phase>
             <goals>
               <goal>unpack</goal>
             </goals>
@@ -89,7 +57,7 @@
                   <type>jar</type>
                   <overWrite>true</overWrite>
                   <outputDirectory>${basedir}/src/main/java</outputDirectory>
-                  <includes>**/*.java</includes>
+                  <includes>**/**</includes>
                 </artifactItem>
               </artifactItems>
             </configuration>
@@ -102,7 +70,7 @@
         <executions>
           <execution>
             <id>patch</id>
-            <phase>package</phase>
+            <phase>generate-sources</phase>
             <goals>
               <goal>apply</goal>
             </goals>
@@ -119,6 +87,31 @@
           <skipApplication>false</skipApplication>
         </configuration>
       </plugin>
+      <plugin>
+        <artifactId>maven-shade-plugin</artifactId>
+        <version>3.0.0</version>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>shade</goal>
+            </goals>
+            <configuration>
+              <shadeSourcesContent>true</shadeSourcesContent>
+              <createSourcesJar>true</createSourcesJar>
+              <relocations>
+                <relocation>
+                  <pattern>com.google</pattern>
+                  <shadedPattern>${rename.offset}.com.google</shadedPattern>
+                </relocation>
+              </relocations>
+              <artifactSet>
+                <excludes />
+              </artifactSet>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>
 </project>

http://git-wip-us.apache.org/repos/asf/hbase-thirdparty/blob/2e4b2473/hbase-shaded-protobuf/pom.xml
----------------------------------------------------------------------
diff --git a/hbase-shaded-protobuf/pom.xml b/hbase-shaded-protobuf/pom.xml
index 0868c93..56eb499 100644
--- a/hbase-shaded-protobuf/pom.xml
+++ b/hbase-shaded-protobuf/pom.xml
@@ -18,15 +18,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
-
-  ON MVN COMPILE NOT WORKING
-
-  If you wondering why 'mvn compile' does not work building HBase
-  (in particular, if you are doing it for the first time), instead do
-  'mvn package'.  If you are interested in the full story, see
-  https://issues.apache.org/jira/browse/HBASE-6795.
-
 -->
   <modelVersion>4.0.0</modelVersion>
   <parent>
@@ -38,7 +29,7 @@
   <artifactId>hbase-shaded-protobuf</artifactId>
   <name>Apache HBase Patched &amp; Relocated (Shaded) Protobuf</name>
   <description>
-    Pulls down protobuf, patches it, relocates/shades, and then bundles it up 
in a new jar.
+    Pulls down protobuf, patches it, compiles, and then relocates/shades.
   </description>
   <build>
     <plugins>
@@ -47,37 +38,91 @@
         <artifactId>maven-source-plugin</artifactId>
       </plugin>
       <plugin>
+        <!--Clean needs to purge src/main/java since this is where
+             the unpack of protobuf is overlaid. Do it for usual
+             clean goal but also before we unpack in case patches
+             delete/add files.-->
         <artifactId>maven-clean-plugin</artifactId>
-              <executions>
-                <execution>
-                  <id>pre-compile-protoc</id>
-                  <phase>generate-sources</phase>
-                  <goals>
-                    <goal>clean</goal>
-                  </goals>
-              </execution>
-            </executions>
-                <configuration>
-                  <filesets>
-                    <fileset>
-                      <directory>${basedir}/src/main/java</directory>
-                      <includes>
-                        <include>**/**</include>
-                      </includes>
-                      <followSymlinks>false</followSymlinks>
-                    </fileset>
-                  </filesets>
-                </configuration>
+        <executions>
+          <execution>
+            <id>pre-compile-protoc</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>clean</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <filesets>
+            <fileset>
+              <directory>${basedir}/src/main/java</directory>
+              <includes>
+                <include>**/**</include>
+              </includes>
+              <followSymlinks>false</followSymlinks>
+            </fileset>
+          </filesets>
+        </configuration>
       </plugin>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-jar-plugin</artifactId>
-            <version>3.0.2</version>
+      <plugin>
+        <!--Download our dependency src, i.e. protobuf, and
+             unpack it. Overlays src/main/java so ready for
+            compile-time-->
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <version>2.10</version>
+        <executions>
+          <execution>
+            <id>unpack</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>unpack</goal>
+            </goals>
+            <configuration>
+              <artifactItems>
+                <artifactItem>
+                  <groupId>${project.groupId}</groupId>
+                  <artifactId>${project.artifactId}</artifactId>
+                  <version>${project.version}</version>
+                  <classifier>sources</classifier>
+                  <type>jar</type>
+                  <overWrite>true</overWrite>
+                  <outputDirectory>${basedir}/src/main/java</outputDirectory>
+                  <includes>**/**</includes>
+                </artifactItem>
+              </artifactItems>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <!--Apply our patches to the unbundled protobuf-->
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-patch-plugin</artifactId>
+        <version>1.2</version>
+        <configuration>
+          <targetDirectory>${basedir}</targetDirectory>
+          <skipApplication>false</skipApplication>
+        </configuration>
+        <executions>
+          <execution>
+            <id>patch</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <!--This should run after the above unpack phase-->
+              <goal>apply</goal>
+            </goals>
             <configuration>
-              <finalName>${jar.finalName}</finalName>                   
+              <strip>1</strip>
+              <patchDirectory>src/main/patches</patchDirectory>
+              
<patchTrackingFile>${project.build.directory}/patches-applied.txt</patchTrackingFile>
+              <naturalOrderProcessing>true</naturalOrderProcessing>
             </configuration>
-          </plugin>
+          </execution>
+        </executions>
+      </plugin>
       <plugin>
+        <!--After compile, shade-->
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-shade-plugin</artifactId>
         <version>3.0.0</version>
@@ -89,7 +134,7 @@
             </goals>
             <configuration>
               <shadeSourcesContent>true</shadeSourcesContent>
-                  <createSourcesJar>true</createSourcesJar>
+              <createSourcesJar>true</createSourcesJar>
               <relocations>
                 <relocation>
                   <pattern>com.google</pattern>
@@ -112,60 +157,6 @@
           </execution>
         </executions>
       </plugin>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-dependency-plugin</artifactId>
-            <version>2.10</version>
-            <executions>
-              <execution>
-                <id>unpack</id>
-                <phase>package</phase>
-                <goals>
-                  <goal>unpack</goal>
-                </goals>
-                <configuration>
-                  <artifactItems>
-                    <artifactItem>
-                      <groupId>${project.groupId}</groupId>
-                      <artifactId>${project.artifactId}</artifactId>
-                      <version>${project.version}</version>
-                      <classifier>sources</classifier>
-                      <type>jar</type>
-                      <overWrite>true</overWrite>
-                      
<outputDirectory>${basedir}/src/main/java</outputDirectory>
-                      <includes>**/*.java</includes>
-                    </artifactItem>
-                  </artifactItems>
-                </configuration>
-              </execution>
-            </executions>
-          </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-patch-plugin</artifactId>
-        <version>1.2</version>
-        <configuration>
-           <!--Patches are made at top-level-->
-           <targetDirectory>${basedir}</targetDirectory>
-          <skipApplication>false</skipApplication>
-        </configuration>
-        <executions>
-          <execution>
-            <id>patch</id>
-            <configuration>
-               <strip>1</strip>
-              <patchDirectory>src/main/patches</patchDirectory>
-              
<patchTrackingFile>${project.build.directory}/patches-applied.txt</patchTrackingFile>
-              <naturalOrderProcessing>true</naturalOrderProcessing>
-            </configuration>
-            <phase>package</phase>
-            <goals>
-              <!--This should run after the above unpack phase-->
-              <goal>apply</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
     </plugins>
   </build>
   <dependencies>

Reply via email to