Permalink
Browse files

[JBAS-8340] Tools module and build scripts

  • Loading branch information...
bstansberry committed Aug 13, 2010
1 parent 4aa8be8 commit bfdb22b0348f7042d3105b33fdecbeef6ea455c7
Showing with 1,777 additions and 0 deletions.
  1. +62 −0 README.txt
  2. +90 −0 build.bat
  3. +179 −0 build.sh
  4. +202 −0 tools/maven/LICENSE.txt
  5. +20 −0 tools/maven/NOTICE.txt
  6. +77 −0 tools/maven/README.txt
  7. BIN tools/maven/ant-tasks/maven-ant-tasks-2.1.0.jar
  8. +6 −0 tools/maven/bin/m2.conf
  9. +164 −0 tools/maven/bin/mvn
  10. +190 −0 tools/maven/bin/mvn.bat
  11. +169 −0 tools/maven/bin/mvnDebug
  12. +193 −0 tools/maven/bin/mvnDebug.bat
  13. +168 −0 tools/maven/bin/mvnyjp
  14. BIN tools/maven/boot/plexus-classworlds-2.2.3.jar
  15. +257 −0 tools/maven/conf/settings.xml
  16. BIN tools/maven/lib/commons-cli-1.2.jar
  17. BIN tools/maven/lib/google-collections-1.0.jar
  18. BIN tools/maven/lib/maven-artifact-3.0-beta-1.jar
  19. BIN tools/maven/lib/maven-compat-3.0-beta-1.jar
  20. BIN tools/maven/lib/maven-core-3.0-beta-1.jar
  21. BIN tools/maven/lib/maven-embedder-3.0-beta-1.jar
  22. BIN tools/maven/lib/maven-model-3.0-beta-1.jar
  23. BIN tools/maven/lib/maven-model-builder-3.0-beta-1.jar
  24. BIN tools/maven/lib/maven-plugin-api-3.0-beta-1.jar
  25. BIN tools/maven/lib/maven-settings-3.0-beta-1.jar
  26. BIN tools/maven/lib/nekohtml-1.9.6.2.jar
  27. BIN tools/maven/lib/plexus-cipher-1.4.jar
  28. BIN tools/maven/lib/plexus-component-annotations-1.5.4.jar
  29. BIN tools/maven/lib/plexus-container-default-1.5.4.jar
  30. BIN tools/maven/lib/plexus-interpolation-1.11.jar
  31. BIN tools/maven/lib/plexus-sec-dispatcher-1.3.jar
  32. BIN tools/maven/lib/plexus-utils-2.0.3.jar
  33. BIN tools/maven/lib/wagon-file-1.0-beta-6.jar
  34. BIN tools/maven/lib/wagon-http-lightweight-1.0-beta-6.jar
  35. BIN tools/maven/lib/wagon-http-shared-1.0-beta-6.jar
  36. BIN tools/maven/lib/wagon-provider-api-1.0-beta-6.jar
  37. BIN tools/maven/lib/xbean-reflect-3.4.jar
  38. BIN tools/maven/lib/xercesMinimal-1.9.6.2.jar
View
@@ -0,0 +1,62 @@
+JBoss Application Server
+
+Directory Structure
+-------------------
+build - Contains the build scripts for creating the complete JBoss AS distribution.
+testsuite - Contains code and build scripts for testing the application server
+tools - Various files used by the build (ant, maven, etc.)
+
+The remaining directories contain the various components of the application server.
+
+Dependencies
+------------
+The pom.xml in the root of the source checkout contains the Maven configuration which
+controls dependency versions.
+
+Building
+-------------------
+From the root directory, run the build script "./build.sh" or "build.bat"
+If you want to call maven directly "mvn install", you must add the jboss repository
+configuration to your Maven settings. See the JBoss build wiki for more information about
+repository config.
+
+For slightly faster builds, the maven enforcer plugin can be skipped.
+./build.sh -P-enforce
+
+Generation of the source jars can be skipping by deactivating the sources
+profile.
+./build.sh -P-sources
+
+During development you may want to build only a single module and update the
+distribution build. This can be done using the property "module".
+For example, to build the "remoting" module and update the dist build, run the following:
+./build.sh -Dmodule=remoting
+
+Running the Testsuite
+--------------------
+The testsuite module contains four submodules:
+
+1) "smoke" -- core tests that should be run as part of every build of the AS. Failures here will fail the build.
+2) "integration" -- the full integration testsuite. Should be run with no failures before any major commits.
+3) "benchmark" -- tests used to compare performance against other releases or previous builds
+4) "stress" -- tests of the server's ability to perform properly while under stress
+
+To run the testsuite from the root directory, run the build script "./build.sh" or "build.bat":
+
+For basic smoke tests, simply: "./build.sh test"
+For integration tests: "./build.sh test -Pintegration-tests"
+For benchmark tests: "./build.sh test -Pbenchmark-tests"
+For stress tests: "./build.sh test -Pstress-tests"
+For all of the above tests: "./build.sh test -Pall-tests"
+
+Using Eclipse
+-------------
+To use eclipse you need to use the m2eclipse plugin (http://m2eclipse.sonatype.org/).
+The following steps are recommended:
+1. Install the latest version of eclipse
+2. Set Xmx in eclipse.ini to be at least 512M, and make sure it's using java 6
+3. On the command line run ./build.sh eclipse:m2eclipse
+4. launch eclipse and install the m2eclipse plugin, and make sure it uses your repo configs
+5. In eclipse preferences Java->Compiler->Errors/Warnings->Deprecated and restricted set forbidden reference to WARNING
+6. Use import on the root pom, which will pull in all modules
+7. Wait (m2eclipse takes awhile on initial import, especially if you did not do step 3)
View
@@ -0,0 +1,90 @@
+@echo off
+REM ======================================================================
+REM
+REM This is the main entry point for the build system.
+REM
+REM Users should be sure to execute this file rather than 'mvn' to ensure
+REM the correct version is being used with the correct configuration.
+REM
+REM ======================================================================
+REM
+REM $Id: build.bat 105735 2010-06-04 19:45:13Z pgier $
+REM
+REM Authors:
+REM Jason Dillon <jason@planet57.com>
+REM Sacha Labourey <sacha.labourey@cogito-info.ch>
+REM
+
+REM ******************************************************
+REM Ignore the MAVEN_HOME variable: we want to use *our*
+REM Maven version and associated JARs.
+REM ******************************************************
+REM Ignore the users classpath, cause it might mess
+REM things up
+REM ******************************************************
+
+SETLOCAL
+
+set CLASSPATH=
+set M2_HOME=
+
+REM ******************************************************
+REM - "for" loops have been unrolled for compatibility
+REM with some WIN32 systems.
+REM ******************************************************
+
+set NAMES=tools;tools\maven;tools\apache\maven
+set SUBFOLDERS=.;..;..\..;..\..\..;..\..\..\..
+
+REM ******************************************************
+REM ******************************************************
+
+SET EXECUTED=FALSE
+for %%i in (%NAMES%) do call :subLoop %%i %1 %2 %3 %4 %5 %6
+
+goto :EOF
+
+
+REM ******************************************************
+REM ********* Search for names in the subfolders *********
+REM ******************************************************
+
+:subLoop
+for %%j in (%SUBFOLDERS%) do call :testIfExists %%j\%1\bin\mvn.bat %2 %3 %4 %5 %6 %7
+
+goto :EOF
+
+
+REM ******************************************************
+REM ************ Test if Maven Batch file exists ***********
+REM ******************************************************
+
+:testIfExists
+if exist %1 call :BatchFound %1 %2 %3 %4 %5 %6 %7 %8
+
+goto :EOF
+
+
+REM ******************************************************
+REM ************** Batch file has been found *************
+REM ******************************************************
+
+:BatchFound
+if (%EXECUTED%)==(FALSE) call :ExecuteBatch %1 %2 %3 %4 %5 %6 %7 %8
+set EXECUTED=TRUE
+
+goto :EOF
+
+REM ******************************************************
+REM ************* Execute Batch file only once ***********
+REM ******************************************************
+
+:ExecuteBatch
+echo Calling %1 %2 %3 %4 %5 %6 %7 %8
+set GOAL=%2
+if "%GOAL%"=="" set GOAL=install
+call %1 %GOAL% %3 %4 %5 %6 %7 %8
+
+:end
+
+if "%NOPAUSE%" == "" pause
View
179 build.sh
@@ -0,0 +1,179 @@
+#!/bin/sh
+### ====================================================================== ###
+## ##
+## This is the main entry point for the build system. ##
+## ##
+## Users should execute this file rather than 'mvn' to ensure ##
+## the correct version is being used with the correct configuration. ##
+## ##
+### ====================================================================== ###
+
+# $Id: build.sh 105735 2010-06-04 19:45:13Z pgier $
+
+PROGNAME=`basename $0`
+DIRNAME=`dirname $0`
+GREP="grep"
+ROOT="/"
+
+# Ignore user's MAVEN_HOME if it is set
+M2_HOME=""
+
+MAVEN_OPTS="$MAVEN_OPTS -Xmx512M"
+export MAVEN_OPTS
+
+# the default search path for maven
+MAVEN_SEARCH_PATH="\
+ tools
+ tools/maven \
+ tools/apache/maven \
+ maven"
+
+# the default arguments
+MVN_OPTIONS=""
+
+# Use the maximum available, or set MAX_FD != -1 to use that
+MAX_FD="maximum"
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false;
+darwin=false;
+case "`uname`" in
+ CYGWIN*)
+ cygwin=true
+ ;;
+
+ Darwin*)
+ darwin=true
+ ;;
+esac
+
+#
+# Helper to complain.
+#
+die() {
+ echo "${PROGNAME}: $*"
+ exit 1
+}
+
+#
+# Helper to complain.
+#
+warn() {
+ echo "${PROGNAME}: $*"
+}
+
+#
+# Helper to source a file if it exists.
+#
+maybe_source() {
+ for file in $*; do
+ if [ -f "$file" ]; then
+ . $file
+ fi
+ done
+}
+
+search() {
+ search="$*"
+ for d in $search; do
+ MAVEN_HOME="`pwd`/$d"
+ MVN="$MAVEN_HOME/bin/mvn"
+ if [ -x "$MVN" ]; then
+ # found one
+ echo $MAVEN_HOME
+ break
+ fi
+ done
+}
+
+#
+# Main function.
+#
+main() {
+ # if there is a build config file. then source it
+ maybe_source "$DIRNAME/build.conf" "$HOME/.build.conf"
+
+ # Increase the maximum file descriptors if we can
+ if [ $cygwin = "false" ]; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ]; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ]; then
+ # use the system max
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ]; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query system maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+ fi
+
+ # try the search path
+ MAVEN_HOME=`search $MAVEN_SEARCH_PATH`
+
+ # try looking up to root
+ if [ "x$MAVEN_HOME" = "x" ]; then
+ target="build"
+ _cwd=`pwd`
+
+ while [ "x$MAVEN_HOME" = "x" ] && [ "$cwd" != "$ROOT" ]; do
+ cd ..
+ cwd=`pwd`
+ MAVEN_HOME=`search $MAVEN_SEARCH_PATH`
+ done
+
+ # make sure we get back
+ cd $_cwd
+
+ if [ "$cwd" != "$ROOT" ]; then
+ found="true"
+ fi
+
+ # complain if we did not find anything
+ if [ "$found" != "true" ]; then
+ die "Could not locate Maven; check \$MVN or \$MAVEN_HOME."
+ fi
+ fi
+
+ # make sure we have one
+ MVN=$MAVEN_HOME/bin/mvn
+ if [ ! -x "$MVN" ]; then
+ die "Maven file is not executable: $MVN"
+ fi
+
+ # need to specify planet57/buildmagic protocol handler package
+ MVN_OPTS="-Djava.protocol.handler.pkgs=org.jboss.net.protocol"
+
+ # setup some build properties
+ MVN_OPTS="$MVN_OPTS -Dbuild.script=$0"
+
+ # change to the directory where the script lives so users are not forced
+ # to be in the same directory as build.xml
+ cd $DIRNAME
+
+ MVN_GOAL=$@
+ if [ -z "$MVN_GOAL" ]; then
+ MVN_GOAL="install"
+ fi
+
+ # export some stuff for maven
+ export MVN MAVEN_HOME MVN_OPTS MVN_GOAL
+
+ echo "$MVN $MVN_OPTIONS $MVN_GOAL"
+
+ # execute in debug mode, or simply execute
+ if [ "x$MVN_DEBUG" != "x" ]; then
+ /bin/sh -x $MVN $MVN_OPTIONS $MVN_GOAL
+ else
+ exec $MVN $MVN_OPTIONS $MVN_GOAL
+ fi
+}
+
+##
+## Bootstrap
+##
+
+main "$@"
Oops, something went wrong.

0 comments on commit bfdb22b

Please sign in to comment.