[mule-user] How to build Mule 2.0 RC 2

0 views
Skip to first unread message

jamh

unread,
Jan 31, 2008, 5:11:08 PM1/31/08
to us...@mule.codehaus.org

I have looked hard at all the posts, all the mule documentation, etc... Is
there a document that describes the steps to build this under eclipse?

And yes I have seen the usual links.

This is what I've done so far:

+ Set up an eclipse that has all the pluggins.

+ Downloaded the MULE 2.0 RC 2 distro

+ Unpacked the stuff under src

Ok, then what? Run "mvn eclipse:eclipse"? Where shall I run this from?
There is no *.pom anywhere in sight.

Any help is appreciated.
--
View this message in context: http://www.nabble.com/How-to-build-Mule-2.0-RC-2-tp15216040p15216040.html
Sent from the Mule - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Dirk Olmes

unread,
Feb 1, 2008, 4:26:43 AM2/1/08
to us...@mule.codehaus.org
jamh wrote:
> I have looked hard at all the posts, all the mule documentation, etc... Is
> there a document that describes the steps to build this under eclipse?
>
> And yes I have seen the usual links.
>
> This is what I've done so far:
>
> + Set up an eclipse that has all the pluggins.
>
> + Downloaded the MULE 2.0 RC 2 distro
>
> + Unpacked the stuff under src
>
> Ok, then what? Run "mvn eclipse:eclipse"? Where shall I run this from?
> There is no *.pom anywhere in sight.

I see ... we don't ship the POMs with the source in the distro, thus
you'll have a hard time compiling the source from the distro directly.
Then again, why would you do so? You can attach the source to the
individual libs from the distribution in Eclipse.

To compile from source I'd suggest checking out the proper source from
https://svn.codehaus.org/mule/tags/mule-2.0.0-RC2/ and building from
there - it has the proper POMs.

If you're adventurous, you could also write a script to extract the POMs
from the mule jar files in the distro...

-dirk

jamh

unread,
Feb 1, 2008, 2:28:44 PM2/1/08
to us...@mule.codehaus.org

Thank you for your reply.

The reason I wanted to do this is that I hit a brick wall trying to compile
my app for MULE 2.0 RC 2. This is what I did before:

+ Downloaded MULE 2.0 RC 2 distro.

+ Went to my directory, with the pom inspired by the examples/hello

+ Did an "mvn eclipse:eclipse", everything went well.

+ Did an "mvn" but got a "class file has wrong version 49.0, should be 48.0"

So I said, ok, maybe I can't do this with my j2sdk1.4.2_13, let's switch to
jdk1.5.0_07. After an "mvn clean", "mvn eclipse:eclipse" and "mvn". This
time it went ok, but when I tried to run it I got:
--> Wrapper Started as Console
Launching a JVM...
java.lang.UnsupportedClassVersionError: org/mule/modules/boot/MuleBootstrap
(Uns
upported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Exception in thread "main"

One last try I said, let's try the generic hello example. I got the exact
same behaviour as described above. My MULE_HOME is set to the correct
distro, and same with my java.

I'm assuming if I build everything myself this won't happen?? Am I the only
one with this problem?

Again, any light shed is appreciated. Thanks..


jamh wrote:
>
> I have looked hard at all the posts, all the mule documentation, etc...
> Is there a document that describes the steps to build this under eclipse?
>
> And yes I have seen the usual links.
>
> This is what I've done so far:
>
> + Set up an eclipse that has all the pluggins.
>
> + Downloaded the MULE 2.0 RC 2 distro
>
> + Unpacked the stuff under src
>
> Ok, then what? Run "mvn eclipse:eclipse"? Where shall I run this from?
> There is no *.pom anywhere in sight.
>
> Any help is appreciated.
>

--
View this message in context: http://www.nabble.com/How-to-build-Mule-2.0-RC-2-tp15216040p15231886.html

jamh

unread,
Feb 1, 2008, 3:02:21 PM2/1/08
to us...@mule.codehaus.org

AAAH!

Stupid oracle, added a java 1.4 path before others. Problem solved.

jamh wrote:
>
> I have looked hard at all the posts, all the mule documentation, etc...
> Is there a document that describes the steps to build this under eclipse?
>
> And yes I have seen the usual links.
>
> This is what I've done so far:
>
> + Set up an eclipse that has all the pluggins.
>
> + Downloaded the MULE 2.0 RC 2 distro
>
> + Unpacked the stuff under src
>
> Ok, then what? Run "mvn eclipse:eclipse"? Where shall I run this from?
> There is no *.pom anywhere in sight.
>
> Any help is appreciated.
>

--
View this message in context: http://www.nabble.com/How-to-build-Mule-2.0-RC-2-tp15216040p15232396.html

Dirk Olmes

unread,
Feb 4, 2008, 6:22:05 AM2/4/08
to us...@mule.codehaus.org
jamh wrote:
> Thank you for your reply.
>
> The reason I wanted to do this is that I hit a brick wall trying to compile
> my app for MULE 2.0 RC 2. This is what I did before:
>
> + Downloaded MULE 2.0 RC 2 distro.
>
> + Went to my directory, with the pom inspired by the examples/hello
>
> + Did an "mvn eclipse:eclipse", everything went well.
>
> + Did an "mvn" but got a "class file has wrong version 49.0, should be 48.0"

I just checked the release notes and noticed that they don't list JDK
1.5 as a prerequisite for using Mule 2.x. I think I'll better add this now.

The current Java source (compile) compatability policy is documented
here: http://mule.mulesource.org/display/MULECDEV/Building+from+Source

-dirk

jamh

unread,
Feb 4, 2008, 1:44:11 PM2/4/08
to us...@mule.codehaus.org

If 1.5 is a prerequisite for using Mule 2.x, perhaps you should remove all
those 1.4 targets in the pom?

--
View this message in context: http://www.nabble.com/How-to-build-Mule-2.0-RC-2-tp15216040p15273460.html


Sent from the Mule - User mailing list archive at Nabble.com.

Andrew Perepelytsya

unread,
Feb 4, 2008, 1:51:46 PM2/4/08
to us...@mule.codehaus.org
Well, it's not really a prerequisite. Most of the code runs with 1.4 and compiled with this target. Only few modules currently need Java 5. However, I think there's an error in Mule poms. If java5 profile is used, the compiler target would also be set to 1.5. As Travis wanted to release a full distribution, he ran it with this profile enabled. File a bug, and please, bare with this omission for RC ;)

Andrew

jamh

unread,
Feb 4, 2008, 2:51:45 PM2/4/08
to us...@mule.codehaus.org

Alright, I am full circle to the beginning.

Let me ask this general question then.

Is there a series of established steps that will take me from the mule
source to having an example running. I am looking for something like this:

1. Prerequisites: JDK 1.5, maven, source from svn://http... [ and not from
the source download since it's missing the poms], and more environmental
setups [ I still don't understand which third party jars are needed, or
where I need to put them ].

2. Run mvn eclipse:eclipse

3. Run mvn source:jar

4. Run mvn javadoc:jar

5. Run mvn install -D[ what exactly? ]

6. Go the examples directory and run hello.bat or whatever.

Where I am now is nowhere. I have downloaded the source from the
repository, and successfully ran mvn eclipse:eclipse. If I import into
eclipse, I have tons of errors. If I try mvn install, I get errors like
"package javax.xml.namespace does not exist". I tried copying the opt jars
from the mule 2.0 RC2 distro into a libs and pointing CLASSPATH to it, but
to no avail.

I know that RC2 is in beta, but I'm sure some of you have an environment
working with it. Can you enlighten us a bit?

--
View this message in context: http://www.nabble.com/How-to-build-Mule-2.0-RC-2-tp15216040p15276041.html

Andrew Perepelytsya

unread,
Feb 4, 2008, 3:31:58 PM2/4/08
to us...@mule.codehaus.org
Have you ever built a maven 2 project?

jamh

unread,
Feb 4, 2008, 4:26:27 PM2/4/08
to us...@mule.codehaus.org

Nothing beyond the "Maven in 5 minutes". I have created a simple maven 2
pom. Am I asking for too much?

Andrew Perepelytsya wrote:
>
> Have you ever built a maven 2 project?
>
>

--
View this message in context: http://www.nabble.com/How-to-build-Mule-2.0-RC-2-tp15216040p15277938.html

Andrew Perepelytsya

unread,
Feb 4, 2008, 4:52:36 PM2/4/08
to us...@mule.codehaus.org
Try running 'mvn -Dmaven.test.skip.exec=true' first, only then execute mvn eclipse:eclipse. Ensure you have properly endorsed newer XML libs as documented on the pages. To get a full distribution you will have to run mvn in distributions/server/full. Unpack the distribution. Only after that (and setting up MULE_HOME, etc.) can you run examples properly.

HTH,
Andrew
Reply all
Reply to author
Forward
0 new messages