Skip to content
David Leoni edited this page Jun 1, 2017 · 9 revisions

S-Match uses Apache Maven to build. Most often, you just want to build it locally on your machine.

Building locally

Building on a Continuos Integration system


Building locally

Typically to build and install an artifact into local repository one has to run

mvn clean install

Build order of the modules is the following:

s-match-parent
s-match-core
s-match-io
s-match-logic
s-match-nlp
s-match-nlp-annotation
s-match-nlp-opennlp
s-match-spsm
s-match-wordnet
s-match-examples

Checkout all modules into one directory:

git clone https://github.com/s-match/s-match-parent/
git clone https://github.com/s-match/s-match-core/
git clone https://github.com/s-match/s-match-io/
git clone https://github.com/s-match/s-match-logic/
git clone https://github.com/s-match/s-match-nlp/
git clone https://github.com/s-match/s-match-nlp-annotation/
git clone https://github.com/s-match/s-match-nlp-opennlp/
git clone https://github.com/s-match/s-match-spsm/
git clone https://github.com/s-match/s-match-wordnet/
git clone https://github.com/s-match/s-match-examples/
git clone https://github.com/s-match/s-match-utils/

Convenient one-liner to build the modules

  • for Windows (cmd)
for %i in (s-match-parent,s-match-core,s-match-io,s-match-logic,s-match-nlp,s-match-nlp-annotation,s-match-nlp-opennlp,s-match-spsm,s-match-wordnet) do pushd %i && mvn clean install clean -Dmaven.test.skip && popd
  • for Linux (bash)
for i in s-match-parent s-match-core s-match-io s-match-logic s-match-nlp s-match-nlp-annotation s-match-nlp-opennlp s-match-spsm s-match-wordnet; do cd $i && mvn clean install clean -Dmaven.test.skip && cd ..; done

To create binary distribution, use S-Match Utils.

From s-match-utils directory, install legacy jars in your local repository:

cd lib/
sh install.sh

and then execute

mvn clean package -PmakeZip

It will build target/s-match-<VERSION>.zip

To try it right away without unzipping, you can also do the following:

From s-match-utils directory, run:

cd target/dist/bin

Then run

in Linux/Mac:

./s-match-gui

In Windows:

s-match-gui.bat

Building on a Continuous Integration system

If you have a server that keeps building development version of S-Match and integrates it with your own software, you might want an easy way to depend on S-Match snapshots located on your server.

One solution that worked for us with Jenkins as CI was the following:

  1. Let Jenkins build stuff on the dev server
  2. Expose the jenkins m2 repository over the web (if you want you can password protect the directory, but we don't treat that case here)
  3. On each developer machine, add this line to the HOME/.m2/settings.xml file

It will allow any build you do to automatically fetch the snapshots:

    <repositories>
           <repository>
                 <id>my-dev-server</id>
                 <name>My Dev Server</name>
                 <url>http://my.dev-server.org/repository</url>
           </repository>
    </repositories>

As server url you could put any place where you have the smatch jars placed with Maven directory structure, and this way you wouldn't need to modify poms of projects depending on s-match snapshots.