« Back

Setting up a Semantic Version Baseline for the Liferay build

General Blogs November 19, 2013 By Ray Augé Staff

As mentioned in a previous post, you may have noticed the reports that are spit out when doing portal builds in the last couple of weeks.

These reports show API changes based on a baseline API version which would have been established automatically the first time you built the portal after semver went in.

This is fine for getting a basic grasp of ongoing changes as I explained in that post.

However, in order to get a more concrete picture and be able to accuratly declare version changes we need to have a proper baseline.

Since 6.2.0 GA was recently released with the semantic versioning tools in place we have the first opportunity to set a concrete baseline; the 6.2.0-ga1 git tag.

Here are the steps needed to setup a baseline based on the official 6.2.0 release (windows users will have convert these commands to whateer will work on that platform).

1) Enter the root of the portal source tree

cd <portal_src_root>


2) Delete the current auto generated baseline repo

rm -rf .bnd


3) Checkout the 6.2.0-ga1 tag

git co -b 6.2.0-ga1 6.2.0-ga1


4) Rebuild the entire portal

ant all


5) Checkout master

git co master


6) Once again, rebuild the entire portal

ant all


The outcome of 6) should be lots of output for at least 2 of the portal jars; util-taglib.jarportal-service.jar.

Not all the output is bad news, but most of it shows that we have not properly declared API changes. Some even require more than a simple version increase. We may have to make descisons on the usage scenario of the specific API in order to reduce the magnitude of the change from a MAJOR/breaking change to a MINOR/compatible change. Of course there are some for which we won't be able to do that, and these are changes which cannot be backported to a maintenance branch.

Recaping the build settings you should be most interested in, if you notice the report output but hate that you have to scroll back through thousands of build lines (if your shell even gives them to you) then you may want to change the default from:

baseline.jar.report.level=diff

to

baseline.jar.report.level=persist

This setting persists the report output to files under <portal_src_root>/baseline-reports/*.

Now you can read the reports in your fav text editor or IDE.

In the next post we'll dig into specific changes found in the reports and how to address each scenario.

No comments yet. Be the first.