Commit 05c061e8 authored by acoburn's avatar acoburn
Browse files

Add mysql-based connector for idiomatic

parent 61704bd8
......@@ -40,6 +40,7 @@ These modules listen to repository events and react accordingly.
* [`acrepo-connector-broadcast`](acrepo-connector-broadcast): ActiveMQ Message Broadcast Service: This rebroadcasts messages from one queue/topic to every queue/topic in a specified list
* [`acrepo-connector-idiomatic`](acrepo-connector-idiomatic): Id Mapping Service: This maps a public ID to a (internal and typically much longer) Fedora URI
* [`acrepo-connector-idiomatic-mysql`](acrepo-connector-idiomatic-mysql): Id Mapping Service Database: This exposes a MySQL datastore for use with the Id Mapping service
* [`acrepo-connector-idiomatic-pgsql`](acrepo-connector-idiomatic-pgsql): Id Mapping Service Database: This exposes a Postgres datastore for use with the Id Mapping service
Other OSGi Features
......@@ -76,6 +77,7 @@ command from its shell:
feature:install acrepo-connector-broadcast
feature:install acrepo-connector-idiomatic
feature:install acrepo-connector-idiomatic-mysql
feature:install acrepo-connector-idiomatic-pgsql
feature:install acrepo-exts-fits
......
Amherst College ID Mapping Service (MySQL)
===============================================
This service implements a database backend for the ID Mapping Service
Building
--------
To build this project use
gradle install
Deploying in OSGi
-----------------
This project can be deployed in an OSGi container. For example using
[Apache Karaf](http://karaf.apache.org) version 4.x and above, you can run the following
command from its shell:
feature:repo-add mvn:edu.amherst.acdc/acrepo-karaf/LATEST/xml/features
feature:install acrepo-connector-idiomatic-mysql
Configuration
-------------
The application can be configured by creating or editing the following configuration
file `$KARAF_HOME/etc/org.ops4j.datasource-idiomatic.cfg`. The following values
are available for configuration:
The name of the database
databaseName=idiomatic
The hostname for the database server
serverName=localhost
The port for the database server
portNumber=3306
The username for connecting to the database
user=
The password for connecting to the database
password=
By editing this file, this service will be immediately redeployed with the new values.
For more help see the [Apache Camel](http://camel.apache.org/) documentation
group = 'edu.amherst.acdc'
description = 'ID Mapping MySQL Connector'
artifacts {
archives (file('build/cfg/main/edu.amherst.acdc.connector.idiomatic.mysql.cfg')) {
classifier 'configuration'
type 'cfg'
}
}
# These values should not be changed
osgi.jdbc.driver.name=mysql
osgi.jdbc.driver.class=com.mysql.jdbc.Driver
dataSourceName=jdbc/idiomaticds
# The values below should be configured to match your
# local pgsql database server.
databaseName=idiomatic
serverName=localhost
portNumber=3306
user=
password=
......@@ -17,7 +17,7 @@ This project can be deployed in an OSGi container. For example using
[Apache Karaf](http://karaf.apache.org) version 4.x and above, you can run the following
command from its shell:
feature:repo-add mvn:edu.amherst.acdc/repository-services/LATEST/xml/features
feature:repo-add mvn:edu.amherst.acdc/acrepo-karaf/LATEST/xml/features
feature:install acrepo-connector-idiomatic-pgsql
Configuration
......
......@@ -27,7 +27,7 @@ This project can be deployed in an OSGi container. For example using
[Apache Karaf](http://karaf.apache.org) version 4.x and above, you can run the following
command from its shell:
feature:repo-add mvn:edu.amherst.acdc/repository-services/LATEST/xml/features
feature:repo-add mvn:edu.amherst.acdc/acrepo-karaf/LATEST/xml/features
feature:install acrepo-connector-idiomatic
Configuration
......
......@@ -28,7 +28,7 @@ This project can be deployed in an OSGi container. For example using
[Apache Karaf](http://karaf.apache.org) version 4.x and above, you can run the following
command from its shell:
feature:repo-add mvn:edu.amherst.acdc/repository-services/LATEST/xml/features
feature:repo-add mvn:edu.amherst.acdc/acrepo-karaf/LATEST/xml/features
feature:install acrepo-exts-serialize-xml
Configuration
......
......@@ -26,7 +26,7 @@ This project can be deployed in an OSGi container. For example using
[Apache Karaf](http://karaf.apache.org) version 4.x and above, you can run the following
command from its shell:
feature:repo-add mvn:edu.amherst.acdc/repository-services/LATEST/xml/features
feature:repo-add mvn:edu.amherst.acdc/acrepo-karaf/LATEST/xml/features
feature:install acrepo-exts-template
Configuration
......
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>edu.amherst.acdc</groupId>
<artifactId>repository-services</artifactId>
<version>1.0.1-SNAPSHOT</version>
</parent>
<artifactId>acrepo-karaf</artifactId>
<packaging>bundle</packaging>
<name>Karaf Provisioning Features for repository services</name>
<dependencies>
<dependency>
<groupId>edu.amherst.acdc</groupId>
<artifactId>acrepo-connector-idiomatic</artifactId>
<scope>test</scope>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>edu.amherst.acdc</groupId>
<artifactId>acrepo-services-jsonld</artifactId>
<scope>test</scope>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>edu.amherst.acdc</groupId>
<artifactId>acrepo-exts-jsonld</artifactId>
<scope>test</scope>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>edu.amherst.acdc</groupId>
<artifactId>acrepo-services-inference</artifactId>
<scope>test</scope>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>edu.amherst.acdc</groupId>
<artifactId>acrepo-services-mint</artifactId>
<scope>test</scope>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>edu.amherst.acdc</groupId>
<artifactId>acrepo-services-pcdm</artifactId>
<scope>test</scope>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>edu.amherst.acdc</groupId>
<artifactId>acrepo-services-activemq</artifactId>
<scope>test</scope>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.hk2.external</groupId>
<artifactId>javax.inject</artifactId>
<version>${hk2.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient-osgi</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore-osgi</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>${commons-codec.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.andrewoma.dexx</groupId>
<artifactId>collection</artifactId>
<version>${dexx.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ops4j.pax.exam</groupId>
<artifactId>pax-exam-container-karaf</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ops4j.pax.exam</groupId>
<artifactId>pax-exam-junit4</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.karaf</groupId>
<artifactId>apache-karaf</artifactId>
<version>${karaf.version}</version>
<type>zip</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.camel.karaf</groupId>
<artifactId>apache-camel</artifactId>
<version>${camel.version}</version>
<type>xml</type>
<classifier>features</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-karaf</artifactId>
<version>${activemq.version}</version>
<type>xml</type>
<classifier>features</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.karaf.features</groupId>
<artifactId>org.apache.karaf.features.core</artifactId>
<version>${karaf.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.karaf.features</groupId>
<artifactId>standard</artifactId>
<version>${karaf.version}</version>
<type>xml</type>
<classifier>features</classifier>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<defaultGoal>install</defaultGoal>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>reserve-port</id>
<phase>package</phase>
<goals>
<goal>reserve-network-port</goal>
</goals>
<configuration>
<portNames>
<portName>fcrepo.dynamic.test.port</portName>
<portName>fcrepo.dynamic.jms.port</portName>
<portName>fcrepo.dynamic.stomp.port</portName>
<portName>fcrepo.dynamic.reindexing.port</portName>
<portName>karaf.rmiRegistry.port</portName>
<portName>karaf.rmiServer.port</portName>
<portName>karaf.ssh.port</portName>
<portName>jetty.dynamic.stop.port</portName>
</portNames>
</configuration>
</execution>
<execution>
<id>attach-artifacts</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>target/classes/features.xml</file>
<type>xml</type>
<classifier>features</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
<!-- pax exam -->
<plugin>
<groupId>org.ops4j.pax.exam</groupId>
<artifactId>maven-paxexam-plugin</artifactId>
<version>${paxexam.plugin.version}</version>
<executions>
<execution>
<id>generate-config</id>
<goals>
<goal>generate-depends-file</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>filter</id>
<phase>generate-resources</phase>
<goals>
<goal>resources</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- integration testing -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<forkCount>3</forkCount>
<reuseForks>true</reuseForks>
<argLine>-Xmx1024m</argLine>
<systemPropertyVariables>
<fcrepo.dynamic.reindexing.port>${fcrepo.dynamic.reindexing.port}</fcrepo.dynamic.reindexing.port>
<fcrepo.dynamic.test.port>${fcrepo.dynamic.test.port}</fcrepo.dynamic.test.port>
<fcrepo.dynamic.jms.port>${fcrepo.dynamic.jms.port}</fcrepo.dynamic.jms.port>
<project.build.outputDirectory>${project.build.outputDirectory}</project.build.outputDirectory>
<karaf.ssh.port>${karaf.ssh.port}</karaf.ssh.port>
<karaf.rmiRegistry.port>${karaf.rmiRegistry.port}</karaf.rmiRegistry.port>
<karaf.rmiServer.port>${karaf.rmiServer.port}</karaf.rmiServer.port>
<project.version>${project.version}</project.version>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<!-- to generate the MANIFEST-FILE of the bundle -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
......@@ -24,8 +24,21 @@
<configfile finalname="/etc/edu.amherst.acdc.connector.idiomatic.cfg">mvn:edu.amherst.acdc/acrepo-connector-idiomatic/${project.version}/cfg/configuration</configfile>
</feature>
<feature name="acrepo-connector-idiomatic-mysql" version="${project.version}">
<details>Installs the id mapping service database (MySQL)</details>
<feature>jdbc</feature>
<feature>jndi</feature>
<feature>transaction</feature>
<feature>pax-jdbc-config</feature>
<feature>pax-jdbc-mysql</feature>
<feature>pax-jdbc-pool-dbcp2</feature>
<configfile finalname="/etc/org.ops4j.datasource-idiomatic.cfg">mvn:edu.amherst.acdc/acrepo-connector-idiomatic-mysql/${project.version}/cfg/configuration</configfile>
</feature>
<feature name="acrepo-connector-idiomatic-pgsql" version="${project.version}">
<details>Installs the id mapping service database</details>
<details>Installs the id mapping service database (PostgreSQL)</details>
<feature>jdbc</feature>
<feature>jndi</feature>
......
rootProject.name = 'repository-services'
include ':acrepo-connector-broadcast'
include ':acrepo-connector-idiomatic'
include ':acrepo-connector-idiomatic-mysql'
include ':acrepo-connector-idiomatic-pgsql'
include ':acrepo-exts-fits'
include ':acrepo-exts-image'
......@@ -20,6 +21,7 @@ include ':acrepo-itests'
project(':acrepo-connector-broadcast').projectDir = "$rootDir/acrepo-connector-broadcast" as File
project(':acrepo-connector-idiomatic').projectDir = "$rootDir/acrepo-connector-idiomatic" as File
project(':acrepo-connector-idiomatic-mysql').projectDir = "$rootDir/acrepo-connector-idiomatic-mysql" as File
project(':acrepo-connector-idiomatic-pgsql').projectDir = "$rootDir/acrepo-connector-idiomatic-pgsql" as File
project(':acrepo-exts-fits').projectDir = "$rootDir/acrepo-exts-fits" as File
project(':acrepo-exts-image').projectDir = "$rootDir/acrepo-exts-image" as File
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment