Skip to content

Commit

Permalink
Merge pull request #16 from rajaram5/develop
Browse files Browse the repository at this point in the history
To test hub.docker trigger
  • Loading branch information
rajaram5 committed Dec 20, 2017
2 parents 1026186 + 2ec528f commit 538ff87
Show file tree
Hide file tree
Showing 39 changed files with 3,190 additions and 431 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Expand Up @@ -2,9 +2,9 @@ language: java
jdk:
- oraclejdk8
before_install:
- git clone https://github.com/DTL-FAIRData/fairmetadata4j ~/fairmetadata4j
- git clone -b develop https://github.com/DTL-FAIRData/fairmetadata4j ~/fairmetadata4j
- cd ~/fairmetadata4j
- git checkout 0.1-beta
# - git checkout 0.1-beta
- mvn install
- cd $TRAVIS_BUILD_DIR
after_success:
Expand Down
8 changes: 8 additions & 0 deletions Dockerfile
@@ -0,0 +1,8 @@
FROM tomcat:8.0-jre8-alpine

MAINTAINER Rajaram Kaliyaperumal <rr.kaliyaperumal@gmail.com>

# Copy setup file
COPY dockerSetup.sh /
# RUN setup file
RUN sh /dockerSetup.sh
4 changes: 2 additions & 2 deletions README.md
@@ -1,7 +1,7 @@
[![Build Status](https://travis-ci.org/DTL-FAIRData/FAIRDataPoint.svg?branch=master)](https://travis-ci.org/DTL-FAIRData/FAIRDataPoint)
[![Build Status](https://travis-ci.org/DTL-FAIRData/FAIRDataPoint.svg?branch=develop)](https://travis-ci.org/DTL-FAIRData/FAIRDataPoint)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/61f029299b814ca8be2b8edbaab6ce50)](https://www.codacy.com/app/rajaram5/FAIRDataPoint?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=DTL-FAIRData/FAIRDataPoint&amp;utm_campaign=Badge_Grade)
[![Dependency Status](https://www.versioneye.com/user/projects/589dd946940b230031fbadd6/badge.svg?style=flat-square)](https://www.versioneye.com/user/projects/589dd946940b230031fbadd6)
[![Coverage Status](https://coveralls.io/repos/github/DTL-FAIRData/FAIRDataPoint/badge.svg?branch=master)](https://coveralls.io/github/DTL-FAIRData/FAIRDataPoint?branch=master)
[![Coverage Status](https://coveralls.io/repos/github/DTL-FAIRData/FAIRDataPoint/badge.svg?branch=develop)](https://coveralls.io/github/DTL-FAIRData/FAIRDataPoint?branch=develop)

### Summary
`FAIRDataPoint` is a REST api for creating, storing and servering `FAIR metadata`. The metadata contents are in this api are generated `semi-automatically` according to the [FAIR Data Point software specification](https://dtl-fair.atlassian.net/wiki/display/FDP/FAIR+Data+Point+software+specification) document. In the current version of api we support `GET, POST and PATCH` requests.
Expand Down
37 changes: 37 additions & 0 deletions dockerSetup.sh
@@ -0,0 +1,37 @@
#!/bin/sh

# Install nano, git and maven openjdk-8-jdk
apk update
apk upgrade
apk add --no-cache bash nano git maven
apk add --no-cache openjdk8

# clone fairmetadata4j repository
git clone --depth 1 -b develop https://github.com/DTL-FAIRData/fairmetadata4j /fairmetadata4j

# Install fairmetadata4j
cd /fairmetadata4j
mvn --quiet --fail-fast install

# Clone FAIRDataPoint repository
cd /
git clone --depth 1 -b develop https://github.com/DTL-FAIRData/FAIRDataPoint /FAIRDataPoint

# Build FAIRDataPoint
cd /FAIRDataPoint
mvn --quiet --fail-fast verify

# Remove ROOT dir
rm -rf /usr/local/tomcat/webapps/ROOT/*

# Add FDP folder to tomcat webapps
cp -rf /FAIRDataPoint/target/fdp/* /usr/local/tomcat/webapps/ROOT

# Remove unused DIR
cd /
rm -rf /FAIRDataPoint
rm -rf /fairmetadata4j
rm -rf /root/.m2/repository/*

# Remove unused apps
apk del git maven openjdk8
936 changes: 936 additions & 0 deletions hs_err_pid891.log

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions nb-configuration.xml
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-shared-configuration>
<!--
This file contains additional configuration written by modules in the NetBeans IDE.
The configuration is intended to be shared among all the users of project and
therefore it is assumed to be part of version control checkout.
Without this configuration present, some functionality in the IDE may be limited or fail altogether.
-->
<properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1">
<!--
Properties that influence various parts of the IDE, especially code formatting and the like.
You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up.
That way multiple projects can share the same settings (useful for formatting rules for example).
Any value defined here will override the pom.xml file value but is only applicable to the current project.
-->
<org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_deploy_2e_server>Tomcat</org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_deploy_2e_server>
</properties>
</project-shared-configuration>
140 changes: 72 additions & 68 deletions pom.xml
@@ -1,26 +1,22 @@
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<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>nl.dtls</groupId>
<artifactId>fairdatapoint</artifactId>
<packaging>war</packaging>
<version>0.1-beta</version>

<packaging>war</packaging>

<name>FairDataPoint</name>
<description>A reference implementation of FAIRDataPoint api</description>
<inceptionYear>2017</inceptionYear>
<description>
A reference implementation of FAIRDataPoint api
</description>

<licenses>
<license>
<name>The MIT License</name>
<url>https://opensource.org/licenses/MIT</url>
</license>
</licenses>

<developers>
<developer>
<name>Rajaram Kaliyaperumal</name>
Expand All @@ -39,61 +35,54 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<springframework.version>4.3.5.RELEASE</springframework.version>
<springdata.version>2.5.6.RELEASE</springdata.version>
<maven.compiler.target>1.8</maven.compiler.target>

<springframework.version>5.0.0.RELEASE</springframework.version>
<springdata.version>3.0.0.RELEASE</springdata.version>
<springfox-swagger.version>2.6.1</springfox-swagger.version>
<springsecurity.version>4.2.1.RELEASE</springsecurity.version>
<javaxservlet.version>3.1.0</javaxservlet.version>
<jackson.version>2.8.6</jackson.version>
<rdf4j.version>2.1.4</rdf4j.version>
<log4j.version>2.7</log4j.version>
<springsecurity.version>4.2.3.RELEASE</springsecurity.version>
<javaxservlet.version>4.0.0</javaxservlet.version>
<jackson.version>2.9.2</jackson.version>
<rdf4j.version>2.2.2</rdf4j.version>
<log4j.version>2.9.1</log4j.version>
<handlebars.version>4.0.6</handlebars.version>
<fairmetadata.version>0.1-beta</fairmetadata.version>
<velocity.version>1.7</velocity.version>
<snakeyaml.version>1.19</snakeyaml.version>
<unirest.version>1.4.9</unirest.version>
<junit.version>4.12</junit.version>
<mockito.version>2.6.2</mockito.version>
<plugin.mavenwar.version>3.0.0</plugin.mavenwar.version>
<mockito.version>2.11.0</mockito.version>

<plugin.mavenwar.version>3.2.0</plugin.mavenwar.version>
<plugin.mavenlic.version>3.0</plugin.mavenlic.version>
<plugin.coveralls.version>4.3.0</plugin.coveralls.version>
<plugin.cobertura.version>2.7</plugin.cobertura.version>
</properties>

<repositories>
<repository>
<id>jcenter-snapshots</id>
<name>jcenter</name>
<url>https://jcenter.bintray.com/</url>
</repository>
</repositories>

<dependencies>
<!-- compile -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<artifactId>spring-webmvc</artifactId>
<version>${springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-rest-webmvc</artifactId>
<version>${springdata.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${springframework.version}</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>${springfox-swagger.version}</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>${springfox-swagger.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
Expand All @@ -104,12 +93,11 @@
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>${springsecurity.version}</version>
</dependency>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>${javaxservlet.version}</version>
<scope>provided</scope>
<groupId>nl.dtl</groupId>
<artifactId>fairmetadata4j</artifactId>
<version>${fairmetadata.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
Expand All @@ -120,17 +108,13 @@
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j.version}</version>
</dependency>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
<version>${velocity.version}</version>
</dependency>

<dependency>
<groupId>org.eclipse.rdf4j</groupId>
<artifactId>rdf4j-runtime</artifactId>
Expand All @@ -140,7 +124,12 @@
<groupId>org.eclipse.rdf4j</groupId>
<artifactId>rdf4j-rio-api</artifactId>
<version>${rdf4j.version}</version>
</dependency>
</dependency>
<dependency>
<groupId>org.eclipse.rdf4j</groupId>
<artifactId>rdf4j-sail-nativerdf</artifactId>
<version>${rdf4j.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
Expand All @@ -151,16 +140,26 @@
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.github.jknack</groupId>
<artifactId>handlebars-springmvc</artifactId>
<version>${handlebars.version}</version>
</dependency>
<dependency>
<groupId>com.mashape.unirest</groupId>
<artifactId>unirest-java</artifactId>
<version>${unirest.version}</version>
</dependency>

<!-- provided -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>${javaxservlet.version}</version>
<scope>provided</scope>
</dependency>

<!-- test -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand All @@ -179,19 +178,22 @@
<version>${springframework.version}</version>
<scope>test</scope>
</dependency>

<!-- runtime -->
<dependency>
<groupId>nl.dtl</groupId>
<artifactId>fairmetadata4j</artifactId>
<version>${fairmetadata.version}</version>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>${springfox-swagger.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>${snakeyaml.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>jcenter-snapshots</id>
<name>jcenter</name>
<url>https://jcenter.bintray.com/</url>
</repository>
</repositories>

<build>
<finalName>fdp</finalName>
<pluginManagement>
Expand Down Expand Up @@ -221,6 +223,7 @@
<excludes>
<exclude>pom.xml</exclude>
<exclude>**/*.ttl</exclude>
<exclude>**/*.yml</exclude>
<exclude>**/*.sparql</exclude>
<exclude>**/*.properties</exclude>
<exclude>**/log4j2.xml</exclude>
Expand All @@ -242,6 +245,7 @@
</plugin>
</plugins>
</build>

<reporting>
<plugins>
<plugin>
Expand All @@ -251,4 +255,4 @@
</plugin>
</plugins>
</reporting>
</project>
</project>
Expand Up @@ -61,7 +61,7 @@ public void doFilterInternal(final HttpServletRequest request,
HttpHeaders.CONTENT_TYPE);
response.setHeader(HttpHeaders.ALLOW, allowedMtds);
response.setHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_METHODS,
(HttpHeaders.ACCEPT));
allowedMtds);
ThreadContext.put("ipAddress", request.getRemoteAddr());
ThreadContext.put("responseStatus", String.valueOf(
response.getStatus()));
Expand Down
Expand Up @@ -37,12 +37,12 @@ public class ApplicationInitializer extends
AbstractAnnotationConfigDispatcherServletInitializer {
@Override
protected Class<?>[] getRootConfigClasses() {
return new Class[]{};
return new Class[]{ RootConfig.class, RestApiContext.class };
}

@Override
protected Class<?>[] getServletConfigClasses() {
return new Class[]{RestApiContext.class};
return new Class[]{};
}

@Override
Expand Down
Expand Up @@ -65,9 +65,8 @@ private ApiInfo apiInfo() {
+ "<li><a target='_blank' href = 'https://dtl-fair."
+ "atlassian.net/wiki/display/FDP/FAIR+Data+Point+"
+ "Software+Specification'>API specs</li>"
+ "<li><a target='_blank' href = 'https://github.com/"
+ "DTL-FAIRData/ODEX-FAIRDataPoint/tree/master/fdp-api"
+ "/java'>Source code</a> </li></p>",
+ "<li><a target='_blank' href = 'https://github.com/DTL-FAIRData/"
+ "FAIRDataPoint'>Source code</a> </li></p>",
"0.1-beta",
"ATO",
"rr.kaliyaperumal@gmail.com",
Expand Down

0 comments on commit 538ff87

Please sign in to comment.