So I just found the older thread (from last month) where Costin explained that there is, indeed, a transition going on in the build process. My only suggestion is that someone should put a BUILD_README.txt in the main directory that explicitly points users to the projects/build-common directory for details on the process. Given that the transition seems to be taking a while, it would be good for it to be documented in the CVS that most people will be using right now. Since other build files at that level work (at least builddocs.xml does), there's nothing to indicate that people should be going elsewhere to build the actual JAR files.
In my case, I did try to build jcr from its own directory, and I got compilation errors because of a missing dependency (more on this in a sec). I took the missing dependencies to mean my environment wasn't configured for invoking ant directly in the projects/jcr/ directory, and that the environment must be auto configured by the build.xml in the root springmodules directory.
Now, about the errors I'm getting in my build process:
Code:
[javac] symbol : variable Status
[javac] location: class org.springmodules.jcr.jackrabbit.support.JackRabbitUserTransaction
[javac] status = Status.STATUS_MARKED_ROLLBACK;
[javac] symbol : class SystemException
[javac] location: class org.springmodules.jcr.jackrabbit.support.JackRabbitUserTransaction
[javac] throw new SystemException("Unable to rollback transaction: " + "XA_ERR=" + e.errorCode);
[javac] symbol : class RollbackException
[javac] location: class org.springmodules.jcr.jackrabbit.support.JackRabbitUserTransaction
[javac] public void commit() throws IllegalStateException, RollbackException, SecurityException, SystemException {
[javac] symbol : class NotSupportedException
[javac] location: class org.springmodules.jcr.jackrabbit.support.JackRabbitUserTransaction
[javac] public void begin() throws NotSupportedException, SystemException {
[javac] symbol : class UserTransaction
[javac] location: package javax.transaction
[javac] import javax.transaction.UserTransaction;
So it seems the javax.transaction package isn't to be found, except that its included in Geronimo - a registered JCR dependency. But, its only registered at test time, not at build time. Since whatever app server the code is deployed to should have the J2EE packages, I ended up fixing it by creating a second dependency in the projects/jcr/ivy.xml file:
Code:
<dependency org="apache" name="geronimo-spec" rev="1.0.1B-rc4" conf="buildtime->default">
<artifact name="geronimo-spec-jta" type="jar"/>
</dependency>
I put it right next to the existing geronimo dependency and everything built and tested just fine. I'll submit a report and patch to JIRA.