commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Horman <jhor...@musicmatch.com>
Subject [jelly] RE: Jelly and properties
Date Tue, 01 Oct 2002 18:32:13 GMT
How about as a temporary fix you just have jelly(.sh) source ~/.jelly if it
exists. This would avoid me having to edit jelly(.sh) or use ant/maven just
to run a script.

I am not a sh expert, but something like this.

-------------------------------------------

jelly(.sh)

#!/bin/sh

if [ -f $HOME/.jelly ]
then
    . $HOME/.jelly
fi

$JAVA_HOME/bin/java -mx1500mb -classpath ${JELLY_HOME}/lib/forehead.jar \
    -Dforehead.conf.file=${JELLY_HOME}/bin/forehead.conf \
    -Dant.home=${ANT_HOME} \
    -Djelly.home=${JELLY_HOME} \
    -Dtools.jar=${JAVA_HOME}/lib/tools.jar \
    $JELLY_PROPERTIES \
    com.werken.forehead.Forehead $*

-------------------------------------------

$HOME/.jelly:

#!/bin/sh

JELLY_PROPERTIES="-Duser.home=${HOME}
-Dlog4j.configuration=file:${HOME}/configs/jelly/log
4j.properties -Dwebservices.config_directory=${HOME}/configs/webservices"

export JELLY_PROPERTIES

-------------------------------------------

-jason horman



-----Original Message-----
From: James Strachan [mailto:james_strachan@yahoo.co.uk]
Sent: Tuesday, October 01, 2002 10:32 AM
To: Jakarta Commons Developers List
Subject: Re: Jelly and properties


From: "Jim Birchfield" <jim.birchfield@genscape.com>
> I would like to see Jelly look for a jelly.properties file on the
classpath
> and load the properties to be available for Jelly to use in the script.
> James, have you had any thoughts around this issue?  It is easy to set the
> properties when using Maven, but as I am starting to use Jelly as a
> scripting language outright, It would be nice to have this feature.  Also,
I
> like the possibility of having a <j:properties> tag (thanks Bob) that can
> load a given properties file to be made available.

Sounds like a good idea.

If you bootstrapped Jelly from either inside Ant or with an Ant Project
scope, you could just use the Ant <properties> tag to load properties into
Jelly. Though I know Maven did some clever jiggery pokery so that dynamic
expressions could be put inside the properties file which would then get
lazily evaluated on demand. So maybe we should migrate some of that
functionality into core Jelly?

James
-------
http://radio.weblogs.com/0112098/

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:
<mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:commons-dev-help@jakarta.apache.org>
This email message and any attachments are for the sole use of the intended
recipient(s) and may contain confidential and privileged information. Any
unauthorized review, use, disclosure or distribution is prohibited. If you
are not the intended recipient or his/her representative, please contact the
sender by reply email and destroy all copies of the original message.

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message