Skip to content

Commit

Permalink
Add project structure, dependencies, and documentation
Browse files Browse the repository at this point in the history
* add pom
* add eclipse configs
* add configs for travis
* add README
* add gitignore
  • Loading branch information
dr0i committed Jan 28, 2016
1 parent 0ee4cca commit 472c3cc
Show file tree
Hide file tree
Showing 11 changed files with 209 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry including="**/*.java" kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/target/
/data/
23 changes: 23 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>lobid-resources</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
5 changes: 5 additions & 0 deletions .settings/org.eclipse.core.resources.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/test/java=UTF-8
encoding//src/test/resources=UTF-8
encoding/<project>=UTF-8
5 changes: 5 additions & 0 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.8
4 changes: 4 additions & 0 deletions .settings/org.eclipse.m2e.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
language: java
jdk: oraclejdk8
before_install:
- export JAVA_HOME=/usr/lib/jvm/java-8-oracle/jre
- sh install-dependencies.sh
install:
- mvn clean install -e -q --settings settings.xml
38 changes: 38 additions & 0 deletions README.textile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
h1. About

Transform MAB-XML to JSON for Elasticsearch indexing with "Metafacture":https://github.com/culturegraph/metafacture-core/wiki used by the resources endpoint of http://lobid.org/.

This repo is going to substitue big parts of https://github.com/lobid/lodmill .
This will be the base for the new lobid.org/resources API 2.0.
The aim is to make things easier, i.e.:
- get rid of hadoop
- concentrating only on lobid-resources (and not also gnd, lobid-organisations etc.)

h1. Build

"!https://secure.travis-ci.org/hbz/lobid-resources.png?branch=master!":https://travis-ci.org/hbz/lobid-resources

Prerequisites: Java 8, Maven 3; verify with @mvn -version@

Create and change into a folder where you want to store the projects:

* @mkdir ~/git ; cd ~/git@

Build the hbz metafacture-core fork:

* @git clone https://github.com/hbz/metafacture-core.git@
* @cd metafacture-core@
* @mvn clean install -DskipTests@
* @cd ..@

Build lobid-resources:

* @git clone https://github.com/hbz/lobid-resources.git@
* @cd lobid-resources@
* @mvn clean install@

See the @.travis.yml@ file for details on the CI config used by Travis.

h1. License

Eclipse Public License: "http://www.eclipse.org/legal/epl-v10.html":http://www.eclipse.org/legal/epl-v10.html
6 changes: 6 additions & 0 deletions install-dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
cd ../..
git clone https://github.com/hbz/metafacture-core.git
cd metafacture-core
git pull
mvn clean install -DskipTests=true
73 changes: 73 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.lobid</groupId>
<artifactId>lobid-resources</artifactId>
<version>0.1-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<target.jdk>1.8</target.jdk>
<junit.version>4.8.2</junit.version>
</properties>
<dependencies>
<dependency>
<groupId>org.culturegraph</groupId>
<artifactId>metafacture-core</artifactId>
<version>2.0.1-HBZ-SNAPSHOT</version> <!-- 1.2.0</version> -->
</dependency>
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-arq</artifactId>
<version>2.10.1</version>
</dependency>
<dependency>
<groupId>com.github.jsonld-java</groupId>
<artifactId>jsonld-java-jena</artifactId>
<version>0.3</version>
</dependency>
<dependency>
<groupId>com.google.gdata</groupId>
<artifactId>core</artifactId>
<version>1.47.1</version>
</dependency>
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>1.3.2</version>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>${target.jdk}</source>
<target>${target.jdk}</target>
<showWarnings>true</showWarnings>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.3</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<configuration>
<test>*Test</test>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
15 changes: 15 additions & 0 deletions settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<settings>
<mirrors>
<!-- This is a workaround for non-existing repos that are pulled in by
some transitive dependencies. This causes long delays when trying to connect to the
repos. To fix that, we define trvis-ci-central as a mirror of the missing repos.
We also define travis-ci-central as a mirror of central to speed up Travis builds.
This file has to be in $M2_HOME/conf/settings.xml or ${user.home}/.m2/settings.xml -->
<mirror>
<id>central</id>
<url>http://repo1.maven.org</url>
<mirrorOf>jena-repo,fascinator-releases</mirrorOf>
</mirror>
</mirrors>
</settings>

0 comments on commit 472c3cc

Please sign in to comment.