Author: jfrederic.clere(a)jboss.com
Date: 2012-01-09 12:15:40 -0500 (Mon, 09 Jan 2012)
New Revision: 2889
Added:
trunk/build/unix/pom.native.xml
trunk/build/unix/src/
trunk/build/unix/src/assembly/
trunk/build/unix/src/assembly/jar.native.xml
Modified:
trunk/build/unix/build.sh
trunk/build/unix/buildbin.jboss-native.sh
Log:
Add logic to create an assembly jar while building.
Modified: trunk/build/unix/build.sh
===================================================================
--- trunk/build/unix/build.sh 2012-01-05 13:32:58 UTC (rev 2888)
+++ trunk/build/unix/build.sh 2012-01-09 17:15:40 UTC (rev 2889)
@@ -118,6 +118,7 @@
esac
shift
done
+export force_64
# Check if we just have only to build the binaries
# something like package-version-src or
Modified: trunk/build/unix/buildbin.jboss-native.sh
===================================================================
--- trunk/build/unix/buildbin.jboss-native.sh 2012-01-05 13:32:58 UTC (rev 2888)
+++ trunk/build/unix/buildbin.jboss-native.sh 2012-01-09 17:15:40 UTC (rev 2889)
@@ -138,4 +138,97 @@
rm -f ${current_loc}/x.tar
cp ${common_loc}/bin/openssl ${output_loc}/bin/${output_bin}
+
+ echo "Preparing corresponding maven resources"
+ case ${BUILD_SYS}${BUILD_CPU} in
+ *hpux-parisc2*)
+ PLATFORM=hpux
+ if $force_64; then
+ CPU=parisc64
+ else
+ CPU=parisc2
+ fi
+ ;;
+ *hpux-i64*)
+ PLATFORM=hpux
+ # We only build a 64 bit one.
+ #if $force_64; then
+ CPU=ia64w
+ #else
+ # CPU=ia64n
+ #fi
+ CHANGETOSL=true
+ ;;
+ *linux2-x86*)
+ PLATFORM=linux
+ CPU=i686
+ ;;
+ # jboss-modules doesn't support it.
+ *linux2-i64*)
+ PLATFORM=linux
+ CPU=ia64
+ ;;
+ *linux2-x64*)
+ PLATFORM=linux
+ CPU=x64
+ ;;
+ *solaris-sun4v*)
+ PLATFORM=solaris10
+ CPU=sparc
+ ;;
+ *solaris64-sun4v*)
+ PLATFORM=solaris10
+ CPU=sparcv9
+ ;;
+ *solaris-sparcv9*)
+ PLATFORM=solaris9
+ CPU=sparc
+ ;;
+ *solaris64-sparcv9*)
+ PLATFORM=solaris9
+ CPU=sparcv9
+ ;;
+ *solaris10-x86*)
+ PLATFORM=solaris10
+ CPU=x86
+ ;;
+ *solaris10-x64*)
+ PLATFORM=solaris10
+ CPU=x64
+ ;;
+ *solaris9-x86*)
+ PLATFORM=solaris9
+ CPU=x86
+ ;;
+ *solaris9-x64*)
+ PLATFORM=solaris9
+ CPU=x64
+ ;;
+ *macosx-x86*)
+ PLATFORM=macosx
+ CPU=i386
+ ;;
+ *macosx-x64*)
+ PLATFORM=macosx
+ CPU=x64
+ ;;
+ *windows-x64*)
+ PLATFORM=windows
+ CPU=x64
+ ;;
+ *windows-x86*)
+ PLATFORM=windows
+ CPU=x86
+ ;;
+ *)
+ echo "${BUILD_SYS}${BUILD_CPU} not supported"
+ exit 1
+ ;;
+ esac
+
+ # Process the pom and assembly jar.
+ cp ${build_top}/pom.native.xml ${common_loc}/pom.xml
+ mkdir -p ${common_loc}/src/assembly
+ cp ${build_top}/src/assembly/jar.native.xml ${common_loc}/src/assembly/jar.xml
+ (cd ${build_top}; mvn install) || exit 1
fi
Added: trunk/build/unix/pom.native.xml
===================================================================
--- trunk/build/unix/pom.native.xml (rev 0)
+++ trunk/build/unix/pom.native.xml 2012-01-09 17:15:40 UTC (rev 2889)
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat, Inc., and individual contributors
+ ~ as indicated by the @author tags. See the copyright.txt file in the
+ ~ distribution for a full listing of individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<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>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-parent</artifactId>
+ <version>6-beta-1</version>
+ </parent>
+
+ <groupId>org.jboss.as.native</groupId>
+ <artifactId>jbossweb-native</artifactId>
+ <version>2.0.10.Beta2-SNAPSHOT</version>
+ <description>natives bundled in jar</description>
+ <packaging>jar</packaging>
+
+ <name>JBoss Application Server: Web Native Subsystem</name>
+
+ <scm>
+
<
connection>scm:svn:http://anonsvn.jboss.org/repos/jbossnative/trunk/bu...
+
<
developerConnection>scm:svn:https://svn.jboss.org/repos/jbossnative/tr...
+
<
url>http://fisheye.jboss.org/browse/jbossnative/trunk/build/unix/util/...
+ </scm>
+
+ <repositories>
+ <repository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Public Repository</name>
+
<
url>http://repository.jboss.org/nexus/content/groups/public/</url>
+ </repository>
+ </repositories>
+
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <includes>
+ <include>**/*TestCase.java</include>
+ </includes>
+ <enableAssertions>false</enableAssertions>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2.2</version>
+ <executions>
+ <execution>
+ <id>jar</id>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <finalName>${project.artifactId}.jar</finalName>
+ <appendAssemblyId>false</appendAssemblyId>
+
<ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
+ <descriptors>
+ <descriptor>src/assembly/jar.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+
+ <resources>
+ <resource>
+ <directory>lib</directory>
+ <includes>
+ <include>**/*.so</include>
+ <include>**/*.dll</include>
+ <include>**/*.sl</include>
+ <include>**/*.dylib</include>
+ <include>**/libapr-1.dylib</include>
+ <include>**/libcrypto.dylib</include>
+ <include>**/libssl.dylib</include>
+ <include>**/libtcnative-1.dylib</include>
+ </includes>
+ </resource>
+ </resources>
+
+ </build>
+
+</project>
Added: trunk/build/unix/src/assembly/jar.native.xml
===================================================================
--- trunk/build/unix/src/assembly/jar.native.xml (rev 0)
+++ trunk/build/unix/src/assembly/jar.native.xml 2012-01-09 17:15:40 UTC (rev 2889)
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<assembly
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/assembly-1.0.0.xsd">
+ <id>jar</id>
+ <formats>
+ <format>jar</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <files>
+ <!-- macosx intel 64 bits -->
+ <file>
+ <source>lib/libapr-1.dylib</source>
+ <outputDirectory>lib/macosx-x86_64</outputDirectory>
+ <destName>libapr-1.jnilib</destName>
+ </file>
+ <file>
+ <source>lib/libcrypto.dylib</source>
+ <outputDirectory>lib/macosx-x86_64</outputDirectory>
+ <destName>libcrypto.jnilib</destName>
+ </file>
+ <file>
+ <source>lib/libssl.dylib</source>
+ <outputDirectory>lib/macosx-x86_64</outputDirectory>
+ <destName>libssl.jnilib</destName>
+ </file>
+ <file>
+ <source>lib/libtcnative-1.dylib</source>
+ <outputDirectory>lib/macosx-x86_64</outputDirectory>
+ <destName>libtcnative-1.jnilib</destName>
+ </file>
+
+ <!-- macosx intel 32 bits -->
+ <file>
+ <source>lib/libapr-1.dylib</source>
+ <outputDirectory>lib/macosx-i686</outputDirectory>
+ <destName>libapr-1.jnilib</destName>
+ </file>
+ <file>
+ <source>lib/libcrypto.dylib</source>
+ <outputDirectory>lib/macosx-i686</outputDirectory>
+ <destName>libcrypto.jnilib</destName>
+ </file>
+ <file>
+ <source>lib/libssl.dylib</source>
+ <outputDirectory>lib/macosx-i686</outputDirectory>
+ <destName>libssl.jnilib</destName>
+ </file>
+ <file>
+ <source>lib/libtcnative-1.dylib</source>
+ <outputDirectory>lib/macosx-i686</outputDirectory>
+ <destName>libtcnative-1.jnilib</destName>
+ </file>
+ </files>
+
+ <fileSets>
+ <!-- linux intel 32 bits -->
+ <fileSet>
+ <directory>lib</directory>
+ <includes>
+ <include>libapr-1.so</include>
+ <include>libcrypto.so</include>
+ <include>libssl.so</include>
+ <include>libtcnative-1.so</include>
+ </includes>
+ <outputDirectory>lib/linux-i686</outputDirectory>
+ </fileSet>
+
+ <!-- linux intel 64 bits -->
+ <fileSet>
+ <directory>lib</directory>
+ <includes>
+ <include>libapr-1.so</include>
+ <include>libcrypto.so</include>
+ <include>libssl.so</include>
+ <include>libtcnative-1.so</include>
+ </includes>
+ <outputDirectory>lib/linux-x86_64</outputDirectory>
+ </fileSet>
+
+ <!-- win32 -->
+ <fileSet>
+ <directory>lib</directory>
+ <includes>
+ <include>tcnative-1.dll</include>
+ </includes>
+ <outputDirectory>lib/win-i686</outputDirectory>
+ </fileSet>
+
+ <!-- win64 -->
+ <fileSet>
+ <directory>lib</directory>
+ <includes>
+ <include>tcnative-1.dll</include>
+ </includes>
+ <outputDirectory>lib/win-x86_64</outputDirectory>
+ </fileSet>
+ </fileSets>
+</assembly>