Skip to content

Commit

Permalink
Fix build.gradle and Dockerfile
Browse files Browse the repository at this point in the history
Remove redundant enums
  • Loading branch information
Valeriia Chekanova committed Jan 2, 2024
1 parent e71cf1f commit bf483ec
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 43 deletions.
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
FROM maven:3.6.1-jdk-11 AS MAVEN
FROM maven:3.9.6-eclipse-temurin-17-alpine as MAVEN

COPY . /fta-fmea
WORKDIR /fta-fmea/ontology-generator
RUN mvn clean install

FROM gradle:6.4-jdk11 AS GRADLE
FROM gradle:8.4-jdk17-alpine as GRADLE
COPY . /fta-fmea
WORKDIR /fta-fmea

COPY --from=MAVEN /fta-fmea/src/main/generated/cz/cvut/kbss/analysis/util/Vocabulary.java \
./src/main/generated/cz/cvut/kbss/analysis/util/Vocabulary.java

RUN ./gradlew clean war
RUN ./gradlew clean bootJar

FROM tomcat:8-jdk11
FROM eclipse-temurin:17-jdk-alpine as runtime

COPY --from=GRADLE /fta-fmea/build/libs/fta-fmea-*.war /usr/local/tomcat/webapps/fta-fmea.war
COPY --from=GRADLE /fta-fmea/build/libs/fta-fmea-*.jar /fta-fmea.jar

EXPOSE 8080
CMD ["catalina.sh", "run"]
CMD ["java", "-jar", "/fta-fmea.jar"]
11 changes: 6 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
buildscript {
repositories {
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "io.freefair.gradle:aspectj-plugin:6.4.3"
}
Expand All @@ -21,8 +24,6 @@ compileJava {
}

repositories {
gradlePluginPortal()
google()
mavenCentral()
}

Expand All @@ -41,10 +42,10 @@ dependencies {

implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.security.oauth.boot:spring-security-oauth2-autoconfigure:2.6.8'
implementation 'org.springframework.security:spring-security-oauth2-core'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.security.oauth.boot:spring-security-oauth2-autoconfigure:2.1.3.RELEASE'

implementation 'io.jsonwebtoken:jjwt:0.9.1'

Expand All @@ -69,4 +70,4 @@ dependencies {

test {
useJUnitPlatform()
}
}
33 changes: 1 addition & 32 deletions src/main/java/cz/cvut/kbss/analysis/util/ConfigParam.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,7 @@ public enum ConfigParam {

SECURITY_SAME_SITE("security.sameSite"),

REPOSITORY_URL("repositoryUrl"),
DRIVER("driver"),
FORM_GEN_REPOSITORY_URL("formGenRepositoryUrl"),
FORM_GEN_SERVICE_URL("formGenServiceUrl"),

APP_CONTEXT("appContext"),

SMTP_HOST("smtp.host"),
SMTP_PORT("smtp.port"),
SMTP_USER("smtp.user"),
SMTP_PASSWORD("smtp.password"),
E_DISPLAY_NAME("email.displayName"),
E_FROM_ADDRESS("email.from"),
E_CC_ADDRESS_LIST("email.cc"),
E_BCC_ADDRESS_LIST("email.bcc"),
E_REPLY_TO_ADDRESS_LIST("email.replyTo"),

E_PASSWORD_RESET_SUBJECT("email.passwordResetSubject"),
E_PASSWORD_RESET_CONTENT("email.passwordResetContent"),

E_INVITATION_SUBJECT("email.invitationSubject"),
E_INVITATION_CONTENT("email.invitationContent"),

E_PASSWORD_CHANGE_SUBJECT("email.passwordChangeSubject"),
E_PASSWORD_CHANGE_CONTENT("email.passwordChangeContent"),

E_PROFILE_UPDATE_SUBJECT("email.profileUpdateSubject"),
E_PROFILE_UPDATE_CONTENT("email.profileUpdateContent"),

OIDC_ROLE_CLAIM("oidc.roleClaim"),

CORS_ALLOWED_ORIGINS("cors.allowedOrigins");
APP_CONTEXT("appContext");

private final String name;

Expand Down

0 comments on commit bf483ec

Please sign in to comment.