ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <Gilbert.Reb...@huk-coburg.de>
Subject Syntax error with javascript in macrodef ?!
Date Wed, 08 Mar 2006 16:51:51 GMT

Hi,

i have a common_targets.xml, with all my macrodefs

Most of that macrodefs make use of javascript (js.jar)

Sometimes i get an error like that =

C:\SCM\skripte\config\common_targets.xml:51: SyntaxError: octal escape
too large (ANT; line 1)
	at
org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHe
lper.java:539)
	at
org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:3
80)
	at
net.sf.antcontrib.logic.ForDelegate.doSequentialIteration(ForDelegate.ja
va:228)
	at
net.sf.antcontrib.logic.ForDelegate.doTheTasks(ForDelegate.java:281)
	at
net.sf.antcontrib.logic.ForDelegate.execute(ForDelegate.java:213)
	at net.sf.antcontrib.logic.For.execute(For.java:166)
	at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
	at org.apache.tools.ant.Task.perform(Task.java:364)
	at
org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:64)
	at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
	at org.apache.tools.ant.Task.perform(Task.java:364)
	at
org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:3
78)
	... 39 more

...

--- Nested Exception ---
SyntaxError: octal escape too large (ANT; line 1)
	at org.mozilla.javascript.NativeGlobal.constructError(Unknown
Source)
	at org.mozilla.javascript.TokenStream.reportSyntaxError(Unknown
Source)
	at org.mozilla.javascript.TokenStream.getToken(Unknown Source)
	at org.mozilla.javascript.Parser.unaryExpr(Unknown Source)
	at org.mozilla.javascript.Parser.mulExpr(Unknown Source)
	at org.mozilla.javascript.Parser.addExpr(Unknown Source)
	at org.mozilla.javascript.Parser.shiftExpr(Unknown Source)
...


Here's the part of my script with line 51 marked =


<cccheckout viewpath="@{modulbase}" reserved="true"/>
<cccheckout viewpath="@{modulbase}/@{modulfile}" reserved="true"/>
            
<copy file="${ant.working.dir}/deploy/${mname}/@{modulfile}"
  tofile="@{modulbase}/@{modulfile}" overwrite="true" />
                
 <for param="file">
     <path>
         <fileset dir="${ant.working.dir}/deploy/${mname}"
includes="*.*"/>
      </path>
     <sequential>
------- line 51 ------------> <var name="fend" unset="true" /> <-------
line 51 ------------
       <script language="javascript">
            index=("@{file}".lastIndexOf('.'));
            fend="@{file}".substring(index);
            project.setProperty("fend", fend);
        </script>
     </sequential>
</for>


Anyone using javascript in macrodefs with the same problem ?
The exception is thrown by js.jar but i don't know why.
Exactly the same macrodefs are running fine in production ?!?

I already googled for the error message but nothing found.


Regards, Gilbert

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message