You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Rupali Desai <rt...@gmail.com> on 2005/11/01 19:58:36 UTC

SCM and build using Maven 1.0.2

Hello,
  I have writeen a maven script which has goals defined to do cvs checkout
and then goal to build and package . The
file looks as follows

<?xml version="1.0"?>
<project default="nightly-build"
xmlns:j="jelly:core"
xmlns:u="jelly:util"
xmlns:m="jelly:maven">


<property name="basedir" value="."/>
<property name="release" value="${basedir}/${maven.scm.cvs.module
}/release"/>
<property name="build" value="${basedir}/${maven.scm.cvs.module}/build"/>

<!-- Checkout the project , the tag is as specified in project.properties-->
<goal name="cvscheckout">
<ant target="cvscheckout"/>
</goal>

<!-- Compile, run test, check style , package, checkin the packaged
build, tag the commit-->
<goal name="buildandpackage">
<attainGoal name="war"/>
</goal>

 <goal name="nightlybuild">
<!-- Any ant task, or jelly tags can go here thanks to jeez -->
<j:set var="goals" value="cvscheckout,buildandpackage" />

<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>

</project>

 However when i run the script with task : maven nightlybuild. It checks out
the src code , but while running the task buildandpackage,

I see the following in the output

java:compile:
[echo] Compiling to Project1/build
[echo] No java source files to compile.

 It completes the task but does not compile the classes.

But if I run it a second time. It runs correctly, finding the classes and
compiles.

Can anyone help me figure out what the problem is.

 Thanks

Rupali