notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
svn commit: r1819 - in development/main: home/transit/handler/etc/test/hosts home/transit/handler/src/main/net/dpml/transit home/transit/plugin/etc/bin metro
- From: niclas AT netcompartner.com
- To: notify-dpml AT lists.ibiblio.org
- Subject: svn commit: r1819 - in development/main: home/transit/handler/etc/test/hosts home/transit/handler/src/main/net/dpml/transit home/transit/plugin/etc/bin metro
- Date: Fri, 18 Feb 2005 21:42:30 +0100
Author: niclas
Date: Fri Feb 18 21:42:30 2005
New Revision: 1819
Modified:
development/main/home/transit/handler/etc/test/hosts/test.repo
development/main/home/transit/handler/src/main/net/dpml/transit/Transit.java
development/main/home/transit/plugin/etc/bin/internal-cygwin.sh
development/main/home/transit/plugin/etc/bin/internal-unix.sh
development/main/home/transit/plugin/etc/bin/transit (contents, props
changed)
development/main/home/transit/plugin/etc/bin/transit.bat
development/main/metro/module.xml
Log:
Fixed up the Unix/Linux scripts and proper flags for the nix environment.
Modified: development/main/home/transit/handler/etc/test/hosts/test.repo
==============================================================================
--- development/main/home/transit/handler/etc/test/hosts/test.repo
(original)
+++ development/main/home/transit/handler/etc/test/hosts/test.repo Fri
Feb 18 21:42:30 2005
@@ -3,7 +3,7 @@
dpml.transit.resourcehost.class=net.dpml.transit.artifact.ClassicResourceHost
dpml.transit.resourcehost.base=file:${user.dir}/target/test/trusted
dpml.transit.resourcehost.knowngroups=
-dpml.transit.resourcehost.priority=50
+dpml.transit.resourcehost.priority=10
dpml.transit.resourcehost.trusted=true
dpml.transit.resourcehost.policy=fast
dpml.transit.resourcehost.username=
Modified:
development/main/home/transit/handler/src/main/net/dpml/transit/Transit.java
==============================================================================
---
development/main/home/transit/handler/src/main/net/dpml/transit/Transit.java
(original)
+++
development/main/home/transit/handler/src/main/net/dpml/transit/Transit.java
Fri Feb 18 21:42:30 2005
@@ -112,18 +112,18 @@
/**
* The DPML home directory established via assesment of the the
${dpml.home}
- * system property and the DPML_HOME environment variable. If neither
are
- * defined the behaviour is platform specific. If the os is Windows,
+ * system property and the DPML_HOME environment variable. If neither are
+ * defined the behaviour is platform specific. If the os is Windows,
* the value returned is equivalent to $APPDATA\DPML whereas Unix the
* environment will return ${user.home}/.dpml.
*/
public static final File DPML_HOME;
/**
- * If a system property named "dpml.system" is defined then the value
- * is assigned otherwise the implementation will look for an environment
- * variable named "DPML_SYSTEM". If neither case holds, the value
assigned
- * if platform dependent. If the os is Windows, the equivalent of
+ * If a system property named "dpml.system" is defined then the value
+ * is assigned otherwise the implementation will look for an environment
+ * variable named "DPML_SYSTEM". If neither case holds, the value assigned
+ * if platform dependent. If the os is Windows, the equivalent of
* $PROGRAMFILES\DPML is assigned otherwise the value defaults to
* "/usr/share/dpml".
*/
@@ -348,9 +348,9 @@
/**
* Resolve the DPML home directory using assesment of the the ${dpml.home}
- * system property, the DPML_HOME environment variable. If DPML_HOME is
- * not declared, the behaviour is platform specific. If the os is
Windows,
- * the value returned is equivalent to $APPDATA\DPML whereas Unix
environment
+ * system property, the DPML_HOME environment variable. If DPML_HOME is
+ * not declared, the behaviour is platform specific. If the os is
Windows,
+ * the value returned is equivalent to $APPDATA\DPML whereas Unix
environment
* will return ${user.home}/.dpml.
*
* @return the DPML home directory
@@ -383,18 +383,18 @@
/**
* Resolve the DPML system home directory. If a system property
- * named "dpml.system" is defined then the value as a file is
- * returned otherwise the implementation will look for an environment
- * variable named "DPML_SYSTEM" which if defined will be
- * returned as a file. If neither case holds, the value assigned
- * if platform dependent. If the os is Windows, the equivalent of
- * $PROGRAMFILES\DPML is returned otherwise the default value
+ * named "dpml.system" is defined then the value as a file is
+ * returned otherwise the implementation will look for an environment
+ * variable named "DPML_SYSTEM" which if defined will be
+ * returned as a file. If neither case holds, the value assigned
+ * if platform dependent. If the os is Windows, the equivalent of
+ * $PROGRAMFILES\DPML is returned otherwise the default value
* of "/usr/share/dpml" is returned.
*
- * @param dir the default DPML_HOME value
+ * @param dpmlHomeDir the default DPML_HOME value
* @return the transit system directory
*/
- private static File resolveSystemDirectory( File dir )
+ private static File resolveSystemDirectory( File dpmlHomeDir )
{
String home = System.getProperty( SYSTEM_KEY );
if( null != home )
@@ -410,11 +410,11 @@
String os = System.getProperty( "os.name" ).toLowerCase();
if( os.indexOf( "win" ) >= 0 )
{
- return new File( dir, "Shared" );
+ return new File( dpmlHomeDir, "Shared" );
}
else
{
- return new File( dir, "share" );
+ return new File( dpmlHomeDir, "share" );
}
/*
@@ -435,8 +435,8 @@
}
/**
- * Resolve the DPML data directory. If the platform is Windows
- * the returned value is equivalent to ${dpml.home}/Data
+ * Resolve the DPML data directory. If the platform is Windows
+ * the returned value is equivalent to ${dpml.home}/Data
* whereas the Unix variant returns ${dpml.home}/data.
*
* @param dir the default DPML_HOME value
@@ -456,8 +456,8 @@
}
/**
- * Resolve the DPML prefs directory. If the platform is Windows
- * the returned value is equivalent to ${dpml.home}/Preferences
+ * Resolve the DPML prefs directory. If the platform is Windows
+ * the returned value is equivalent to ${dpml.home}/Preferences
* whereas the Unix variant returns ${dpml.home}/prefs.
*
* @param dir the default DPML_HOME value
Modified: development/main/home/transit/plugin/etc/bin/internal-cygwin.sh
==============================================================================
--- development/main/home/transit/plugin/etc/bin/internal-cygwin.sh
(original)
+++ development/main/home/transit/plugin/etc/bin/internal-cygwin.sh Fri
Feb 18 21:42:30 2005
@@ -4,15 +4,15 @@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
+# You may obtain a copy of the License at
+#
# http://www.apache.org/licenses/LICENSE-2.0
-#
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
-#
+#
# See the License for the specific language governing permissions and
# limitations under the License.
@@ -42,10 +42,10 @@
echo " Transit Arguments: $TRANSIT_ARGS $@"
echo ""
-ARGS="$TRANSIT_JVM_OPTS -Djava.protocol.handler.pkgs=net.dpml.transit
\"-Djava.security.policy=$TRANSIT_SECURITY_POLICY\" $BOOTSTRAP_PLUGIN
-classpath \"$TRANSIT_CLASSPATH\" net.dpml.transit.Main
-Xbootstrap=$TRANSIT_PLUGIN $TRANSIT_ARGS $@"
-
-echo -n "$JAVA" >$TRANSIT_HOME/command-line.log
-echo -n " " >>$TRANSIT_HOME/command-line.log
-echo "$ARGS" >>$TRANSIT_HOME/command-line.log
+ARGS="$TRANSIT_JVM_OPTS -Djava.protocol.handler.pkgs=net.dpml.transit
\"-Djava.security.policy=$TRANSIT_SECURITY_POLICY\" -classpath
\"$TRANSIT_CLASSPATH\" net.dpml.transit.Main -Xbootstrap=$TRANSIT_PLUGIN
$TRANSIT_ARGS $@"
+mkdir -p $DPML_HOME/data/logs/transit/
+echo -n "$JAVA" >$DPML_HOME/data/logs/transit/command-line.log
+echo -n " " >>$DPML_HOME/data/logs/transit/command-line.log
+echo "$ARGS" >>$DPML_HOME/data/logs/transit/command-line.log
echo $ARGS | xargs "$JAVA"
Modified: development/main/home/transit/plugin/etc/bin/internal-unix.sh
==============================================================================
--- development/main/home/transit/plugin/etc/bin/internal-unix.sh
(original)
+++ development/main/home/transit/plugin/etc/bin/internal-unix.sh Fri
Feb 18 21:42:30 2005
@@ -4,15 +4,15 @@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
+# You may obtain a copy of the License at
+#
# http://www.apache.org/licenses/LICENSE-2.0
-#
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
-#
+#
# See the License for the specific language governing permissions and
# limitations under the License.
@@ -31,8 +31,9 @@
JAVA="$JAVA_HOME/bin/java"
ARGS="$TRANSIT_JVM_OPTS -Djava.protocol.handler.pkgs=net.dpml.transit
\"-Djava.security.policy=$TRANSIT_SECURITY_POLICY\" -classpath
\"$TRANSIT_CLASSPATH\" net.dpml.transit.Main -Xbootstrap=$TRANSIT_PLUGIN
$TRANSIT_ARGS $@"
-echo -n "$JAVA" >$TRANSIT_HOME/command-line.log
-echo -n " " >>$TRANSIT_HOME/command-line.log
-echo "$ARGS" >>$TRANSIT_HOME/command-line.log
+mkdir -p $DPML_HOME/data/logs/transit/
+echo -n "$JAVA" >$DPML_HOME/data/logs/transit/command-line.log
+echo -n " " >>$DPML_HOME/data/logs/transit/command-line.log
+echo "$ARGS" >>$DPML_HOME/data/logs/transit/command-line.log
echo $ARGS | xargs "$JAVA"
Modified: development/main/home/transit/plugin/etc/bin/transit
==============================================================================
--- development/main/home/transit/plugin/etc/bin/transit (original)
+++ development/main/home/transit/plugin/etc/bin/transit Fri Feb 18
21:42:30 2005
@@ -1,77 +1,83 @@
-#!/bin/sh
-#
-# Copyright 2004 Niclas Hedhman
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-# implied.
-#
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-if [ ! "$DPML_HOME" ]; then
- export DPML_HOME="$HOME/.dpml"
-fi
-
-if [ ! "$DPML_SYSTEM" ]; then
- export DPML_SYSTEM="$DPML_HOME/share"
-fi
-
-
-# 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
-
-PLATFORM=`uname`
-export PLATFORM
-
-#
-# Compute the TRANSIT_HOME if not already set.
-#
-if [ -z "$TRANSIT_HOME" ] ; then
- CWD=`pwd`
- BIN_DIR=`dirname "$0"`
- cd "$BIN_DIR"
- ABSOLUTE_PATH=`pwd`
- cd "$CWD"
- TRANSIT_HOME="`dirname "$ABSOLUTE_PATH"`"
- export TRANSIT_HOME
-fi
-
-if [ -z "$TRANSIT_PLUGIN" ] ; then
- TRANSIT_PLUGIN=@TRANSIT-PLUGIN-URI@
- export TRANSIT_PLUGIN
-fi
-
-TRANSIT_VERSION="@TRANSIT_VERSION@"
-export TRANSIT_VERSION
-
-TRANSIT_SECURITY_POLICY=$TRANSIT_HOME/bin/security.policy
-export TRANSIT_SECURITY_POLICY
-
-TRANSIT_CLASSPATH=$DPML_SYSTEM/local/@TRANSIT-PATH-FOR-NIX@
-export TRANSIT_CLASSPATH
-
-if [ `echo $PLATFORM | grep "CYGWIN"` ] ; then
- exec "$TRANSIT_HOME/bin/internal-cygwin.sh" "$@"
-elif [ `echo $PLATFORM | grep "Linux"` ] ; then
- exec "$TRANSIT_HOME/bin/internal-unix.sh" "$@"
-else
- echo "Starting Default Unix script"
- exec "$TRANSIT_HOME/bin/internal-unix.sh" "$@"
-fi
+#!/bin/sh
+#
+# Copyright 2004 Niclas Hedhman
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+#
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+if [ ! "$DPML_HOME" ]; then
+ DPML_HOME="$HOME/.dpml"
+ export DPML_HOME
+fi
+
+if [ ! "$DPML_SYSTEM" ]; then
+ CWD=`pwd`
+ BIN_DIR=`dirname "$0"`
+ cd "$BIN_DIR"
+ ABSOLUTE_PATH=`pwd`
+ cd "$CWD"
+ DPML_SYSTEM="`dirname "$ABSOLUTE_PATH"`"
+ export DPML_SYSTEM
+fi
+
+# 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
location"
+ echo " of the Java Virtual Machine you want to use."
+ echo
+ echo "This requirement is in place to avoid accidental execution of
pre-installed"
+ echo "Java virtual machines on your system, such as kaffe or any outdated
Sun or"
+ echo "Blackdown JVMs. Sorry for the inconvenience."
+ exit 1
+fi
+
+PLATFORM=`uname`
+export PLATFORM
+
+if [ -z "$TRANSIT_PLUGIN" ] ; then
+ TRANSIT_PLUGIN=@TRANSIT-PLUGIN-URI@
+ export TRANSIT_PLUGIN
+fi
+
+TRANSIT_VERSION="@TRANSIT_VERSION@"
+export TRANSIT_VERSION
+
+TRANSIT_SECURITY_POLICY=$DPML_SYSTEM/bin/security.policy
+export TRANSIT_SECURITY_POLICY
+
+CACHED="$DPML_HOME/data/cache/@TRANSIT-PATH-FOR-NIX@"
+LIBRARY="$DPML_SYSTEM/local/@TRANSIT-PATH-FOR-NIX@"
+SUPPLIMENT="$DPML_HOME/prefs/transit/lib"
+
+if [ -f $CACHED ] ; then
+ TRANSIT_CLASSPATH="$CACHED:$SUPPLIMENT"
+else
+ TRANSIT_CLASSPATH="$LIBRARY:$SUPPLIMENT"
+fi
+export TRANSIT_CLASSPATH
+
+
+if [ `echo $PLATFORM | grep "CYGWIN"` ] ; then
+ exec "$DPML_SYSTEM/bin/internal-cygwin.sh" "$@"
+elif [ `echo $PLATFORM | grep "Linux"` ] ; then
+ exec "$DPML_SYSTEM/bin/internal-unix.sh" "$@"
+else
+ echo "Starting Default Unix script"
+ exec "$DPML_SYSTEM/bin/internal-unix.sh" "$@"
+fi
Modified: development/main/home/transit/plugin/etc/bin/transit.bat
==============================================================================
--- development/main/home/transit/plugin/etc/bin/transit.bat (original)
+++ development/main/home/transit/plugin/etc/bin/transit.bat Fri Feb 18
21:42:30 2005
@@ -28,7 +28,7 @@
set $ARGS=%*
:RUN_METRO
-%JAVA% %$POLICY% %TRANSIT_JVM_OPTS% -classpath %$SUPPLIMENT%;%$CLASSPATH%
net.dpml.transit.Main -Xbootstrap=%TRANSIT_PLUGIN% %$ARGS%
+%JAVA% %$POLICY% %TRANSIT_JVM_OPTS% -classpath %$SUPPLIMENT%;%$CLASSPATH%
net.dpml.transit.Main -Xbootstrap=%TRANSIT_PLUGIN% %TRANSIT_ARGS% %$ARGS%
goto EndOfScript
:EndOfScript
Modified: development/main/metro/module.xml
==============================================================================
--- development/main/metro/module.xml (original)
+++ development/main/metro/module.xml Fri Feb 18 21:42:30 2005
@@ -1,24 +1,24 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<!--
+<!--
Copyright 2004 Stephen J McConnell
-
+
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
+ You may obtain a copy of the License at
+
http://www.apache.org/licenses/LICENSE-2.0
-
+
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.
-
+
See the License for the specific language governing permissions and
limitations under the License.
-->
-<project name="dpml-metro" default="install" basedir="."
- xmlns:transit="antlib:net.dpml.transit"
+<project name="dpml-metro" default="install" basedir="."
+ xmlns:transit="antlib:net.dpml.transit"
xmlns:x="plugin:dpml/magic/dpml-magic-core">
<transit:import uri="artifact:template:dpml/magic/standard"/>
@@ -135,9 +135,13 @@
<zipfileset dir="${bundle}/share" prefix="Shared">
<exclude name="**/metro"/>
</zipfileset >
- <tarfileset dir="${bundle}/prefs" prefix="prefs"/>
- <tarfileset dir="${bundle}/share" prefix="share">
+ <tarfileset dir="${bundle}/prefs" prefix="prefs" mode="644" />
+ <tarfileset dir="${bundle}/share" prefix="share" mode="444" >
<exclude name="**/metro.bat"/>
+ <exclude name="**/metro"/>
+ </tarfileset>
+ <tarfileset dir="${bundle}/share" prefix="share" mode="555" >
+ <include name="**/metro"/>
</tarfileset>
</x:dist>
- svn commit: r1819 - in development/main: home/transit/handler/etc/test/hosts home/transit/handler/src/main/net/dpml/transit home/transit/plugin/etc/bin metro, niclas, 02/18/2005
Archive powered by MHonArc 2.6.24.