Hi,

I am using ant's apply task to execute a system command.  It looks like
the following:

<apply executable="ojspc" failonerror="True">
<arg line="-srcdir jspjava" />
<arg value="-noCompile" />
<arg line="-appRoot /home/rsu/prototype" />
<fileset dir="testjsp">

</fileset>
</apply>

The build failed without giving me a specific error message.  It just
told me that:

  [apply] Current OS is SunOS
    [apply] ojspc -srcdir jspjava -noCompile -appRoot
/home/rsu/prototype
    [apply] Executing ojspc -srcdir jspjava -noCompile -appRoot
/home/rsu/prototype /home/rsu/prototype/testjsp/silly.jsp

BUILD FAILED

/home/rsu/prototype/buildjsp.xml:19: apply returned: -1
        at
org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java,
Compiled Code)
        at
org.apache.tools.ant.taskdefs.ExecuteOn.runExec(ExecuteOn.java, Compiled
Code)
        at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java,
Compiled Code)
        at org.apache.tools.ant.Task.perform(Task.java, Compiled Code)
        at org.apache.tools.ant.Target.execute(Target.java, Compiled
Code)
        at org.apache.tools.ant.Target.performTasks(Target.java,
Compiled Code)
        at org.apache.tools.ant.Project.executeTarget(Project.java,
Compiled Code)
        at org.apache.tools.ant.Project.executeTargets(Project.java,
Compiled Code)
        at org.apache.tools.ant.Main.runBuild(Main.java, Compiled Code)
        at org.apache.tools.ant.Main.start(Main.java, Compiled Code)
        at org.apache.tools.ant.Main.main(Main.java, Compiled Code)

Then I copied and pasted the ant generated command  after [apply]
executing
ojspc -srcdir jspjava -noCompile -appRoot /home/rsu/prototype
/home/rsu/prototype/testjsp/silly.jsp
and ran it at the command line and it succeeded.

I don't know what could be troubling ant in executing this command,
since the command itself is ok to run.  Does anyone have an idea?
Thanks a lot for your help!

Zhendi Su

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to