...
- A branch must be created from a release tag. Thus, if you want to create a branch from trunk you should
- make sure trunk builds
- create a release of trunk (it's ok to do nothing with that release... moves just needs the tag for a branch point)
- For each dependent component you must decide if you want to create a branch of that component.
- If the dependent component does not need to change (ie you are only changing code in your application), there is nothing to do.
- If you wish to use the trunk version of the dependent component, then change the version of the dependency in your application back to a range (ie <version>[0.0.0,999.999.999)</version>).
- If you wish to use a branch version of the dependent component, then complete these steps for the dependent component, and set up a BRANCH RANGE. (See "Branching Example" below for how to create a dependent branch range).
Branching example.
Let's suppose we have application example-web-app which has version 2.5.3 deployed to production. It depends on edu.mit.ist.es.common:sais-common:3.1.5 (the sais-common component version 3.1.5). Let's suppose it also depends on edu.mit.ist.es.components:example-component:1.2.3 (example-component version 1.2.3). A bug is found in production, and the trunk is not in a releasable state (perhaps we have a bunch of untested changes). We need a release as soon as possible. It is found that the bug fix requires changes to sais-common and example-web-app, but not to example-component.
(In trunk, example-web-app is at version 2.6.0-SNAPSHOT, sais-common is at 4.1.2-SNAPSHOT and example-component is at 1.2.4-SNAPSHOT).
The following will need to occur.
- Use moves to create a branch of example-web-app version 2.5.3. (This will become version 2.5.3b1-SNAPSHOT)
- Use moves to create a branch of sais-common component version 3.1.5. (This will become version 3.1.5b1-SNAPSHOT)
Wiki Markup Check out the example-web-app branch code (from \[example-web-app-svn-url]/branches/releases/2.5.3b1).
Wiki Markup Check out the sais-common branch code (from \[sais-common-svn-url]/branches/releases/3.1.5b1).
- edit the sais-common dependency in example-web-app's pom.xml, so that
Code Block lang xml title Range dependency example From: <dependency> <groupId>edu.mit.ist.es.common</groupId> <artifactId>sais-common</artifactId> <version>3.1.5</version> </dependency> To: <dependency> <groupId>edu.mit.ist.es.common</groupId> <artifactId>sais-common</artifactId> <version>[3.1.5b1, 3.1.5b999)</version> </dependency>
Your project should now build and deploy. Moreover, Moves will allow you to select a branch build after you commit all of your changes.
Screenshots
TODOSince the ranges have been removed from the branch,