ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hari <hari1...@gmail.com>
Subject Japaniese character not supporting in ANT
Date Wed, 08 Jun 2011 10:10:49 GMT
 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message