Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
William Welling committed Oct 2, 2018
0 parents commit 1117fc7
Show file tree
Hide file tree
Showing 16 changed files with 370 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# http://editorconfig.org/

root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
6 changes: 6 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"plugins": [
"eslint-plugin-json",
"eslint-plugin-raml"
]
}
63 changes: 63 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
bin/
schema/
target/
.settings/
!.mvn/wrapper/maven-wrapper.jar

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr

### NetBeans ###
nbproject/private/
build/
nbbuild/
dist/
nbdist/
.nb-gradle/


# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*


*.log*

*.mv*
*.trace*

*.rdb*

.DS_Store
7 changes: 7 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

buildMvn {
publishAPI = 'yes'
mvnDeploy = 'yes'
runLintRamlCop = 'yes'
}

Empty file added NEWS.md
Empty file.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# mod-camunda

Copyright (C) 2016-2018 The Open Library Foundation

This software is distributed under the terms of the Apache License, Version 2.0.
See the file ["LICENSE"](LICENSE) for more information.
120 changes: 120 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
<?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>

<artifactId>mod-camunda</artifactId>

<name>Okapi Camunda Module</name>
<description>Okapi Camunda module for Business Process Management</description>

<licenses>
<license>
<name>Apache License 2.0</name>
<url>http://spdx.org/licenses/Apache-2.0</url>
</license>
</licenses>

<parent>
<groupId>org.folio</groupId>
<artifactId>spring-module-core</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>

<packaging>jar</packaging>

<properties>
<java.version>1.8</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<build>

<plugins>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>org.folio.rest.domain.generator.EntityJsonSchemaGenerator</mainClass>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
<configuration>
<mainClass>org.folio.rest.SpringOkapiModule</mainClass>
</configuration>
</execution>
</executions>
</plugin>

</plugins>

<resources>
<resource>
<filtering>false</filtering>
<directory>src/main/resources</directory>
<excludes>
<exclude>descriptors/**</exclude>
</excludes>
</resource>
<resource>
<filtering>true</filtering>
<directory>src/main/resources/descriptors</directory>
<targetPath>../</targetPath>
<includes>
<include>DeploymentDescriptor.json</include>
<include>ModuleDescriptor.json</include>
</includes>
</resource>
</resources>

</build>

<dependencies>

<dependency>
<groupId>org.folio</groupId>
<artifactId>tenant</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-rest</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-rest-hal-browser</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>

</dependencies>

</project>
20 changes: 20 additions & 0 deletions src/main/java/org/folio/rest/SpringOkapiModule.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package org.folio.rest;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

@SpringBootApplication
public class SpringOkapiModule extends SpringBootServletInitializer {

@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(SpringOkapiModule.class);
}

public static void main(String[] args) {
SpringApplication.run(SpringOkapiModule.class, args);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{"properties": [
{
"name": "spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation",
"type": "java.lang.String",
"description": "A description for 'spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation'"
},
{
"name": "additional.domain.packages",
"type": "java.lang.String",
"description": "A description for 'additional.domain.packages'"
}
]}
47 changes: 47 additions & 0 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
logging:
file: logs/mod-camunda.log
level:
org:
hibernate: INFO
springframework:
security: INFO
web: INFO
path:

server:
port: 9000

spring:
data.rest:
returnBodyOnCreate: true
returnBodyOnUpdate: true
datasource:
platform: h2
url: jdbc:h2:./target/mod-camunda;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
driverClassName: org.h2.Driver
# platform: postgres
# driverClassName: org.postgresql.Driver
# url: jdbc:postgresql://localhost:5432/mod-camunda

username: folio
password: folio
h2:
console:
enabled: true
path: /h2console
jpa:
database-platform: org.hibernate.dialect.H2Dialect
# database-platform: org.hibernate.dialect.PostgreSQLDialect

properties.hibernate.jdbc.lob.non_contextual_creation: true
generate-ddl: true
hibernate.ddl-auto: create-drop
open-in-view: true
show-sql: false
profiles:
active: default
thymeleaf:
mode: TEXT
suffix: .sql

additional.domain.packages:
5 changes: 5 additions & 0 deletions src/main/resources/banner.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
___ _ ___ _ _ ___ _
/ __|_ __ _ _(_)_ _ __ _ / _ \| |____ _ _ __(_) / __| __ _ _ __ _ __| |___
\__ \ '_ \ '_| | ' \/ _` | | (_) | / / _` | '_ \ | \__ \/ _` | ' \| '_ \ / -_)
|___/ .__/_| |_|_||_\__, | \___/|_\_\__,_| .__/_| |___/\__,_|_|_|_| .__/_\___|
|_| |___/ |_| |_|
7 changes: 7 additions & 0 deletions src/main/resources/descriptors/DeploymentDescriptor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"srvcId": "@project.artifactId@[email protected]@",
"nodeId": "localhost",
"descriptor": {
"exec": "java -jar ../mod-camunda/target/[email protected]@.jar -Dspring.config.location=classpath:/ --server.port=%p"
}
}
25 changes: 25 additions & 0 deletions src/main/resources/descriptors/ModuleDescriptor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"id": "@project.artifactId@[email protected]@",
"name": "Workflow Module",
"provides": [
{
"id": "_tenant",
"version": "1.0",
"interfaceType" : "system",
"handlers" : [
{
"methods" : [ "POST", "DELETE" ],
"pathPattern" : "/_/tenant"
}
]
}
],
"permissionSets" : [],
"launchDescriptor": {
"dockerImage": "@project.artifactId@:@project.version@",
"dockerArgs": {
"HostConfig": { "PortBindings": { "8081/tcp": [{ "HostPort": "%p" }] } }
},
"dockerPull" : false
}
}
Empty file.
41 changes: 41 additions & 0 deletions src/test/resources/application.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
logging:
file: logs/mod-camunda-tests.log
level:
org:
hibernate: INFO
springframework:
security: INFO
web: INFO
path:

server:
port: 9100

spring:
data.rest:
returnBodyOnCreate: true
returnBodyOnUpdate: true
datasource:
platform: h2
url: jdbc:h2:mem:AZ;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
driverClassName: org.h2.Driver
username: folio
password: folio
h2:
console:
enabled: true
path: /h2console
jpa:
database-platform: org.hibernate.dialect.H2Dialect
properties.hibernate.jdbc.lob.non_contextual_creation: true
generate-ddl: true
hibernate.ddl-auto: create-drop
open-in-view: true
show-sql: false
profiles:
active: default
thymeleaf:
mode: TEXT
suffix: .sql

additional.domain.packages:
Empty file.

0 comments on commit 1117fc7

Please sign in to comment.