User: user57 Date: 01/12/06 16:33:20 Added: . build.bat build.sh build.xml Log: o adding build files Revision Changes Path 1.1 jmx/build.bat Index: build.bat =================================================================== @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 'ant' to ensure REM the correct version is being used with the correct configuration. REM REM ====================================================================== REM REM $Id: build.bat,v 1.1 2001/12/07 00:33:20 user57 Exp $ REM REM Authors: REM Jason Dillon <[EMAIL PROTECTED]> REM Sacha Labourey <[EMAIL PROTECTED]> REM REM ****************************************************** REM Ignore the ANT_HOME variable: we want to use *our* REM ANT version and associated JARs. REM ****************************************************** REM Ignore the users classpath, cause it might mess REM things up REM ****************************************************** SETLOCAL set CLASSPATH= set ANT_HOME= set JAXP_DOM_FACTORY=org.apache.crimson.jaxp.DocumentBuilderFactoryImpl set JAXP_SAX_FACTORY=org.apache.crimson.jaxp.SAXParserFactoryImpl REM set JAXP_DOM_FACTORY=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl REM set JAXP_SAX_FACTORY=org.apache.xerces.jaxp.SAXParserFactoryImpl set ANT_OPTS=-Djava.protocol.handler.pkgs=planet57.net.protocol -Djavax.xml.parsers.DocumentBuilderFactory=%JAXP_DOM_FACTORY% -Djavax.xml.parsers.SAXParserFactory=%JAXP_SAX_FACTORY% -Dbuild.script=build.bat REM ****************************************************** REM - "for" loops have been unrolled for compatibility REM with some WIN32 systems. REM ****************************************************** set NAMES=tools;tools\ant;tools\apache\ant 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\ant.bat %2 %3 %4 %5 %6 %7 goto :EOF REM ****************************************************** REM ************ Test if ANT 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 call %1 %2 %3 %4 %5 %6 %7 %8 :end pause 1.1 jmx/build.sh Index: build.sh =================================================================== #!/bin/sh ### ====================================================================== ### ## ## ## This is the main entry point for the build system. ## ## ## ## Users should be sure to execute this file rather than 'ant' to ensure ## ## the correct version is being used with the correct configuration. ## ## ## ### ====================================================================== ### # $Id: build.sh,v 1.1 2001/12/07 00:33:20 user57 Exp $ PROGNAME=`basename $0` DIRNAME=`dirname $0` GREP="grep" ROOT="/" # Ignore user's ANT_HOME if it is set ANT_HOME="" # the default search path for ant ANT_SEARCH_PATH="\ tools tools/ant \ tools/apache/ant \ ant" # the default build file name ANT_BUILD_FILE="build.xml" # the default arguments ANT_OPTIONS="-find $ANT_BUILD_FILE" # the jaxp parser to use if [ "x$JAXP" = "x" ]; then # Default to crimson JAXP="crimson" fi # # Helper to complain. # die() { echo "${PROGNAME}: $*" exit 1 } # # 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 ANT_HOME="`pwd`/$d" ANT="$ANT_HOME/bin/ant" if [ -x "$ANT" ]; then # found one echo $ANT_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" # try the search path ANT_HOME=`search $ANT_SEARCH_PATH` # try looking up to root if [ "x$ANT_HOME" = "x" ]; then target="build" _cwd=`pwd` while [ "x$ANT_HOME" = "x" ] && [ "$cwd" != "$ROOT" ]; do cd .. cwd=`pwd` ANT_HOME=`search $ANT_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 Ant; check \$ANT or \$ANT_HOME." fi fi # make sure we have one ANT=$ANT_HOME/bin/ant if [ ! -x "$ANT" ]; then die "Ant file is not executable: $ANT" fi # specify the jaxp parser impls to use case "$JAXP" in crimson) JAXP_DOM_FACTORY="org.apache.crimson.jaxp.DocumentBuilderFactoryImpl" JAXP_SAX_FACTORY="org.apache.crimson.jaxp.SAXParserFactoryImpl" ;; xerces) JAXP_DOM_FACTORY="org.apache.xerces.jaxp.DocumentBuilderFactoryImpl" JAXP_SAX_FACTORY="org.apache.xerces.jaxp.SAXParserFactoryImpl" ;; esac if [ "x$JAXP_DOM_FACTORY" != "x" ]; then ANT_OPTS="$ANT_OPTS -Djavax.xml.parsers.DocumentBuilderFactory=$JAXP_DOM_FACTORY" fi if [ "x$JAXP_SAX_FACTORY" != "x" ]; then ANT_OPTS="$ANT_OPTS -Djavax.xml.parsers.SAXParserFactory=$JAXP_SAX_FACTORY" fi # need to specify planet57/buildmagic protocol handler package ANT_OPTS="$ANT_OPTS -Djava.protocol.handler.pkgs=planet57.net.protocol" # setup some build properties ANT_OPTS="$ANT_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 # export some stuff for ant export ANT ANT_HOME ANT_OPTS # execute in debug mode, or simply execute if [ "x$ANT_DEBUG" != "x" ]; then /bin/sh -x $ANT $ANT_OPTIONS "$@" else exec $ANT $ANT_OPTIONS "$@" fi } ## ## Bootstrap ## main "$@" 1.1 jmx/build.xml Index: build.xml =================================================================== <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE project [ <!ENTITY buildmagic SYSTEM "resource://planet57/tools/buildmagic/common.xml"> ]> <!-- ====================================================================== --> <!-- --> <!-- JBoss, the OpenSource J2EE webOS --> <!-- --> <!-- Distributable under LGPL license. --> <!-- See terms of license at http://www.gnu.org. --> <!-- --> <!-- ====================================================================== --> <!-- $Id: build.xml,v 1.1 2001/12/07 00:33:20 user57 Exp $ --> <project default="main" name="JBoss/JMX"> <!-- ================================================================== --> <!-- Setup --> <!-- ================================================================== --> <!-- | Include the common Buildmagic elements. | | This defines several different targets, properties and paths. | It also sets up the basic extention tasks amoung other things. --> &buildmagic; <!-- ================================================================== --> <!-- Initialization --> <!-- ================================================================== --> <!-- | Initialize the build system. Must depend on '_buildmagic:init'. | Other targets should depend on 'init' or things will mysteriously fail. --> <target name="init" unless="init.disable" depends="_buildmagic:init"> </target> <!-- ================================================================== --> <!-- Configuration --> <!-- ================================================================== --> <!-- | Configure the build system. | | This target is invoked by the Buildmagic initialization logic and | should contain module specific configuration elements. --> <target name="configure" unless="configure.disable"> <!-- =================== --> <!-- Basic Configuration --> <!-- =================== --> <!-- Module name(s) & version --> <property name="module.name" value="jmx"/> <property name="module.Name" value="JBoss JMX"/> <property name="module.version" value="DEV"/> <!-- ========= --> <!-- Libraries --> <!-- ========= --> <!-- EDU.oswego.cs.dl.util.concurrent --> <property name="oswego.concurrent.root" value="${project.thirdparty}/oswego/concurrent"/> <property name="oswego.concurrent.lib" value="${oswego.concurrent.root}/lib"/> <path id="oswego.concurrent.classpath"> <pathelement path="${oswego.concurrent.lib}/concurrent.jar"/> </path> <!-- JUnit --> <property name="junit.junit.root" value="${project.thirdparty}/junit/junit"/> <property name="junit.junit.lib" value="${junit.junit.root}/lib"/> <path id="junit.junit.classpath"> <pathelement path="${junit.junit.lib}/junit.jar"/> </path> <!-- The combined library classpath --> <path id="library.classpath"> <path refid="oswego.concurrent.classpath"/> </path> <!-- ======= --> <!-- Modules --> <!-- ======= --> <!-- The combined dependent module classpath --> <path id="dependentmodule.classpath"> </path> <!-- ===== --> <!-- Tasks --> <!-- ===== --> <!-- Where source files live --> <property name="source.java" value="${module.source}/main"/> <!-- Where build generated files will go --> <property name="build.reports" value="${module.output}/reports"/> <property name="build.classes" value="${module.output}/classes"/> <property name="build.lib" value="${module.output}/lib"/> <property name="build.api" value="${module.output}/api"/> <property name="build.etc" value="${module.output}/etc"/> <!-- Install/Release structure --> <property name="install.id" value="${module.name}-${module.version}"/> <property name="release.id" value="${install.id}"/> <property name="install.root" value="${module.output}/${install.id}"/> <!-- The combined thirdparty classpath --> <path id="thirdparty.classpath"> <path refid="library.classpath"/> <path refid="dependentmodule.classpath"/> </path> <!-- This module is based on Java 1.2 --> <property name="javac.target" value="1.2"/> <!-- classpath and local.classpath must have a value using with a path --> <property name="classpath" value=""/> <property name="local.classpath" value=""/> <!-- The classpath required to build classes. --> <path id="javac.classpath"> <pathelement path="${classpath}"/> <pathelement path="${local.classpath}"/> <path refid="thirdparty.classpath"/> </path> <!-- The classpath required to build javadocs. --> <path id="javadoc.classpath"> <path refid="javac.classpath"/> </path> <!-- Packages to include when generating api documentation --> <property name="javadoc.packages" value="org.jboss.*"/> <!-- Override JUnit defaults --> <property name="junit.timeout" value="240000"/> <!-- 4 minutes --> <property name="junit.batchtest.todir" value="${build.reports}"/> <property name="junit.jvm.options" value="-Ddummy"/> </target> <!-- ================================================================== --> <!-- Compile --> <!-- ================================================================== --> <!-- | Compile everything. | | This target should depend on other compile-* targets for each | different type of compile that needs to be performed, short of | documentation compiles. --> <target name="compile" description="Compile all source files." depends="compile-classes"/> <!-- Compile all class files --> <target name="compile-classes" depends="init"> <mkdir dir="${build.classes}"/> <javac destdir="${build.classes}" optimize="${javac.optimize}" target="${javac.target}" debug="${javac.debug}" depend="${javac.depend}" verbose="${javac.verbose}" deprecation="${javac.deprecation}" includeAntRuntime="${javac.include.ant.runtime}" includeJavaRuntime="${javac.include.java.runtime}" failonerror="${javac.fail.onerror}"> <src path="${source.java}"/> <classpath refid="javac.classpath"/> <include name="${javac.includes}"/> <exclude name="${javac.excludes}"/> </javac> </target> <!-- ================================================================== --> <!-- Archives --> <!-- ================================================================== --> <!-- | Build all jar files. --> <target name="jars" description="Builds all jar files." depends="compile"> <mkdir dir="${build.lib}"/> <!-- Build the jboss-jmx.jar --> <jar jarfile="${build.lib}/jboss-jmx.jar"> <fileset dir="${build.classes}"> <include name="**"/> </fileset> </jar> </target> <!-- ================================================================== --> <!-- Documents --> <!-- ================================================================== --> <!-- | Create all generated documenation. | | This target should depend on other docs-* targets for each | different type of docuementation that is to be generated. --> <target name="docs" description="Builds all documentation." depends="docs-api"/> <!-- Javadocs is an exception, but provide a docs-api to conform. --> <target name="docs-api" depends="docs-javadocs"/> <!-- | Check if we need to build javadocs | | Javadocs will only be generated if one or more .java source files | is newer than the generated index.html. --> <target name="docs-javadocs-check" depends="init"> <!-- if index.html is newer than the sources we are up to date --> <uptodate property="docs-javadocs.disable" targetfile="${build.api}/index.html"> <srcfiles dir="${source.java}" includes="**/*.java"/> </uptodate> </target> <!-- Generate Javadoc if we are out of date --> <target name="docs-javadocs" depends="docs-javadocs-check" unless="docs-javadocs.disable"> <mkdir dir="${build.api}"/> <javadoc packagenames="${javadoc.packages}" sourcepath="${source.java}" destdir="${build.api}" classpathref="javadoc.classpath" windowtitle="${javadoc.windowtitle}" splitindex="${javadoc.splitindex}" doctitle="${javadoc.doctitle}" author="${javadoc.author}" version="${javadoc.version}" public="${javadoc.public}" package="${javadoc.package}" protected="${javadoc.protected}" private="${javadoc.private}" encoding="${javadoc.encoding}" use="${javadoc.use}" verbose="${javadoc.verbose}"> <group title="JBoss JMX" packages="org.jboss.mx*"/> </javadoc> </target> <target name="javadocs" depends="docs-javadocs"/> <!-- ================================================================== --> <!-- Install & Release --> <!-- ================================================================== --> <target name="install" description="Install the structure for a release." depends="all, _buildmagic:install:default"/> <target name="release" depends="install"/> <target name="release-zip" description="Builds a ZIP distribution." depends="release, _buildmagic:release:zip"/> <target name="release-tar" description="Builds a TAR distribution." depends="release, _buildmagic:release:tar"/> <target name="release-tgz" description="Builds a TAR-GZ distribution." depends="release, _buildmagic:release:tgz"/> <target name="release-all" description="Builds a distribution for each archive type." depends="release-zip, release-tgz"/> <!-- ================================================================== --> <!-- Cleaning --> <!-- ================================================================== --> <!-- Clean up all build output --> <target name="clean" description="Cleans up most generated files." depends="_buildmagic:clean"> </target> <!-- Clean up all generated files --> <target name="clobber" description="Cleans up all generated files." depends="_buildmagic:clobber, clean"> </target> <!-- ================================================================== --> <!-- Misc. --> <!-- ================================================================== --> <target name="main" description="Executes the default target (most)." depends="most"/> <target name="all" description="Builds everything." depends="jars, docs"/> <target name="most" description="Builds almost everything." depends="jars"/> <target name="help" description="Show this help message." depends="_buildmagic:help:standard"/> </project>
_______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development