Chris: I just had the same problem earlier today outside of CRON.
Try executing the command from within the directory that contains the POM.

# set up some environment vars to make things more readable
. /home/maven/metalink3/setupVars.sh

HERE=`pwd`
cd  /Location/of/the/POM
${M2_HOME}/bin/mvn site:site
cd $HERE
#

/Shud werk.

Mike
/
Sommers, Elizabeth wrote:
You might do better using a good CI tool like Vulcan.  I am not saying you 
can't do this with cron, but there are tools around that do just this.
http://code.google.com/p/vulcan/

Liz Sommers
[EMAIL PROTECTED]


-----Original Message-----
From: Chris Russell [mailto:[EMAIL PROTECTED]
Sent: Friday, July 20, 2007 2:30 PM
To: Maven Users List
Subject: Running Maven commands with CRON


Hello,

I'm trying to run the following script with CRON:
# set up some environment vars to make things more readable
. /home/maven/metalink3/setupVars.sh

/u02/webapps/orihttp/apache/maven-2.0.4/bin/mvn site:site

This runs fine when I run it from the command line. But when CRON runs it I get:
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'site'.
[INFO] ----------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO]    task-segment: [site:site]
[INFO] ---------------------------------------------------------------------------- [INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------ [INFO] Cannot execute mojo: site. It requires a project with an existing pom.xml, but the build is not using one.

It seems when running from CRON Maven can't find the pom file.

Is there a way to specify the location of the top level pom via that command line?

Thanks in advance,
Chris


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


Reply via email to