You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm-commits@maven.apache.org by ev...@apache.org on 2003/12/04 21:59:11 UTC
cvs commit: maven-scm/generic-scm-providers/clearcase/src/java/org/apache/maven/genericscm/provider/clearcase/repository ClearcaseRepository.java
evenisse 2003/12/04 12:59:11
Added: generic-scm-providers/clearcase .cvsignore
project.properties project.xml
generic-scm-providers/clearcase/src/java/org/apache/maven/genericscm/provider/clearcase/command
AbstractClearcaseCommand.java
generic-scm-providers/clearcase/src/java/org/apache/maven/genericscm/provider/clearcase/command/checkout
ClearcaseCheckOutCommand.java
generic-scm-providers/clearcase/src/java/org/apache/maven/genericscm/provider/clearcase/repository
ClearcaseRepository.java
Log:
Start of Clearcase provider
Revision Changes Path
1.1 maven-scm/generic-scm-providers/clearcase/.cvsignore
Index: .cvsignore
===================================================================
.project
maven.log
.classpath
target
1.1 maven-scm/generic-scm-providers/clearcase/project.properties
Index: project.properties
===================================================================
maven.junit.fork=true
1.1 maven-scm/generic-scm-providers/clearcase/project.xml
Index: project.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<project>
<pomVersion>3</pomVersion>
<name>Generic SCM API for clearcase</name>
<groupId>genericscm</groupId>
<id>genericscm-clearcase</id>
<artifactId>genericscm-clearcase</artifactId>
<currentVersion>1.0-beta1-SNAPSHOT</currentVersion>
<description>Generic SCM Tools - Clearcase</description>
<shortDescription>Generic SCM Tools - Clearcase</shortDescription>
<inceptionYear>2003</inceptionYear>
<package>org.apache.maven.genericscm</package>
<versions/>
<branches/>
<developers>
<developer>
<name>Emmanuel Venisse</name>
<id>evenisse</id>
<email>emmanuel@venisse.net</email>
<organization/>
<roles>
<role>Creator</role>
<role>Project Leader</role>
<role>Release Manager</role>
</roles>
</developer>
</developers>
<contributors/>
<dependencies>
<dependency>
<groupId>genericscm</groupId>
<artifactId>genericscm-api</artifactId>
<version>1.0-beta1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>regexp</groupId>
<artifactId>regexp</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/java</sourceDirectory>
<unitTestSourceDirectory>src/test</unitTestSourceDirectory>
<unitTest>
<includes>
<include>**/*Test.java</include>
</includes>
<resources>
<resource>
<directory>src/test-resources</directory>
<includes>
<include>**/*.*</include>
</includes>
</resource>
</resources>
</unitTest>
<resources>
<resource>
<directory>src/resources</directory>
<includes>
<include>**/*.*</include>
</includes>
</resource>
</resources>
</build>
</project>
1.1 maven-scm/generic-scm-providers/clearcase/src/java/org/apache/maven/genericscm/provider/clearcase/command/AbstractClearcaseCommand.java
Index: AbstractClearcaseCommand.java
===================================================================
package org.apache.maven.genericscm.provider.clearcase.command;
/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-userName documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Apache" and "Apache Software Foundation" and
* "Apache Maven" must not be used to endorse or promote products
* derived from this software without prior written permission. For
* written permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* "Apache Maven", nor may "Apache" appear in their name, without
* prior written permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
* ====================================================================
*/
import org.apache.maven.genericscm.ScmException;
import org.apache.maven.genericscm.command.AbstractCommand;
import org.apache.maven.genericscm.provider.clearcase.repository.ClearcaseRepository;
import org.apache.maven.genericscm.repository.Repository;
import org.apache.maven.genericscm.util.Commandline;
import org.apache.maven.genericscm.util.StreamConsumer;
/**
* @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
* @version $Id: AbstractClearcaseCommand.java,v 1.1 2003/12/04 20:59:11 evenisse Exp $
*/
public abstract class AbstractClearcaseCommand extends AbstractCommand
{
private ClearcaseRepository repository;
private String branchName;
private String tagName;
/* (non-Javadoc)
* @see org.apache.maven.genericscm.command.Command#setRepository(org.apache.maven.genericscm.repository.Repository)
*/
public void setRepository(Repository repository) throws ScmException
{
if (repository instanceof ClearcaseRepository)
{
this.repository = (ClearcaseRepository)repository;
}
else
{
throw new ScmException("Invalid repository format");
}
}
/* (non-Javadoc)
* @see org.apache.maven.genericscm.command.Command#getRepository()
*/
public Repository getRepository()
{
return repository;
}
/* (non-Javadoc)
* @see org.apache.maven.genericscm.command.Command#setBranch(java.lang.String)
*/
public void setBranch(String branchName)
{
this.branchName = branchName;
}
/* (non-Javadoc)
* @see org.apache.maven.genericscm.command.Command#getBranch()
*/
public String getBranch()
{
return branchName;
}
/* (non-Javadoc)
* @see org.apache.maven.genericscm.command.Command#setTag(java.lang.String)
*/
public void setTag(String tagName)
{
this.tagName = tagName;
}
/* (non-Javadoc)
* @see org.apache.maven.genericscm.command.Command#getTag()
*/
public String getTag()
{
return tagName;
}
}
1.1 maven-scm/generic-scm-providers/clearcase/src/java/org/apache/maven/genericscm/provider/clearcase/command/checkout/ClearcaseCheckOutCommand.java
Index: ClearcaseCheckOutCommand.java
===================================================================
package org.apache.maven.genericscm.provider.svn.command.checkout;
/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-userName documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Apache" and "Apache Software Foundation" and
* "Apache Maven" must not be used to endorse or promote products
* derived from this software without prior written permission. For
* written permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* "Apache Maven", nor may "Apache" appear in their name, without
* prior written permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
* ====================================================================
*/
import org.apache.maven.genericscm.ScmException;
import org.apache.maven.genericscm.command.checkout.CheckOutCommand;
import org.apache.maven.genericscm.provider.clearcase.command.AbstractClearcaseCommand;
import org.apache.maven.genericscm.provider.clearcase.repository.ClearcaseRepository;
import org.apache.maven.genericscm.util.Commandline;
/**
* @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
* @version $Id: ClearcaseCheckOutCommand.java,v 1.1 2003/12/04 20:59:11 evenisse Exp $
*/
public class ClearcaseCheckOutCommand
extends AbstractClearcaseCommand
implements CheckOutCommand
{
/* (non-Javadoc)
* @see org.apache.maven.genericscm.command.AbstractCommand#getCommandLine()
*/
public Commandline getCommandLine() throws ScmException
{
Commandline command = new Commandline();
command.setExecutable("cleartool");
command.createArgument().setValue("co");
if (getBranch() != null)
{
command.createArgument().setValue("-branch");
command.createArgument().setValue(getBranch());
}
return command;
}
/* (non-Javadoc)
* @see org.apache.maven.genericscm.command.Command#getName()
*/
public String getName() throws Exception
{
return NAME;
}
/* (non-Javadoc)
* @see org.apache.maven.genericscm.command.Command#getDisplayName()
*/
public String getDisplayName() throws Exception
{
return "Check out";
}
}
1.1 maven-scm/generic-scm-providers/clearcase/src/java/org/apache/maven/genericscm/provider/clearcase/repository/ClearcaseRepository.java
Index: ClearcaseRepository.java
===================================================================
package org.apache.maven.genericscm.provider.clearcase.repository;
/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-userName documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Apache" and "Apache Software Foundation" and
* "Apache Maven" must not be used to endorse or promote products
* derived from this software without prior written permission. For
* written permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* "Apache Maven", nor may "Apache" appear in their name, without
* prior written permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
* ====================================================================
*/
import org.apache.maven.genericscm.ScmException;
import org.apache.maven.genericscm.repository.AbstractRepository;
/**
* @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
* @version $Id: ClearcaseRepository.java,v 1.1 2003/12/04 20:59:11 evenisse Exp $
*/
public class ClearcaseRepository extends AbstractRepository
{
/* (non-Javadoc)
* @see org.apache.maven.genericscm.repository.Repository#parseConnection()
*/
public void parseConnection() throws ScmException
{
//Not used
}
/* (non-Javadoc)
* @see org.apache.maven.genericscm.repository.Repository#getPassword()
*/
public String getPassword()
{
//Not used
return null;
}
/* (non-Javadoc)
* @see org.apache.maven.genericscm.repository.Repository#setPassword(java.lang.String)
*/
public void setPassword(String password)
{
//Not used
}
}