From 62fd719197af2b924e60a9e746f0174df44140b5 Mon Sep 17 00:00:00 2001 From: Rudi Schlatte <rudi@ifi.uio.no> Date: Fri, 1 Mar 2024 10:48:07 +0100 Subject: [PATCH] Remove spring-boot-demo leftovers Change-Id: I5a7409fb200dba004a88e4249bd6b32e0aaf4b3e --- README.md | 9 ++++ java-spring-boot-demo/.gitignore | 33 --------------- java-spring-boot-demo/Dockerfile | 15 ------- java-spring-boot-demo/pom.xml | 42 ------------------- .../com/example/demo/DemoApplication.java | 13 ------ .../java/com/example/demo/DemoController.java | 14 ------- .../src/main/resources/application.properties | 0 .../example/demo/DemoApplicationTests.java | 13 ------ nebulous-requirements-extractor/build.gradle | 7 ++++ .../optimiser/kubevela/package-info.java | 4 +- 10 files changed, 18 insertions(+), 132 deletions(-) delete mode 100644 java-spring-boot-demo/.gitignore delete mode 100644 java-spring-boot-demo/Dockerfile delete mode 100644 java-spring-boot-demo/pom.xml delete mode 100644 java-spring-boot-demo/src/main/java/com/example/demo/DemoApplication.java delete mode 100644 java-spring-boot-demo/src/main/java/com/example/demo/DemoController.java delete mode 100644 java-spring-boot-demo/src/main/resources/application.properties delete mode 100644 java-spring-boot-demo/src/test/java/com/example/demo/DemoApplicationTests.java diff --git a/README.md b/README.md index bb25fd9..3ee313d 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,15 @@ This module serves two purposes: coming in via ActiveMQ and invoke the optimizer as needed, thereby possibly triggering application reconfigurations. +## The `nebulous-requirements-extractor` library + +This library offers the utility class `KubevelaAnalyzer` that extracts +component requirements from KubeVela files. This code is used both in the +optimiser-controller and in other components of the NebulOuS optimiser. + +The library will be built and deployed automatically as part of the build +process of the optimiser-controller. + # Building To compile, install a JDK (Java Development Kit) version 17 or greater on the build machine. diff --git a/java-spring-boot-demo/.gitignore b/java-spring-boot-demo/.gitignore deleted file mode 100644 index 549e00a..0000000 --- a/java-spring-boot-demo/.gitignore +++ /dev/null @@ -1,33 +0,0 @@ -HELP.md -target/ -!.mvn/wrapper/maven-wrapper.jar -!**/src/main/**/target/ -!**/src/test/**/target/ - -### STS ### -.apt_generated -.classpath -.factorypath -.project -.settings -.springBeans -.sts4-cache - -### IntelliJ IDEA ### -.idea -*.iws -*.iml -*.ipr - -### NetBeans ### -/nbproject/private/ -/nbbuild/ -/dist/ -/nbdist/ -/.nb-gradle/ -build/ -!**/src/main/**/build/ -!**/src/test/**/build/ - -### VS Code ### -.vscode/ diff --git a/java-spring-boot-demo/Dockerfile b/java-spring-boot-demo/Dockerfile deleted file mode 100644 index 427e30e..0000000 --- a/java-spring-boot-demo/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -# -# Build stage -# -FROM docker.io/library/maven:3.9.2-eclipse-temurin-17 AS build -COPY src /home/app/src -COPY pom.xml /home/app -RUN mvn -f /home/app/pom.xml clean package - -# -# Package stage -# -FROM docker.io/library/eclipse-temurin:17-jre -COPY --from=build /home/app/target/demo-0.0.1-SNAPSHOT.jar /usr/local/lib/demo.jar -EXPOSE 8080 -ENTRYPOINT ["java","-jar","/usr/local/lib/demo.jar"] diff --git a/java-spring-boot-demo/pom.xml b/java-spring-boot-demo/pom.xml deleted file mode 100644 index 76e0f0e..0000000 --- a/java-spring-boot-demo/pom.xml +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-parent</artifactId> - <version>3.1.0</version> - <relativePath/> <!-- lookup parent from repository --> - </parent> - <groupId>com.example</groupId> - <artifactId>demo</artifactId> - <version>0.0.1-SNAPSHOT</version> - <name>demo</name> - <description>Demo project for Spring Boot</description> - <properties> - <java.version>17</java.version> - </properties> - <dependencies> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter</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-test</artifactId> - <scope>test</scope> - </dependency> - </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-maven-plugin</artifactId> - </plugin> - </plugins> - </build> -</project> diff --git a/java-spring-boot-demo/src/main/java/com/example/demo/DemoApplication.java b/java-spring-boot-demo/src/main/java/com/example/demo/DemoApplication.java deleted file mode 100644 index 094d95b..0000000 --- a/java-spring-boot-demo/src/main/java/com/example/demo/DemoApplication.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class DemoApplication { - - public static void main(String[] args) { - SpringApplication.run(DemoApplication.class, args); - } - -} diff --git a/java-spring-boot-demo/src/main/java/com/example/demo/DemoController.java b/java-spring-boot-demo/src/main/java/com/example/demo/DemoController.java deleted file mode 100644 index 61a5075..0000000 --- a/java-spring-boot-demo/src/main/java/com/example/demo/DemoController.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.example.demo; - -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class DemoController { - - @RequestMapping("/") - public Object root() { - return null; - } - -} diff --git a/java-spring-boot-demo/src/main/resources/application.properties b/java-spring-boot-demo/src/main/resources/application.properties deleted file mode 100644 index e69de29..0000000 diff --git a/java-spring-boot-demo/src/test/java/com/example/demo/DemoApplicationTests.java b/java-spring-boot-demo/src/test/java/com/example/demo/DemoApplicationTests.java deleted file mode 100644 index eaa9969..0000000 --- a/java-spring-boot-demo/src/test/java/com/example/demo/DemoApplicationTests.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.demo; - -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -@SpringBootTest -class DemoApplicationTests { - - @Test - void contextLoads() { - } - -} diff --git a/nebulous-requirements-extractor/build.gradle b/nebulous-requirements-extractor/build.gradle index 40f90e7..a3e2474 100644 --- a/nebulous-requirements-extractor/build.gradle +++ b/nebulous-requirements-extractor/build.gradle @@ -1,6 +1,11 @@ /* * This file was generated by the Gradle 'init' task. * + * NOTE: any changes in this file also need to be replicated in the `pom.xml` + * file in the same directory! The CI/CD process uses maven, so changes to + * dependencies made in this file will work locally but not propagate to the + * distributed library otherwise. + * * This project uses @Incubating APIs which are subject to change. */ @@ -26,6 +31,8 @@ repositories { } dependencies { + // NOTE: replicate any changes in this section in the `pom.xml` file as well + // JSON parsing; exported to consumers // https://github.com/FasterXML/jackson api 'com.fasterxml.jackson.core:jackson-databind:2.16.1' diff --git a/nebulous-requirements-extractor/src/main/java/eu/nebulouscloud/optimiser/kubevela/package-info.java b/nebulous-requirements-extractor/src/main/java/eu/nebulouscloud/optimiser/kubevela/package-info.java index 6945cd0..bf63bf3 100644 --- a/nebulous-requirements-extractor/src/main/java/eu/nebulouscloud/optimiser/kubevela/package-info.java +++ b/nebulous-requirements-extractor/src/main/java/eu/nebulouscloud/optimiser/kubevela/package-info.java @@ -1,6 +1,6 @@ /** - * This library provides the class {@link KubevelaAnalyzer}, which factors out - * common code to extract node requirements from KubeVela files. + * This library provides the utility class {@link KubevelaAnalyzer}, which + * factors out common code to extract node requirements from KubeVela files. * * @author Rudolf Schlatte */