[cle-release-team] An interesting (bug?) : release problem

Matthew Jones matthew at longsight.com
Tue Jul 3 12:38:29 PDT 2012


So the Sakai release/build process is pretty bad. If you build it with a
populated repository you get unpredictable results. If you build it with an
empty repository it breaks. I'm not sure if this is a bug in maven or a bug
in Sakai at the moment.

The problem with this really is this:
https://jira.sakaiproject.org/browse/SAK-18921

Master has an import dependency on kernel so it requires kernel to be built
before it can work. So I decided to try to change the master parent to
kernel instead of sonatype so it would always build kernel first correctly
as part of the reactor order (it still needs to build from base)
https://jira.sakaiproject.org/browse/SAK-22353

So when you run "mvn clean install" on the base pom, it should see it has a
parent of master->has a parent of kernel and know it needs to build
everything.

It all seemed okay *except* when the build gets to the first tool that has
a kernel dependency, it wants the wrong kernel version!
http://nightly2.sakaiproject.org/logs/sakai-rel/build-2012-07-03-01:00:02.log.txt

1) org.sakaiproject.kernel:sakai-component-manager:jar:1.2-SNAPSHOT

This is defined in kernel pom's dependencyManagement with the
"${project.version}" variable. And 1.2-SNAPSHOT is the version of common

<dependency>
<groupId>org.sakaiproject.kernel</groupId>
<artifactId>sakai-component-manager</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.sakaiproject.kernel</groupId>
<artifactId>sakai-kernel-api</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.sakaiproject.kernel.component.api</groupId>
<artifactId>sakai-component-manager</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>

Somehow the version of the end child (common) is going all the way up to
chain to the parent, and it's using that rather than the 1.3-SNAPSHOT
defined in that pom. If I change this ${project.version} to be
"1.3-SNAPSHOT" (or as a property with a value of 1.3-SNAPSHOT) in these 3
places, the build works. If I revert SAK-18921 and put the parent of master
back to sonatype it works too. (It's able to figure out kernel needs to be
built first as it's a dependency for other projects, it just can't figure
it out as an import dependency).

Maven 3 is even worse, because it fails completely without the
relativePaths that were added in
https://jira.sakaiproject.org/browse/SAK-22321 .

So I don't know what's up with this ${project.version}. Maybe it's bugged
for multi module projects? I see a lot of random jiras. Same behavior in
Maven 3.0.4 and 2.2.1.

I'm thinking of just moving the

        <sakai.kernel.version>1.3.0-SNAPSHOT</sakai.kernel.version>

property into kernel, and using that? I don't know . . .
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/cle-release-team/attachments/20120703/1909a947/attachment-0006.html 


More information about the cle-release-team mailing list