[ 
http://jira.codehaus.org/browse/SCM-342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_107132
 ] 

Duncan Doyle commented on SCM-342:
----------------------------------

I'm currently developing a fix for this issue, however I need some more info 
about other SCM tools. I'm familiar with how CVS tagging works, but I need to 
know whether other SCM tools (SubVersion, ClearCase, etc.) have the same 
behaviour in order for my algorithm to work.

So my question is if all SCM tools tag recursively (e.g. like CVS,  tag the 
basedir all files in the directory tree which are under CVS control get tagged)?

The algorithm I have in mind works like this.
- Keep a static HashSet in the class which contains processed (tagged) base 
directories of the ScmFileSets.
- When a project executes a tag, check whether the basedir of its ScmFileSet is 
in the set of already processed basedirs. If it is present in the list, don't 
execute the tagging for this project. Otherwise continue.
- Check whether the basedir of the project's ScmFileSet is a subdirectory of an 
already processed basedir in the static HashSet. If it is a subdirectory, skip 
the tagging because it has already been tagged recursively by another project. 
Otherwise, continue.
- Execute the tagging on the project and add the ScmFileSet's basedir to the 
static HashSet.

Using this algorithm, the aggregator tag can be removed. If all SCM tools work 
like this, this algorithm will ensure correct tagging behaviour for boh 
standard - and flat project layouts.

> scm:tag should support flat project layout
> ------------------------------------------
>
>                 Key: SCM-342
>                 URL: http://jira.codehaus.org/browse/SCM-342
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-plugin
>    Affects Versions: 1.0
>         Environment: Windows XP, Eclipse 3.3
>            Reporter: Duncan Doyle
>
> I have a Maven2 Flat Project Layout as described here: 
> http://maven.apache.org/guides/mini/guide-ide-eclipse.html
> Basically my directory layout is as follows:
> /MavenRoot/pom.xml  (this is the SuperPom)
> /Module1/pom.xml
> /Module2/pom.xml
> /Module3/pom.xml
> Modules 1,2 and 3 are specified in the <modules> section of the SuperPom 
> (e.g() <module>../Module1</module>). Each POM contains its own CVS connection 
> URL.
> When I execute the scm:tag goal on the SuperPom in the MavenRoot project, 
> only the MavenRoot project gets tagged. The same behaviour can be seen with 
> the scm:update goal, which was fixed by providing a scm:update-subprojects 
> goal.
> I would like to see this behaviour fixed in the SCM plugin, while Maven2 
> advices a Flat Project Layout when working with Eclipse. At this moment I 
> can't use the tag goal at all (it should be executed automatically by 
> CruiseControl on a succesfull build).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to