Re: How to release a single module in a Mercurial repository?
hmm, looks good so far. The only thing I noticed is that the URL in the child module doesn't contain a trailing /: scm:hg:https://maven-scm-provider-hg-test.googlecode.com/hg vs scm:hg:https://maven-scm-provider-hg-test.googlecode.com/hg/ does this make any difference? (Shouldn't but I've seen code in maven-scm where it does...) LieGrue, strub --- On Sat, 3/5/11, Olivier Lamy ol...@apache.org wrote: From: Olivier Lamy ol...@apache.org Subject: Re: How to release a single module in a Mercurial repository? To: Maven Users List users@maven.apache.org Date: Saturday, March 5, 2011, 4:14 PM @Mark I have a project here [1], I use for testing maven scm stuff. I have started testing this and have reproduce but with a different error : [INFO] EXECUTING: /bin/sh -c cd /home/olamy/dev/test-projects/maven-scm-provider-hg-test/my-app hg commit --message '[maven-release-plugin] prepare release my-app-1.7' /home/olamy/dev/test-projects/maven-scm-provider-hg-test/my-app/pom.xml [INFO] EXECUTING: /bin/sh -c cd /home/olamy/dev/test-projects/maven-scm-provider-hg-test/my-app hg push https://maven-scm-provider-hg-test.googlecode.com/hg [ERROR] EXECUTION FAILED Execution of cmd : push failed with exit code: 255. Working directory was: /home/olamy/dev/test-projects/maven-scm-provider-hg-test/my-app Your Hg installation seems to be valid and complete. Hg version: 1.7.3 (OK) Weird because the cli looks correct. @Andreas I see you are using scm 1.4 dependency groupIdorg.apache.maven.scm/groupId artifactIdmaven-scm-provider-hg/artifactId version1.4/version /dependency Can you try with 1.5-SNAPSHOT ? -- Olivier Lamy http://twitter.com/olamy http://www.linkedin.com/in/olamy [1] http://code.google.com/p/maven-scm-provider-hg-test/ 2011/3/5 Mark Struberg strub...@yahoo.de: Andreas, it would be really fine if you could provide your sample project as a tar.gz or zip. Because in theory it should really also work with hg. The fix in MRELEASE-457 should just allow that. Btw, sometimes the default behaviour of the MavenModel scm section handling also adds some bad salt to the story: it currently _always_ automatically adds the child-modules name to the scm URL, which is ok for SVN and CVS but _VERY_ bad for git, hg and likes. Because in git, hg, etc the URL _doesn't_ change for the sub-module! So please before filling a Jira issue, please check if all your child modules contain a copy of the scm section of the parent pom. Just copy it over to the child pom please! @Olivier, I think we should finally fix this ugly stuff asap. The probleme here is that the MavenModel per definition doen't know anything about the SCM provider (because that gets defined by the MavenMode) and the scm provider doesn't yet know anything about the Maven Model it is contained in. Also, the scm URL is not only used by the various maven-scm-providers but also by reporting etc... So this could be tricky. I thought about a configurable 'ScmUrlRules#FIXED, SUBMODULES' which can be configured via a RegExp in maven settings which gets applied to the scm URL. Or any other kind of pulling this info out of the model vs scm-provider context. LieGrue, strub --- On Fri, 3/4/11, Olivier Lamy ol...@apache.org wrote: From: Olivier Lamy ol...@apache.org Subject: Re: How to release a single module in a Mercurial repository? To: Andreas Ebbert-Karroum andreas.ebbert-karr...@codecentric.de Cc: Maven Users List users@maven.apache.org Date: Friday, March 4, 2011, 4:53 PM Please use hg scm provider component Thanks ! -- Olivier Lamy http://twitter.com/olamy http://www.linkedin.com/in/olamy 2011/3/4 Andreas Ebbert-Karroum andreas.ebbert-karr...@codecentric.de: Hi Olivier, I can gladly do so. Do you want me to report that for the maven-release-plugin, or is that an issue with the hg scm provider? Andreas 2011/3/4 Olivier Lamy ol...@apache.org Hello, Perso, I have tested MRELEASE-457 with git and svn. So it look to need some hack to work with the hg scm provider. Can you load a jira issue I will have a look ? Thanks ! -- Olivier Lamy http://twitter.com/olamy http://www.linkedin.com/in/olamy 2011/3/3 Andreas Ebbert-Karroum andreas.ebbert-karr...@codecentric.de: Hi, I still stand by my claim that the story of releasing a single module in a hg multi-module repository is currently not possible. Now you might say, that this is against conventions, and you should always release the whole repository, but usage of of maven and mercurial differs, and after all it's convention over configuration and not convention or not at all. In this E-Mail I will prove to you that this is not possible, if you will follow me through the following steps. If at any point I missed an
[maven enforcer plugin] maven enforcer plugin - plugin using = version #
Using maven enforcer plugin, how can I ensure that all projects are using a a plugin version = than the one I defined? For example, I want to ensure all the projects in the company (we use a company super pom) use maven release plugin = 2.1 version In the company super pom we are using pluginManagement section. However, child projects can always override this value and I need to trace which project has overriden this value. (crossposted from http://stackoverflow.com/questions/5208051/maven-enforcer-plugin-plugin-using-version ) Thanks, Josh
Re: How to release a single module in a Mercurial repository?
Hi Oliverm 2011/3/5 Olivier Lamy ol...@apache.org @Andreas I see you are using scm 1.4 dependency groupIdorg.apache.maven.scm/groupId artifactIdmaven-scm-provider-hg/artifactId version1.4/version /dependency Can you try with 1.5-SNAPSHOT ? Yes, I am using the 1.4 release, because the 1.5-Snapshot gave an error message, that it cannot tag subdirectories of the repository. Quote from the E-Mail: The new dependencies with the snapshot release plugin also updates to a newer hg scm provider. The new hg scm provider has the interesting new habit to throw an exception, when you want to tag something, which does not concern the whole repository. Caused by: org.apache.maven.scm.ScmException: This provider doesn't support tagging subsets of a directory at org.apache.maven.scm.provider.hg.command.tag.HgTagCommand.executeTagCommand(HgTagCommand.java:77) at org.apache.maven.scm.command.tag.AbstractTagCommand.executeCommand(AbstractTagCommand.java:81) at org.apache.maven.scm.command.AbstractCommand.execute(AbstractCommand.java:59) ... 29 more -- Mit freundlichen Grüßen / Best regards Andreas Ebbert-Karroum | Bereichsleiter der Agilen Software Factory codecentric AG | Merscheider Straße 1 | 42699 Solingen | Deutschland tel: +49 (0) 212.23362825 | fax: +49 (0) 212.23362879 | mobil: +49 (0) 175.2664109 www.codecentric.de | blog.codecentric.de | www.meettheexperts.de | www.more4fi.de Sitz der Gesellschaft: Düsseldorf | HRB 63043 Vorstand: Klaus Jäger (Vorsitzender) | Mirko Novakovic . Rainer Vehns Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Bernd Klinkmann . Jürgen Schütz Diese E-Mail einschließlich evtl. beigefügter Dateien enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und löschen Sie diese E-Mail und evtl. beigefügter Dateien umgehend. Das unerlaubte Kopieren, Nutzen oder Öffnen evtl. beigefügter Dateien sowie die unbefugte Weitergabe dieser E-Mail ist nicht gestattet.
Re: How to release a single module in a Mercurial repository?
Hi, I've attached my hg repository that I used for testing to the above mentioned jira issue. As I have written in my email, the *only* way I could make the release plugin work for releasing a submodule was to copy the scm information into each an every module. While this may work, and with your explaination I understand the technical legacy of that behaviour, this is unintentional and unmaintainable. Fixing this sounds like a very good idea :) If I can support you in any way, let me know. How do you normally trigger the release build for a submodule? 1) from the root of the repository: mvn -f submodule/pom.xml 2) from a parent project (either in root or any other directory): mvn -pl submodule 3) from the submodule itself: mvn Andreas 2011/3/5 Mark Struberg strub...@yahoo.de Andreas, it would be really fine if you could provide your sample project as a tar.gz or zip. Because in theory it should really also work with hg. The fix in MRELEASE-457 should just allow that. Btw, sometimes the default behaviour of the MavenModel scm section handling also adds some bad salt to the story: it currently _always_ automatically adds the child-modules name to the scm URL, which is ok for SVN and CVS but _VERY_ bad for git, hg and likes. Because in git, hg, etc the URL _doesn't_ change for the sub-module! So please before filling a Jira issue, please check if all your child modules contain a copy of the scm section of the parent pom. Just copy it over to the child pom please! @Olivier, I think we should finally fix this ugly stuff asap. The probleme here is that the MavenModel per definition doen't know anything about the SCM provider (because that gets defined by the MavenMode) and the scm provider doesn't yet know anything about the Maven Model it is contained in. Also, the scm URL is not only used by the various maven-scm-providers but also by reporting etc... So this could be tricky. I thought about a configurable 'ScmUrlRules#FIXED, SUBMODULES' which can be configured via a RegExp in maven settings which gets applied to the scm URL. Or any other kind of pulling this info out of the model vs scm-provider context. LieGrue, strub --- On Fri, 3/4/11, Olivier Lamy ol...@apache.org wrote: From: Olivier Lamy ol...@apache.org Subject: Re: How to release a single module in a Mercurial repository? To: Andreas Ebbert-Karroum andreas.ebbert-karr...@codecentric.de Cc: Maven Users List users@maven.apache.org Date: Friday, March 4, 2011, 4:53 PM Please use hg scm provider component Thanks ! -- Olivier Lamy http://twitter.com/olamy http://www.linkedin.com/in/olamy 2011/3/4 Andreas Ebbert-Karroum andreas.ebbert-karr...@codecentric.de: Hi Olivier, I can gladly do so. Do you want me to report that for the maven-release-plugin, or is that an issue with the hg scm provider? Andreas 2011/3/4 Olivier Lamy ol...@apache.org Hello, Perso, I have tested MRELEASE-457 with git and svn. So it look to need some hack to work with the hg scm provider. Can you load a jira issue I will have a look ? Thanks ! -- Olivier Lamy http://twitter.com/olamy http://www.linkedin.com/in/olamy 2011/3/3 Andreas Ebbert-Karroum andreas.ebbert-karr...@codecentric.de: Hi, I still stand by my claim that the story of releasing a single module in a hg multi-module repository is currently not possible. Now you might say, that this is against conventions, and you should always release the whole repository, but usage of of maven and mercurial differs, and after all it's convention over configuration and not convention or not at all. In this E-Mail I will prove to you that this is not possible, if you will follow me through the following steps. If at any point I missed an option I would like you to raise your voice :) *Step 1* So, I started with a very simple multi-module project (/pom.xml and /multi/pom.xml) and tried to release just a single module (multi). It turned out that this is not possible, because during the release:perform phase, the whole hg repository is checked out, and the build is started in the root of that repository. = Use the latest maven-release-plugin:2.2-SNAPSHOT in which MRELEASE-457http://jira.codehaus.org/browse/MRELEASE-457is fixed. *Step 2* The new dependencies with the snapshot release plugin also updates to a newer hg scm provider. The new hg scm provider has the interesting new habit to throw an exception, when you want to tag something, which does not concern the whole repository. Caused by: org.apache.maven.scm.ScmException: This provider doesn't support tagging subsets of a directory at
Re: How to release a single module in a Mercurial repository?
hmm, I think we should remove this Exception. tagging a subdirectory is again only valid in very special SCMs, mainly SVN (don't remember how this did behave in CVS anymore). Usually a tag is a 'name' on a certain snapshot in the whole repo. Tagging a repo will just give you this unique snapshot over the repo, regardless of the submodule you are currently in. That's a well known behaviour lots of SCMs and most people who are using those SCMs should certainly be aware of it. LieGrue, strub --- On Sun, 3/6/11, Andreas Ebbert-Karroum andreas.ebbert-karr...@codecentric.de wrote: From: Andreas Ebbert-Karroum andreas.ebbert-karr...@codecentric.de Subject: Re: How to release a single module in a Mercurial repository? To: Maven Users List users@maven.apache.org Cc: Olivier Lamy ol...@apache.org Date: Sunday, March 6, 2011, 8:15 PM Hi Oliverm 2011/3/5 Olivier Lamy ol...@apache.org @Andreas I see you are using scm 1.4 dependency groupIdorg.apache.maven.scm/groupId artifactIdmaven-scm-provider-hg/artifactId version1.4/version /dependency Can you try with 1.5-SNAPSHOT ? Yes, I am using the 1.4 release, because the 1.5-Snapshot gave an error message, that it cannot tag subdirectories of the repository. Quote from the E-Mail: The new dependencies with the snapshot release plugin also updates to a newer hg scm provider. The new hg scm provider has the interesting new habit to throw an exception, when you want to tag something, which does not concern the whole repository. Caused by: org.apache.maven.scm.ScmException: This provider doesn't support tagging subsets of a directory at org.apache.maven.scm.provider.hg.command.tag.HgTagCommand.executeTagCommand(HgTagCommand.java:77) at org.apache.maven.scm.command.tag.AbstractTagCommand.executeCommand(AbstractTagCommand.java:81) at org.apache.maven.scm.command.AbstractCommand.execute(AbstractCommand.java:59) ... 29 more -- Mit freundlichen Grüßen / Best regards Andreas Ebbert-Karroum | Bereichsleiter der Agilen Software Factory codecentric AG | Merscheider Straße 1 | 42699 Solingen | Deutschland tel: +49 (0) 212.23362825 | fax: +49 (0) 212.23362879 | mobil: +49 (0) 175.2664109 www.codecentric.de | blog.codecentric.de | www.meettheexperts.de | www.more4fi.de Sitz der Gesellschaft: Düsseldorf | HRB 63043 Vorstand: Klaus Jäger (Vorsitzender) | Mirko Novakovic . Rainer Vehns Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Bernd Klinkmann . Jürgen Schütz Diese E-Mail einschließlich evtl. beigefügter Dateien enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und löschen Sie diese E-Mail und evtl. beigefügter Dateien umgehend. Das unerlaubte Kopieren, Nutzen oder Öffnen evtl. beigefügter Dateien sowie die unbefugte Weitergabe dieser E-Mail ist nicht gestattet. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: How to release a single module in a Mercurial repository?
What about perforce or clearcase ? -Original Message- From: Mark Struberg [mailto:strub...@yahoo.de] Sent: Sunday, March 06, 2011 4:40 PM To: Maven Users List Subject: Re: How to release a single module in a Mercurial repository? hmm, I think we should remove this Exception. tagging a subdirectory is again only valid in very special SCMs, mainly SVN (don't remember how this did behave in CVS anymore). Usually a tag is a 'name' on a certain snapshot in the whole repo. Tagging a repo will just give you this unique snapshot over the repo, regardless of the submodule you are currently in. That's a well known behaviour lots of SCMs and most people who are using those SCMs should certainly be aware of it. LieGrue, strub --- On Sun, 3/6/11, Andreas Ebbert-Karroum andreas.ebbert-karr...@codecentric.de wrote: From: Andreas Ebbert-Karroum andreas.ebbert-karr...@codecentric.de Subject: Re: How to release a single module in a Mercurial repository? To: Maven Users List users@maven.apache.org Cc: Olivier Lamy ol...@apache.org Date: Sunday, March 6, 2011, 8:15 PM Hi Oliverm 2011/3/5 Olivier Lamy ol...@apache.org @Andreas I see you are using scm 1.4 dependency groupIdorg.apache.maven.scm/groupId artifactIdmaven-scm-provider-hg/artifactId version1.4/version /dependency Can you try with 1.5-SNAPSHOT ? Yes, I am using the 1.4 release, because the 1.5-Snapshot gave an error message, that it cannot tag subdirectories of the repository. Quote from the E-Mail: The new dependencies with the snapshot release plugin also updates to a newer hg scm provider. The new hg scm provider has the interesting new habit to throw an exception, when you want to tag something, which does not concern the whole repository. Caused by: org.apache.maven.scm.ScmException: This provider doesn't support tagging subsets of a directory at org.apache.maven.scm.provider.hg.command.tag.HgTagCommand.executeTagCommand(HgTagCommand.java:77) at org.apache.maven.scm.command.tag.AbstractTagCommand.executeCommand(AbstractTagCommand.java:81) at org.apache.maven.scm.command.AbstractCommand.execute(AbstractCommand.java:59) ... 29 more -- Mit freundlichen Grüßen / Best regards Andreas Ebbert-Karroum | Bereichsleiter der Agilen Software Factory codecentric AG | Merscheider Straße 1 | 42699 Solingen | Deutschland tel: +49 (0) 212.23362825 | fax: +49 (0) 212.23362879 | mobil: +49 (0) 175.2664109 www.codecentric.de | blog.codecentric.de | www.meettheexperts.de | www.more4fi.de Sitz der Gesellschaft: Düsseldorf | HRB 63043 Vorstand: Klaus Jäger (Vorsitzender) | Mirko Novakovic . Rainer Vehns Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Bernd Klinkmann . Jürgen Schütz Diese E-Mail einschließlich evtl. beigefügter Dateien enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und löschen Sie diese E-Mail und evtl. beigefügter Dateien umgehend. Das unerlaubte Kopieren, Nutzen oder Öffnen evtl. beigefügter Dateien sowie die unbefugte Weitergabe dieser E-Mail ist nicht gestattet. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org