Sunday, August 3, 2008

My Attempt at Bulding Mule 1.4.x

I thought I'd take a crack at building the Mule source, which uses Maven for its builds:
$ svn export
$ cd mule-1.4.x
$ mvn validate
I was first presented with the following error:
1) org.apache.maven.wagon:wagon-webdav:jar:RELEASE
Added the Mule repositories:
<name>MuleForge Repository</name>
<name>Mule Dependencies Repository</name>
<!-- For the Abdera dependencies -->
<name>Apache Incubating Repository</name>
Now the version issue for wagon-webdav was resolved. From the mvn validate output:
    WAGON_VERSION: 1.0-beta-2
My next problem was that I did an export and not a checkout:
[INFO] Updating project files from SCM: skipped.
Provider message:
The svn command failed.
Command output:
svn: '.' is not a working copy

[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Cannot get the revision information from the scm repository :
So I replaced my export with a checkout:
$ svn co .
Now a Java version problem:
[WARNING] Rule 1: org.apache.maven.plugin.enforcer.RequireJavaVersion failed with message: Detected JDK Version: 1.6.0
is not in the allowed range [1.4.2,1.5.0).
As I only have Java 6 on my machine:
$ java -version
java version "1.6.0"
OpenJDK Runtime Environment (build 1.6.0-b09)
OpenJDK Server VM (build 1.6.0-b09, mixed mode)
I changed the configuration of the enforcer plugin to allow up to Java 1.6.0:
<!-- minimum version is 1.4.2, Java 5 and higher not allowed -->
<!-- <version>[1.4.2,1.5.0)</version> -->
The Build Guide lists I could of skipped the enforcer with:
$ mvn -DskipEnforcer=true
After running:
$ mvn test
I got a lot farther, but the amount of test errors are kind of scary:
Tests run: 131, Failures: 10, Errors: 46, Skipped: 0
A common error was a found in the output files in tests/functional/target/surefire-reports was:
Failed to parse configuration resource
I was able to read the file with Groovy's XmlSlurper just fine:
#!/usr/bin/env groovy
file = new File(args[0])
def xml = new groovy.util.XmlSlurper().parse(file)
println xml
I tried the build with skipping the tests:
$ mvn -DskipTests package
But I got a compilation error. Maybe someday I'll take the time to figure out whats going wrong. I was still able to generate some Eclipse project files though:
$ mvn eclipse:eclipse
So I can still take a good look at the source, which is good enough.

No comments:

Post a Comment