Initial revision
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113407 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
3
runner/.cvsignore
Normal file
3
runner/.cvsignore
Normal file
@@ -0,0 +1,3 @@
|
||||
target
|
||||
velocity.log
|
||||
maven.log
|
||||
251
runner/plugin.jelly
Normal file
251
runner/plugin.jelly
Normal file
@@ -0,0 +1,251 @@
|
||||
<project
|
||||
xmlns:j="jelly:core"
|
||||
xmlns:maven="jelly:maven"
|
||||
xmlns:util="jelly:util"
|
||||
xmlns:define="jelly:define"
|
||||
xmlns:deploy="deploy"
|
||||
xmlns:sea="sea"
|
||||
xmlns:velocity="jelly:org.apache.commons.jelly.tags.velocity.VelocityTagLibrary"
|
||||
xmlns:plexus="runner">
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- D E P L O Y P L E X U S -->
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Deploys Plexus into a self-contained directory that allows you -->
|
||||
<!-- to run Plexus easily. -->
|
||||
<!-- ===================================================================== -->
|
||||
|
||||
<!--
|
||||
|
|
||||
| We need a way to customize the configuration process.
|
||||
|
|
||||
-->
|
||||
|
||||
|
||||
<!--
|
||||
|
|
||||
| Plexus Dynamic TagLibarary
|
||||
|
|
||||
| o Create a plexus project.
|
||||
| o Create a runtime based on a configuration.
|
||||
| o Update the runtime based on an updated configuration.
|
||||
| o Generate a reactor for component builds.
|
||||
| o Generate a stub component with testing facilities.
|
||||
| o Leave hooks for processes to allow for things like insertion of webapps
|
||||
| or other artifacts that are the product of another build.
|
||||
| o Generate reports on the state of the overall project.
|
||||
|
|
||||
-->
|
||||
|
||||
<define:taglib uri="runner">
|
||||
|
||||
<!--
|
||||
|
|
||||
| @base
|
||||
| @conf
|
||||
| @confDir
|
||||
| @modelPom
|
||||
| @plexusPomFile
|
||||
| @configurationProperties
|
||||
|
|
||||
-->
|
||||
|
||||
<define:tag name="deploy">
|
||||
|
||||
<j:set
|
||||
var="templatePath"
|
||||
value="${pom.getPluginContext('maven-plexus-plugin').getVariable('plugin.dir')}/plugin-resources/templates"/>
|
||||
|
||||
<j:set
|
||||
var="launcherConfiguration"
|
||||
value="classworlds.conf"/>
|
||||
|
||||
<j:set
|
||||
var="launcherConfigurationTemplate"
|
||||
value="classworlds.vm"/>
|
||||
|
||||
<runner:create-directory-structure
|
||||
base="${base}"/>
|
||||
|
||||
<runner:assemble-plexus-dependencies
|
||||
plexusPomFile="${plexusPomFile}"
|
||||
plexusCoreLibDirectory="${base}/lib"/>
|
||||
|
||||
<runner:create-classworlds-configuration
|
||||
plexusPom="${plexusPomFile}"
|
||||
templatePath="${templatePath}"
|
||||
classWorldsConfiguration="${base}/conf/${launcherConfiguration}"
|
||||
classWorldsConfigurationTemplate="${launcherConfigurationTemplate}"/>
|
||||
|
||||
<runner:create-launcher-scripts
|
||||
templatePath="${templatePath}"
|
||||
unixScript="${base}/bin/plexus.sh"
|
||||
windowsScript="${base}/bin/plexus.bat"/>
|
||||
|
||||
<runner:package-java-runtime
|
||||
jreDirectory="${base}/jre"/>
|
||||
|
||||
</define:tag>
|
||||
|
||||
<define:tag name="create-directory-structure">
|
||||
|
||||
<delete dir="${base}"/>
|
||||
|
||||
<mkdir dir="${base}/bin"/>
|
||||
<mkdir dir="${base}/conf"/>
|
||||
<mkdir dir="${base}/components"/>
|
||||
<mkdir dir="${base}/lib"/>
|
||||
<mkdir dir="${base}/app-lib"/>
|
||||
<mkdir dir="${base}/work"/>
|
||||
|
||||
</define:tag>
|
||||
|
||||
<!--
|
||||
|
|
||||
| Copy any Plexus/Application configuration files.
|
||||
|
|
||||
-->
|
||||
<define:tag name="process-configurations">
|
||||
|
||||
<util:properties
|
||||
file="${configurationProperties}"
|
||||
var="appProperties"/>
|
||||
|
||||
<copy
|
||||
todir="${destinationDirectory}"
|
||||
overwrite="true"
|
||||
filtering="on">
|
||||
<fileset dir="${sourceDirectory}"/>
|
||||
<filterset>
|
||||
<j:forEach var="appProperty" items="${appProperties.keys()}">
|
||||
<util:replace var="token" oldChar="." newChar="_" value="${appProperty}"/>
|
||||
<j:set var="token" value="${token.toUpperCase()}"/>
|
||||
<j:set var="propertyName" value="${appProperty}" />
|
||||
<j:set var="propertyValue" value="${appProperties.getProperty(propertyName)}"/>
|
||||
<filter token="${token}" value="${propertyValue}"/>
|
||||
</j:forEach>
|
||||
</filterset>
|
||||
</copy>
|
||||
|
||||
</define:tag>
|
||||
|
||||
<define:tag name="assemble-plexus-dependencies">
|
||||
|
||||
<maven:pom
|
||||
projectDescriptor="${plexusPomFile}"
|
||||
var="plexusPom"/>
|
||||
|
||||
<j:set
|
||||
var="plexusJar"
|
||||
value="${maven.repo.local}/plexus/jars/${plexusPom.artifactId}-${plexusPom.currentVersion}.jar"/>
|
||||
|
||||
<util:available file="${plexusJar}">
|
||||
<j:set var="plexusJarPresent" value="true"/>
|
||||
<copy file="${plexusJar}" todir="${plexusCoreLibDirectory}"/>
|
||||
</util:available>
|
||||
|
||||
<j:if test="${plexusJarPresent != 'true'}">
|
||||
<get
|
||||
src="http://www.ibiblio.org/maven/plexus/jars/${plexusPom.artifactId}-${plexusPom.currentVersion}.jar"
|
||||
dest="${plexusCoreLibDirectory}"/>
|
||||
</j:if>
|
||||
|
||||
<!--
|
||||
|
|
||||
| Now we need to pull down Plexus' dependencies to satisfy runtime
|
||||
| requirements.
|
||||
|
|
||||
-->
|
||||
|
||||
<echo>Retrieving any missing Plexus dependencies ... </echo>
|
||||
|
||||
${plexusPom.verifyDependencies()}
|
||||
|
||||
<!-- Copy the plexus dependencies into the runtime lib/. -->
|
||||
|
||||
<deploy:copy-deps
|
||||
projectDescriptor="${plexusPomFile}"
|
||||
todir="${plexusCoreLibDirectory}"
|
||||
excludes="junit"/>
|
||||
|
||||
</define:tag>
|
||||
|
||||
<!--
|
||||
|
|
||||
| @plexusPom
|
||||
| @templatePath
|
||||
| @classWorldsConfiguration
|
||||
| @classWorldsConfigurationTemplate
|
||||
|
|
||||
-->
|
||||
<define:tag name="create-classworlds-configuration">
|
||||
|
||||
<echo>
|
||||
@plexusPom = ${plexusPom}
|
||||
@templatePath = ${templatePath}
|
||||
@classWorldsConfiguration = ${classWorldsConfiguration}
|
||||
@classWorldsConfigurationTemplate = ${classWorldsConfigurationTemplate}
|
||||
</echo>
|
||||
|
||||
<maven:pom
|
||||
projectDescriptor="${plexusPom}"
|
||||
var="project"/>
|
||||
|
||||
<velocity:merge
|
||||
name="${classWorldsConfiguration}"
|
||||
basedir="${templatePath}"
|
||||
template="${classWorldsConfigurationTemplate}"/>
|
||||
|
||||
</define:tag>
|
||||
|
||||
<!--
|
||||
|
|
||||
| @templatePath
|
||||
| @unixScript
|
||||
| @windowsScript
|
||||
|
|
||||
-->
|
||||
<define:tag name="create-launcher-scripts">
|
||||
|
||||
<echo>
|
||||
@templatePath = ${templatePath}
|
||||
@unixScript = ${unixScript}
|
||||
@windowsScript = ${windowsScript}
|
||||
</echo>
|
||||
|
||||
<velocity:merge
|
||||
name="${unixScript}"
|
||||
basedir="${templatePath}"
|
||||
template="plexus.vm"/>
|
||||
|
||||
<velocity:merge
|
||||
name="${windowsScript}"
|
||||
basedir="${templatePath}"
|
||||
template="plexus-bat.vm"/>
|
||||
|
||||
<chmod file="${unixScript}" perm="+x"/>
|
||||
|
||||
</define:tag>
|
||||
|
||||
<!--
|
||||
|
|
||||
| Include the JRE if specified. This is useful for applications
|
||||
| that need to be completely self-contained.
|
||||
|
|
||||
-->
|
||||
<define:tag name="package-java-runtime">
|
||||
|
||||
<j:if test="${jre == 'true'}">
|
||||
<exec
|
||||
executable="cp">
|
||||
<arg value="-r"/>
|
||||
<arg value="${java.home}"/>
|
||||
<arg value="${jreDirectory}"/>
|
||||
</exec>
|
||||
</j:if>
|
||||
|
||||
</define:tag>
|
||||
|
||||
</define:taglib>
|
||||
|
||||
</project>
|
||||
6
runner/plugin.properties
Normal file
6
runner/plugin.properties
Normal file
@@ -0,0 +1,6 @@
|
||||
# -------------------------------------------------------------------
|
||||
# Default Maven properties for the Plexus plugin.
|
||||
# -------------------------------------------------------------------
|
||||
# These are the properties that we believe are immutable so we
|
||||
# keep them apart from the project specific properties.
|
||||
# -------------------------------------------------------------------
|
||||
5
runner/project.properties
Normal file
5
runner/project.properties
Normal file
@@ -0,0 +1,5 @@
|
||||
# -------------------------------------------------------------------
|
||||
# P R O J E C T P R O P E R T I E S
|
||||
# -------------------------------------------------------------------
|
||||
maven.license.licenseFile=${basedir}/../../../LICENSE.txt
|
||||
|
||||
102
runner/project.xml
Normal file
102
runner/project.xml
Normal file
@@ -0,0 +1,102 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<project>
|
||||
<extend>${basedir}/../project.xml</extend>
|
||||
<pomVersion>3</pomVersion>
|
||||
<id>maven-runner-plugin</id>
|
||||
<name>Maven Plexus Plug-in</name>
|
||||
<currentVersion>0.2</currentVersion>
|
||||
<description>Various goals for making development with Plexus easy.</description>
|
||||
<shortDescription>Plexus Tools</shortDescription>
|
||||
<url>http://maven.apache.org/reference/plugins/plexus/</url>
|
||||
<siteDirectory>/www/maven.apache.org/reference/plugins/plexus/</siteDirectory>
|
||||
<repository>
|
||||
<connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:maven/src/plugins-build/plexus/</connection>
|
||||
<url>http://cvs.apache.org/viewcvs/maven/src/plugins-build/plexus/</url>
|
||||
</repository>
|
||||
<developers/>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>commons-jelly</groupId>
|
||||
<artifactId>commons-jelly-tags-velocity</artifactId>
|
||||
<version>20030303.205659</version>
|
||||
<properties>
|
||||
<classloader>root.maven</classloader>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<id>velocity</id>
|
||||
<version>1.3</version>
|
||||
</dependency>
|
||||
<!-- Betwixt requirements -->
|
||||
|
||||
<dependency>
|
||||
<id>commons-collections</id>
|
||||
<version>2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<id>commons-digester</id>
|
||||
<version>1.4.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<id>commons-beanutils</id>
|
||||
<version>1.6.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<id>commons-lang</id>
|
||||
<version>1.0-b1.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<id>commons-logging</id>
|
||||
<version>1.0.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<id>commons-betwixt</id>
|
||||
<version>20030211.133854</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<id>dom4j</id>
|
||||
<version>1.4-dev-8</version>
|
||||
<url>http://www.dom4j.org/</url>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<id>commons-jelly</id>
|
||||
<version>20030211.141339</version>
|
||||
<url>http://jakarta.apache.org/commons/jelly/</url>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<id>commons-jexl</id>
|
||||
<version>1.0-beta-1</version>
|
||||
<url>http://jakarta.apache.org/commons/jexl/</url>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<id>ant</id>
|
||||
<version>1.5.1</version>
|
||||
</dependency>
|
||||
<!-- Betwixt requirements -->
|
||||
|
||||
<dependency>
|
||||
<id>xerces</id>
|
||||
<version>2.0.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<id>xml-apis</id>
|
||||
<version>1.0.b2</version>
|
||||
</dependency>
|
||||
<!--
|
||||
|
|
||||
| Plexus dependencies.
|
||||
|
|
||||
-->
|
||||
|
||||
<dependency>
|
||||
<id>plexus</id>
|
||||
<version>0.2</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<id>plexus</id>
|
||||
<version>0.2</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
4
runner/src/plugin-resources/templates/classworlds.vm
Normal file
4
runner/src/plugin-resources/templates/classworlds.vm
Normal file
@@ -0,0 +1,4 @@
|
||||
main is org.apache.plexus.PlexusContainerHost from core
|
||||
|
||||
[core]
|
||||
load ${lib}/*.jar
|
||||
164
runner/src/plugin-resources/templates/plexus-bat.vm
Normal file
164
runner/src/plugin-resources/templates/plexus-bat.vm
Normal file
@@ -0,0 +1,164 @@
|
||||
@REM ----------------------------------------------------------------------------
|
||||
@REM Plexus Start Up Batch script
|
||||
@REM
|
||||
@REM Required ENV vars:
|
||||
@REM JAVA_HOME - location of a JDK home dir
|
||||
@REM PLEXUS_HOME - location of Plexus installed home dir
|
||||
@REM
|
||||
@REM Optional ENV vars
|
||||
@REM PLEXUS_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
|
||||
@REM PLEXUS_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
|
||||
@REM PLEXUS_OPTS - parameters passed to the Java VM when running Plexus
|
||||
@REM e.g. to debug Plexus itself, use
|
||||
@REM set PLEXUS_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||
@REM
|
||||
@REM Utility rquirements:
|
||||
@REM Windows' find.exe
|
||||
@REM Windows' cmd.exe (NT) OR command.com ( 98 or ME )
|
||||
@REM ----------------------------------------------------------------------------
|
||||
|
||||
|
||||
CLASSWORLDS_VERSION=1.0-beta-5
|
||||
MAIN_CLASS=com.werken.classworlds.Launcher
|
||||
PLEXUS_OPTS="-Xmx128m"
|
||||
|
||||
@REM Begin all REM lines with '@' in case PLEXUS_BATCH_ECHO is 'on'
|
||||
@echo off
|
||||
@REM enable echoing my setting PLEXUS_BATCH_ECHO to 'on'
|
||||
@if "%PLEXUS_BATCH_ECHO%" == "on" echo %PLEXUS_BATCH_ECHO%
|
||||
|
||||
@REM Execute a user defined script before this one
|
||||
if exist "%HOME%\plexusrc_pre.bat" call "%HOME%\plexusrc_pre.bat"
|
||||
|
||||
@REM set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" @setlocal
|
||||
|
||||
@REM For Windows NT, use cmd.exe to execute the "CD" later
|
||||
@REM For Win 98ME, use comand.com - if neither is found , default to use
|
||||
@REM cmd.exe in the path and hope we'll hit a Win version of it
|
||||
@REM FYI: Using command.com on Win NT causes "Parameter format not correct" error
|
||||
set PLEXUS_COMMAND_COM="cmd.exe"
|
||||
if exist "%SystemRoot%\system32\cmd.exe" set PLEXUS_COMMAND_COM="%SystemRoot%\system32\cmd.exe"
|
||||
if exist "%SystemRoot%\command.com" set PLEXUS_COMMAND_COM="%SystemRoot%\command.com"
|
||||
|
||||
@REM Use explicit find.exe to prevent cygwin and others find.exe from being
|
||||
@REM used instead - we use this to test dir existance in a cross-win-platform way
|
||||
set PLEXUS_FIND_EXE="find.exe"
|
||||
if exist "%SystemRoot%\system32\find.exe" set PLEXUS_FIND_EXE="%SystemRoot%\system32\find.exe"
|
||||
if exist "%SystemRoot%\command\find.exe" set PLEXUS_FIND_EXE="%SystemRoot%\command\find.exe"
|
||||
|
||||
@REM ==== START VALIDATION ====
|
||||
if not "%JAVA_HOME%" == "" goto OkJHome
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME not found in your environment.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation
|
||||
echo.
|
||||
goto end
|
||||
|
||||
:OkJHome
|
||||
%PLEXUS_COMMAND_COM% /C DIR "%JAVA_HOME%" 2>&1 | %PLEXUS_FIND_EXE% /I /C "%JAVA_HOME%" >nul
|
||||
if not errorlevel 1 goto chkMHome
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory.
|
||||
echo JAVA_HOME = %JAVA_HOME%
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation
|
||||
echo.
|
||||
goto end
|
||||
|
||||
:chkMHome
|
||||
if not "%PLEXUS_HOME%"=="" goto valMHome
|
||||
|
||||
echo.
|
||||
echo ERROR: PLEXUS_HOME not found in your environment.
|
||||
echo Please set the PLEXUS_HOME variable in your environment to match the
|
||||
echo location of the Plexus installation
|
||||
echo.
|
||||
goto end
|
||||
|
||||
:valMHome
|
||||
%PLEXUS_COMMAND_COM% /C DIR "%PLEXUS_HOME%" 2>&1 | %PLEXUS_FIND_EXE% /I /C "%PLEXUS_HOME%" >nul
|
||||
if not errorlevel 1 goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: PLEXUS_HOME is set to an invalid directory.
|
||||
echo PLEXUS_HOME = %PLEXUS_HOME%
|
||||
echo Please set the PLEXUS_HOME variable in your environment to match the
|
||||
echo location of the Plexus installation
|
||||
echo.
|
||||
goto end
|
||||
@REM ==== END VALIDATION ====
|
||||
|
||||
:init
|
||||
@REM Decide how to startup depending on the version of windows
|
||||
|
||||
@REM -- Win98ME
|
||||
if NOT "%OS%"=="Windows_NT" goto Win9xArg
|
||||
|
||||
@REM -- 4NT shell
|
||||
if "%eval[2+2]" == "4" goto 4NTArgs
|
||||
|
||||
@REM -- Regular WinNT shell
|
||||
set PLEXUS_CMD_LINE_ARGS=%*
|
||||
goto endInit
|
||||
|
||||
@REM The 4NT Shell from jp software
|
||||
:4NTArgs
|
||||
set PLEXUS_CMD_LINE_ARGS=%$
|
||||
goto endInit
|
||||
|
||||
:Win9xArg
|
||||
@REM Slurp the command line arguments. This loop allows for an unlimited number
|
||||
@REM of agruments (up to the command line limit, anyway).
|
||||
set PLEXUS_CMD_LINE_ARGS=
|
||||
:Win9xApp
|
||||
if %1a==a goto endInit
|
||||
set PLEXUS_CMD_LINE_ARGS=%PLEXUS_CMD_LINE_ARGS% %1
|
||||
shift
|
||||
goto Win9xApp
|
||||
|
||||
@REM Reaching here means variables are defined and arguments have been captured
|
||||
:endInit
|
||||
SET PLEXUS_DEFAULT_OPTS="-Xmx160m"
|
||||
SET PLEXUS_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
|
||||
SET PLEXUS_ENDORSED="-Djava.endorsed.dirs=%JAVA_HOME%\lib\endorsed;%PLEXUS_HOME%\lib\endorsed"
|
||||
|
||||
@REM Start PLEXUS
|
||||
%PLEXUS_JAVA_EXE% -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl "-Dplexus.home=%PLEXUS_HOME%" "-Dtools.jar=%JAVA_HOME%\lib\tools.jar" "-Dforehead.conf.file=%PLEXUS_HOME%\bin\forehead.conf" %PLEXUS_ENDORSED% %PLEXUS_DEFAULT_OPTS% %PLEXUS_OPTS% -classpath %PLEXUS_CLASSPATH% %PLEXUS_MAIN_CLASS% %PLEXUS_CMD_LINE_ARGS%
|
||||
|
||||
|
||||
$PLEXUS_OPTS \
|
||||
-classpath ${PLEXUS_HOME}/lib/classworlds-${CLASSWORLDS_VERSION}.jar \
|
||||
-Dclassworlds.conf=${PLEXUS_HOME}/conf/classworlds.conf \
|
||||
-Dlib=${PLEXUS_HOME}/lib \
|
||||
-Dtools.jar=$TOOLS_JAR \
|
||||
-Dplexus.home=${PLEXUS_HOME} \
|
||||
$MAIN_CLASS ${CONF}
|
||||
|
||||
|
||||
:end
|
||||
@REM set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" goto endNT
|
||||
|
||||
@REM For old DOS remove the set variables from ENV - we assume they were not set
|
||||
@REM before we started - at least we don't leave any baggage around
|
||||
set PLEXUS_COMMAND_COM=
|
||||
set PLEXUS_FIND_EXE=
|
||||
set PLEXUS_DEFAULT_OPTS=
|
||||
set PLEXUS_JAVA_EXE=
|
||||
set PLEXUS_CLASSPATH=
|
||||
set PLEXUS_MAIN_CLASS=
|
||||
set PLEXUS_CMD_LINE_ARGS=
|
||||
SET PLEXUS_ENDORSED=
|
||||
goto postExec
|
||||
|
||||
:endNT
|
||||
@endlocal
|
||||
|
||||
:postExec
|
||||
if exist "%HOME%\plexusrc_post.bat" call "%HOME%\plexusrc_post.bat"
|
||||
@REM pause the batch file if PLEXUS_BATCH_PAUSE is set to 'on'
|
||||
if "%PLEXUS_BATCH_PAUSE%" == "on" pause
|
||||
127
runner/src/plugin-resources/templates/plexus.vm
Normal file
127
runner/src/plugin-resources/templates/plexus.vm
Normal file
@@ -0,0 +1,127 @@
|
||||
#! /bin/sh
|
||||
|
||||
CLASSWORLDS_VERSION=1.0-beta-5
|
||||
MAIN_CLASS=com.werken.classworlds.Launcher
|
||||
PLEXUS_OPTS="-Xmx128m"
|
||||
|
||||
# OS specific support. $var _must_ be set to either true or false.
|
||||
cygwin=false
|
||||
darwin=false;
|
||||
case "`uname`" in
|
||||
CYGWIN*) cygwin=true;;
|
||||
Darwin*) darwin=true ;;
|
||||
esac
|
||||
|
||||
# resolve links - $0 may be a softlink
|
||||
THIS_PROG="$0"
|
||||
|
||||
while [ -h "$THIS_PROG" ]; do
|
||||
ls=`ls -ld "$THIS_PROG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '.*/.*' > /dev/null; then
|
||||
THIS_PROG="$link"
|
||||
else
|
||||
THIS_PROG=`dirname "$THIS_PROG"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
# Get standard environment variables
|
||||
PRGDIR=`dirname "$THIS_PROG"`
|
||||
PLEXUS_HOME=`cd "$PRGDIR/.." ; pwd`
|
||||
PLEXUS_CONF=`cd "$PLEXUS_HOME/conf" ; pwd`
|
||||
unset THIS_PROG
|
||||
|
||||
#if ( $jre )
|
||||
|
||||
JAVA_HOME=${PLEXUS_HOME}/jre
|
||||
|
||||
#end
|
||||
|
||||
# Checking for JAVA_HOME is required on *nix due
|
||||
# to some distributions stupidly including kaffe in /usr/bin
|
||||
if [ "$JAVA_HOME" = "" ] ; then
|
||||
echo "ERROR: JAVA_HOME not found in your environment."
|
||||
echo
|
||||
echo "Please, set the JAVA_HOME variable in your environment to match the"
|
||||
echo "location of the Java Virtual Machine you want to use."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# For Cygwin, ensure paths are in UNIX format before anything is touched
|
||||
if $cygwin ; then
|
||||
[ -n "$PLEXUS_HOME" ] &&
|
||||
PLEXUS_HOME=`cygpath --unix "$PLEXUS_HOME"`
|
||||
[ -n "$JAVA_HOME" ] &&
|
||||
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||
[ -n "$CLASSPATH" ] &&
|
||||
CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
|
||||
fi
|
||||
|
||||
if [ -z "$PLEXUS_TMPDIR" ] ; then
|
||||
PLEXUS_TMPDIR="$PLEXUS_HOME"/temp
|
||||
mkdir -p "$PLEXUS_TMPDIR"
|
||||
fi
|
||||
|
||||
if [ -z "$JAVACMD" ] ; then
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
echo "Error: JAVA_HOME is not defined correctly."
|
||||
echo " We cannot execute $JAVACMD"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ -z "$JAVA_HOME" ] ; then
|
||||
echo "Warning: JAVA_HOME environment variable is not set."
|
||||
echo " If build fails because sun.* classes could not be found"
|
||||
echo " you will need to set the JAVA_HOME environment variable"
|
||||
echo " to the installation directory of java."
|
||||
fi
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin; then
|
||||
PLEXUS_HOME=`cygpath --path --windows "$PLEXUS_HOME"`
|
||||
PLEXUS_CONF=`cygpath --path --windows "$PLEXUS_CONF"`
|
||||
PLEXUS_TMPDIR=`cygpath --path --windows "$PLEXUS_TMPDIR"`
|
||||
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
|
||||
fi
|
||||
|
||||
# For Darwin, use classes.jar for TOOLS_JAR
|
||||
TOOLS_JAR="${JAVA_HOME}/lib/tools.jar"
|
||||
if $darwin; then
|
||||
TOOLS_JAR="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Classes/classes.jar"
|
||||
fi
|
||||
|
||||
# ----- Execute The Requested Command -----------------------------------------
|
||||
|
||||
echo "Using PLEXUS_HOME: $PLEXUS_HOME"
|
||||
echo "Using PLEXUS_CONF: $PLEXUS_CONF"
|
||||
echo "Using PLEXUS_TMPDIR: $PLEXUS_TMPDIR"
|
||||
echo "Using JAVA_HOME: $JAVA_HOME"
|
||||
|
||||
if [ "$1" = "" ]
|
||||
then
|
||||
CONF=${PLEXUS_CONF}/plexus.conf
|
||||
else
|
||||
CONF=$1
|
||||
fi
|
||||
|
||||
$JAVACMD \
|
||||
$PLEXUS_OPTS \
|
||||
-classpath ${PLEXUS_HOME}/lib/classworlds-${CLASSWORLDS_VERSION}.jar \
|
||||
-Dclassworlds.conf=${PLEXUS_HOME}/conf/classworlds.conf \
|
||||
-Dlib=${PLEXUS_HOME}/lib \
|
||||
-Djava.io.tmpdir=${PLEXUS_TMPDIR} \
|
||||
-Dtools.jar=$TOOLS_JAR \
|
||||
-Dplexus.home=${PLEXUS_HOME} \
|
||||
$MAIN_CLASS ${CONF}
|
||||
1
runner/xdocs/.cvsignore
Normal file
1
runner/xdocs/.cvsignore
Normal file
@@ -0,0 +1 @@
|
||||
stylesheets
|
||||
16
runner/xdocs/changes.xml
Normal file
16
runner/xdocs/changes.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0"?>
|
||||
<document>
|
||||
<properties>
|
||||
<title>Changes</title>
|
||||
<author email="jason@zenplex.com">Jason van Zyl</author>
|
||||
</properties>
|
||||
|
||||
<body>
|
||||
<release version="1.0" date="2002-08-04">
|
||||
<action dev="jvanzyl" type="add">
|
||||
Original release for Maven 1.0-beta8
|
||||
</action>
|
||||
</release>
|
||||
</body>
|
||||
</document>
|
||||
|
||||
23
runner/xdocs/goals.xml
Normal file
23
runner/xdocs/goals.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0"?>
|
||||
<document>
|
||||
|
||||
<properties>
|
||||
<title>Maven Plexus Plug-in Goals</title>
|
||||
<author email="jason@zenplex.com">Jason van Zyl</author>
|
||||
</properties>
|
||||
|
||||
<body>
|
||||
<section name="Goals">
|
||||
<table>
|
||||
<tr><th>Goal</th><th>Description</th></tr>
|
||||
<tr>
|
||||
<td>plexus:runtime</td>
|
||||
<td>
|
||||
For a given project generate a plexus runtime using the required
|
||||
components.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</section>
|
||||
</body>
|
||||
</document>
|
||||
15
runner/xdocs/index.xml
Normal file
15
runner/xdocs/index.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0"?>
|
||||
<document>
|
||||
|
||||
<properties>
|
||||
<title>Maven Ant Plug-in</title>
|
||||
<author email="jason@zenplex.com">Jason van Zyl</author>
|
||||
</properties>
|
||||
|
||||
<body>
|
||||
<section name="Maven Plexus Plug-in">
|
||||
<p>
|
||||
</p>
|
||||
</section>
|
||||
</body>
|
||||
</document>
|
||||
16
runner/xdocs/navigation.xml
Normal file
16
runner/xdocs/navigation.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<project name="Maven Plexus Plugin">
|
||||
|
||||
<title>Maven Plexus Plugin</title>
|
||||
|
||||
<body>
|
||||
<links>
|
||||
<item name="Maven" href="http://maven.apache.org/"/>
|
||||
<item name="Plexus" href="http://maven.apache.org/"/>
|
||||
</links>
|
||||
<menu name="Overview">
|
||||
<item name="Goals" href="/goals.html" />
|
||||
<item name="Properties" href="/properties.html" />
|
||||
</menu>
|
||||
</body>
|
||||
</project>
|
||||
25
runner/xdocs/properties.xml
Normal file
25
runner/xdocs/properties.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<document>
|
||||
|
||||
<properties>
|
||||
<title>Maven Ant Plugin Properties</title>
|
||||
<author email="dion@multitask.com.au">dIon Gillard</author>
|
||||
</properties>
|
||||
|
||||
<body>
|
||||
<section name="Maven Plexus Plugin Settings">
|
||||
<table>
|
||||
<tr>
|
||||
<th>Property name</th>
|
||||
<th>Optional?</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</section>
|
||||
</body>
|
||||
</document>
|
||||
Reference in New Issue
Block a user