You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ace.apache.org by "Marcel Offermans (JIRA)" <ji...@apache.org> on 2014/03/27 17:23:16 UTC

[jira] [Commented] (ACE-429) Upgrade the build to Bndtools 2.2.2

    [ https://issues.apache.org/jira/browse/ACE-429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13949516#comment-13949516 ] 

Marcel Offermans commented on ACE-429:
--------------------------------------

Over the last couple of days I have worked on this.

First of all, I created a branch of our 1.0.0 release and retrofitted the right annotations to our APIs so we can create a set of bundles to baseline against. I also upgraded that branch to use Bndtools 2.2.2. The work was done in: https://svn.apache.org/repos/asf/ace/branches/1.0.0-semanticversion/

Next, I copied all artifacts from that branch to the "Release" repository of trunk, and enabled baselining support.

Furthermore, I had to do a number of things to make it work:

1. Standardise on a specific version of ECJ (the eclipse compiler). I chose the one from Kepler SR2, which is the latest release. I also added an ant task to extract ECJ from Eclipse in case we want to upgrade. You need to run that task (install-ecj) from within Eclipse and ensure you allow Ant to run in the same process as Eclipse so it can access the internals it needs. It will complain if you do it wrong. :)

2. Standardise on Java 7. Since that is currently the lowest supported Java release, I see no problem moving to it, but if anybody does, let us know. >From testing different Java versions it seems baselining is relatively immune to Java versions (we've even tried running it on Java 8 and that worked).

3. Configure at least Java 7 in the Eclipse workspace, and in the Java / Compiler preferences tab turn off "Preserve unused (never read) local variables" to ensure that ECJ produces the same bytecode inside and outside of Eclipse.

Feel free to test if this setup works for you. I would suggest you try using a fresh checkout and workspace. I have had quite a few issues with settings that persisted from old workspaces that were hard to track down and change (producing some false positives in terms of baselining).

> Upgrade the build to Bndtools 2.2.2
> -----------------------------------
>
>                 Key: ACE-429
>                 URL: https://issues.apache.org/jira/browse/ACE-429
>             Project: ACE
>          Issue Type: Improvement
>            Reporter: Marcel Offermans
>            Assignee: Marcel Offermans
>
> As discussed on the mailing list, we want to upgrade to Bndtools 2.2.2 and enable support for baselining. Baselining will give us a lot of tool support to ensure our code (bundles and exported packages) is semantically versioned. To leverage baselining support there are a couple of things we need to do:
> * We need the to start putting @ProviderType and @ConsumerType annotations on all our APIs. In fact, we need to “retrofit” this to our 1.0.0 release to ensure the baselining works correctly. These annotations are not magically available, but we can add them to the global build path (cnf/ext/defaults.bnd).
> * We need to keep a copy of all released bundles (the latest version of each) in a repository to baseline against. Because we don’t want our build to break when we’re off-line I propose we put them in a local repository. We probably need to build those artifacts with the Eclipse compiler to prevent problems that will otherwise occur because of differences between ecj and javac so: checkout with Eclipse, build, collect all bundles from "generated" folders and publish them into the releaserepo in cnf. We also want to add them to the -deps artifact so people can easily get started with a release with baselining enabled.



--
This message was sent by Atlassian JIRA
(v6.2#6252)