Thanks Dan! That worked. But since I need to specify multiple goals in
maven.xml, including running the nightly-build, is there a way this can
be incorporated into maven.xml itself?
Savitha
dan tran wrote:
here is a sample for bat file
set LOG=target\build.snapshot.x86.txt
set LOG_JAVA=target/build.snapshot.x86.txt
call maven your-main-goal >%LOG% 2>&1
if %ERRORLEVEL% NEQ 0 goto failed
goto end
:failed
call maven your-sendmail-goal -Dsendmail.attachment=%LOG_JAVA%
:end
On 5/30/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
I am not sure how to use a shell script in maven. Is there any code
sample I can look at to implement this?
Thanks!
Savitha
dan tran <[EMAIL PROTECTED]> wrote:
You need to wrap your maven works in a shell script:
1. get the script to call your main goal and redirect both stdout
and stderror
to a file.
2 the same script will then invoke the send report goal with the
location of the log
-D
On 5/28/05, Savitha Rajiv <[EMAIL PROTECTED]> wrote:
Hi,
I need to be able to notify via email, the status of the build. Did
it fail or succeed. I know how to email a file, but dont know how to
trap the build information into a file. Please help.
Here is the maven.xml for emailing file...
<project default="send-report"
xmlns:j="jelly:core"
xmlns:u="jelly:util"
xmlns:ant="jelly:ant"
xmlns:maven="jelly:maven">
<goal name="send-report">
<echo>SENDING REPORTS VIA EMAIL</echo>
<mail subject="nightly-build on Mercury finished"
mailhost="mail.wiziotec.com" mailport="25"
encoding="plain">
<from address="[EMAIL PROTECTED]" name="Build Info group"/>
<to address="[EMAIL PROTECTED]" name="Savitha Rajiv" />
<!-- Right now I have created a dummy log file to send via email -->
<message src="maven-nightly-build.log" />
<fileset dir="c:\wiziotec\workspace\root">
<include name="maven-nightly-build.log" />
</fileset>
</mail>
</goal>
Thanks!
---------------------------------
Do You Yahoo!?
Yahoo! Small Business - Try our new Resources site!
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]