Introducing the Next Generation of SoapUI: SoapUI NG Pro Download SoapUI NG Pro Download SoapUI NG Pro

Building soapUI from SVN

PDF Print E-mail
User Rating:  / 18
Rate this article: PoorBest 

How to download and build soapUI from SVN repository

OBS! soapUI has changed source code management system from Subversion to Git. These instructions are thus obsolete and will be updated with new instructions for using Git (https://github.com/SmartBear/soapui).


Want to have access to latest features and bug-fixes or add some yourself? Here comes a short walkthrough on how to download and build soapUI from our svn repository using eclipse (NetBeans/IDEA users shouldn't have a problem following these instructions either).

Prerequisites

soapUI still uses maven 1.0.2 as its build-engine (we just haven’t had time to upgrade to maven 2), download it from http://archive.apache.org/dist/maven/binaries/ (don't use 1.1!) and install it as required (be sure to set the MAVEN_HOME environment variable to point to the installation). Also make sure that you have a 1.5+ JDK installed and in your path.

In eclipse make sure you have a subversion plugin installed (I use subclipse) and start by switching to the SVN Repository Exploring perspective so we can add the soapUI SVN repository right-click in the SVN Repositories view and select New -> Repository Location and specify svn://svn.eviware.com/soapui/trunk/core as the connection string in the dialog:

Add-svn-repository

After clicking Finish, the repository will be added and you can expand it to see its contents:

repository-tree

Right click the root node and select checkout, set any paths as you would like them and select Finish. Eclipse will start downloading the code from our repository (which will take some time), when finished switch to the Java perspective and you should have the project in your Navigator:

navigator-view

Before we can run it we make sure all dependencies are up to date. This is where maven comes into the picture.

  1. open a command-prompt and navigate to the directory (where you checked out the soapUI project)
  2. run the following command: maven eclipse:generate-classpath

(this might take some time the first time since it will download not only dependencies required by soapUI but also all other dependencies maven itself requires)

maven-eclipse-generate-classpath

When finished maven will (hopefully) have generated a .classpath file for your eclipse project that sets all dependencies, but before we can use it in eclipse we need to define the MAVEN_REPO build variable in our eclipse environment, open the eclipse Preferences\Java\Build Path\Classpath Variables page and select New

maven-repo-variable

Set the name to MAVEN_REPO and the path to your local maven repository that maven created when you ran it the first time (this is usually \.maven\repository)

Eclipse will now prompt to rebuild the workspace and after that you should have a compiled soapUI project ready to run (if you have compilation errors, you might need to rebuild the soapUI XMLBeans first - more on that below). Navigate to the com.eviware.soapui.SoapUI class in the Package Explorer:

SoapUI-class-in-tree

and select Run As -> Java Application from its popup menu. If all goes well soapUI will start after some churning!

soapUI-splash

Increasing Memory in eclipse

Since soapUI is "quite resource intensive" you might run into OutOfMemory errors when running from inside eclipse. You can increase the memory allocated for soapUI by first selecting the "Run Configuration.." from the Run toolbar:

run-configuration

and then increasing the memory settings in the Arguments->VM-Arguments field for the SoapUI configuration:

setting-run-configuration

Set it to -Xms128m -Xmx512m initially, maybe you need to increase it more (depends on your projects..).

Rebuilding XMLBeans

soapUI heavily relies on apache XMLBeans (what a fantastic project!) for its XML processing and configuration file handling. If you check out the project as described above and get compilation errors related to classes not being found, then you might need to update the jar files soapUI uses that have been generated from the corresponding xsds in the src\xsd folder. Rebuilding them with maven/xmlbeans is easy.

  1. open a command-prompt and navigate to the project directory as above
  2. run the following command: maven soapui:generate-xml-beans

maven-soapui-generate-xml-beans

3. on successful execution go back to eclipse and refresh the project. If this solved the problem you are all set, otherwise please post a question on our sourceforge forum.

(the built XMLBeans jars are placed in your local maven repository: \.maven\repository\eviware\jars)

Building soapUI-XX.jar

If you want to build the soapUI-XX.jar file to use in an existing installation, use maven again as follows:

  1. open a command-prompt and navigate to the project directory as above
  2. run the maven command maven jar:install which will compile, test and build an up-to-date jar and save it to the target folder and your repository:

maven-jar-install

Use this file by replacing the existing one in your soapUI installation, also be sure to replace any of the generated XMLBeans jars created by rebuilding XMLBeans as described above.

Also be sure to rebuild the XMLBeans as described above to be sure you have the latest version.

Generate Javadocs

If you want access to the latest javadocs for the soapUI API, maven will do this for you as well;

  1. Open a command-prompt and navigate to the project directory
  2. Run the maven command maven javadoc which will generate the entire javadoc in the target\docs\apidocs directory

If you run into OutOfMemory problems here (or with any other maven-related task above), you can increase mavens memory allocation by setting the MAVEN_OPTS environment variable, for example

MAVEN_OPTS=-Xmx768m

to allocate 768 Mb to the maven process.

Updating to latest code

If you want to make sure you have the latest sources available, just right-click on your project in eclipse and select Team -> Update. eclipse will download the latest modifications from our SVN repository. You might need to both rebuild the XMLBeans (as described above) and/or regenerate the classpath (also as described above) to have the latest dependencies in your project.

Hope this gets you going, please don't hesitate to share your improvements and experiences with the rest of the soapUI community!