<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">My work around solution is quite clunky but is working ok until when/if Alkacon fix up cmsshell to be backwards compatible. Christophe's solution looks nicer.</div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
1. Create a patch package in my project org.opencms.main.</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">2. Got the latest content for CmsShellCommands.java from github, and hacked it to add functions I need.</div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">3. Updated my ant task to pass through an optional classpath env variable, which is my classes directory.</div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">4. Edited cmsshell.sh to prefix the classpath with my optional classpath env - because it comes first my patch class is loaded rather than the java file from opencms.jar.</div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">ie at the bottom:</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><div>echo extra_classpath=$EXTRA_CLASSPATH</div><div>java -classpath "${EXTRA_CLASSPATH}:${OPENCMS_CLASSPATH}:${TOMCAT_CLASSPATH}" org.opencms.main.CmsShell -base="${OPENCMS_BASE}" "$@"</div>
<div><br></div><div>Steve</div></div><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br></blockquote></div>