Sam
unread,Jun 29, 2012, 2:42:50 AM6/29/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to testng-users
Hi All,
I am not sure what is the issue but my ant build script is getting
failed with below error :
My classpath is huge and I assume it is getting failed because of that
but how to solve this?
From past 6 hours I was working on this but couldn't solve, can you
please help me out?
C:\CR\uibuild.xml:76: Process fork failed.
at org.testng.TestNGAntTask.executeAsForked(TestNGAntTask.java:824)
at org.testng.TestNGAntTask.execute(TestNGAntTask.java:521)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:
291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
....
....
Below is my Ant Build.xml
<project name="Build-Jenkins" default="run" basedir=".">
<import file="build.xml"/>
<property name="uibuild.dir" location="${basedir}/source/tests/build"/
>
<property name="uilib.dir" location="${basedir}/source/tests/lib"/>
<property name="uisrc.dir" location="${basedir}/source/tests/src"/>
<taskdef resource="testngtasks" classpath="./source/tests/lib/
testng-6.4.jar"/>
<target name="setClassPath">
<path id ="classpath_jars">
<pathelement path = "${basedir}/"/>
<fileset dir = "${uilib.dir}" includes = "*.jar"/>
<fileset dir="lib/j2ee">
<include name="*.jar"/>
</fileset>
<fileset dir="source/carrentals-web/WEB-INF/src/com/CR/">
<include name="**/*.java"/>
</fileset>
</path>
<pathconvert pathsep = ";" property="test.classpath"
refid="classpath_jars"/>
</target>
<target name = "uiinit">
<mkdir dir = "${uibuild.dir}" />
</target>
<target name = "uiclean">
<delete dir ="${uibuild.dir}"/>
</target>
<target name="uicompile" depends="uiclean, uiinit, setClassPath"
description="compile the source " >
<antcall target="compile" />
<echo message=" Now running Run target with Class Path: $
{test.classpath}:${build.dir}"/>
<javac srcdir="${uisrc.dir}" destdir="${uibuild.dir}" debug="true">
<classpath>
<fileset dir="${web.dir}/WEB-INF/lib">
<include name="*.jar"/>
</fileset>
<fileset dir="lib/j2ee">
<include name="*.jar"/>
</fileset>
<fileset dir = "${uilib.dir}" includes = "*.jar"/>
</classpath>
<include name="**/*.java"/>
</javac>
</target>
<target name="run" depends="uicompile"
description="run the testng xml file">
<testng classpath = "${test.classpath};${uibuild.dir}">
<xmlfileset dir="${basedir}/source/tests" includes = "testng.xml" /
>
</testng>
</target>
</project>