You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Thorsten Heit <th...@vkb.de> on 2015/12/17 12:31:02 UTC

Best practices: m-release-p and svn:externals

Hi,

I have a few Maven projects that use svn:externals to link to code and/or 
resources stored in different paths in our Subversion repository. 
Compiling, packaging, deploying etc, works fine; even creating releases 
with m-release-p (release:prepare && release:perform).

The svn:externals I'm actually using refer to files / folders in the 
trunk, not fixed versions. Example:

^/trunk/projectA/fileA fileA

Therefore, when you check out a tagged release created with m-release-p 
somewhere in the future, the checked out files could be different compared 
to the time the release was created. To prevent this, I'm actually 
manually changing the svn:externals definition in the tagged release to 
reference fixed versions of the desired files/folders after m-release-p is 
finished:

-r<rev> ^/trunk/projectA/fileA fileA


Is there a way to automate this?

According to the release notes of Subversion 1.9, there's a new option 
"--pin-externals" available for "svn copy". Is it possible to use that? If 
yes, how can I do this?
I've also found this plugin here: 
https://github.com/MartinMReed/maven-svn-plugin


What do you think?


Regards

Thorsten

Re: Best practices: m-release-p and svn:externals

Posted by Robert Scholte <rf...@apache.org>.
Op Thu, 17 Dec 2015 12:31:02 +0100 schreef Thorsten Heit  
<th...@vkb.de>:

> Hi,
>
> I have a few Maven projects that use svn:externals to link to code and/or
> resources stored in different paths in our Subversion repository.
> Compiling, packaging, deploying etc, works fine; even creating releases
> with m-release-p (release:prepare && release:perform).
>
> The svn:externals I'm actually using refer to files / folders in the
> trunk, not fixed versions. Example:
>
> ^/trunk/projectA/fileA fileA
>
> Therefore, when you check out a tagged release created with m-release-p
> somewhere in the future, the checked out files could be different  
> compared
> to the time the release was created. To prevent this, I'm actually
> manually changing the svn:externals definition in the tagged release to
> reference fixed versions of the desired files/folders after m-release-p  
> is
> finished:
>
> -r<rev> ^/trunk/projectA/fileA fileA
>
>
> Is there a way to automate this?
>
> According to the release notes of Subversion 1.9, there's a new option
> "--pin-externals" available for "svn copy". Is it possible to use that?  
> If
> yes, how can I do this?
> I've also found this plugin here:
> https://github.com/MartinMReed/maven-svn-plugin
>
>
> What do you think?
>
>
> Regards
>
> Thorsten

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Best practices: m-release-p and svn:externals

Posted by Thorsten Heit <th...@gmx.de>.
Hello Robert,

it's quite long ago that you answered my initial question, and I have been
pretty busy with my $DAYJOB, but I wanted to say thanks for the pointers you
gave.

Using these hints I finally figured out how to realize such a feature and
just added a quite simple patch to the Maven SCM plugin that allows to use
the "--pin-externals" option with a Subversion 1.9.x client:
https://issues.apache.org/jira/browse/MRELEASE-549


Regards

Thorsten



--
View this message in context: http://maven.40175.n5.nabble.com/Best-practices-m-release-p-and-svn-externals-tp5855187p5866324.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Best practices: m-release-p and svn:externals

Posted by Robert Scholte <rf...@apache.org>.
For the maven-release-plugin and maven-scm this is not possible.

I can give you a couple of links which you can look at to understand  
what's happening right now.
Keep in mind that if we want to add such feature, we need to think for all  
SCMs, and not just svn.
If there are more SCMs with an equivalent option (not sure if there is  
one), we should bundle them and think of the proper approach.

Here's where the commandline in constructed:
http://maven.apache.org/scm/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/xref/org/apache/maven/scm/provider/svn/svnexe/command/tag/SvnTagCommand.html

Here we probably need an extra field...
http://maven.apache.org/scm/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/xref/org/apache/maven/scm/provider/svn/svnexe/command/tag/SvnTagCommand.html

Here's where the information of the maven-release-plugin is passed through  
to the SCM Provider
http://maven.apache.org/components/maven-release/maven-release-manager/xref/org/apache/maven/shared/release/phase/ScmTagPhase.html

I've seen more request asking for svn externals, but there wasn't a really  
good way to implement this. Maybe with svn 1.9 there is.

thanks,
Robert

Op Thu, 17 Dec 2015 12:31:02 +0100 schreef Thorsten Heit  
<th...@vkb.de>:

> Hi,
>
> I have a few Maven projects that use svn:externals to link to code and/or
> resources stored in different paths in our Subversion repository.
> Compiling, packaging, deploying etc, works fine; even creating releases
> with m-release-p (release:prepare && release:perform).
>
> The svn:externals I'm actually using refer to files / folders in the
> trunk, not fixed versions. Example:
>
> ^/trunk/projectA/fileA fileA
>
> Therefore, when you check out a tagged release created with m-release-p
> somewhere in the future, the checked out files could be different  
> compared
> to the time the release was created. To prevent this, I'm actually
> manually changing the svn:externals definition in the tagged release to
> reference fixed versions of the desired files/folders after m-release-p  
> is
> finished:
>
> -r<rev> ^/trunk/projectA/fileA fileA
>
>
> Is there a way to automate this?
>
> According to the release notes of Subversion 1.9, there's a new option
> "--pin-externals" available for "svn copy". Is it possible to use that?  
> If
> yes, how can I do this?
> I've also found this plugin here:
> https://github.com/MartinMReed/maven-svn-plugin
>
>
> What do you think?
>
>
> Regards
>
> Thorsten

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org