From 54a3992118f4455b99fee8f3a648145bcf2b8e65 Mon Sep 17 00:00:00 2001 From: Maros Marsalek Date: Thu, 11 Aug 2016 13:05:32 +0200 Subject: HONEYCOMB-23 Add plugin sample and sample minimal distribution Change-Id: Idbcdc5a52a9bfd3b90c039f1a1e58c258cd01849 Signed-off-by: Maros Marsalek --- samples/minimal-distribution/pom.xml | 71 ++++++++++++++++++++++ .../java/io/fd/honeycomb/samples/distro/Main.java | 33 ++++++++++ 2 files changed, 104 insertions(+) create mode 100644 samples/minimal-distribution/pom.xml create mode 100644 samples/minimal-distribution/src/main/java/io/fd/honeycomb/samples/distro/Main.java (limited to 'samples/minimal-distribution') diff --git a/samples/minimal-distribution/pom.xml b/samples/minimal-distribution/pom.xml new file mode 100644 index 000000000..c8311aead --- /dev/null +++ b/samples/minimal-distribution/pom.xml @@ -0,0 +1,71 @@ + + + + + + io.fd.honeycomb.common + minimal-distribution-parent + 1.0.0-SNAPSHOT + ../../common/minimal-distro-parent + + + 4.0.0 + io.fd.honeycomb.samples.distro + minimal-distribution + 1.0.0-SNAPSHOT + + + -Xms128m -Xmx128m + io.fd.honeycomb.samples.distro.Main + + + + + + maven-compiler-plugin + + + org.codehaus.gmaven + groovy-maven-plugin + + + org.apache.maven.plugins + maven-jar-plugin + + + org.apache.maven.plugins + maven-dependency-plugin + + + maven-assembly-plugin + + + + + + + io.fd.honeycomb.samples.interfaces + interfaces-mapping + 1.0.0-SNAPSHOT + + + io.fd.honeycomb + minimal-distribution + 1.0.0-SNAPSHOT + + + + diff --git a/samples/minimal-distribution/src/main/java/io/fd/honeycomb/samples/distro/Main.java b/samples/minimal-distribution/src/main/java/io/fd/honeycomb/samples/distro/Main.java new file mode 100644 index 000000000..f6b38aa78 --- /dev/null +++ b/samples/minimal-distribution/src/main/java/io/fd/honeycomb/samples/distro/Main.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2016 Cisco and/or its affiliates. + * + * 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. + */ + +package io.fd.honeycomb.samples.distro; + +import com.google.common.collect.Lists; +import com.google.inject.Module; +import io.fd.honeycomb.samples.interfaces.mapping.SampleInterfaceModule; +import java.util.List; + +public class Main { + + public static void main(String[] args) { + final List sampleModules = Lists.newArrayList(io.fd.honeycomb.infra.distro.Main.BASE_MODULES); + + sampleModules.add(new SampleInterfaceModule()); + + io.fd.honeycomb.infra.distro.Main.init(sampleModules); + } +} -- cgit 1.2.3-korg