You can use the Maven Release plug-in to package and release your Developer Studio projects. As a practice, at the development stage of the project, it is the SNAPSHOT version of the artifacts that is used. This is similar to the next major/minor version to be released. For example, if the next planned release version is 1.1.0, it is 1.1.0-SNAPSHOT that is used for versioning in the development stage.
Follow the steps below to deploy WSO2 artifacts to a nexus repository:
Warning |
---|
Make sure you are using WSO2 Developer Studio 3.7.1 or upwards. |
In the
pom.xml
file, configure the SCM configuration. For example,Code Block language xml <scm> <connection>scm:svn:https://svn.wso2.com/wso2/interns/2013/vijithae/release/trunk</connection> <developerConnection>scm:svn:https://svn.wso2.com/wso2/interns/2013/vijithae/release/trunk</developerConnection> <url>https://svn.wso2.com/wso2/interns/2013/vijithae/release/trunk</url> </scm>
Point to the nexus repository of the project. For example,
Code Block language xml <distributionManagement> <repository> <id>deployment</id> <name>Internal Releases</name> <url>http://localhost:8081/nexus/content/repositories/releases/</url> </repository> <snapshotRepository> <id>deployment</id> <name>Internal Snapshot Releases</name> <url>http://localhost:8081/nexus/content/repositories/snapshots/</url> </snapshotRepository> </distributionManagement>
Configure with the
wso2-release-helper-plugin
and tag base. For example,Code Block language xml <plugin> <artifactId>maven-release-plugin</artifactId> <version>2.5</version> <configuration> <preparationGoals> org.wso2.maven:wso2-release-helper-plugin:1.0.0-SNAPSHOT:prepare-release </preparationGoals> <completionGoals> org.wso2.maven:wso2-release-helper-plugin:1.0.0-SNAPSHOT:prepare-snapshots </completionGoals> <tagBase>https://svn.wso2.com/wso2/interns/2013/vijithae/release/tags</tagBase> </configuration> </plugin>
Info Note that the
wso2-release-pre-prepare-plugin
is now deprecated since the plug-in only supported svn and provided no support for rollbacks, dryRun mode etc.- Execute the
mvn release:prepare
command inside the Maven Multi Module project. Give appropriate values for release, development, and tag versions when prompted. - Execute the
mvn release:perform
command inside the Maven Multi Module project.
For complete information on the Maven Release plug-in, see the Maven Release Plugin page on the Apache website. For complete information on the WSO2 Release Helper plug-in, see Using WSO2 Release Helper Plug-In.