I managed to checkout to the working directory, but 2 problems:
1) ClearCase does not want to checkout to an already existing directory, so in the checkout command, I first delete the directory to checkout to. It is then re-created by ClearCase. This seems to work fine in my test, so I think this is ok.
2) pom.xml is not in the root, so the build fails with:
Could not find the model file 'C:\Program Files\Apache Software Foundation\continuum-1.0.1\bin\win32\..\..\apps\continuum\working-directory\32\pom.xml'
That is normal since it is in "...working-directory\32\my_vob\modules\mymodule". ClearCase re-creates the vob structure and everything in between up to where the module actually is. What I have been thinking is creating a temperary snapshot view and then copy everything from that temp location to "working-directory\32". Problem is that I don't know where pom.xml is in that structure, so I don't know how to that.
Other solution is that the user updates the build definition to point to the location of the pom, but I tried that and it does not work. Continuum does not seem to take that into account. Is that a known bug?
regards,
Wim
2005/12/1, Emmanuel Venisse <[EMAIL PROTECTED]>:
I talk about file parsing in ${user.home}/.scm/
Wim Deblauwe a écrit :
>
>
> 2005/12/1, Emmanuel Venisse <[EMAIL PROTECTED]
> <mailto: [EMAIL PROTECTED]>>:
>
> Remove all maven-scm libs from ${continuum}/apps/continuum/lib and
> put in it all new maven-scm libs.
>
> What do you use for scm file parsing?
>
> Emmanuel
>
>
> Euh.. just stringtokenizer, like this:
>
> public class ClearCaseScmProviderRepository
> extends ScmProviderRepository
> {
> private String viewName;
> private File configSpec;
>
> /**
> *
> * @param url format is [view_name]:[url_to_configspec] or
> [view_name]|[url_to_configspec]
> */
> public ClearCaseScmProviderRepository( String url )
> throws ScmRepositoryException
> {
> try
> {
> System.out.println( "url = "" + url );
> parseUrl( url );
> }
> catch ( MalformedURLException e )
> {
> throw new ScmRepositoryException( "Illegal URL: " + url +
> "(" + e.getMessage() + ")" );
> }
> catch ( URISyntaxException e )
> {
> throw new ScmRepositoryException( "Illegal URL: " + url +
> "(" + e.getMessage() + ")" );
> }
> catch ( UnknownHostException e )
> {
> throw new ScmRepositoryException( "Illegal URL: " + url +
> "(" + e.getMessage() + ")" );
> }
> }
>
> private void parseUrl( String url )
> throws MalformedURLException, URISyntaxException,
> UnknownHostException
> {
> if( url.indexOf( '|' ) != -1 )
> {
> StringTokenizer tokenizer = new StringTokenizer( url, "|" );
> fillInProperties( tokenizer );
> }
> else
> {
> StringTokenizer tokenizer = new StringTokenizer( url, ":" );
> fillInProperties( tokenizer );
> }
> }
>
> private void fillInProperties( StringTokenizer tokenizer )
> throws UnknownHostException, URISyntaxException,
> MalformedURLException
> {
> if( tokenizer.countTokens() == 1 )
> {
> //No view name was given
> viewName = getDefaultViewName();
> String spec = tokenizer.nextToken();
> System.out.println( "spec = " + spec );
> configSpec = createConfigSpecFile( spec );
> }
> else
> {
> viewName = tokenizer.nextToken();
> System.out.println( "viewName = " + viewName );
> String pathname = tokenizer.nextToken();
> System.out.println( "pathname = " + pathname );
> configSpec = createConfigSpecFile( pathname );
> }
> }
>
> private File createConfigSpecFile( String spec )
> throws URISyntaxException, MalformedURLException
> {
> File result;
> if( spec.indexOf( ':' ) == -1 )
> {
> result = new File( spec );
> }
> else
> {
> result = new File( new URL( spec ).toURI() );
> }
> return result;
> }
>
> /**
> * Default: ${hostname}-{ user.name <http://user.name>}-${artifactId}
> * @return
> */
> private String getDefaultViewName()
> throws UnknownHostException
> {
> String username = System.getProperty( "user.name
> <http://user.name>", "nouser" );
> String hostname = getHostName();
> return username + "-" + hostname + "-maven";
> }
>
> private String getHostName()
> throws UnknownHostException
> {
> return InetAddress.getLocalHost().getHostName();
> }
>
> public String getViewName()
> {
> return viewName;
> }
>
> public File getConfigSpec()
> {
> return configSpec;
> }
> }
>