From ad104bfe8cf5c9790b78deda2984d278addf659f Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Sat, 4 Feb 2017 17:21:41 +0000 Subject: [PATCH] Revert "mesos marathon demo" This reverts commit 93c704cbf7ede95fc7e9b6b582217e315d5837a6. --- mesos-marathon/Dockerfile | 4 -- mesos-marathon/dockerise.sh | 5 -- mesos-marathon/marathon.json | 14 ------ mesos-marathon/pom.xml | 46 ------------------- .../java/com/mogronalol/DemoApplication.java | 14 ------ .../java/com/mogronalol/HelloController.java | 17 ------- .../src/main/resources/application.properties | 1 - .../com/mogronalol/DemoApplicationTests.java | 34 -------------- pom.xml | 1 - 9 files changed, 136 deletions(-) delete mode 100644 mesos-marathon/Dockerfile delete mode 100644 mesos-marathon/dockerise.sh delete mode 100644 mesos-marathon/marathon.json delete mode 100644 mesos-marathon/pom.xml delete mode 100644 mesos-marathon/src/main/java/com/mogronalol/DemoApplication.java delete mode 100644 mesos-marathon/src/main/java/com/mogronalol/HelloController.java delete mode 100644 mesos-marathon/src/main/resources/application.properties delete mode 100644 mesos-marathon/src/test/java/com/mogronalol/DemoApplicationTests.java diff --git a/mesos-marathon/Dockerfile b/mesos-marathon/Dockerfile deleted file mode 100644 index 9f92f7fa6a..0000000000 --- a/mesos-marathon/Dockerfile +++ /dev/null @@ -1,4 +0,0 @@ -FROM openjdk:8-jre-alpine -ADD build/libs/demo-0.0.1-SNAPSHOT.jar app.jar -EXPOSE 8082 -ENTRYPOINT ["java","-jar","/app.jar"] \ No newline at end of file diff --git a/mesos-marathon/dockerise.sh b/mesos-marathon/dockerise.sh deleted file mode 100644 index 85b8554b52..0000000000 --- a/mesos-marathon/dockerise.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash -set -e -docker login -u mogronalol -p $DOCKER_PASSWORD -docker build -t mogronalol/mesos-marathon-demo:$BUILD_NUMBER . -docker push mogronalol/mesos-marathon-demo:$BUILD_NUMBER diff --git a/mesos-marathon/marathon.json b/mesos-marathon/marathon.json deleted file mode 100644 index 6471259e92..0000000000 --- a/mesos-marathon/marathon.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "id": "mesos-marathon-demo", - "container": { - "type": "DOCKER", - "docker": { - "image": "", - "network": "BRIDGE", - "portMappings": [ - { "containerPort": 8082, "hostPort": 0 } - ] - }, - "volumes": [] - } -} \ No newline at end of file diff --git a/mesos-marathon/pom.xml b/mesos-marathon/pom.xml deleted file mode 100644 index ca17a5c4c4..0000000000 --- a/mesos-marathon/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - 4.0.0 - - com.baeldung - mesos-marathon - 0.0.1-SNAPSHOT - - - org.springframework.boot - spring-boot-starter-parent - 1.5.1.RELEASE - - - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-test - test - - - - - - - org.springframework.boot - spring-boot-maven-plugin - 1.5.1.RELEASE - - - - repackage - - - - - - - - \ No newline at end of file diff --git a/mesos-marathon/src/main/java/com/mogronalol/DemoApplication.java b/mesos-marathon/src/main/java/com/mogronalol/DemoApplication.java deleted file mode 100644 index f757178026..0000000000 --- a/mesos-marathon/src/main/java/com/mogronalol/DemoApplication.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.mogronalol; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -import javax.annotation.PostConstruct; - -@SpringBootApplication -public class DemoApplication { - - public static void main(String[] args) { - SpringApplication.run(DemoApplication.class, args); - } -} diff --git a/mesos-marathon/src/main/java/com/mogronalol/HelloController.java b/mesos-marathon/src/main/java/com/mogronalol/HelloController.java deleted file mode 100644 index 2059280ba0..0000000000 --- a/mesos-marathon/src/main/java/com/mogronalol/HelloController.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.mogronalol; - -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.ResponseBody; -import org.springframework.web.bind.annotation.RestController; - -@RestController(value = "/") -public class HelloController { - - @GetMapping - @ResponseBody - public String getMapping() { - return "Hello world"; - } - -} diff --git a/mesos-marathon/src/main/resources/application.properties b/mesos-marathon/src/main/resources/application.properties deleted file mode 100644 index 8d51d0c619..0000000000 --- a/mesos-marathon/src/main/resources/application.properties +++ /dev/null @@ -1 +0,0 @@ -server.port=8082 \ No newline at end of file diff --git a/mesos-marathon/src/test/java/com/mogronalol/DemoApplicationTests.java b/mesos-marathon/src/test/java/com/mogronalol/DemoApplicationTests.java deleted file mode 100644 index 5e88f9a70f..0000000000 --- a/mesos-marathon/src/test/java/com/mogronalol/DemoApplicationTests.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.mogronalol; - -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.boot.context.embedded.LocalServerPort; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.springframework.web.client.RestTemplate; - -import static org.assertj.core.api.Assertions.assertThat; - -@RunWith(SpringJUnit4ClassRunner.class) -@SpringBootTest(classes = {DemoApplication.class}, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) -public class DemoApplicationTests { - - private RestTemplate restTemplate; - - @LocalServerPort - private int port; - - @Before - public void setUp() { - restTemplate = new RestTemplate(); - } - - @Test - public void contextLoads() { - final String result = restTemplate.getForObject("http://localhost:" + port + "/", String.class); - assertThat(result).isEqualTo("Hello world"); - } - -} diff --git a/pom.xml b/pom.xml index a17b8fc9ce..41235dcc26 100644 --- a/pom.xml +++ b/pom.xml @@ -79,7 +79,6 @@ mapstruct metrics - mesos-marathon mockito mocks