Commit 619ab8a8 authored by Mat's avatar Mat

Update build script; Use Java 11 for building

Change all springboot versions used to 2.1.6
Fix relative path of sub-POMs (See https://stackoverflow.com/a/6006098)
parent 394e0414
......@@ -11,7 +11,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.4.RELEASE</version>
<version>2.1.6.RELEASE</version>
</parent>
<dependencies>
......@@ -69,7 +69,7 @@
</dependencies>
<properties>
<java.version>10</java.version>
<java.version>11</java.version>
<docker.image.prefix>dockerfile</docker.image.prefix>
</properties>
......@@ -105,7 +105,7 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<release>${java.version}</release>
<release>10</release>
</configuration>
<dependencies>
<dependency>
......
......@@ -11,7 +11,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.6.RELEASE</version>
<version>2.1.6.RELEASE</version>
</parent>
<dependencies>
......@@ -68,7 +68,7 @@
</dependency>
</dependencies>
<properties>
<java.version>10</java.version>
<java.version>11</java.version>
<docker.image.prefix>dockerfile</docker.image.prefix>
</properties>
<build>
......@@ -101,7 +101,7 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<release>${java.version}</release>
<release>10</release>
</configuration>
<dependencies>
<dependency>
......
......@@ -10,7 +10,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.4.RELEASE</version>
<version>2.1.6.RELEASE</version>
</parent>
<dependencies>
......@@ -68,7 +68,7 @@
</dependencies>
<properties>
<java.version>10</java.version>
<java.version>11</java.version>
<docker.image.prefix>dockerfile</docker.image.prefix>
</properties>
......@@ -102,7 +102,7 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<release>${java.version}</release>
<release>10</release>
</configuration>
<dependencies>
<dependency>
......
......@@ -10,7 +10,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.4.RELEASE</version>
<version>2.1.6.RELEASE</version>
</parent>
<dependencies>
......@@ -52,39 +52,43 @@
</dependencies>
<properties>
<java.version>10</java.version>
<java.version>11</java.version>
<docker.image.prefix>dockerfile</docker.image.prefix>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.4.13</version>
<configuration>
<imageName>${docker.image.prefix}/${project.artifactId}</imageName>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.4.13</version>
<configuration>
<imageName>${docker.image.prefix}/${project.artifactId}</imageName>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>10</release>
</configuration>
</plugin>
</plugins>
<defaultGoal>install</defaultGoal>
<defaultGoal>install</defaultGoal>
</build>
</project>
......@@ -11,12 +11,12 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.4.RELEASE</version>
<version>2.1.6.RELEASE</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>10</java.version>
<java.version>11</java.version>
</properties>
<dependencies>
......@@ -63,4 +63,15 @@
<version>2.9.6</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>10</release>
</configuration>
</plugin>
</plugins>
</build>
</project>
......@@ -11,12 +11,12 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.4.RELEASE</version>
<version>2.1.6.RELEASE</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>10</java.version>
<java.version>11</java.version>
</properties>
<dependencies>
......@@ -63,4 +63,15 @@
<version>2.9.6</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>10</release>
</configuration>
</plugin>
</plugins>
</build>
</project>
......@@ -11,12 +11,12 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.4.RELEASE</version>
<version>2.1.6.RELEASE</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>10</java.version>
<java.version>11</java.version>
</properties>
<dependencies>
......@@ -61,6 +61,16 @@
<artifactId>jackson-databind</artifactId>
<version>2.9.4</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>10</release>
</configuration>
</plugin>
</plugins>
</build>
</project>
......@@ -12,12 +12,12 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.4.RELEASE</version>
<version>2.1.6.RELEASE</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>10</java.version>
<java.version>11</java.version>
</properties>
<dependencies>
......@@ -118,4 +118,15 @@
<version>2.9.6</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>10</release>
</configuration>
</plugin>
</plugins>
</build>
</project>
......@@ -11,12 +11,12 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.4.RELEASE</version>
<version>2.1.6.RELEASE</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>10</java.version>
<java.version>11</java.version>
</properties>
<dependencies>
......@@ -40,4 +40,15 @@
<version>19.0</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>10</release>
</configuration>
</plugin>
</plugins>
</build>
</project>
......@@ -11,12 +11,12 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.4.RELEASE</version>
<version>2.1.6.RELEASE</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>10</java.version>
<java.version>11</java.version>
</properties>
<dependencies>
......@@ -44,4 +44,15 @@
<artifactId>jackson-databind</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>10</release>
</configuration>
</plugin>
</plugins>
</build>
</project>
......@@ -12,12 +12,12 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.4.RELEASE</version>
<version>2.1.6.RELEASE</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>10</java.version>
<java.version>11</java.version>
</properties>
<dependencies>
......@@ -35,6 +35,12 @@
<artifactId>guava</artifactId>
<version>19.0</version>
</dependency>
<!-- <dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
<type>bundle</type>
</dependency> -->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
......@@ -88,6 +94,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<!-- <version>3.8.1</version> -->
<configuration>
<release>10</release>
</configuration>
......
......@@ -9,11 +9,11 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.6.RELEASE</version>
<version>2.1.6.RELEASE</version>
<relativePath></relativePath>
</parent>
<properties>
<java.version>10</java.version>
<java.version>11</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<docker.image.prefix>dockerfile</docker.image.prefix>
</properties>
......@@ -47,6 +47,7 @@
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
......@@ -72,6 +73,26 @@
<version>2.7.0</version>
<scope>compile</scope>
</dependency>
<!-- <dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
<version>1.9.7</version>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
<version>1.9.7</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.23.0</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.4.2.Final</version>
</dependency> -->
<dependency>
<groupId>com.example</groupId>
<artifactId>searchitect-common</artifactId>
......@@ -85,7 +106,7 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<release>${java.version}</release>
<release>10</release>
</configuration>
<dependencies>
<dependency>
......
......@@ -9,7 +9,8 @@ import java.util.Optional;
import java.util.Set;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.json.JsonSimpleJsonParser;
import org.springframework.boot.json.JsonParser;
import org.springframework.boot.json.BasicJsonParser;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
......@@ -101,7 +102,7 @@ public class RepositoryController {
String targetUrl = this.urlBuilder.getTargetUrl(backendName, "repository", "", "");
String response = postResponseStringFromBackend(postData, targetUrl);
// then parse and store repositoryName in userdatabase
JsonSimpleJsonParser jsonparser = new JsonSimpleJsonParser();
JsonParser jsonparser = new BasicJsonParser();
Map<String, Object> map = jsonparser.parseMap(response);
String repositoryName = (String) map.get("repositoryName");
UserAccount user = accountRepository.findByUsername(principal.getName()).get();
......
......@@ -10,7 +10,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.4.RELEASE</version>
<version>2.1.6.RELEASE</version>
</parent>
<dependencies>
......@@ -49,7 +49,7 @@
</dependency>
</dependencies>
<properties>
<java.version>10</java.version>
<java.version>11</java.version>
</properties>
<build>
......
......@@ -11,12 +11,12 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.4.RELEASE</version>
<version>2.1.6.RELEASE</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>10</java.version>
<java.version>11</java.version>
</properties>
<dependencies>
......
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