dojo 의 build.bat 파일을 ant Task로 만들어야 했다.
우선 build.bat 파일은 다음과 같다.
java -classpath ../shrinksafe/js.jar;../shrinksafe/shrinksafe.jar org.mozilla.javascript.tools.shell.Main build.js %* @rem java -Xms256m -Xmx256m -classpath ../shrinksafe/js.jar;../shrinksafe/shrinksafe.jar org.mozilla.javascript.tools.shell.Main build.js %*
처음에 그냥 책을 살짝 훑어보고, 이렇게 만들어 봤다.
<java classname="org.mozilla.javascript.tools.shell.Main"> <arg value="build.js"> <classpath>../shrinksafe/js.jar</classpath> <classpath>../shrinksafe/shrinksafe.jar</classpath> <arg value="profileFile=${target.profileFile}"> <arg value="action=clean,release"> </arg> </arg> </arg> </java>
그랬더니, 다음과 같은 에러가 나타났다..
The <path> type doesn't support nested text data ("../shrinksafe/js.jar").
음.. 무슨 근거로 <classpath>를 저렇게 쓴걸까?
다음은, <classpath>에 관하여 책을 좀더 찾아 보고 다음고 같이 고쳐보았다.
<java classname="org.mozilla.javascript.tools.shell.Main"> <classpath path="${dojo.shrinksafe.dir}"> <pathelement location="js.jar"> <pathelement location="shrinksafe.jar"></pathelement> </pathelement> </classpath> <arg value="build.js"> <arg value="profileFile=${target.profileFile}"> <arg value="action=clean,release"> </arg> </arg> </arg> </java>
이번엔 이런 에러메시지가..
"Could not find org.mozilla.javascript.tools.shell.Main. Make sure you have it in your classpath"
음.. 좀더 살펴보니 <fileset>이란 놈도 있어서. 다음과 같이 다시 도전해 보았다.
<java dir="${dojo.buildscripts.dir}" classname="org.mozilla.javascript.tools.shell.Main" fork="true" failonerror="true"> <classpath> <fileset dir="${dojo.shrinksafe.dir}"> <include name="*.jar"></include> </fileset> </classpath> <arg value="build.js"> <arg value="profileFile=${target.profileFile}"> <arg value="action=clean,release"></arg> </arg> </arg> </java>
오.. 돈다 돈다...