Commit 7a3b0684 authored by Kostis Trantzas's avatar Kostis Trantzas
Browse files

Merge branch '3-populate-main-branch-with-initial-commit-release-0' into 'main'

Resolve "Populate main branch with initial commit (Release 0)"

Closes #3

See merge request !2
parents edb8bba6 e0d6ec6f
Loading
Loading
Loading
Loading

.gitignore

0 → 100644
+4 −0
Original line number Diff line number Diff line
/target/
.project
.classpath
/.settings

Dockerfile.centrallog

0 → 100644
+6 −0
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 -p /opt/openslice/lib/
COPY target/org.etsi.osl.centrallog.service-1.2.0-SNAPSHOT.jar /opt/openslice/lib/
CMD ["java", "-Xshareclasses:cacheDir=/opt/shareclasses", "-jar", "/opt/openslice/lib/org.etsi.osl.centrallog.service-1.2.0-SNAPSHOT.jar"]
 No newline at end of file

pom.xml

0 → 100644
+209 −0
Original line number Diff line number Diff line

<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>

	<parent>
		<groupId>org.etsi.osl</groupId>
		<artifactId>org.etsi.osl.main</artifactId>
		<version>1.2.0-SNAPSHOT</version>
		<relativePath>../org.etsi.osl.main</relativePath>
	</parent>

	<artifactId>org.etsi.osl.centrallog.service</artifactId>
	<name>org.etsi.osl.centrallog.service</name>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<spring.boot-version>${spring-boot-version}</spring.boot-version>
		<spring.cloud-consul-version>${spring-cloud-consul-version}</spring.cloud-consul-version>
	</properties>


	<dependencyManagement>
		<dependencies>
			<!-- Spring Boot BOM -->
			<dependency>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-dependencies</artifactId>
				<version>${spring.boot-version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<!-- Camel BOM -->
			<dependency>
				<groupId>org.apache.camel.springboot</groupId>
				<artifactId>camel-spring-boot-dependencies</artifactId>
				<version>${camel.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<dependencies>
		<!-- Spring Boot -->
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter</artifactId>
			<exclusions>
				<exclusion>
					<groupId>org.springframework.boot</groupId>
					<artifactId>spring-boot-starter-tomcat</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-cache</artifactId>
		</dependency>

		<dependency>
			<groupId>org.apache.camel.springboot</groupId>
			<artifactId>camel-undertow-starter</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-undertow</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
		</dependency>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-actuator</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-starter-bootstrap</artifactId>
			<version>3.0.2</version>
		</dependency>

		<!-- <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-consul-discovery</artifactId> 
			</dependency> -->


		<!-- activeMQ -->
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-activemq</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.activemq</groupId>
			<artifactId>activemq-amqp</artifactId>
			<scope>test</scope>
			<exclusions>
				<exclusion>
					<groupId>org.apache.qpid</groupId>
					<artifactId>proton-j</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.messaginghub</groupId>
			<artifactId>pooled-jms</artifactId>
		</dependency>


		<!-- Camel -->
		<dependency>
			<groupId>org.apache.camel.springboot</groupId>
			<artifactId>camel-spring-boot-starter</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.activemq</groupId>
			<artifactId>activemq-pool</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.camel</groupId>
			<artifactId>camel-activemq</artifactId>
			<exclusions>
				<exclusion>
					<groupId>org.apache.activemq</groupId>
					<artifactId>activemq-broker</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.apache.camel.springboot</groupId>
			<artifactId>camel-service-starter</artifactId>
		</dependency>

		<dependency>
  			<groupId>org.apache.camel.springboot</groupId>
			<artifactId>camel-http-starter</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.camel</groupId>
			<artifactId>camel-jackson</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.camel</groupId>
			<artifactId>camel-http-common</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.camel</groupId>
			<artifactId>camel-stream</artifactId>
		</dependency>
		<dependency>
			<groupId>com.h2database</groupId>
			<artifactId>h2</artifactId>
		</dependency>

		<!-- models -->
		<dependency>
			<groupId>org.etsi.osl</groupId>
			<artifactId>org.etsi.osl.model</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>org.etsi.osl</groupId>
			<artifactId>org.etsi.osl.tmf.api</artifactId>
			<version>${project.version}</version>
		</dependency>


		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-databind</artifactId>
		</dependency>

	</dependencies>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<configuration>
						<source>${java.version}</source>
						<target>${java.version}</target>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
				<version>${spring-boot-version}</version>
				<executions>
					<execution>
						<goals>
							<goal>repackage</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>

	</build>



</project>
+56 −0
Original line number Diff line number Diff line
package org.etsi.osl.centrallog.service;

/*-
 * ========================LICENSE_START=================================
 * org.etsi.osl.bugzilla
 * %%
 * Copyright (C) 2019 openslice.io
 * %%
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =========================LICENSE_END==================================
 */


import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.context.config.annotation.RefreshScope;


/**
 * @author ichatzis
 *
 * based on
 * https://github.com/apache/camel/tree/master/examples/camel-example-spring-boot-activemq
 * https://github.com/indrabasak/spring-consul-example 
 */
// This is equivalent to @Configuration, @EnableAutoConfiguration, and @ComponentScan
@SpringBootApplication
// This annotation is used for consul
@EnableDiscoveryClient
//@EnableRetry
// This is from spring-cloud to allow local configuration application
@RefreshScope
// @EnableAutoConfiguration annotation tells Spring Boot to "guess" how you will want to configure Spring, 
// based on the jar dependencies that you have added. For example, If HSQLDB is on your classpath, and you 
// have not manually configured any database connection beans, then Spring will auto-configure an in-memory database. 
@EnableAutoConfiguration
// This is enabled by default
@EnableConfigurationProperties
public class CentralLogService {
	public static void main(String[] args) {		
		SpringApplication.run( CentralLogService.class, args);	
	}
}
+45 −0
Original line number Diff line number Diff line
package org.etsi.osl.centrallog.service;

/*-
 * ========================LICENSE_START=================================
 * org.etsi.osl.portal.api
 * %%
 * Copyright (C) 2019 openslice.io
 * %%
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =========================LICENSE_END==================================
 */
/**
 * @author ichatzis
 **/

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableConfigurationProperties
@ConfigurationProperties
public class CentralLoggerConfig {

	
    private String centrallogurl;

	public String getCentrallogurl() {
		return centrallogurl;
	}

	public void setCentrallogurl(String centrallogurl) {
		this.centrallogurl = centrallogurl;
	} 
}
Loading