[p4] Exiting 1 wont work with pre-trigger

Travis Morris tmorris at discoverysoftware.com
Sat Dec 8 15:52:52 PST 2001

I'm trying setup a pre-trigger which uses Ant to build all my java
classes before submitting to the baseline. Basically I have a home
directory on the server mapped to my client machine thus allowing me to
build the client workspace before submitting.

I created a batch file which sets up the environment variables, and
calls Ant, which uses a BuildListener. Its setup so if the build fails
it performs the following:



System.out.println("Your changelist failed.");



I dont see why its still submitting the changelist even though I'm
exiting with non zero.

Does it make a difference that its not the actual batch file returning
the non zero, and its actually a build monitor being called by Ant?

Essentially this is my setup:



Build_CMAutomation //depot/... d:/buildscripts/build.bat


The only reason I'm using this batch file is because Perforce wont find
the environment variables unless I set the right before I call the
command.. I have no clue why.


set PATH=d:\buildscripts;d:\ant\bin

set JAVA_HOME=c:\jbuilder5\jdk1.3

ant.bat -listener BuildMonitor -f build.xml -quiet 


Thanks for any help you can provide.

More information about the perforce-user mailing list