I thought I'd take a crack at building the
Mule source, which uses
Maven for its builds:
$ svn export http://svn.codehaus.org/mule/branches/mule-1.4.x
$ cd mule-1.4.x
$ mvn validate
I was first presented with the following error:
Missing:
----------
1) org.apache.maven.wagon:wagon-webdav:jar:RELEASE
Added the
Mule repositories:
<repository>
<id>muleforge</id>
<url>http://repository.muleforge.org</url>
<name>MuleForge Repository</name>
</repository>
<repository>
<id>mule.dependencies</id>
<url>http://dist.codehaus.org/mule/dependencies/maven2/</url>
<name>Mule Dependencies Repository</name>
</repository>
<!-- For the Abdera dependencies -->
<repository>
<id>apache-incubating</id>
<name>Apache Incubating Repository</name>
<url>http://people.apache.org/repo/m2-incubating-repository/</url>
</repository>
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] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Cannot get the revision information from the scm repository :
Error!
So I replaced my export with a checkout:
$ svn co http://svn.codehaus.org/mule/branches/mule-1.4.x .
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:
<requireJavaVersion>
<!-- minimum version is 1.4.2, Java 5 and higher not allowed -->
<!-- <version>[1.4.2,1.5.0)</version> -->
<version>[1.4.2,1.6.0]</version>
</requireJavaVersion>
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:
org.mule.test.config.MuleClasspathConfigBuilderTestCase.txt:org.mule.config.ConfigurationException:
Failed to parse configuration resource
"file:/home/prystasj/workspace/mule-1.4.x/tests/functional/target/test-classes/test-xml-mule-config.xml"
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