Output Linux distribution package
authorhuangjian <huang.jian12@zte.com.cn>
Tue, 20 Sep 2016 11:26:42 +0000 (19:26 +0800)
committerhuangjian <huang.jian12@zte.com.cn>
Tue, 20 Sep 2016 11:26:42 +0000 (19:26 +0800)
Change-Id: Ibb7c081f2ea3379817d1c54ea0d30349aba25a12
Issue-id: OCS-57
Signed-off-by: huangjian <huang.jian12@zte.com.cn>
wso2bpel-ext/wso2bpel-core/distribution/standalone/pom.xml
wso2bpel-ext/wso2bpel-parent/wso2bpelparent-lite/pom.xml

index af35250..efc892c 100644 (file)
@@ -1,3 +1,4 @@
+<?xml version="1.0"?>
 <!--
 
     Copyright 2016 [ZTE] and others.
         <artifactId>distribution</artifactId>
         <version>1.0.0-SNAPSHOT</version>
     </parent>
-    
+
     <modelVersion>4.0.0</modelVersion>
     <artifactId>standalone</artifactId>
-    <!--name>openo/commonservice/commonutilities/distribution/standalone</name-->
+    <name>openo/commonservice/commonutilities/distribution/standalone</name>
     <packaging>pom</packaging>
 
     <properties>
-        <packagename>openo-commonservice-commonutilities</packagename>
+        <packagename>openo-commonservice-commonutilities-wso2bpel-ext</packagename>
+        <linux64id>linux64</linux64id>
+        <win64id>win64</win64id>
+        <linux64outputdir>target/assembly/${linux64id}</linux64outputdir>
+        <win64outputdir>target/assembly/${win64id}</win64outputdir>
+        <version.output>target/version</version.output>
     </properties>
 
     <build>
                 <artifactId>maven-resources-plugin</artifactId>
                 <executions>
                     <execution>
-                        <id>copy-resources</id>
+                        <id>copy-resources-${linux64id}</id>
                         <phase>process-resources</phase>
                         <goals>
                             <goal>copy-resources</goal>
                         </goals>
                         <configuration>
-                            <outputDirectory>${basedir}/target/assembly/</outputDirectory>
+                            <outputDirectory>${linux64outputdir}</outputDirectory>
                             <resources>
                                 <resource>
                                     <directory>src/main/assembly/</directory>
                                     <includes>
                                         <include>**/*</include>
                                     </includes>
+                                    <excludes>
+                                        <exclude>**/*.bat</exclude>
+                                    </excludes>
+                                </resource>
+                            </resources>
+                            <overwrite>true</overwrite>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>copy-resources-${win64id}</id>
+                        <phase>process-resources</phase>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>${win64outputdir}</outputDirectory>
+                            <resources>
+                                <resource>
+                                    <directory>src/main/assembly/</directory>
+                                    <filtering>false</filtering>
+                                    <includes>
+                                        <include>**/*</include>
+                                    </includes>
+                                    <excludes>
+                                        <exclude>**/*.sh</exclude>
+                                    </excludes>
                                 </resource>
                             </resources>
                             <overwrite>true</overwrite>
@@ -63,7 +95,7 @@
                 <artifactId>maven-dependency-plugin</artifactId>
                 <executions>
                     <execution>
-                        <id>copy-jar</id>
+                        <id>copy-jar-${linux64id}</id>
                         <goals>
                             <goal>copy</goal>
                         </goals>
                                     <artifactId>wso2bpel-mgr</artifactId>
                                     <type>jar</type>
                                     <overWrite>true</overWrite>
-                                    <outputDirectory>target/assembly/</outputDirectory>
+                                    <outputDirectory>${linux64outputdir}</outputDirectory>
                                     <destFileName>wso2bpel-service.jar</destFileName>
                                 </artifactItem>
                             </artifactItems>
                         </configuration>
                     </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-antrun-plugin</artifactId>
-                <executions>
                     <execution>
-                        <id>zip</id>
-                        <phase>package</phase>
+                        <id>copy-jar-${win64id}</id>
                         <goals>
-                            <goal>run</goal>
+                            <goal>copy</goal>
                         </goals>
+                        <phase>prepare-package</phase>
                         <configuration>
-                            <tasks name="${project.artifactId}">
-                                <zip destfile="target/${packagename}-${project.version}.zip" update="true">
-                                    <zipfileset dir="target/assembly" includes="**" />
-                                </zip>
-                                                               <copy todir="target/assembly/lib">
-                                                                       <fileset dir="../../wso2bpel-mgr/lib">
-                                                                               <include name="*" />
-                                                                       </fileset>
-                                                               </copy>
-                                                               <copy todir="target/assembly/lib">
-                                                                       <fileset dir="../../wso2bpel-mgr/target/dependency">
-                                                                               <include name="*" />
-                                                                       </fileset>
-                                                               </copy>
-                                                               <copy todir="target/assembly/classes">
-                                                                       <fileset dir="../../wso2bpel-mgr/target/classes">
-                                                                               <include name="**/*" />
-                                                                       </fileset>
-                                                               </copy>
-                            </tasks>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>org.openo.common-services.common-utilities</groupId>
+                                    <artifactId>wso2bpel-mgr</artifactId>
+                                    <type>jar</type>
+                                    <overWrite>true</overWrite>
+                                    <outputDirectory>${win64outputdir}</outputDirectory>
+                                    <destFileName>wso2bpel-service.jar</destFileName>
+                                </artifactItem>
+                            </artifactItems>
                         </configuration>
                     </execution>
                 </executions>
             </plugin>
             <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>build-helper-maven-plugin</artifactId>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
                 <executions>
                     <execution>
-                        <id>attach-artifacts</id>
+                        <id>distribution</id>
                         <phase>package</phase>
                         <goals>
-                            <goal>attach-artifact</goal>
+                            <goal>run</goal>
                         </goals>
                         <configuration>
-                            <artifacts>
-                                <artifact>
-                                    <file>target/${packagename}-${project.version}.zip</file>
-                                    <type>zip</type>
-                                </artifact>
-                            </artifacts>
+                            <tasks name="distribution">
+                                <copy todir="target/assembly/linux64/lib">
+                                    <fileset dir="../../wso2bpel-mgr/lib">
+                                        <include name="*" />
+                                    </fileset>
+                                </copy>
+                                <copy todir="target/assembly/win64/lib">
+                                    <fileset dir="../../wso2bpel-mgr/lib">
+                                        <include name="*" />
+                                    </fileset>
+                                </copy>
+                                <tar destfile="${version.output}/${packagename}-${project.version}.tar.gz" longfile="posix" compression="gzip">
+                                    <tarfileset dir="target/assembly/linux64" filemode="0644" dirmode="0755">
+                                        <exclude name="**/*.sh"/>
+                                    </tarfileset>
+                                    <tarfileset dir="target/assembly/linux64" filemode="0755" dirmode="0755">
+                                        <include name="**/*.sh"/>
+                                    </tarfileset>
+                                </tar>
+                                <attachartifact file="${version.output}/${packagename}-${project.version}.tar.gz" classifier="linux64" type="tar.gz"/>
+                                <zip destfile="${version.output}/${packagename}-${project.version}.zip" update="true">
+                                    <zipfileset dir="target/assembly/win64" includes="**"/>
+                                </zip>
+                                <attachartifact file="${version.output}/${packagename}-${project.version}.zip" classifier="win64" type="zip"/>
+                            </tasks>
                         </configuration>
                     </execution>
                 </executions>
index 4dc3709..739cd76 100644 (file)
@@ -1,3 +1,4 @@
+<?xml version="1.0"?>
 <!--
 
     Copyright 2016 [ZTE] and others.
         <groupId>org.openo.oparent</groupId>
         <artifactId>oparent</artifactId>
         <version>1.0.0-SNAPSHOT</version>
-        <relativePath></relativePath>
+        <relativePath>../../../../oparent</relativePath>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.openo.common-services.common-utilities</groupId>
     <artifactId>wso2bpelparent-lite</artifactId>
     <version>1.0.0-SNAPSHOT</version>
-    <!--name>openo/commonservice/commonutilities/wso2bpelparent-lite</name-->
+    <name>openo/commonservice/commonutilities/wso2bpelparent-lite</name>
     <packaging>pom</packaging>
 
     <build>
                     <artifactId>lifecycle-mapping</artifactId>
                     <version>1.0.0</version>
                 </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-compiler-plugin</artifactId>
+                    <version>3.3</version>
+                    <configuration>
+                        <verbose>true</verbose>
+                        <fork>true</fork>
+                        <compilerVersion>1.7</compilerVersion>
+                        <source>1.7</source>
+                        <target>1.7</target>
+                        <encoding>UTF-8</encoding>
+                        <debug>true</debug>
+                    </configuration>
+                </plugin>
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-jar-plugin</artifactId>
                     <artifactId>license-maven-plugin</artifactId>
                     <version>3.0.rc1</version>
                 </plugin>
+                <plugin>
+                    <artifactId>maven-antrun-plugin</artifactId>
+                    <version>1.8</version>
+                </plugin>
             </plugins>
         </pluginManagement>
     </build>