Return-Path: X-Original-To: apmail-maven-users-archive@www.apache.org Delivered-To: apmail-maven-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9E35BC9B9 for ; Fri, 28 Nov 2014 18:48:58 +0000 (UTC) Received: (qmail 44214 invoked by uid 500); 28 Nov 2014 18:48:57 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 44126 invoked by uid 500); 28 Nov 2014 18:48:57 -0000 Mailing-List: contact users-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Maven Users List" Reply-To: "Maven Users List" Delivered-To: mailing list users@maven.apache.org Received: (qmail 44113 invoked by uid 99); 28 Nov 2014 18:48:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Nov 2014 18:48:56 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of prvs=1409167490=Alejandro.Endo@grassvalley.com designates 12.161.118.90 as permitted sender) Received: from [12.161.118.90] (HELO mx1.belden.com) (12.161.118.90) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Nov 2014 18:48:31 +0000 X-AuditID: 0a01015a-b7f628e000000d19-0f-5478c341b410 Received: from bdcnotes1.belden.com ( [10.1.1.71]) by mx1.belden.com (Service Ready) with SMTP id 20.9B.03353.143C8745; Fri, 28 Nov 2014 13:47:29 -0500 (EST) In-Reply-To: References: To: "Maven Users List" MIME-Version: 1.0 Subject: Re: release plugin issue X-KeepSent: 05371067:12DEC643-85257D9E:00651CBF; type=4; name=$KeepSent X-Mailer: Lotus Notes Release 8.5.3FP2 SHF99 September 04, 2012 From: Alejandro.Endo@grassvalley.com Message-ID: Date: Fri, 28 Nov 2014 13:47:29 -0500 X-MIMETrack: Serialize by Router on BDCNotes1/BeldenCDT(Release 9.0.1FP2|August 03, 2014) at 11/28/2014 01:47:30 PM, Serialize complete at 11/28/2014 01:47:30 PM Content-Type: multipart/alternative; boundary="=_alternative 0067398485257D9E_=" X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrHIsWRmVeSWpSXmKPExsXCxcjorut4uCLE4NANBYtHW68zOjB6tD8V CmCMamC0SUosKQvOTM/Tt7NJzMvLL0ksSVVISS1OtlVySs1JSc1TcMksTs5JzMxNLdL1DPbX tbAwtVRSyEyxVTJSUijISUxOzU3NK7FVSiwoSM1LUbLjUsAANkBlmXkKqXnJ+SmZeem2SqEh broWSnYunsHOCa2sGacW/mUvOJNW8XftROYGxrchXYycHBICJhIPVjxlhLDFJC7cW8/WxcjF ISQwn1HizvbtbCAJToFAibet39khEqcYJZ72nWcFSYgI6EssO3ifBcTmFRCUODnzCZgtLKAo cfzqclaIqZ4St3Zfh7LtJb4/+gBWwyagIjHt7x1GiN4gid8XLoLFWQRUJdoXvmMFWSYhsIxR 4vjd/WAJZoEAicenNzNNYOSfhWTfLCQpCFtH4sSqY8wQtrbEois/2Rcwsqxi5MutMNRLAge2 XnJ+7iZGSJxF7WB82qJwiFGAg1GJh5fHrCJEiDWxrLgy9xCjBAezkghv40agEG9KYmVValF+ fFFpTmrxIcYgoDsnMktxJ+cDU0BeSbyxgQGRHCVx3lOXckKEBNKBSSA7NbUgtQhmKBMHJ8hS LimRYmAcpxYllpZkxIMSTnwxMOVINTCu+rqj6V12cr2be0uW2GzjEk0V6zdX1hy1PvtkZbdn ile6rB8nB19JzGOHzkPJDBe9PJgXH3/71lG9snNx4aJawyTbvKsPj3bYc7zhzQh6d21qbaXS ZLsPCme6cmctDFCe9fPctGLONx1B/LOv7L/gL8M6sWzp7lsaB9TCNqhP+8QW2GBY+V+JpTgj 0VCLuag4EQBBFXDOAQMAAA== X-Virus-Checked: Checked by ClamAV on apache.org --=_alternative 0067398485257D9E_= Content-Type: text/plain; charset="US-ASCII" But the problem has nothing to do with Jenkins You can manually type mvn release:prepare release:perform -DdryRun=true and it will pass and then dryRun=false and it will fail My point is about the default behaviour of a dry run not being realistic compared to a full release, which will make you miss problems that WILL fail the real release. And to make matters worse, if a real release fails, it leaves the repo in disarray. IMO it should really clean up to the same state as it was when the release was started. If this is not possible because you cannot easily revert changes in a SCM (or in other words, you cannot do the WHOLE release as a transaction) then at least there should be a realistic, non-persistent check for those operations that will give you a high degree of certainty that a real release will succeed. That's what a dry run is supposed to do. It will never be 100% sure (example, what if while deploying the release artifact the internet connection drops. This can't be checked by a successful dryRun) but it should be as real as possible, and right now the dryRun is so much simpler than the real release that it becomes meaningless. There are so many steps in a release (which is what makes this plugin so necessary) that there's many opportunities for failures: unstable dependencies, unstable parents, artifacts not being SNAPSHOTs, missing SCM tags (which are needed everywhere since SCM inheritance doesn't work well with git), errors in javadoc (that only since recently started failing the build), no write access in SCM repo, tag already existing in SCM repo, artifacts already existing in remote maven repo (i.e. accidental redeploys). All these I have actually encountered in real life in an enterprise setting. And i'm not saying all these are not detected by a default dryRun, some of them are. I just wanted to make the point that releasing has many potential failure points Alejandro Endo | Software Designer/Concepteur de logiciels From: Stephen Connolly To: Maven Users List , Date: 2014-11-28 12:52 PM Subject: Re: release plugin issue Ohhhh wait a sec.... you're using the evil job type... http://javaadventure.blogspot.ie/2013/11/jenkins-maven-job-type-considered-evil.html Well all bets are off then.... that will most likely royally screw you over On 28 November 2014 at 17:45, Robert Scholte wrote: > Op Fri, 28 Nov 2014 00:54:29 +0100 schreef >: > > > I'm using the release-plugin v2.5.1 and I'm often encountering two >> recurring stories with failed releases >> >> 1) Now the release can fail due to errors in the javadoc. This is not a >> problem, the problem is that IF there are problems in the javadoc the >> release doesn't complete but the two commits and the tag has been done so >> after fixing the javadoc I need to reset the git repo to right before the >> failed released AND I have to remove the tag to try again. I am releasing >> from jenkins so the resume flag is set to false. if something fails we >> start from the beginning, which makes sense in a build server IMO. My >> suggestion here would be to generate all those artifacts (javadoc and >> source) before committing and tagging the code, that way if they fail, the >> repo is not in an invalid state. Another option would be improvement #2 >> >> 2) Very often the dryRun succeeds but the real release fails, to the point >> where the dryRun is meaningless. This defeats the whole purpose of a >> dry-run. The problem is that the dry run is over simplified. For example, >> again, if there are javadoc problems they won't be spotted because the >> dry-run doesn't run javadoc generation. Anything that's part of the real >> build should be run on the dry-run except for things that make persistent >> changes. Another problem I encounter often is that the real release fails >> because the tag already exists in SCM (leftover from a previous failed >> release). This should also be validated by the dryRun. If a real release >> can fail because a tag is already present then the dry run should fail if >> the tag is already present >> >> What do you guys think? If these points are considered valid I will open a >> ticket at least for the second one, which is the worse of the two >> >> > It's also possible to do a dryrun for the release:perform since version > 2.3 [1] > That's still not the default of the jenkins m2-release-plugin, but it > works. > > Robert > > [1] https://jira.codehaus.org/browse/MRELEASE-736 > > >> Alejandro Endo | Software Designer/Concepteur de logiciels >> >> >> DISCLAIMER: >> Privileged and/or Confidential information may be contained in this >> message. If you are not the addressee of this message, you may not >> copy, use or deliver this message to anyone. In such event, you >> should destroy the message and kindly notify the sender by reply >> e-mail. It is understood that opinions or conclusions that do not >> relate to the official business of the company are neither given >> nor endorsed by the company. >> Thank You. >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org > For additional commands, e-mail: users-help@maven.apache.org > > DISCLAIMER: Privileged and/or Confidential information may be contained in this message. If you are not the addressee of this message, you may not copy, use or deliver this message to anyone. In such event, you should destroy the message and kindly notify the sender by reply e-mail. It is understood that opinions or conclusions that do not relate to the official business of the company are neither given nor endorsed by the company. Thank You. --=_alternative 0067398485257D9E_=--