Skip to content

DEV, Build from Scratch

Tamás Kőhegyi edited this page Aug 29, 2015 · 29 revisions

Building the project from scratch

In case you have a brand new snapshot from the product, and you would like to recreate the product from scratch, the following steps should be done. Use latest JDK 8 during the compilation.

NOTE: THIS DESCRIPTION IS VALID FOR WILMA 1.1 only

NOTE2: You may investigate Travis CI configuration file (.travis.yml) too, to get information on how to build Wilma (and its extensions) in a CI environment. You may see latest build log at Travis CI here. Meanwhile Travis CI is not yet the official build environment of the tool, provides useful information to you in case you would like to build Wilma.

Optional Build Step: prepare IDEs

Execute gradlew cleanIdea idea or gradlew cleanEclipse eclipse targets to generate IDE (IntelliJ or Eclipse) specific files.

Optional Build Step: Using Build Number

By default all module will get build number = DEV, like wilma-1.1.DEV.jar. In case you would like to distinguish between your builds, just add buildNumber parameter to the build command. Example parameter usage for Jenkins jobs:

-PbuildNumber=${BUILD_NUMBER}

Using local repository

Some of the modules (browsermob-proxy, wilma-mock and wilma-autotest) use local Maven repository to store the built module. By default the build scripts are prepared to use C:/tmp/myRepo folder and Windows machine. If you work under Linux, or would like to use another folder for the local Maven repository, you need to add localRepository parameter to the build command. Example parameter usage on Linux, and use /opt/wilma/repo folder as your local Maven repository:

-PlocalRepository=file:///opt/wilma/repo/

Optional Build Step: Building browsermob-proxy for Wilma

This module is separated within and from Wilma. Wilma use this module as an external module, the official Wilma release use this module from JCenter repository. In case of local build, and when the browsermob-proxy folder content is not changed, you should skip this build step completely. The latest git version may not work as expected (as it is unstable), using the official version from JCenter (stable) is highly recommended. In case you insist on rebuilding Wilma fully, including this module, or something is changed within browsermob-proxy folder, you may rebuild the module with the following command:

./gradlew -b browsermob-proxy/build.gradle clean build createPom uploadArchives -x checkstyleMain -x checkstyleTest

If everything goes well, you should find the just compiled browsermob-proxy module installed in your local Maven repo at C:/tmp/myRepo folder (or in the local repository you specified with the -PlocalRepository parameter).

Before moving to the next step, you need to modify wilma-application/modules/wilma-browsermob-integration/build.gradle file, and use the same version you built instead of the official version (quote from that file).

  compile ('com.epam.wilma:browsermob-proxy:2.0-beta-8-wilma-1.0.8'){

Building Wilma

Execute the following command:

./gradlew clean build release

After a successful build, you will find

  • Wilma Application zip in folder wilma-application/build/distributions, and
  • Wilma Message Search Application zip in folder wilma-message-search/build/distributions.

You may extract the zips to somewhere, and start it as it is extracted there, by executing the following command:

Wilma Message Search Application:

(patch to java in JDK not in JRE!) java -jar wilma-message-search-1.1.DEV.jar message.search.conf.properties 

Access to its UI: http://localhost:9093/

Wilma Application:

java -jar wilma-1.1.DEV.jar wilma.conf.properties 

Access to its UI: http://localhost:1234/index/

NOTE: Wilma Message Search is a support tool of Wilma, it is not necessary to run, but if you would like to, please remember, that the Message Search Application must be started before Wilma.

Optional Build Step: Building Wilma-Service-API for Wilma

This module is separated from Wilma, and can be used in other components/applications those would like to communicate with Wilma effectively. (In the future it will be available in JCenter too.) You may build the module with the following command:

./gradlew -b wilma-service-api/build.gradle clean build createPom uploadArchives

If everything goes well, you should find the just compiled wilma-service-api module installed in your local Maven repository, ready to be used by other projects.

Optional Build Step: Building Wilma Test Client and Test Server for Wilma

These modules are separated from Wilma. The Test Client and the Test Server together are used for performance tests, and in addition, the Test Server is used for functional tests (see next section). You may build these modules with the following command:

#create test client
./gradlew -b wilma-test/wilma-test-client/build.gradle clean build -x checkstyleMain -x checkstyleTest

#create test server
./gradlew -b wilma-test/wilma-test-server/build.gradle clean build -x checkstyleMain -x checkstyleTest

After run, you should find the just compiled jars in wilma-test/wilma-test-client/build/lib and wilma-test/wilma-test-server/build/lib folders.

Optional Build Step: Building Functional Tests for Wilma

To build Wilma functional tests properly, you need Wilma Application and Wilma Test Server running with their default settings on a single machine, and execute the following commands (note, that if you performed the optional wilma-service-api build, you may skip the first command):

#create a version of the wilma-service-api first
./gradlew -b wilma-service-api/build.gradle clean build createPom uploadArchives

#build functional tests
./gradlew -b wilma-functionaltest/build.gradle clean build

In case you would like to execute the functional tests, use this command:

./gradlew -b wilma-functionaltest/build.gradle clean run -Pwilmahost=hostname_where_wilma_is_running
Clone this wiki locally