Integrated lite and full services and controllers in core.

Change-Id: I34914c89c2266fa02bee1a5b0522c46139b13966
diff --git a/core/pom.xml b/core/pom.xml
index abe02bb..253b616 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -3,7 +3,7 @@
 	<modelVersion>4.0.0</modelVersion>
 	<groupId>de.ids_mannheim.korap</groupId>
 	<artifactId>Kustvakt-core</artifactId>
-	<version>0.61.3</version>
+	<version>0.61.4</version>
 
 	<properties>
 		<java.version>1.8</java.version>
@@ -17,36 +17,14 @@
 		<resources>
 			<resource>
 				<directory>src/main/resources</directory>
-				<filtering>true</filtering>
-				<includes>
-					<include>**/*.info</include>
-					<include>**/*.xml</include>
-					<include>**/*.conf</include>
-					<include>**/*.kustvakt</include>
-					<include>**/*.properties</include>
-					<include>**/*.sql</include>
-				</includes>
 			</resource>
 		</resources>
 		<testResources>
 			<testResource>
 				<directory>src/test/resources</directory>
-				<filtering>true</filtering>
-				<includes>
-					<include>**/*.prop</include>
-					<include>**/*.xml</include>
-					<include>**/*.conf</include>
-					<include>**/*.info</include>
-					<include>**/*.properties</include>
-				</includes>
 			</testResource>
 			<testResource>
 				<directory>src/main/resources</directory>
-				<filtering>true</filtering>
-				<includes>
-					<include>**/*.info</include>
-					<include>**/*.properties</include>
-				</includes>
 			</testResource>
 		</testResources>
 		<plugins>
@@ -73,12 +51,20 @@
 					<compilerVersion>${java.version}</compilerVersion>
 					<source>${java.version}</source>
 					<target>${java.version}</target>
+					<processors>
+						<processor>lombok.launch.AnnotationProcessorHider$AnnotationProcessor</processor>
+						<processor>org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor</processor>
+					</processors>
 				</configuration>
 			</plugin>
 
 			<!-- build tests jar, so extensions can use fastjerseytest class to build 
 				rest tests -->
-			<!-- <plugin>
+			<!-- <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> 
+				<version>3.0.1</version> <executions> <execution> <id>attach-sources</id> 
+				<goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> -->
+			<!-- Generate source jar -->
+			<plugin>
 				<groupId>org.apache.maven.plugins</groupId>
 				<artifactId>maven-source-plugin</artifactId>
 				<version>3.0.1</version>
@@ -90,43 +76,17 @@
 						</goals>
 					</execution>
 				</executions>
-			</plugin> -->
-			<!-- Generate source jar -->
-		    <plugin>
-		      <groupId>org.apache.maven.plugins</groupId>
-		      <artifactId>maven-source-plugin</artifactId>
-		      <version>3.0.1</version>
-		      <executions>
-		        <execution>
-		          <id>attach-sources</id>
-		          <goals>
-		            <goal>jar</goal>
-		          </goals>
-		        </execution>
-		      </executions>
-		    </plugin>
-			<!-- <plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-surefire-plugin</artifactId>
-				<version>2.20.1</version>
-
-				<configuration>
-					<reuseForks>false</reuseForks>
-					<forkCount>2</forkCount>
-					<threadCount>10</threadCount>
-					<argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine>
-
-					<excludes>
-						<exclude>**/*APITest.java</exclude>
-					</excludes>
-					<includes>
-						<include>de/ids_mannheim/korap/**/*.java</include>
-					</includes>
-				</configuration>
-			</plugin> -->
+			</plugin>
+			<!-- <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> 
+				<version>2.20.1</version> <configuration> <reuseForks>false</reuseForks> 
+				<forkCount>2</forkCount> <threadCount>10</threadCount> <argLine>-Xmx1024m 
+				-XX:MaxPermSize=256m</argLine> <excludes> <exclude>**/*APITest.java</exclude> 
+				</excludes> <includes> <include>de/ids_mannheim/korap/**/*.java</include> 
+				</includes> </configuration> </plugin> -->
 		</plugins>
 	</build>
 	<dependencies>
+		<!-- Jersey -->
 		<dependency>
 			<groupId>com.sun.jersey</groupId>
 			<artifactId>jersey-bundle</artifactId>
@@ -170,20 +130,27 @@
 				</exclusion>
 			</exclusions>
 		</dependency>
-		<!-- EM:done -->
+
+		<!-- JSON -->
 		<dependency>
-			<groupId>com.sun.jersey.jersey-test-framework</groupId>
-			<artifactId>jersey-test-framework-core</artifactId>
+			<groupId>com.sun.jersey</groupId>
+			<artifactId>jersey-json</artifactId>
 			<version>${jersey.version}</version>
-			<scope>test</scope>
 		</dependency>
 		<dependency>
-			<groupId>com.sun.jersey.jersey-test-framework</groupId>
-			<artifactId>jersey-test-framework-grizzly</artifactId>
-			<version>${jersey.version}</version>
-			<scope>test</scope>
+			<groupId>net.minidev</groupId>
+			<artifactId>json-smart</artifactId>
+			<version>1.0.9</version>
 		</dependency>
-		<!-- EM: Logging -->
+
+		<!-- Flyway -->
+		<dependency>
+			<groupId>org.flywaydb</groupId>
+			<artifactId>flyway-core</artifactId>
+			<version>4.0</version>
+		</dependency>
+
+		<!-- Logging -->
 		<dependency>
 			<groupId>org.apache.logging.log4j</groupId>
 			<artifactId>log4j-api</artifactId>
@@ -195,26 +162,36 @@
 			<version>2.11.0</version>
 		</dependency>
 		<dependency>
-		    <groupId>org.apache.logging.log4j</groupId>
-		    <artifactId>log4j-slf4j-impl</artifactId>
-		    <version>2.11.0</version>
+			<groupId>org.apache.logging.log4j</groupId>
+			<artifactId>log4j-slf4j-impl</artifactId>
+			<version>2.11.0</version>
 		</dependency>
 		<dependency>
-		    <groupId>org.apache.logging.log4j</groupId>
-		    <artifactId>log4j-jul</artifactId>
-		    <version>2.11.0</version>
-		    <exclusions>
-		    	<exclusion>
+			<groupId>org.apache.logging.log4j</groupId>
+			<artifactId>log4j-jul</artifactId>
+			<version>2.11.0</version>
+			<exclusions>
+				<exclusion>
 					<groupId>org.slf4j</groupId>
 					<artifactId>slf4j-api</artifactId>
 				</exclusion>
-		    </exclusions>
+			</exclusions>
 		</dependency>
 		<dependency>
 			<groupId>org.slf4j</groupId>
 			<artifactId>slf4j-api</artifactId>
-		    <version>1.7.25</version>
+			<version>1.7.25</version>
 		</dependency>
+		
+		<!-- Java Assist -->
+		<dependency>
+			<groupId>org.javassist</groupId>
+			<artifactId>javassist</artifactId>
+			<version>3.22.0-GA</version>
+		</dependency>
+
+		<!-- EM:done -->
+
 		<dependency>
 			<groupId>junit</groupId>
 			<artifactId>junit</artifactId>
@@ -233,7 +210,7 @@
 		<dependency>
 			<groupId>de.ids_mannheim.korap</groupId>
 			<artifactId>Koral</artifactId>
-			<version>0.31</version>
+			<version>[0.31,)</version>
 			<exclusions>
 				<exclusion>
 					<groupId>org.eclipse.jetty</groupId>
@@ -285,7 +262,7 @@
 		<dependency>
 			<groupId>de.ids_mannheim.korap</groupId>
 			<artifactId>Krill</artifactId>
-			<version>0.58.1</version>
+			<version>[0.58.1,)</version>
 			<exclusions>
 				<exclusion>
 					<groupId>org.xerial</groupId>
@@ -314,6 +291,8 @@
 			<artifactId>reflections</artifactId>
 			<version>0.9.10</version>
 		</dependency>
+
+		<!-- Spring -->
 		<dependency>
 			<groupId>org.springframework</groupId>
 			<artifactId>spring-core</artifactId>
@@ -334,6 +313,27 @@
 			<artifactId>spring-orm</artifactId>
 			<version>${spring-framework.version}</version>
 		</dependency>
+
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-jdbc</artifactId>
+			<version>${spring-framework.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-tx</artifactId>
+			<version>${spring-framework.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework.security</groupId>
+			<artifactId>spring-security-core</artifactId>
+			<version>${spring-framework.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework.security</groupId>
+			<artifactId>spring-security-web</artifactId>
+			<version>${spring-framework.version}</version>
+		</dependency>
 		<!-- EM: done -->
 		<dependency>
 			<groupId>org.springframework</groupId>
@@ -407,34 +407,15 @@
 			<version>3.2.1</version>
 		</dependency>
 
-		<!-- not part of public release
-		<dependency>
-			<groupId>KorAP-graphDB</groupId>
-			<artifactId>KorAP-graphDB</artifactId>
-			<version>1.0-SNAPSHOT</version>
-			<exclusions>
-				<exclusion>
-					<groupId>org.antlr</groupId>
-					<artifactId>antlr4-runtime</artifactId>
-				</exclusion>
-				<exclusion>
-					<groupId>org.glassfish.jersey.core</groupId>
-					<artifactId>jersey-client</artifactId>
-				</exclusion>
-				<exclusion>
-					<groupId>org.glassfish.jersey.containers</groupId>
-					<artifactId>jersey-container-grizzly2-http</artifactId>
-				</exclusion>
-				<exclusion>
-					<groupId>org.glassfish.jersey.core</groupId>
-					<artifactId>jersey-common</artifactId>
-				</exclusion>
-				<exclusion>
-					<groupId>org.glassfish.jersey.core</groupId>
-					<artifactId>jersey-server</artifactId>
-				</exclusion>
-			</exclusions>
-		</dependency> -->
+		<!-- not part of public release <dependency> <groupId>KorAP-graphDB</groupId> 
+			<artifactId>KorAP-graphDB</artifactId> <version>1.0-SNAPSHOT</version> <exclusions> 
+			<exclusion> <groupId>org.antlr</groupId> <artifactId>antlr4-runtime</artifactId> 
+			</exclusion> <exclusion> <groupId>org.glassfish.jersey.core</groupId> <artifactId>jersey-client</artifactId> 
+			</exclusion> <exclusion> <groupId>org.glassfish.jersey.containers</groupId> 
+			<artifactId>jersey-container-grizzly2-http</artifactId> </exclusion> <exclusion> 
+			<groupId>org.glassfish.jersey.core</groupId> <artifactId>jersey-common</artifactId> 
+			</exclusion> <exclusion> <groupId>org.glassfish.jersey.core</groupId> <artifactId>jersey-server</artifactId> 
+			</exclusion> </exclusions> </dependency> -->
 		<dependency>
 			<groupId>org.apache.httpcomponents</groupId>
 			<artifactId>httpclient</artifactId>
@@ -446,12 +427,20 @@
 			<version>2.6</version>
 		</dependency>
 
+		<!-- Hibernate -->
 		<dependency>
 			<groupId>org.hibernate</groupId>
 			<artifactId>hibernate-ehcache</artifactId>
 			<version>${hibernate.version}</version>
 		</dependency>
 		<dependency>
+			<groupId>org.hibernate</groupId>
+			<artifactId>hibernate-jpamodelgen</artifactId>
+			<version>${hibernate.version}</version>
+			<scope>provided</scope>
+		</dependency>
+		
+		<dependency>
 			<groupId>javax.servlet</groupId>
 			<artifactId>javax.servlet-api</artifactId>
 			<version>4.0.1</version>