Hi Sagara,

If you want to use features of Maven Release Plugin and automate the
process of producing Product milestone releases, correct method is to use
the approach 2. You should not fork any maven plugin in-house.

There are other organisations already following the same mechanism [5].

[5].
http://docs.spring.io/spring-javaconfig/docs/1.0.0.M4/reference/html/ch01s07.html

Thanks and Regards,
Harshana
--
Harshana Eranga Martin
Senior Software Engineer
Asian Mobile Banking
Web: https://www.commbank.com.au/ <http://wso2.com>

ECF Committer: http://www.eclipse.org/ecf/
Blog: http://harshana05.blogspot.com
Profile: https://www.google.com/profiles/harshana05

On 9 March 2015 at 21:06, Sagara Gunathunga <[email protected]> wrote:

>
> We are about to release G-Reg 5.0.0 M3 pack but found an issue when
> releasing a milestone version.  Let me take G-Reg as an example, G-Reg
> 5.0.0-M3 version is depends on carbon-governance SNAPSHOT version  and that
> is a legitimate use as well ( As G-Reg 5.0.0-M3 version, we actually
> release some of the completed features of carbon-governance/carbon-registry
> repos.)  but Maven release plug-in does not support to release any project
> with SNAPSHOT dependencies [1] [4], so we have 2 options to solve this
> issue.
>
>
>
> *1. ) Modify Maven release plug-in to allow  SNAPSHOT dependencies.*
>
> Pros
> ---------
> - Fix is relatively straightforward, we just have to remove validation in
> code and allow  SNAPSHOT dependencies.
>
> - No change to release process.
>
>
> Cons
> ---------
> - We have to fork and maintain Maven release plug-in locally and will lose
> new changes from Apache.
>
> - If we consider G-Reg-5.0.0-M3 pack, technically it's a milestone version
> not a snapshot version so as a principle 'creation process of the pack'
> should be repeatable but if we allow SNAPSHOT dependencies inside product
> packs 'creation process of the pack' is not repeatable.  This is not
> something standard, if we decided to go with this approach at least we
> should not call them as milestone packs instead SNAPSHOT packs (like
> nightly builds)  e.g -   G-Reg-5.0.0-SNAPSHOT-08-03-15 pack etc.
>
>
>
>
>
>
> *2.) Instead of SNAPSHOT dependencies, first release own dependencies with
> M-'X'   (e.g  - carbon-governance-4.4.0-M1 ) and then use these released
> versions within the milestone product pack. *
>
> Example - G-Reg 5.0.0-M3 pack can have carbon-governance-4.4.0-M2 and
> carbon-registry-4.3.2-M5  but NOT carbon-identity-4.3.1-M2
>
> Pros
> ---------
> - Again relatively straightforward, we don't need to fork and maintain
> Maven release plug-in.
>
> - AFAIK adding post-fix to distinguish Milestone, Alpha, Beta versions is
> a standard practise [2] , [3] hence end users already aware not to use
> milestone versions in production.
>
>
> Cons
> ---------
> - There is a chance that other teams can use M-X packs in there milestone
> releases,  we need a proper governance and disciplines not to do that (e.g
> - carbon-governance-4.4.0-M1 should be only  use by G-Reg team within WSO2
> other than special permissions)
>
>
> WDYT ?
>
>
>
>
> [1] -
> http://maven.apache.org/maven-release/maven-release-plugin/examples/prepare-release.html
>
> [2] - Spring releases  -
> http://repo1.maven.org/maven2/org/springframework/spring-core/
>
> [3] - Hibernate releases -
> http://repo1.maven.org/maven2/org/hibernate/hibernate-search/
>
> [4] - When I tied for above, build was stopped with following error.
>
> [INFO]
> ------------------------------------------------------------------------
>
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-release-plugin:2.5.1:prepare (default-cli)
> on project carbon-governance: Can't release project due to non released
> dependencies :
>
> [ERROR]
> org.wso2.carbon.registry:org.wso2.carbon.registry.admin.api:jar:4.3.1-SNAPSHOT:compile
>
> [ERROR]
> org.wso2.carbon.registry:org.wso2.carbon.registry.common:jar:4.3.1-SNAPSHOT:compile
>
> [ERROR]
> org.wso2.carbon.registry:org.wso2.carbon.registry.extensions:jar:4.3.1-SNAPSHOT:compile
>
> [ERROR]
> org.wso2.carbon.registry:org.wso2.carbon.registry.indexing:jar:4.3.1-SNAPSHOT:compile
>
> [ERROR] in project 'WSO2 Carbon - Governance'
> (org.wso2.carbon.governance:org.wso2.carbon.governance.api:bundle:4.3.1-SNAPSHOT)
>
>
>
> Thanks !
> --
> Sagara Gunathunga
>
> Senior Technical Lead; WSO2, Inc.;  http://wso2.com
> V.P Apache Web Services;    http://ws.apache.org/
> Linkedin; http://www.linkedin.com/in/ssagara
> Blog ;  http://ssagara.blogspot.com
>
>
> _______________________________________________
> Architecture mailing list
> [email protected]
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to