Skip to content

Commit

Permalink
Migrate to Maven
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaljurand committed Aug 12, 2013
1 parent 910de85 commit dc51020
Show file tree
Hide file tree
Showing 35 changed files with 107 additions and 488 deletions.
13 changes: 1 addition & 12 deletions README.md
Expand Up @@ -200,18 +200,7 @@ pointer an HTTP resource (i.e. URL) but not via pointing to a local file (such a

### Using APE from Java programs

To simplify calling APE from Java we provide the `ACEParser` interface which
is effectively a Java-style front-end to querying the predicate `get_ape_results/2`.
`ACEParser` is implemented by the following classes:

- `APELocal` accesses APE via JPL, the bidirectional Prolog/Java interface, which is included in the SWI-Prolog installation
- `APESocket` accesses APE via its socket server
- `APEWebservice` accesses APE via its HTTP server

To build `attempto_ape.jar` containing the mentioned classes, run `ant` in the `java`-subdirectory.

cd java
ant
See the documentation in [java/](java/).


### Some examples
Expand Down
8 changes: 0 additions & 8 deletions java/.gitignore

This file was deleted.

33 changes: 17 additions & 16 deletions java/README.md
Expand Up @@ -8,35 +8,36 @@ Copyright 2008-2013, Attempto Group, University of Zurich (http://attempto.ifi.u
Content
-------

The Java Interface for APE consists of one jar-file `attempto-ape.jar`,
which contains various interfaces to APE:
To simplify calling APE from Java programs, we provide the `ACEParser` interface which
is effectively a Java-style front-end to querying the predicate `get_ape_results/2`.
`ACEParser` is implemented by the following classes:

- `APELocal` accesses APE via JPL, the bidirectional Prolog/Java interface, which is included in the SWI-Prolog installation;
- `APESocket` accesses APE via its socket server;
- `APEWebservice` accesses APE via its HTTP server.

See docs/index.html for the detailed documentation of the packages and classes
(generated by `ant createjavadoc`).

Building with Maven
-------------------

Compilation
-----------
The Java Interface for APE can be compiled into a single jar-file `attempto-ape.jar`.

Apache Ant+Ivy is needed for compilation. The following commands are available:
First install SWI-Prolog's JPL into your local Maven repository.
See [install-jpl.sh](install-jpl.sh) for an example on how do it.

- `ant compile` compiles the Java source code.
- `ant createjars` creates the jar-files.
- `ant createjavadoc` creates the Javadoc documentation pages.
- `ant clean` deletes all automatically generated files like the compiled Java classes, the
jar-files, and the Javadoc files.
- `ant buildeverything` builds everything from scratch.
- `ant test` runs unit tests (see more below).
Building the jar-file.

mvn package -DskipTests

Building the documentation, licenses, etc.

mvn site


Testing
-------

In order to run the unit tests (`ant test`), first compile `ape.exe`.
In order to run the unit tests (`mvn test`), first compile `ape.exe`.

For the `APELocal` tests to succeed, place `ape.exe` into the APE root directory
and execute (in any directory):
Expand All @@ -54,4 +55,4 @@ For the `APEWebservice` tests to succeed, start the APE HTTP server:

Now run

ant test
mvn test
124 changes: 0 additions & 124 deletions java/build.xml

This file was deleted.

7 changes: 7 additions & 0 deletions java/install-jpl.sh
@@ -0,0 +1,7 @@
mvn install:install-file \
-Dfile=/usr/local/lib/swipl-6.4.1/lib/jpl.jar \
-DgroupId=jpl \
-DartifactId=jpl \
-Dversion=6.4.1 \
-Dpackaging=jar \
-DgeneratePom=true
16 changes: 0 additions & 16 deletions java/ivy.xml

This file was deleted.

38 changes: 0 additions & 38 deletions java/lib/README.txt

This file was deleted.

6 changes: 0 additions & 6 deletions java/licenses/README.txt

This file was deleted.

0 comments on commit dc51020

Please sign in to comment.