ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Echlin, Robert" <Robert.Ech...@windriver.com>
Subject RE: Japaniese character not supporting in ANT
Date Fri, 10 Jun 2011 13:58:00 GMT
Hi Hari,
1)
Your email shows groovyc reporting with an identifier at the start of the line that can't
have come from Ant, like:
[*groovyc*]
Except for one line that looks like normal Ant output:
[groovyc]

These lines, with [*groovyc*], look like they were not generated in ant, but in some other
environment called from ant, probably groovy.
If you have added the asterisks by hand for some reason, please tell us that you did.
:-)

2)
Like Scot, I don't think this is an issue with Japanese characters.
To me it looks like your groovy code, has a "\" character when it shouldn't.
Please look at that possibility first.

I was going to add info about UTF-8, but your code says you are using ISO-2022-JP.
Ant should never actually see the Japanese characters, because groovy is running your code.
The error explicitly says that the "\" character is on line 41 of "Login_Page_002_Groovy.groovy".
This is a groovy file, not an Ant file.
All that Ant does is tell groovy to run on that file, through the groovy task for Ant, which
is called groovyc.

I hope this helps.
Rob
 

> -----Original Message-----
> From: Hari [mailto:hari14cs@gmail.com] 
> Sent: Wednesday, June 08, 2011 6:11 AM
> To: user@ant.apache.org
> Subject: Japaniese character not supporting in ANT
> 
>  HI
>   Am currently working on Japanese project. This is my below 
> code am using .
> The build.xml not working .
> 
> <?xml version="1.0"?>
> 
> <project name="tellurium-testng" default="compile-test" basedir=".">
> 
> <property name ="basedir" value ="C:\workspace\Current" />
> 
> <property name="dir.project" value="${basedir}" />
> 
> <property file="build.properties" />
> 
> <property name="dir.source" value="${dir.project}/src" />
> 
> <property name="dir.source.tellurium" 
> value="${dir.source}/com/ibi/idp/test"
> />
> 
> <property name="dir.source.test" 
> value="${dir.source}/com/ibi/idp/test" />
> 
> <property name="dir.build" value="${dir.project}/out" />
> 
> <property name="dir.build.tellurium" 
> value="${dir.build}/production" />
> 
> <property name="dir.build.test" value="${dir.build}/test" />
> 
> <property name="dir.lib" value="${dir.project}/lib" />
> 
> <path id="lib.path">
> 
> <fileset dir="${dir.lib}">
> 
> <include name="*.jar" />
> 
> <exclude name="*-src.jar" />
> 
> <include name="*.class" />
> 
> </fileset>
> 
> </path>
> 
> @
> 
> <!-- Match runtime libraries -->
> 
> <patternset id="pattern.libs">
> 
> <include name="**/*.jar" />
> 
> <exclude name="**/*-src.jar"/>
> 
> <!--exclude name="**/*junit.jar"/-->
> 
> </patternset>
> 
> <path id="junit.classpath">
> 
> <fileset dir="${dir.lib}">
> 
> <include name="junit*.jar"/>
> 
> </fileset>
> 
> </path>
> 
> <path id="tellurium.classpath">
> 
> <path refid="lib.path" />
> 
> <pathelement location="${dir.build.tellurium}" />
> 
> </path>
> 
> <path id="test.classpath">
> 
> <path refid="tellurium.classpath" />
> 
> <path refid="junit.classpath" />
> 
> <pathelement location="${dir.build.test}" />
> 
> </path>
> 
> <path id="project.classpath">
> 
> <path refid="test.classpath" />
> 
> </path>
> 
> <taskdef name="junit"
> 
> classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"
> 
> classpathref="junit.classpath" />
> 
> <target name="clean">
> 
> <echo message="Cleaning ..." />
> 
> <delete dir="${dir.build.tellurium}" />
> 
> <delete dir="${dir.build.test}" />
> 
> </target>
> 
> <target name="init">
> 
> <echo message="Initializing project..." />
> 
> <tstamp>
> 
> <format property="time.formatted"
> 
> pattern="MM/dd/yyyy hh:mm:ss a" unit="hour" />
> 
> </tstamp>
> 
> <mkdir dir="${dir.build}" />
> 
> <mkdir dir="${dir.build.tellurium}" />
> 
> <mkdir dir="${dir.build.test}" />
> 
> </target>
> 
> <macrodef name="compile-java">
> 
> <!-- required attributes -->
> 
> <attribute name="srcdir" />
> 
> <attribute name="destdir" />
> 
> <attribute name="excludes" default="" />
> 
> <!-- these defaults can be changed using properties -->
> 
> <attribute name="compiler" default="${javac.compiler}" />
> 
> <attribute name="debug" default="${javac.debug}" />
> 
> <attribute name="optimize" default="${javac.optimize}" />
> 
> <attribute name="deprecation" default="${javac.deprecation}" />
> 
> <attribute name="fork" default="${javac.fork}" />
> 
> <!-- these defaults can only be overridden explicitly by a task -->
> 
> <attribute name="encoding" default="ISO-2022-JP" />
> 
> <attribute name="includeAndRunTime" default="no" />
> 
> <attribute name="failonerror" default="false" />
> 
> <!-- this element sucks up all elements when the macro is used -->
> 
> <element name="javac-elements" implicit="yes" />
> 
> <!-- the macro body -->
> 
> <sequential>
> 
> <javac srcdir="@{srcdir}"
> 
> excludes="@{excludes}"
> 
> destdir="@{destdir}" compiler="@{compiler}"
> 
> debug="@{debug}"
> 
> optimize="@{optimize}"
> 
> deprecation="@{deprecation}"
> 
> fork="@{fork}"
> 
> encoding="@{encoding}" failonerror="@{failonerror}">
> 
> </javac>
> 
> </sequential>
> 
> </macrodef>
> 
> <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc"
> 
> classpathref="lib.path"/>
> 
> <target name="compile-tellurium" depends="init">
> 
> <echo message="Compiling java..." />
> 
> <groovyc srcdir="${dir.source.tellurium}"
> 
> destdir="${dir.build.tellurium}">
> 
> <classpath refid="lib.path" />
> 
> <!--javac source="1.5" target="1.5" debug="on" /-->
> 
> </groovyc>
> 
> <javac srcdir="${dir.source.tellurium}"
> 
> destdir="${dir.build.tellurium}">
> 
> <classpath refid="tellurium.classpath" />
> 
> </javac>
> 
> </target>
> 
> <target name="compile-test" depends="clean, compile-tellurium">
> 
> <echo message="Compiling test.." />
> 
> <groovyc srcdir="${dir.source.test}" destdir="${dir.build.test}">
> 
> <classpath refid="tellurium.classpath" />
> 
> <include name="**" />
> 
> </groovyc>
> 
> <javac srcdir="${dir.source.test}"
> 
> destdir="${dir.build.test}">
> 
> <classpath refid="test.classpath" />
> 
> </javac>
> 
> </target>
> 
> <target name="run-single-test" depends="compile-test">
> 
> <junit printsummary="yes" errorProperty="test.failed"
> 
> failureProperty="test.failed">
> 
> <classpath refid="project.classpath" />
> 
> <test name="com.ibi.idp.test" haltonfailure="yes" outfile="result">
> 
> <formatter type="xml" />
> 
> </test>
> 
> </junit>
> 
> <junitreport todir=".">
> 
> <fileset dir=".">
> 
> <include name="result.xml" />
> 
> </fileset>
> 
> <report format="frames" todir="./report/" />
> 
> </junitreport>
> 
> </target>
> 
> <target name="run-unit-tests" depends="compile-test">
> 
> <junit fork="yes" forkmode="once" maxmemory="1024m"
> 
> printsummary="yes"
> 
> failureProperty="test.failed">
> 
> <classpath refid="project.classpath" />
> 
> <classpath refid="test.classpath" />
> 
> <formatter type="brief" usefile="false" />
> 
> <formatter type="xml" />
> 
> <batchtest todir="${dir.build.test}">
> 
> <fileset dir="${dir.source}">
> 
> <include name="**/"/>
> 
>  </fileset>
> 
> </batchtest>
> 
> </junit>
> 
> <!--
> 
> <fail if="test.failed" >
> 
> </fail>
> 
> -->
> 
> <junitreport todir=".">
> 
> <fileset dir="C:\workspace\Current\out\test">
> 
> <include name="TEST-*.xml" />
> 
> </fileset>
> 
> <report format="frames" todir="./report/html" />
> 
> </junitreport>
> 
> </target>
> 
> </project>
> 
> *ERROR:This is the error thrown. In 41'st line the japanese 
> character ... It not supporting it*
> 
> [*groovyc*] Compiling 4 source files to 
> C:\workspace\Current\out\production
> 
> [*groovyc*] 
> *org.codehaus.groovy.control.MultipleCompilationErrorsException*:
> startup failed:
> 
> [*groovyc*]
> C:\workspace\Current\src\com\Login\test\a\loginpage\Login_Page
_002_Groovy.groovy:
> 41: unexpected char: '\' @ line 41, column 146.
> 
> [*groovyc*] ݍ  ܂ꂽ   ׂẴf [ ^ v   t @ C    \     ܂  B
> 
> [*groovyc*] ^
> 
> [groovyc]
> 
> [*groovyc*] 1 error
> 
> BUILD FAILED
> *
> 
> C:\workspace\Current\build.xml:119: Compilation Failed
> 
> Help me
> 
> 
> 
> Regards,
> 
> Hari
> 
> 
> 
> 
> 
> 
> *
> 
Mime
View raw message