[
https://issues.apache.org/jira/browse/SCM-288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17960915#comment-17960915
]
ASF GitHub Bot commented on SCM-288:
------------------------------------
jira-importer opened a new issue, #506:
URL: https://github.com/apache/maven-scm/issues/506
**[Arne
Degenring](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=arned)**
opened
**[SCM-288](https://issues.apache.org/jira/browse/SCM-288?redirect=false)** and
commented
As discussed on
http://www.nabble.com/Towards-full-ClearCase-integration-tf3433039.html
PROBLEM:
The ClearCase implementation of the checkout command for ClearCase creates a
ClearCase snapshot view. Such a snaphsot view is very similiar to a CVS or
Subversion checkout directory, but one major difference is the directory
structure. To make it clear, consider the following example:
Consider you have checked out the project MY_VOB/my/project to
d:\continuum-work\167:
- When working with CVS or SVN, you would find the POM file at
d:\continuum-work\167\pom.xml.
- With ClearCase, the location would be
d:\continuum-work\167\MY_VOB\my\project\pom.xml. This means that the directory
structure within the configuration management system, is repeated in every view
(checkout directory). AFAIK it is not possible to change this ClearCase
behaviour.
This leads to the following problems:
- After adding a project to Continuum, the build cannot be performed because
the POM file cannot be found. The build definition has to be changed manually,
so that the POM file location is e.g. "MY_VOB/my/project/pom.xml" instead of
"pom.xml".
- The maven-release-manager performs a clean checkout from a tag to the
target/checkout directory, and then runs the build in that checkout directory.
Same problem here, it would have to be run in e.g.
"target/checkout/MY_VOB/my/project" instead of just "target/checkout".
SOLUTION:
The solution is to add an attribute to CheckOutScmResult that contains the
path of the project directory relative to the checkout directory. By default,
and for most SCM providers, it is just "". But the ClearCaseCheckOutCommand
sets e.g. "MY_VOB/my/project" instead. (Notice that this is only be possible
with auto-generated config specs as introduced by SCM-287).
PATCH:
The attached maven-scm-patch.txt contains a patch to maven-scm-api,
maven-scm-provider-clearcase and the BootstrapMojo in maven-scm-plugin. I
tested it by trying scm:bootstrap for ClearCase (works now) and SVN (still
works).
After applying the patch, please deploy a new maven-scm snapshot version to
the Apache Snapshot repo as well.
Continuum and the maven-release-manager will have to be changed to pay
attention to this relative path attribute accordingly; I will try to submit
patches in the next days, at least for maven-release-manager. Should these
patches be part of this issue, or should separate issues be created for these
projects?
---
**Affects:** 1.0-rc1
**Attachments:**
-
[patch-maven-scm.txt](https://issues.apache.org/jira/secure/attachment/12718500/patch-maven-scm.txt)
(_7.98 kB_)
-
[patch-maven-scm-2.txt](https://issues.apache.org/jira/secure/attachment/12718646/patch-maven-scm-2.txt)
(_16.56 kB_)
**Issue Links:**
- [SCM-290](https://issues.apache.org/jira/browse/SCM-290) Improved
documentation for ClearCase SCM provider
- [CONTINUUM-1218](https://issues.apache.org/jira/browse/CONTINUUM-1218)
Automatically determine correct POM file location in Build Definition when
checking out from SCMs like ClearCase
- [MRELEASE-208](https://issues.apache.org/jira/browse/MRELEASE-208) Support
for ClearCase, and other SCMs that do checkout projects to subdirectories of
the checkout directory
- [CONTINUUM-1218](https://issues.apache.org/jira/browse/CONTINUUM-1218)
Automatically determine correct POM file location in Build Definition when
checking out from SCMs like ClearCase
(_**"is depended upon by"**_)
- [MRELEASE-208](https://issues.apache.org/jira/browse/MRELEASE-208) Support
for ClearCase, and other SCMs that do checkout projects to subdirectories of
the checkout directory
(_**"is depended upon by"**_)
> Improved support for SCM providers like ClearCase that do NOT check out
> directly into the check-out-dir but into sub-directories of the check-out-dir
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: SCM-288
> URL: https://issues.apache.org/jira/browse/SCM-288
> Project: Maven SCM (Moved to GitHub Issues)
> Issue Type: Improvement
> Components: maven-plugin, maven-scm-api, maven-scm-provider-clearcase
> Affects Versions: 1.0-rc1
> Reporter: Arne Degenring
> Assignee: Emmanuel Venisse
> Priority: Major
> Fix For: 1.0-rc1
>
> Attachments: patch-maven-scm-2.txt, patch-maven-scm.txt
>
>
> As discussed on
> http://www.nabble.com/Towards-full-ClearCase-integration-tf3433039.html
> PROBLEM:
> The ClearCase implementation of the checkout command for ClearCase creates a
> ClearCase snapshot view. Such a snaphsot view is very similiar to a CVS or
> Subversion checkout directory, but one major difference is the directory
> structure. To make it clear, consider the following example:
> Consider you have checked out the project MY_VOB/my/project to
> d:\continuum-work\167:
> - When working with CVS or SVN, you would find the POM file at
> d:\continuum-work\167\pom.xml.
> - With ClearCase, the location would be
> d:\continuum-work\167\MY_VOB\my\project\pom.xml. This means that the
> directory structure within the configuration management system, is repeated
> in every view (checkout directory). AFAIK it is not possible to change this
> ClearCase behaviour.
> This leads to the following problems:
> - After adding a project to Continuum, the build cannot be performed because
> the POM file cannot be found. The build definition has to be changed
> manually, so that the POM file location is e.g. "MY_VOB/my/project/pom.xml"
> instead of "pom.xml".
> - The maven-release-manager performs a clean checkout from a tag to the
> target/checkout directory, and then runs the build in that checkout
> directory. Same problem here, it would have to be run in e.g.
> "target/checkout/MY_VOB/my/project" instead of just "target/checkout".
> SOLUTION:
> The solution is to add an attribute to CheckOutScmResult that contains the
> path of the project directory relative to the checkout directory. By default,
> and for most SCM providers, it is just "". But the ClearCaseCheckOutCommand
> sets e.g. "MY_VOB/my/project" instead. (Notice that this is only be possible
> with auto-generated config specs as introduced by SCM-287).
> PATCH:
> The attached maven-scm-patch.txt contains a patch to maven-scm-api,
> maven-scm-provider-clearcase and the BootstrapMojo in maven-scm-plugin. I
> tested it by trying scm:bootstrap for ClearCase (works now) and SVN (still
> works).
> After applying the patch, please deploy a new maven-scm snapshot version to
> the Apache Snapshot repo as well.
> Continuum and the maven-release-manager will have to be changed to pay
> attention to this relative path attribute accordingly; I will try to submit
> patches in the next days, at least for maven-release-manager. Should these
> patches be part of this issue, or should separate issues be created for these
> projects?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)