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

dragonyliu pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/ratis.git

commit 8a9963c8f3defb1a909c7393bf15eb560752c9a6
Author: leo65535 <[email protected]>
AuthorDate: Wed Aug 10 11:16:33 2022 +0800

    RATIS-1660. Fix wrong ratis package (#705)
    
    
    (cherry picked from commit 92088ff621ca44f29818b1df71e232284602a88e)
---
 pom.xml                                           |  2 +
 ratis-assembly/pom.xml                            | 41 ++++++++++++---
 ratis-assembly/src/main/assembly/bin-pkg.xml      | 28 ++++++++++
 ratis-assembly/src/main/assembly/bin.xml          | 62 +++++++++++------------
 ratis-assembly/src/main/assembly/examples-bin.xml | 14 ++---
 ratis-assembly/src/main/assembly/shell-bin.xml    |  2 +-
 6 files changed, 104 insertions(+), 45 deletions(-)

diff --git a/pom.xml b/pom.xml
index 803700fc5..7743fa9dd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -176,6 +176,7 @@
     <maven-stylus-skin.version>1.5</maven-stylus-skin.version>
     <maven-surefire-plugin.version>3.0.0-M1</maven-surefire-plugin.version>
     <maven-checkstyle-plugin.version>3.1.2</maven-checkstyle-plugin.version>
+    <maven-assembly-plugin.version>3.4.1</maven-assembly-plugin.version>
 
     <checkstyle.version>9.3</checkstyle.version>
 
@@ -522,6 +523,7 @@
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-assembly-plugin</artifactId>
+          <version>${maven-assembly-plugin.version}</version>
           <configuration>
             <!--Defer to the ratis-assembly sub-module.  It does all 
assembly-->
             <skipAssembly>true</skipAssembly>
diff --git a/ratis-assembly/pom.xml b/ratis-assembly/pom.xml
index 46e716fa0..0bd81aa9b 100644
--- a/ratis-assembly/pom.xml
+++ b/ratis-assembly/pom.xml
@@ -115,6 +115,7 @@
           <attach>true</attach>
         </configuration>
       </plugin>
+
       <plugin>
         <artifactId>maven-assembly-plugin</artifactId>
         <configuration>
@@ -123,14 +124,42 @@
           <skipAssembly>false</skipAssembly>
           <appendAssemblyId>true</appendAssemblyId>
           <tarLongFileMode>gnu</tarLongFileMode>
-          <descriptors>
-            <descriptor>src/main/assembly/src.xml</descriptor>
-            <descriptor>src/main/assembly/bin.xml</descriptor>
-            <descriptor>src/main/assembly/examples-bin.xml</descriptor>
-            <descriptor>src/main/assembly/shell-bin.xml</descriptor>
-          </descriptors>
         </configuration>
+        <executions>
+          <execution>
+            <id>src</id>
+            <phase>package</phase>
+            <goals>
+              <goal>single</goal>
+            </goals>
+            <configuration>
+              <descriptors>
+                <descriptor>src/main/assembly/src.xml</descriptor>
+              </descriptors>
+              <finalName>apache-ratis-${project.version}-src</finalName>
+              <appendAssemblyId>false</appendAssemblyId>
+            </configuration>
+          </execution>
+          <execution>
+            <id>default-cli</id>
+            <phase>package</phase>
+            <goals>
+              <goal>single</goal>
+            </goals>
+            <configuration>
+              <descriptors>
+                <descriptor>src/main/assembly/bin.xml</descriptor>
+                <descriptor>src/main/assembly/examples-bin.xml</descriptor>
+                <descriptor>src/main/assembly/shell-bin.xml</descriptor>
+                <descriptor>src/main/assembly/bin-pkg.xml</descriptor>
+              </descriptors>
+              <finalName>apache-ratis-${project.version}-bin</finalName>
+              <appendAssemblyId>false</appendAssemblyId>
+            </configuration>
+          </execution>
+        </executions>
       </plugin>
+
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-site-plugin</artifactId>
diff --git a/ratis-assembly/src/main/assembly/bin-pkg.xml 
b/ratis-assembly/src/main/assembly/bin-pkg.xml
new file mode 100644
index 000000000..c07c83cd5
--- /dev/null
+++ b/ratis-assembly/src/main/assembly/bin-pkg.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<!--
+  Licensed 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. See accompanying LICENSE file.
+-->
+<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0";
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+          xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 
http://maven.apache.org/xsd/assembly-2.0.0.xsd";>
+  <id>bin-pkg</id>
+  <formats>
+    <format>tar.gz</format>
+  </formats>
+  <fileSets>
+    <fileSet>
+      
<directory>${project.basedir}/target/apache-ratis-${project.version}-bin/apache-ratis-${project.version}-bin</directory>
+      <outputDirectory>..</outputDirectory>
+    </fileSet>
+  </fileSets>
+</assembly>
diff --git a/ratis-assembly/src/main/assembly/bin.xml 
b/ratis-assembly/src/main/assembly/bin.xml
index 0648efdb0..2d0858eb9 100644
--- a/ratis-assembly/src/main/assembly/bin.xml
+++ b/ratis-assembly/src/main/assembly/bin.xml
@@ -23,7 +23,7 @@
   -->
   <id>bin</id>
   <formats>
-    <format>tar.gz</format>
+    <format>dir</format>
   </formats>
   <moduleSets>
     <moduleSet>
@@ -77,35 +77,35 @@
       <directoryMode>0755</directoryMode>
     </fileSet>
     <!-- Include dev support tools -->
-    <fileSet>
-      <directory>${project.basedir}/../dev-support</directory>
-      <outputDirectory>dev-support</outputDirectory>
-      <fileMode>0644</fileMode>
-      <directoryMode>0755</directoryMode>
-    </fileSet>
-    <fileSet>
-      <directory>${project.basedir}/../ratis-shell/target/</directory>
-      <outputDirectory>ratis-shell/lib/shell</outputDirectory>
-      <fileMode>755</fileMode>
-      <includes>
-        <include>ratis-shell-*-jar-with-dependencies.jar</include>
-      </includes>
-    </fileSet>
-    <fileSet>
-      <directory>${project.basedir}/../ratis-shell/src/main/bin</directory>
-      <outputDirectory>ratis-shell/bin</outputDirectory>
-      <fileMode>755</fileMode>
-    </fileSet>
-    <fileSet>
-      <directory>${project.basedir}/../ratis-shell/src/main/libexec</directory>
-      <outputDirectory>ratis-shell/libexec</outputDirectory>
-      <fileMode>0644</fileMode>
-      <directoryMode>0755</directoryMode>
-    </fileSet>
-    <fileSet>
-      <directory>${project.basedir}/../ratis-shell/src/main/conf</directory>
-      <outputDirectory>ratis-shell/conf</outputDirectory>
-      <fileMode>644</fileMode>
-    </fileSet>
+<!--    <fileSet>-->
+<!--      <directory>${project.basedir}/../dev-support</directory>-->
+<!--      <outputDirectory>dev-support</outputDirectory>-->
+<!--      <fileMode>0644</fileMode>-->
+<!--      <directoryMode>0755</directoryMode>-->
+<!--    </fileSet>-->
+<!--    <fileSet>-->
+<!--      <directory>${project.basedir}/../ratis-shell/target/</directory>-->
+<!--      <outputDirectory>ratis-shell/lib/shell</outputDirectory>-->
+<!--      <fileMode>755</fileMode>-->
+<!--      <includes>-->
+<!--        <include>ratis-shell-*-jar-with-dependencies.jar</include>-->
+<!--      </includes>-->
+<!--    </fileSet>-->
+<!--    <fileSet>-->
+<!--      
<directory>${project.basedir}/../ratis-shell/src/main/bin</directory>-->
+<!--      <outputDirectory>ratis-shell/bin</outputDirectory>-->
+<!--      <fileMode>755</fileMode>-->
+<!--    </fileSet>-->
+<!--    <fileSet>-->
+<!--      
<directory>${project.basedir}/../ratis-shell/src/main/libexec</directory>-->
+<!--      <outputDirectory>ratis-shell/libexec</outputDirectory>-->
+<!--      <fileMode>0644</fileMode>-->
+<!--      <directoryMode>0755</directoryMode>-->
+<!--    </fileSet>-->
+<!--    <fileSet>-->
+<!--      
<directory>${project.basedir}/../ratis-shell/src/main/conf</directory>-->
+<!--      <outputDirectory>ratis-shell/conf</outputDirectory>-->
+<!--      <fileMode>644</fileMode>-->
+<!--    </fileSet>-->
   </fileSets>
 </assembly>
diff --git a/ratis-assembly/src/main/assembly/examples-bin.xml 
b/ratis-assembly/src/main/assembly/examples-bin.xml
index 59e85400b..c88f75930 100644
--- a/ratis-assembly/src/main/assembly/examples-bin.xml
+++ b/ratis-assembly/src/main/assembly/examples-bin.xml
@@ -23,7 +23,7 @@
   -->
   <id>examples-bin</id>
   <formats>
-    <format>tar.gz</format>
+    <format>dir</format>
   </formats>
   <dependencySets>
     <dependencySet>
@@ -68,12 +68,12 @@
       <fileMode>755</fileMode>
     </fileSet>
     <!-- Include dev support tools -->
-    <fileSet>
-      <directory>${project.basedir}/../dev-support</directory>
-      <outputDirectory>dev-support</outputDirectory>
-      <fileMode>0644</fileMode>
-      <directoryMode>0755</directoryMode>
-    </fileSet>
+<!--    <fileSet>-->
+<!--      <directory>${project.basedir}/../dev-support</directory>-->
+<!--      <outputDirectory>dev-support</outputDirectory>-->
+<!--      <fileMode>0644</fileMode>-->
+<!--      <directoryMode>0755</directoryMode>-->
+<!--    </fileSet>-->
     <fileSet>
       
<directory>${project.basedir}/../ratis-examples/src/main/resources</directory>
       <outputDirectory>examples/conf</outputDirectory>
diff --git a/ratis-assembly/src/main/assembly/shell-bin.xml 
b/ratis-assembly/src/main/assembly/shell-bin.xml
index e586cecd7..5ecbb5ca6 100644
--- a/ratis-assembly/src/main/assembly/shell-bin.xml
+++ b/ratis-assembly/src/main/assembly/shell-bin.xml
@@ -17,7 +17,7 @@
           xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 
http://maven.apache.org/xsd/assembly-2.0.0.xsd";>
   <id>shell</id>
   <formats>
-    <format>tar.gz</format>
+    <format>dir</format>
   </formats>
   <fileSets>
     <fileSet>

Reply via email to