Swordfishing first steps
Download and compile swordfish locally is very simple. You just need following:
- JDK 5 or 6
- Maven 2
- Subversion to check out sources
Then just do following:
% mkdir swordfish-trunc
% svn co http://dev.eclipse.org/svnroot/rt/org.eclipse.swordfish/trunk swordfish-trunc
Then after some time (depending on your internet connection) you will see something like this:
Checked out revision 20532.
Then you just type:
% cd swordfish-trunc
% mvn clean install
And then you will see something like this:
% mvn clean install
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] Eclipse Swordfish
[INFO] org.eclipse.swordfish.api
[INFO] org.eclipse.swordfish.core.util
[INFO] org.eclipse.swordfish.core.planner
[INFO] org.eclipse.swordfish.core.event
[INFO] org.eclipse.swordfish.core
[INFO] Unnamed - org.eclipse.swordfish:compatibility:pom:basic
[INFO] org.eclipse.swordfish.compatibility.smx3
[INFO] org.eclipse.swordfish.core.test.util
[INFO] org.eclipse.swordfish.core.configuration
[INFO] org.eclipse.swordfish.core.event.tracking
[INFO] Unnamed - org.eclipse.swordfish:samples:pom:basic
[INFO] org.eclipse.swordfish.samples.http
[INFO] org.eclipse.swordfish.samples.cxfendpoint
[INFO] org.eclipse.swordfish.samples.http
[INFO] org.eclipse.swordfish.samples.configurationprovider
[INFO] org.eclipse.swordfish.samples.configurationconsumer
[INFO] org.eclipse.swordfish.samples.exceptionlistener
[INFO] Unnamed - org.eclipse.swordfish:endpoints:pom:basic
[INFO] Unnamed - org.eclipse.swordfish:org.eclipse.swordfish.endpoints.http:bundle:1.0-SNAPSHOT
[INFO] org.eclipse.swordfish.compatibility.cxf.minimal
[INFO] org.eclipse.swordfish.compatibility.smx.nmr.osgi
[INFO] Unnamed - org.eclipse.swordfish:org.eclipse.swordfish.bundles:pom:basic
[INFO] ------------------------------------------------------------------------
[INFO] Building Eclipse Swordfish
[INFO] task-segment: [clean, install]
[INFO] ------------------------------------------------------------------------
..
...
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 minute 51 seconds
[INFO] Finished at: Wed Feb 11 11:20:22 CET 2009
[INFO] Final Memory: 37M/63M
[INFO] ------------------------------------------------------------------------
My congratulations, now you have downloaded and compiled the Swordfish project. Off course you would need to work with it using your IDE of choice, here I will describe how to import it to your Eclipse workspace.
You would need a recent Eclipse version, e.g. Eclipse Ganymede JEE. Before you would be able to import swordfish projects to your Eclipse you would need to generate an Eclipse-specific project descriptions. You can do it using following command (executed in the root folder of the checked out sources, in my case it’s swordfish-trunc)
% mvn eclipse:eclipse
Afterwards change to the directory org.eclipse.swordfish.core.integrationtest (contains the integration tests) and generate the Eclipse projects in the same way as for the main project
% mvn eclipse:eclipse
After it you launch your Eclipse and import projects from the swordfish-trunc folder, then just select all projects eclipse will find there. As soon as you will do it Eclipse will try to compile them, and … will fail. It will fail because 3rd party library we are using are managed by maven and (after a successful build) stored inside your local maven repository (usually located in your home folder under .m2/repository), so you just need to show Eclipse where your local maven repository is located. You need to define a new classpath variable called M2_REPO and target it to your local maven repository. Whole process you can see on this screencast.



[...] Zubairov has posted a short tutorial to his Swordfishing Blog that will guide you through the first steps of installing and building [...]
The Swordfish Blog » Blog Archive » First steps with Swordfish
February 11, 2009
As the Swordfish download was disabled at eclipse.org, I took the head revision from trunk as described in your blog. Unfortunatly the project is broken and maven could not create the POM as it’s missing some stuff (ODE).
The build of M3 fails at the end, too, as some dependencies could not resolved: the servicemix repository doesnt exists anymore at servicemix.org!
HGU
August 6, 2009
Hi,
Yes Swordfish had some internal issues related to the Eclipse IP processes that lead to removal of the Swordfish bundles from the Eclipse Galileo web site, however it will show up soon again. In the meantime you could try to build swordfish-tooling (which also include one of the latest Swordfish binaries) using following wiki page
http://code.google.com/p/swordfish-tooling/wiki/HowToBuild
zubairov
August 6, 2009
Thanks for the hint… i’ll give it a try. Meanwhile i managed to build 0.9.0 M3… changed the wrong repository links in the downloaded POMs in the local M2 repo (the wrong links are created by an other dependency).
HGU
August 6, 2009