This is a step by step guide to build Apache Savan in windows and run a sample application using Apache Savan.
Step1: Setting up the environment
To build Apache Savan you need several other components installed in your system. Follow the steps to setup the basic environment.
Setup JAVA
Create an environment variable called JAVA_HOME and give it the path of your JDK installation. (e.g. C:\Program Files\Java\jdk1.6.0_14)
Also add the Java bin folder to the Windows Path system environment variable. (e.g. C:\Program Files\Java\jdk1.6.0_14\bin)
Install Apache Axis2
Savan is module created on top of Apache Axis2. So you need to setup Axis2 in order to run Savan.
You can dowload the Axis2 components from
here.
Download both "Standard Binary Distribution" and the "WAR" distribution.
Extract the "Standard Binary Distribution" and add its path to Windows Environment Variables.
In order to do this create an environment variable called AXIS2_HOME and give it the path of your Axis2 installation. (e.g. F:\Programs\Java\Axis\AXIS2_HOME\axis2-1.4.1)
Also add the Axis2 bin folder to the Windows Path system environment variable. (e.g. F:\Programs\Java\Axis\AXIS2_HOME\axis2-1.4.1\bin)
Install Apache Tomcat Server
This helps to easily customize the Axis2 server.
You can get the Tomcat installer from
here.
Install it and then copy the Axis2.war file in to the webapps folder of Apache Tomcat. (i.e. C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps)
Then start the Tomcat Server.
Open your web browser and go to http://localhost:8080/axis2/.
If the Axis2 installation is successful you will be directed to the Axis2 user interface.
Install Maven
Maven is needed to build the Apache Savan source.
You can get the Maven from
here.
Extract the zip file and add Maven to the windows environment variables.
In order to do this create an environment variable called MAVEN_HOME and give it the path of your Maven installation. (e.g. F:\Programs\Java\Maven\MAVEN_HOME\apache-maven-2.0.10)
Also add the Maven bin folder to the Windows Path system environment variable. (e.g. F:\Programs\Java\Maven\MAVEN_HOME\apache-maven-2.0.10\bin)
Install Apache Ant
Ant is needed to build the Apache Savan sample application.
You can get the Ant from
here.
Extract the zip file and add Ant to the windows environment variables.
In order to do this create an environment variable called ANT_HOME and give it the path of your Ant installation. (e.g. F:\Programs\Java\Apache Ant\ANT_HOME\apache-ant-1.7.1)
Also add the Ant bin folder to the Windows Path system environment variable. (e.g. F:\Programs\Java\Apache Ant\ANT_HOME\apache-ant-1.7.1\bin)
So now all the required components has been successfully installed.
Step 2 : Getting and Building the sources
Get source code
After environment setup you need to get Apache Savan source code.
You can get the source code by checking out it from here.
Build source Code
By using the windows command prompt go to folder where you checked out the Savan source code.
execute the following commant to build the sources. (mvn clean install)
This command will read the sources and will download the needed libraries.
It will take some time to successfullty download all the required libraries.
When all the components are built successfully you can start running a simple Savan enabled application.
Step 3 : Running sample application
Build sample application
By using the windows command prompt go to folder where you checked out the Savan source code.
Then navigate to the modules\samples\eventing directory.
Execute the following command to build the sample application. (ant deploy)
This will create all the files needed to run the sample.
Run sample application
Go to the folder where you choosed as AXIS2_HOME.
Go to the \repository\modules folder and copy the "savan-SNAPSHOT.mar" file in to relavant directory of the tomcat server. (e.g. C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\axis2\WEB-INF\modules)
Go to the \lib folder and copy the "savan-core-SNAPSHOT.jar" file in to relavant directory of the tomcat server. (e.g. C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\axis2\WEB-INF\lib)
Go to the \repository\services folder and copy "ListenerService1.aar", "ListenerService2.aar","PublisherService.aar" files in to relavant directory of the tomcat server. (e.g. C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\axis2\WEB-INF\services)
Restart the tomcat server.
You will see the new sample application we build is deployed in the Axis2 server.
Step 4 : Advanced configurations
You can specify more advanced features of by login in to the Axis2 admin panel.
Go to http://localhost:8080/axis2/axis2-admin/ for it.
The default username - Admin
The default password - axis2