Skip to content

Commit

Permalink
Merge pull request #10 from ATTX-project/dev
Browse files Browse the repository at this point in the history
Publishing first version for release
  • Loading branch information
jkesanie authored May 22, 2017
2 parents 32d1d67 + 1894a5d commit af0c7f0
Show file tree
Hide file tree
Showing 26 changed files with 1,486 additions and 2 deletions.
110 changes: 110 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
/.nb-gradle/
/.gradle/
/dc-elasticsearch-siren/attx-api-plugin-feature-tests/build/
/dc-elasticsearch-siren/attx-api-plugin/build/

### Gradle ###
.gradle
/build/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Cache of project
.gradletasknamecache

# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties

### Intellij ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

.idea/
# User-specific stuff:
.idea/workspace.xml
.idea/tasks.xml

# Sensitive or high-churn files:
.idea/dataSources/
.idea/dataSources.ids
.idea/dataSources.xml
.idea/dataSources.local.xml
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml
dc-elasticsearch-siren/attx-api-plugin-feature-tests/.idea/

# Gradle:
.idea/gradle.xml
.idea/libraries

# Mongo Explorer plugin:
.idea/mongoSettings.xml

## File-based project format:
*.iws

## Plugin-specific files:

# IntelliJ
/out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

### Intellij Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721

# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr


### Intellij+iml ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff:

# Sensitive or high-churn files:

# Gradle:

# Mongo Explorer plugin:

## File-based project format:

## Plugin-specific files:

# IntelliJ

# mpeltonen/sbt-idea plugin

# JIRA plugin

# Crashlytics plugin (for Android Studio and IntelliJ)

### Intellij+iml Patch ###
# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023

*.iml
modules.xml
.idea/misc.xml
*.ipr

# End of https://www.gitignore.io/api/intellij,intellij+iml
/dc-feature-tests/build/
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
# api-elasticsearch
Elasticsearch based implementation of the public restful API.
# Distribution Component

This ATTX Distribution Component provides the interface between the Graph Component and the applications designed for consuming and disseminating the data produced by the Semantic Web Broker platform.

The Distribution Component consists of:
* ElasticSearch 1.3.4 with Siren plugin (https://github.com/sirensolutions/siren) which has the role of indexing and making the Graph Store knowledge convenient accessible via an API;
* ElasticSearch 5.x which provides the latest functionality in order to index data as plain JSON (after applying a JSON-LD frame http://json-ld.org/spec/latest/json-ld-framing/), JSON-LD or capturing logs.

## Repository Structure

The repository consists of:
* Distribution Component - Integration Tests
* Elasticsearch 1.3.4 ATTX API plugin and associated tests
32 changes: 32 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
plugins {
id "de.undercouch.download" version "3.1.2"
id "com.chrisgahlert.gradle-dcompose-plugin" version "0.8.2"
id "com.github.johnrengelman.shadow" version "1.2.4"
id "com.bmuschko.docker-remote-api" version "3.0.6"
}
apply plugin: 'java'
apply plugin: 'base' // To add "clean" task to the root project.


subprojects {
apply from: rootProject.file('common.gradle')
}

repositories {
mavenCentral()
}

ext {
javaProjectList = ['dc-elasticsearch-siren',
'attx-api-plugin',
'attx-api-plugin-feature-tests',
'dc-feature-tests']
}

def javaProjects() {
subprojects.findAll { javaProjectList.contains(it.name)}
}

configure(javaProjects()) {
apply from: rootProject.file('commonJava.gradle')
}
26 changes: 26 additions & 0 deletions common.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apply plugin: 'base'

ext {
imageRepo = "attx-dev"
imageRepoPort = "5000"
artifactRepoPort = "8081"
jenkinsPort = "49001"
pypiRepoPort = "5039"
dcGroupID = "org.uh.hulib.attx.dc"
}

if (!project.hasProperty("registryURL")) {
ext.registryURL = "http://${imageRepo}:${imageRepoPort}"
}

if (!project.hasProperty("artifactRepoURL")) {
ext.artifactRepoURL = "http://${imageRepo}:${artifactRepoPort}/repository/attx-releases"
}

if (!project.hasProperty("artifactRepoUser")) {
ext.artifactRepoUser = ""
}

if (!project.hasProperty("artifactRepoPassword")) {
ext.artifactRepoPassword = ""
}
87 changes: 87 additions & 0 deletions commonJava.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'com.github.johnrengelman.shadow'

String mavenGroupId = 'org.uh.hulib.attx.dc'
String mavenVersion = '1.0-SNAPSHOT'

targetCompatibility = '1.8'
sourceCompatibility = '1.8'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'

repositories {
// mavenCentral()
maven { url "https://plugins.gradle.org/m2/"}
maven { url "$artifactRepoURL"}
}

dependencies {
// Adding dependencies here will add the dependencies to each subproject.
testCompile 'junit:junit:4.12'
}

String mavenArtifactId = name

group = mavenGroupId
version = mavenVersion

task sourcesJar(type: Jar, dependsOn: classes, description: 'Creates a jar from the source files.') {
classifier = 'sources'
from sourceSets.main.allSource
}

artifacts {
archives jar
archives sourcesJar
}

configure(install.repositories.mavenInstaller) {
pom.project {
groupId = mavenGroupId
artifactId = mavenArtifactId
version = mavenVersion
}
}

task createFolders(description: 'Creates the source folders if they do not exist.') doLast {
sourceSets*.allSource*.srcDirs*.each { File srcDir ->
if (!srcDir.isDirectory()) {
println "Creating source folder: ${srcDir}"
srcDir.mkdirs()
}
}
}

task mergedJavadoc(type: Javadoc, description: 'Creates Javadoc from all the projects.') {
title = 'All modules'
destinationDir = new File(project.buildDir, 'merged-javadoc')

// Note: The closures below are executed lazily.
source {
subprojects*.sourceSets*.main*.allSource
}
classpath.from {
subprojects*.configurations*.compile*.copyRecursive({ !(it instanceof ProjectDependency); })*.resolve()
}
}

// This might

publishing {
repositories {
maven {
// change to point to your repo, e.g. http://my.org/repo
url "${artifactRepoURL}"
credentials {
username "${artifactRepoUser}"
password "${artifactRepoPassword}"
}
}
}
publications {
mavenJava(MavenPublication) {
from components.java
}
}
}
27 changes: 27 additions & 0 deletions dc-elasticsearch-siren/attx-api-plugin-feature-tests/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
if (!hasProperty('mainClass')) {
ext.mainClass = ''
}

dependencies {
testCompile \
'junit:junit:4.10',
'info.cukes:cucumber-java8:1.2.5',
'info.cukes:cucumber-junit:1.2.5',
'info.cukes:cucumber-jython:1.2.5',
'org.python:jython-standalone:2.7.1b3',
'com.mashape.unirest:unirest-java:1.4.9',
'org.skyscreamer:jsonassert:1.4.0',
'net.javacrumbs.json-unit:json-unit:1.16.0',
'net.javacrumbs.json-unit:json-unit-fluent:1.16.0',
'org.apache.jena:apache-jena-libs:3.1.1'
}

test {
testLogging.showStandardStreams = true
systemProperties System.getProperties()
}

task copyToLib(type: Copy) {
into "$buildDir/output/lib"
from configurations.testCompile
}
Loading

0 comments on commit af0c7f0

Please sign in to comment.