Expression Pattern Language (eXPL)

Get going quickly with Git and Maven

Step 1 - Get software development tools ready

See Java Tools table on right for links to download sites and descriptions, including recommended versions, which are important for avoiding compatibility issues. The Java SDK must also be installed on your PC. Eclipse is a recommended Java development enviroment, but also popular are NetBeans, JDeveloper and IntelliJ IDEA.

The installation assumes Maven will run from the command line. To prove this, execute "mvn --version" and check the resulting print out includes the expected version. eg.

$ mvn --version
Apache Maven 3.2.3 ...
Maven home: /usr/local/apache-maven-3.2.3
...

For more information on Eclipse set up, go to Maven for Eclipse.

Step 2 - Download project to your PC

The Classy Logic project is downloaded from the a public Git repository. In a command console, go to your chosen workspace location and run:

git clone https://github.com/andrew-bowley/xpl

Upon completion, the project will be found in the "xpl" sub directory, from now referred to as the eXPL "home location". There are two modules, parser, which is the eXPL parser and query engine and tutorial. which contains the code examples for eXPL Reference.

Step 3 - Maven Build

To build the project and deploy artifacts to the local repository, go to the eXPL home location and run:

mvn clean install

Upon completion, the message "BUILD SUCCESS" should be displayed. If the build failed, then you will need to scroll back and investigate what error messages appeared during the build.

Tutorial

The recommended approach to running tutorial examples is to import eXPL modules "parser" and "tutorial" into Eclipse as Maven projects. Each example can be run using "Run as Java application...". However, other IDEs such as IntelliJ IDEA can be used, or even the command line.

Java Tools

ToolDescription
gitGit is a free and open source distributed version control system. Recommended version 1.9.0 and above
mavenApache Maven is a software project management and comprehension tool. Recommended version 3.2.1 and above
eclipseJava developer tool, including a Java IDE, Git client and Maven integration. Recommended version Eclipse Luna (4.4.1) and above.

There is only one dependency, and that is the parser library. When Maven is not being used to run examples, the library jar can be copied to a project "libs" folder by running the following Maven profile in the tutorial directory:

mvn initialize -P java

The jar file copied to the libs folder can then be included in the classpath for running the tutorials.

Compiler Compilation (Optional)

This step is not required as the eXPL compiler is provided in the distribution. Compiler enthusiasts wishing to change the eXPL grammar or add new features, read on! JavaCC compiles the eXPL compiler. The local Maven repository needs to contain JavaCC files not available online. This step installs javacc-4.2.jar which is used to generate the eXPL parser files and also runs JavaCC to generate required eXPL Java source files.

Go to the install directory under eXPL home location and run:

mvn initialize -P javacc

Upon completion, the message "Parser generated with 0 errors and 1 warnings." should be displayed.