Open gherson opened 8 years ago
Below pom.xml seems to solve - attempto-ape-1.0.1.jar was created.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>ch.uzh.ifi.attempto.ape</groupId>
<artifactId>attempto-ape</artifactId>
<packaging>jar</packaging>
<version>1.0.1</version>
<name>Java Interface for APE</name>
<description>Java Interface for APE</description>
<url>http://attempto.ifi.uzh.ch/</url>
<issueManagement>
<system>GitHub</system>
<url>https://github.com/Attempto/APE/issues?labels=java</url>
</issueManagement>
<licenses>
<license>
<name>LGPL 3.0 license</name>
<url>http://www.opensource.org/licenses/lgpl-3.0.html</url>
</license>
</licenses>
<developers>
<developer>
<name>Kaarel Kaljurand</name>
<email>kaljurand@gmail.com</email>
<timezone>+1</timezone>
</developer>
<developer>
<name>Tobias Kuhn</name>
<email>kuhntobias@gmail.com</email>
<timezone>+1</timezone>
</developer>
</developers>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>jpl</groupId>
<artifactId>jpl</artifactId>
<version>6.0.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.3.1</version>
</dependency>
<dependency>
<groupId>com.sun.phobos</groupId>
<artifactId>jdom</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.19</version>
</dependency>
<dependency>
<groupId>org.apache.avro</groupId>
<artifactId>avro-guava-dependencies</artifactId>
<version>1.8.0</version>
</dependency>
</dependencies>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
</plugin>
</plugins>
</reporting>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
I should also note that I had to try different versions of jpl.jar (which when multiplied by other unknowns became very time consuming). For my Windows 7 laptop, I downloaded them to C:/Program Files (x86)/pl/lib/ and installed them via mvn install:install-file. The winning one was the one from http://www.java2s.com/Code/Jar/j/Downloadjpljar.htm. It was installed via
C:Downloads\APE-master\APE-master\java>mvn install:install-file -Dfile="C:/Program Files (x86)/pl/lib/jpl-6.0.0.jar" -DgroupId=jpl -DartifactId=jpl -Dversion=6.0.0 -Dpackaging=jar -DgeneratePom=true
Thanks! I'm looking into ways to improve the JPL installation. The thing is that one should use the jar that is included in the SWI-Prolog installation, so that it would match the version of SWI-Prolog that is used by APE. Maybe an installation script like below would be suitable. I don't know though how it would work on Windows.
eval `swipl -dump-runtime-variables`
mvn install:install-file \
-Dfile=$PLBASE/lib/jpl.jar \
-DgroupId=jpl \
-DartifactId=jpl \
-Dversion=$PLVERSION \
-Dpackaging=jar \
-DgeneratePom=true
No errors until
mvn package -DskipTests
, which can't find packages jpl, org.slf4j, com.google.commmon.collect, etc:why?
thanks, George (on Windows 7)
p.s. I also had to edit Downloads\APE-master\APE-master\java\pom.xml's
Advice from http://stackoverflow.com/questions/25912398/maven-project-error-diamond-multicatch-operator-not-supported-in-source-1-5 to make it the following seems to work.