Piotr Kosiorowski a écrit :
Hello,
I was trying to setup a CI server for my project using maven2 &
Continuum with ClearCase on Unix. I think I made it work finally but
found some issues with it - especially with maven-scm-clearcase. So I
will try to describe my findings here. I might be wrong as I am not that
experienced with both maven2 and ClearCase.
1) Update fails in version 1.0.beta2 and in trunk because
update command uses changelog command without setting logger on it - so
changelog command fails with NullPointerException at the beggining of
execution in:
getLogger().debug( "executing changelog command..." );
The required change is in
ClearCaseUpdateCommand.java:
protected ChangeLogCommand getChangeLogCommand()
{
return new ClearCaseChangeLogCommand();
}
should be:
protected ChangeLogCommand getChangeLogCommand()
{
ClearCaseChangeLogCommand c= new ClearCaseChangeLogCommand();
c.setLogger(getLogger());
return c;
}
This change must be done in maven-scm-api and not in clearcase provider.
2) Checkout fails on Unix:
Lets assume it uses
/abc/def/1 as a working directory
First thing it does is it removes /abc/def/1 directory and than sets
working directory to
/abc/def/1/..
with:
command.setWorkingDirectory( new File(
workingDirectory,"..").getAbsolutePath() );
But because /abc/def/1 does not exists at this point command execution
fails (on Unix - I do not know how it works on Windows).
It should set it to
/abc/def
using
command.setWorkingDirectory( new File( workingDirectory, ".."
).getCanonicalPath() );
I'd prefer :
command.setWorkingDirectory( workingDirectory.getParentFile() );
This change is to be introduced in ClearCaseCheckOutCommand.java.
3) I do not run ClearCase LT but I do not want to use -vws parameter for
checkout command - my environment is configured to work without it and
in fact I cannot even find a way to make it work with this parameter
from command line. In my opinion the best approach would be not to use
default view storage if one is not present in configuration file, but
skip -vws parameter in command line construction in this case. If
someone wants -vws parameter to be passed he should specify it in
config file.
I don't use Clearcase, so i don't know what is the msot common usage (-vws or not) but we use it
actually as default. I think it will be better for users to keep it ads default and add the
availability in conf file to don't use it.
Wim, Dan, any thoughts?
I have some other minor issues but these ones are difficult to workaround.
post them.
Emmanuel