0

With each new release I make the tags are included, which eventually leads to this structure:

...VersionExperimentation/tags/VersionExperimentation-0.0.7/tags/VersionExperimentation-0.0.6/tags/VersionExperimentation-0.0.5/tags/VersionExperimentation-0.0.4/tags/VersionExperimentation-0.0.3/tags/VersionExperimentation-0.0.2-beta/tags/VersionExperimentation-0.0.2-alpha/src/main/java

My POM looks like this:

    <scm>
    <developerConnection>scm:svn:https://[..root svn folder]/VersionExperimentation</developerConnection>
</scm>
<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-release-plugin</artifactId>
            <configuration>
                <tagBase>[..root svn folder]/VersionExperimentation/tags</tagBase>
            </configuration>
        </plugin>
    </plugins>
</build>

Obviously the tags should be in the root, not in VersionExperimentation folder, where the project is, which is defined in the developerConnection.

What is the best practice here? Should we have a project within some folder within the SVN root and tags in the same path, where the project folder is?

Like:

./projectFolder
./tagsFolder

where DeveloperConnection is going to point to projectFolder and configuration of release tagbase tag to the tagsFolder?

This would seem to follow the recommended repository layout by svn book, which can be found here

$ svn list file:///var/svn/single-project-repo
trunk/
branches/
tags/

If yes, what should we do, if we have projects, which, unfortunately store the project immediately in the root folder?

Should we create the folders, move the data to the right place and configure the pom appropriately, to store the tags in tags folder and to commit to the trunk/projectFolder?

Ev0oD
  • 1,395
  • 16
  • 33

1 Answers1

0

You should follow the best practices, cause they are not for nothing called best practice. I would suggest to have things like:

 repository-root
    +-- project1
    +-- project2
    +-- project3

On the root level in your repository you can insert supplemental folder to your project (organization stuff etc.) if you need but within every project i would recommend to follow the TTB structure of subversion which means having each project:

  +-- project1
       +--- trunk
       +--- tags
       +--- branchs

which in consequence will remove the need of configuration in Maven (Convention over configuration).

Apart from the above storing a single project in a single repository is not recommend cause in Subversion it is not neccesary in contradiction to Git where the things are running different. So in Subversion there is no problem at all storing hundreds or thousands of projects within a single Subversion repository...

On the other hand if you have a really good reason not to go with the defaults you should explain in detail why you need to go different paths.

khmarbaise
  • 92,914
  • 28
  • 189
  • 235
  • Hi, thanks for your answer. The decisions to make different svn repositories for different projects was not mine, I presume the reason for this decision done by responsible for it was because of code hiding. Only those who need to see the code can see it - they have limited access to just those repositories they work with. I do not think it is the best decision, but it was not mine. I like the way you proposed the structure. So just for the clarification - is it a good idea to just move the projects into the trunk folder and create the tag folder in the same folder, following this practice? – Ev0oD Oct 19 '14 at 12:07
  • To prevent others from seing something for this purposes permission exists. And moving to best practise. Yes. – khmarbaise Oct 19 '14 at 15:48