rJLBMAC:/work/dojo/dojo-1.0.1-src/util/buildscripts john$ vi build.sh
JLBMAC:/work/dojo/dojo-1.0.1-src/util/buildscripts john$ vi build_release.sh
JLBMAC:/work/dojo/dojo-1.0.1-src/util/buildscripts john$ vi README
JLBMAC:/work/dojo/dojo-1.0.1-src/util/buildscripts john$ ./build.sh profile=standard loader=xdomain action=release
release: Using profile: profiles/standard.profile.js
release: Using version number: 0.0.0.dev for the release.
release: Deleting: ../../release/dojo
release: Copying: ../../dojo/../dijit to: ../../release/dojo/dijit
release: Copying: ../../dojo/../dojox to: ../../release/dojo/dojox
release: Copying: ../../dojo to: ../../release/dojo/dojo
release: Building dojo.js and layer files
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 20
at org.mozilla.javascript.regexp.NativeRegExp.executeREBytecode(NativeRegExp.java:1914)
at org.mozilla.javascript.regexp.NativeRegExp.matchRegExp(NativeRegExp.java:2419)
at org.mozilla.javascript.regexp.NativeRegExp.executeRegExp(NativeRegExp.java:2449)
at org.mozilla.javascript.regexp.RegExpImpl.matchOrReplace(RegExpImpl.java:165)
at org.mozilla.javascript.regexp.RegExpImpl.replace(RegExpImpl.java:102)
at org.mozilla.javascript.NativeString.execMethod(NativeString.java:278)
at org.mozilla.javascript.IdFunction.call(IdFunction.java:93)
at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1442)
at org.mozilla.javascript.gen.c4._c16(/Users/john/work/dojo/dojo-1.0.1-src/util/buildscripts/jslib/buildUtil.js:621)
at org.mozilla.javascript.gen.c4.call(/Users/john/work/dojo/dojo-1.0.1-src/util/buildscripts/jslib/buildUtil.js)
at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1442)
at org.mozilla.javascript.gen.c4._c18(/Users/john/work/dojo/dojo-1.0.1-src/util/buildscripts/jslib/buildUtil.js:660)
at org.mozilla.javascript.gen.c4.call(/Users/john/work/dojo/dojo-1.0.1-src/util/buildscripts/jslib/buildUtil.js)
at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1442)
at org.mozilla.javascript.gen.c1._c3(/Users/john/work/dojo/dojo-1.0.1-src/util/buildscripts/build.js:103)
at org.mozilla.javascript.gen.c1.call(/Users/john/work/dojo/dojo-1.0.1-src/util/buildscripts/build.js)
at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1442)
at org.mozilla.javascript.gen.c1._c0(/Users/john/work/dojo/dojo-1.0.1-src/util/buildscripts/build.js:23)
at org.mozilla.javascript.gen.c1.call(/Users/john/work/dojo/dojo-1.0.1-src/util/buildscripts/build.js)
at org.mozilla.javascript.gen.c1.exec(/Users/john/work/dojo/dojo-1.0.1-src/util/buildscripts/build.js)
at org.mozilla.javascript.Context.evaluateReader(Context.java:1073)
at org.mozilla.javascript.tools.shell.Main.evaluateScript(Main.java:384)
at org.mozilla.javascript.tools.shell.Main.processFileSecure(Main.java:371)
at org.mozilla.javascript.tools.shell.Main.processFile(Main.java:308)
at org.mozilla.javascript.tools.shell.Main.processSource(Main.java:300)
at org.mozilla.javascript.tools.shell.Main.exec(Main.java:117)
at org.mozilla.javascript.tools.shell.Main.main(Main.java:77)
Anyone else have/fix this?
Thanks!
John

I should have included
In case it wasn't obvious from the command line snippets. This is a clean download and run of the build tool on my mac. I have experienced this both with Java 1.5 release 5 and release 6 (www.apple.com/java).
It works for me, I just
It works for me, I just tried on an OS X 10.4.11 box running Java 1.5:
java version "1.5.0_13"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05-241)
Java HotSpot(TM) Client VM (build 1.5.0_13-121, mixed mode, sharing)
I used the 1.0.2 src download and ran the build step you mention above, and I did not get an error. If you are curious, you can edit etc/buildscripts/jslib/buildUtil.js around line 621 and do a logger.trace(depRegExpString) to see what string it is trying to use for the regexp.
Here is what mine says:
Found the problem
For anyone else who has this problem...
Modify build.sh add -verbose to the java call:
java -verbose -jar ../shrinksafe/custom_rhino.jar build.js "$@"
Make sure it is loading the Rhino classes from the right place. For example: Loaded org.mozilla.javascript.gen.c7 from file:/Users/john/work/dojo/dojo-1.0.1-src/util/shrinksafe/custom_rhino.jar
I had a stray js.jar located in my ~/Java/Extensions folder:Loaded org.mozilla.javascript.regexp.RegExpImpl from file:/Users/john/Library/Java/Extensions/js.jar
D'oh!
Thanks for responding jburke!