Hi,

I have two issues. One is to schedule the build to occur once a week, instead of nightly. How do I do that?

Second, the goal set up for nightly-build in maven.xml is not creating the jar file, or running the send-report goal. . I think there is somethign wrong in the way I have set the "for" loop.

Can someone help me with this?  Here is my maven.xml:

<project default="nightly-build"
   xmlns:j="jelly:core"
   xmlns:u="jelly:util">

<!-- this will create a directory with the time of the build under target -->
   <preGoal name="nightly-build">
       <tstamp>
           <format property="build.date" pattern="yyyy.MM.dd/hh.mm.ss"/>
           <echo>BUILD DATE IS</echo>
<echo>"${build.date}"</echo> </tstamp> <j:set var="maven.build.dir" value="${basedir}/target/${build.date}"/>
   </preGoal>

   <goal name="compile">
       <echo>test</echo>
   </goal>
   <goal name="jar">
       <echo>BUILDING JARS NOW</echo>
   </goal>


   <goal name="nightly-build"
       description="Nightly Build">
       <echo>nightly-build</echo>
<!--Any ant task, or jelly tags can go here --> value="multiproject:goal,multiproject:clean,clean,clean-site,multiproject:site,site:deploy"
       />

<j:set var="goals" value="compile,test,site:generate,jar,send-report"/>
               <mkdir dir="${maven.build.dir}/${build.date}" />
<u:tokenize var="goals" delim=",">${goals}</u:tokenize>
           <j:forEach items="${goals}" var="goal" indexVar="goalNumber">
Now attaining goal number ${goalNumber}, which is ${goal}
           <attainGoal name="${goal}" />
           </j:forEach>
   </goal>

   <goal name="send-report">
       <echo>SENDING REPORTS VIA EMAIL</echo>
       <mail subject="Build Status on Mercury"
           mailhost="mail.xyz.com" mailport="25"
           encoding="plain">
           <from address="[EMAIL PROTECTED]" name="Nightly Build"/>
<to address="[EMAIL PROTECTED]" name="Developer" /> <message src="buildresults.log" />
           <fileset dir="c:\build\workspace\root">
           <include name="buildresults.log" />
</fileset> </mail>
   </goal>

</project>



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

Reply via email to