Skip to content
This repository has been archived by the owner on Jan 3, 2019. It is now read-only.

Commit

Permalink
Add web deployment to fcrepo-jms-indexer
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Woods committed Aug 24, 2013
1 parent b865a17 commit ef22e02
Show file tree
Hide file tree
Showing 28 changed files with 677 additions and 294 deletions.
274 changes: 274 additions & 0 deletions fcrepo-jms-indexer-core/pom.xml
@@ -0,0 +1,274 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>

<parent>
<groupId>org.fcrepo</groupId>
<artifactId>fcrepo-jms-indexer-pluggable</artifactId>
<version>4.0.0-alpha-2-SNAPSHOT</version>
</parent>

<artifactId>fcrepo-jms-indexer-core</artifactId>
<name>${project.artifactId}</name>
<description>Fedora JMS Indexer Core</description>
<packaging>jar</packaging>

<properties>
<spring.version>3.2.0.RELEASE</spring.version>
<activemq.version>5.7.0</activemq.version>
<abdera.version>1.1.3</abdera.version>
</properties>

<dependencies>
<dependency>
<groupId>javax.jms</groupId>
<artifactId>jms-api</artifactId>
<version>1.1-rev-1</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jms</artifactId>
<version>${spring.version}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>com.sun.jersey.contribs</groupId>
<artifactId>jersey-spring</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.jersey.jersey-test-framework</groupId>
<artifactId>jersey-test-framework-grizzly2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-servlet</artifactId>
<version>${jersey.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.abdera</groupId>
<artifactId>abdera-core</artifactId>
<version>${abdera.version}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.2.5</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>org.apache.abdera</groupId>
<artifactId>abdera-parser</artifactId>
<version>${abdera.version}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>

<dependency>
<groupId>org.fcrepo</groupId>
<artifactId>fcrepo-http-commons</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.fcrepo</groupId>
<artifactId>fcrepo-http-api</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.fcrepo</groupId>
<artifactId>fcrepo-kernel</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.fcrepo</groupId>
<artifactId>fcrepo-jms</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.fcrepo</groupId>
<artifactId>fcrepo-http-commons</artifactId>
<version>${project.version}</version>
<scope>test</scope>
<type>test-jar</type>
</dependency>

<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-fuseki</artifactId>
<version>0.2.7</version>
<scope>test</scope>
</dependency>

</dependencies>

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<plugins>

<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.2</version>
<executions>
<execution>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<DependencyConvergence />
<bannedDependencies>
<searchTransitive>true</searchTransitive>
<excludes>
<exclude>commons-logging</exclude>
<!--log4j needed in 'test' fuseki-->
<!--<exclude>log4j:log4j</exclude>-->
<exclude>org.slf4j:slf4j-jcl</exclude>
<exclude>org.slf4j:slf4j-jdk14</exclude>
<!--log4j12 needed in 'test' fuseki-->
<!--<exclude>org.slf4j:slf4j-log4j12</exclude>-->
<exclude>org.slf4j:slf4j-log4j13</exclude>
<exclude>org.slf4j:slf4j-nop</exclude>
<exclude>org.slf4j:slf4j-simple</exclude>
<exclude>org.apache.cxf</exclude>
</excludes>
</bannedDependencies>
</rules>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${checkstyle.plugin.version}</version>
<dependencies>
<dependency>
<groupId>org.fcrepo</groupId>
<artifactId>fcrepo-build-tools</artifactId>
<version>${fcrepo-build-tools.version}</version>
</dependency>
</dependencies>
<configuration>
<consoleOutput>true</consoleOutput>
<configLocation>fcrepo-checkstyle/checkstyle.xml</configLocation>
<suppressionsLocation>fcrepo-checkstyle/checkstyle-suppressions.xml
</suppressionsLocation>
</configuration>
<executions>
<execution>
<id>checkstyle</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.8</version>
<!-- reserve ports for integration tests -->
<configuration>
<portNames>
<portName>test.port</portName>
<portName>test.mgt.port</portName>
<portName>test.fuseki.port</portName>
</portNames>
</configuration>
<executions>
<execution>
<id>reserve-port</id>
<phase>pre-integration-test</phase>
<goals>
<goal>reserve-network-port</goal>
</goals>
</execution>
</executions>

</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<!-- export ports for integration tests to system.env-->
<systemPropertyVariables>
<test.port>${test.port}</test.port>
<test.mgt.port>${test.mgt.port}</test.mgt.port>
<test.fuseki.port>${test.fuseki.port}</test.fuseki.port>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>

</project>
Expand Up @@ -27,6 +27,9 @@
/**
* Basic Indexer implementation that writes object content to timestamped files
* on disk.
*
* @author Esmé Cowles
* Date: Aug 19, 2013
**/
public class FileSerializer implements Indexer {

Expand Down
Expand Up @@ -22,6 +22,9 @@
* Main interface for individual indexers to implement. Each type of
* destination (Solr, triplestore, files, etc.) should have its own
* implementation.
*
* @author Esmé Cowles
* Date: Aug 19, 2013
**/
public interface Indexer {
/**
Expand Down
Expand Up @@ -43,6 +43,9 @@
/**
* MessageListener implementation that retrieves objects from the repository and
* invokes one or more indexers to index the content.
*
* @author Esmé Cowles
* Date: Aug 19, 2013
**/
public class IndexerGroup implements MessageListener {
private Parser atomParser = new Abdera().getParser();
Expand Down Expand Up @@ -107,6 +110,7 @@ public void onMessage(Message message) {
final String xml = ((TextMessage) message).getText();
Document<Entry> doc = atomParser.parse(new StringReader(xml));
Entry entry = doc.getRoot();
// FIXME: This pid logic does not work with path: /rest/a/b/c
final String pid = entry.getCategories("xsd:string").get(0)
.getTerm();

Expand Down
Expand Up @@ -40,6 +40,9 @@

/**
* Indexes triples from Fedora into a triplestore using SPARQL Update.
*
* @author Esmé Cowles
* Date: Aug 19, 2013
**/
public class SparqlIndexer implements Indexer {
private String prefix;
Expand Down
Expand Up @@ -27,6 +27,10 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

/**
* @author Esmé Cowles
* Date: Aug 19, 2013
*/
public class FileSerializerTest {
private static SimpleDateFormat fmt = new SimpleDateFormat("HHmmssSSS");
private FileSerializer serializer;
Expand Down
Expand Up @@ -53,6 +53,10 @@
import org.apache.abdera.Abdera;
import org.apache.abdera.model.Entry;

/**
* @author Esmé Cowles
* Date: Aug 19, 2013
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration({"/spring-test/test-container.xml"})
public class IndexerGroupIT {
Expand Down
Expand Up @@ -25,6 +25,10 @@
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertEquals;

/**
* @author Esmé Cowles
* Date: Aug 19, 2013
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration({"/spring-test/test-container.xml"})
public class SparqlIndexerIT {
Expand Down
File renamed without changes.

0 comments on commit ef22e02

Please sign in to comment.