Maven2 builder working dir problem
Jean-Philippe Shields <[email protected]>
| Newsgroups | gmane.comp.java.cruise-control.user |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I'm running cruisecontrol 2.8.2 on windows xp.
My problem is related to the way cruisecontol uses it's working dir with the
maven2 builder. I have many projets using maven2 builder but only one is
giving me problems. My maven project is set up as a pom parent having
multiple modules that are in different child folders. The child projects
have batch files (.bat) that uses relative directory structures to call a
parent batch file that sets up common variables (call
..\..\..\SetHomeProjectVar.bat).
parent_folder
--- general_variables.bat
--- pom.xml
--- child_folder_1
--- specific_variable.bat
--- pom.xml
The thing is it that it works fine if I execute maven (C:\parent_folder>mvn
test) from the parent pom directory from command line or from my Eclipse
projects. It works fine from my developper computer or cruisecontrol
computer both from command line.
But it does not work from CruiseControl. Tests fail giving me errors like
this one:
'..\..\..\SetHomeProjectVar.bat' n'est pas reconnu en tant que
commande interne<br/>ou externe, un programme ex‚cutable ou un fichier
de co
mmandes.<br/>Le chemin d'accès spécifié est introuvable.
It means that the call command has not found the relative batch file.
I've been able to reproduce the error on my computer with the
following command where I call maven from the root directory
specifying the pom file.
C:\>mvn -f"C:\parent_folder\pom.xml" test
So everything points out to CruiseControl not executing the maven pom
file from the directory where the pom file is located. I looked at the
source code from SourceForge of the Maven2Builder but it looks fine :
197 final File workingDir = filePomFile.getAbsoluteFile().getParentFile();
One other thing is that I've not been able to change the level logging
from CruiseControl to print the following debug statement from the
Maven2Builder.
198 LOG.debug("Working dir is : " + workingDir.toString());
Any input would be apprciated. Thanks.
Jean-Philippe Shields
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Cruisecontrol-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cruisecontrol-user