Author: jfrederic.clere(a)jboss.com
Date: 2011-05-09 10:39:56 -0400 (Mon, 09 May 2011)
New Revision: 2775
Added:
trunk/build/unix/util/jbossweb/build.sh
trunk/build/unix/util/jbossweb/pom.xml
Modified:
trunk/build/unix/util/jbossweb/files.sh
Log:
Use maven to build a big jar with all native libraries.
Added: trunk/build/unix/util/jbossweb/build.sh
===================================================================
--- trunk/build/unix/util/jbossweb/build.sh (rev 0)
+++ trunk/build/unix/util/jbossweb/build.sh 2011-05-09 14:39:56 UTC (rev 2775)
@@ -0,0 +1,66 @@
+#!/bin/sh
+# Copyright(c) 2011 Red Hat Middleware, LLC,
+# and individual contributors as indicated by the @authors tag.
+# See the copyright.txt in the distribution for a
+# full listing of individual contributors.
+#
+# This library 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 of the License, or (at your option) any later version.
+#
+# This library 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 library in the file COPYING.LIB;
+# if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+#
+# @author Jean-Frederic Clere
+#
+echo ""
+echo "Running `basename $0` $LastChangedDate: 2011-05-06 16:35:58 +0200 (Fri, 06 May
2011) $"
+echo ""
+echo "Started : `date`"
+echo "Params : $@"
+echo ""
+
+# Globals
+build_top=`pwd`
+export build_top
+force_64=false
+
+#
+# Read local machine parameters.
+TMPROOTBASE=/tmp
+IPLOCAL=localhost
+if [ -f $HOME/jbossnative.`uname -n` ]; then
+ . $HOME/jbossnative.`uname -n`
+fi
+export TMPROOTBASE
+export IPLOCAL
+
+while [ "x" != "x$1" ]
+do
+ case $1 in
+ 64)
+ force_64=true
+ ;;
+ 32)
+ force_64=false
+ ;;
+ *)
+ echo "Parameter $1 not supported"
+ echo "Usage build.sh [-64]"
+ exit 1
+ ;;
+ esac
+ shift
+done
+
+echo ""
+echo "SUCCESS : `basename $0` $LastChangedDate: 2011-05-06 16:35:58 +0200 (Fri, 06
May 2011) $"
+echo ""
Property changes on: trunk/build/unix/util/jbossweb/build.sh
___________________________________________________________________
Added: svn:executable
+ *
Modified: trunk/build/unix/util/jbossweb/files.sh
===================================================================
--- trunk/build/unix/util/jbossweb/files.sh 2011-05-09 11:51:40 UTC (rev 2774)
+++ trunk/build/unix/util/jbossweb/files.sh 2011-05-09 14:39:56 UTC (rev 2775)
@@ -1,5 +1,6 @@
rm -f jboss-native-2.0.*
rm -rf bin
+rm -rf src/main/resources
for file in `cat files.list`
do
HTTPFILE=`echo $file | sed 's:-1.0.0-:-2.0.10-dev-:'`
@@ -99,21 +100,20 @@
esac
export TYPE
- mkdir -p bin/native/${PLATFORM}
+ mkdir -p src/main/resources/bin/native/${PLATFORM}
echo $FILE
echo $BASE
wget
http://hudson.qa.jboss.com/hudson/view/Native/job/${BASE}/lastSuccessfulB...
|| exit 1
if [ $HTTPFILE != $FILE ]; then
mv $HTTPFILE $FILE
fi
- (cd bin/native
+ (cd src/main/resources/bin/native
if [ $TYPE = "tar" ]; then
- tar zxvf ../../$FILE
+ tar zxvf ../../../../../$FILE
else
- unzip -o ../../$FILE
+ unzip -o ../../../../../$FILE
fi
mv bin/native ${PLATFORM}/${CPU}
rm -rf bin
) || exit 1
done
-jar cvf native.jar bin/native/*/*/*.so bin/native/*/*/engines/*.so bin/native/*/*/*.dll
bin/native/*/*/libapr-1.dylib bin/native/*/*/libcrypto.dylib bin/native/*/*/libssl.dylib
bin/native/*/*/libtcnative-1.dylib bin/native/*/*/*.sl bin/native/*/*/engines/*.sl
Added: trunk/build/unix/util/jbossweb/pom.xml
===================================================================
--- trunk/build/unix/util/jbossweb/pom.xml (rev 0)
+++ trunk/build/unix/util/jbossweb/pom.xml 2011-05-09 14:39:56 UTC (rev 2775)
@@ -0,0 +1,92 @@
+<?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>
+
+ <properties>
+ <version.junit>4.8.1</version.junit>
+ <version.org.jboss.web>7.0.0.Beta10</version.org.jboss.web>
+ </properties>
+
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jbossweb-native</artifactId>
+ <version>2.0.10-SNAPSHOT</version>
+ <packaging>jar</packaging>
+
+ <name>JBoss Application Server: Web Native Subsystem</name>
+
+ <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>
+ </plugins>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <includes>
+ <include>**/*.so</include>
+ <include>**/*.dll</include>
+ <include>**/*.sl</include>
+ <include>**/libapr-1.dylib</include>
+ <include>**/libcrypto.dylib</include>
+ <include>**/libssl.dylib</include>
+ <include>**/libtcnative-1.dylib</include>
+ </includes>
+ </resource>
+ </resources>
+ </build>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${version.junit}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.web</groupId>
+ <artifactId>jbossweb</artifactId>
+ <version>${version.org.jboss.web}</version>
+ </dependency>
+
+ </dependencies>
+</project>