Commit 734d9c49 authored by Christos Tranoris's avatar Christos Tranoris
Browse files

Merge branch 'develop' into parent-child-characteristics

parents 3cf80469 d303f614
Loading
Loading
Loading
Loading

.gitlab-ci.yml

0 → 100644
+32 −0
Original line number Diff line number Diff line
include:
  - project: osl/code/org.etsi.osl.main
    ref: main
    file: 
      - ci-templates/default.yml
      - ci-templates/build.yml
    rules:
      - if: '$CI_COMMIT_REF_NAME == "main"'
  
  - project: osl/code/org.etsi.osl.main
    ref: develop
    file: 
      - ci-templates/default.yml
      - ci-templates/build.yml
    rules:
      - if: '$CI_COMMIT_REF_NAME == "develop"'

  - project: osl/code/org.etsi.osl.main
    ref: develop
    file: 
      - ci-templates/default.yml
      - ci-templates/build_unprotected.yml
    rules:
      - if: '$CI_COMMIT_REF_NAME != "main" && $CI_COMMIT_REF_NAME != "develop"'

maven_build:
  extends: .maven_build

docker_build:
  extends: .docker_build
  needs:
    - maven_build
+1 −2
Original line number Diff line number Diff line
FROM ibm-semeru-runtimes:open-17.0.7_7-jdk
MAINTAINER openslice.io
RUN mkdir /opt/shareclasses
# RUN mkdir /opt/shareclasses
RUN mkdir -p /opt/openslice/lib/
COPY target/org.etsi.osl.tmf.api-1.2.0-SNAPSHOT-exec.jar /opt/openslice/lib/
CMD ["java", "-Xshareclasses:cacheDir=/opt/shareclasses", "-jar", "/opt/openslice/lib/org.etsi.osl.tmf.api-1.2.0-SNAPSHOT-exec.jar"]

ci_settings.xml

0 → 100644
+16 −0
Original line number Diff line number Diff line
<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
  <servers>
    <server>
      <id>gitlab-maven</id>
      <configuration>
        <httpHeaders>
          <property>
            <name>Job-Token</name>
            <value>${CI_JOB_TOKEN}</value>
          </property>
        </httpHeaders>
      </configuration>
    </server>
  </servers>
</settings>
+17 −2
Original line number Diff line number Diff line
@@ -6,7 +6,6 @@
		<groupId>org.etsi.osl</groupId>
		<artifactId>org.etsi.osl.main</artifactId>
		<version>1.2.0-SNAPSHOT</version>
		<relativePath>../org.etsi.osl.main</relativePath>
	</parent>


@@ -27,6 +26,22 @@
		<lombok-version>1.18.28</lombok-version>
	</properties>

	<repositories>
		<repository>
			<id>gitlab-maven</id>
			<url>https://labs.etsi.org/rep/api/v4/groups/260/-/packages/maven</url>
		</repository>
	</repositories>
	<distributionManagement>
		<repository>
			<id>gitlab-maven</id>
			<url>${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/maven</url>
		</repository>
		<snapshotRepository>
			<id>gitlab-maven</id>
			<url>${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/maven</url>
		</snapshotRepository>
	</distributionManagement>
	
	<dependencyManagement>
		<dependencies>
+8 −3
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ import java.io.InputStream;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;

/**
 * @author ctranoris
@@ -12,27 +13,31 @@ import com.fasterxml.jackson.databind.ObjectMapper;
 */
public class JsonUtils {

	static byte[] toJson(Object object) throws IOException {
	public static byte[] toJson(Object object) throws IOException {
		ObjectMapper mapper = new ObjectMapper();
		mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
		mapper.registerModule(new JavaTimeModule());
		return mapper.writeValueAsBytes(object);
	}

	static String toJsonString(Object object) throws IOException {
	public static String toJsonString(Object object) throws IOException {
		ObjectMapper mapper = new ObjectMapper();
		mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
		mapper.registerModule(new JavaTimeModule());
		return mapper.writeValueAsString(object);
	}

	public static <T> T toJsonObj(String content, Class<T> valueType) throws IOException {
		ObjectMapper mapper = new ObjectMapper();
		mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
		mapper.registerModule(new JavaTimeModule());
		return mapper.readValue(content, valueType);
	}

	static <T> T toJsonObj(InputStream content, Class<T> valueType) throws IOException {
	public static <T> T toJsonObj(InputStream content, Class<T> valueType) throws IOException {
		ObjectMapper mapper = new ObjectMapper();
		mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
		mapper.registerModule(new JavaTimeModule());
		return mapper.readValue(content, valueType);
	}

Loading