Updates to fix generic build

This commit is contained in:
michaelpede 2021-10-26 09:46:00 -07:00
parent 1c677a7dc3
commit 579a88d19c
7 changed files with 33 additions and 11 deletions

1
.gitignore vendored
View File

@ -32,6 +32,7 @@ target
bin
*.iml
*.bak
.env*
classes
.DS_Store
*.local

View File

@ -1,8 +1,11 @@
FROM tomcat:latest
FROM tomcat:9
#FROM tomcat:latest
ENV JPDA_ADDRESS="*:8000"
ENV JPDA_TRANSPORT="dt_socket"
#Not needed while volume mapped for development
#COPY ./target/RESOservice-1.0.war /usr/local/tomcat/webapps/
#COPY ./target/RESODataDictionary-1.7.metadata-report.json /usr/local/tomcat/webapps/
CMD ["catalina.sh", "jpda", "run"]

View File

@ -15,6 +15,7 @@ services:
- SQL_PASSWORD
- SQL_CONNECTION_STR
- SQL_DB_DRIVER
- CERT_REPORT_FILENAME
volumes:
- ./target:/usr/local/tomcat/webapps
# depends_on:

View File

@ -1,7 +1,9 @@
FROM ubuntu:20.10
WORKDIR /usr/src/app
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y wget openjdk-8-jdk curl pip maven docker-compose
RUN apt-get update && apt-get install -y wget curl pip maven docker-compose
RUN update-java-alternatives -s java-1.8.0-openjdk-amd64
CMD ./docker/scripts/build.sh

View File

@ -1,13 +1,18 @@
#!/bin/bash
REAL_VAR0=`readlink -f $0`
HOME_DIR=`dirname ${REAL_VAR0}`
HOME_DIR_OLD=`dirname ${REAL_VAR0}`
HOME_DIR=/usr/src/app
TEMP_DIR="${HOME_DIR}/temp"
SQL_DIR="${HOME_DIR}/sql"
# Ensure we have directories set up
[ -d "${TEMP_DIR}" ] && echo "temp directory found." || mkdir ${TEMP_DIR}
[ -d "${SQL_DIR}" ] && echo "sql directory found." || mkdir ${SQL_DIR}
if [ ! -f "${HOME_DIR}/.env" ]
then
cp "${HOME_DIR}/env-default" "${HOME_DIR}/.env"
fi
if [ -z "${SQL_HOST}" ]
then
@ -19,24 +24,34 @@ then
then
echo "CURL not installed. Exiting build."
exit
else
curl -L https://raw.githubusercontent.com/RESOStandards/web-api-commander/main/src/main/resources/RESODataDictionary-1.7.metadata-report.json --output RESODataDictionary-1.7.metadata-report.json
fi
else
wget https://raw.githubusercontent.com/RESOStandards/web-api-commander/main/src/main/resources/RESODataDictionary-1.7.metadata-report.json -O RESODataDictionary-1.7.metadata-report.json
fi
java -jar temp/web-api-commander.jar --generateReferenceDDL --useKeyNumeric > sql/reso-reference-ddl-dd-1.7.numeric-keys.sql
# The following lines should be independent of the SQL logic.
java -jar temp/web-api-commander.jar --generateResourceInfoModels
mv ResourceInfoModels/* src/main/java/org/reso/service/data/definition/
java -jar temp/web-api-commander.jar --generateReferenceDDL --useKeyNumeric >sql/reso-reference-ddl-dd-1.7.numeric-keys.sql
else
COMPOSE_FILE="docker-compose.yml"
fi
#VERSION=6.5.1
#wget https://services.gradle.org/distributions/gradle-${VERSION}-bin.zip -P /tmp
#unzip -d /opt/gradle /tmp/gradle-${VERSION}-bin.zip
#ln -s /opt/gradle/gradle-${VERSION} /opt/gradle/latest
#/opt/gradle/latest/bin/gradle build
#mkdir target
#cp build/libs/RESOservice-1.0.war ./target/
#cp RESODataDictionary-1.7.metadata-report.json ./target/
if ! mvn compile
then
echo "Maven could not be found."
exit
else
mvn package
cp RESODataDictionary-1.7.metadata-report.json ./target/
fi

View File

@ -22,7 +22,7 @@
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>

View File

@ -61,7 +61,7 @@ public class FieldDefinition extends ResourceInfo
list.add(fieldInfo);
fieldInfo = new FieldInfo("FieldName", EdmPrimitiveTypeKind.String.getFullQualifiedName());
fieldInfo.addAnnotation("The name of the field as expressed in the payload. For OData APIs, this field MUST meet certain naming requirements and should be consistent with whats advertised in the OData XML metadata (to be verified in certification). ", "Core.Description");
fieldInfo.addAnnotation("The name of the field as expressed in the payload. For OData APIs, this field MUST meet certain naming requirements and should be consistent with what's advertised in the OData XML metadata (to be verified in certification). ", "Core.Description");
list.add(fieldInfo);
fieldInfo = new FieldInfo("DisplayName", EdmPrimitiveTypeKind.String.getFullQualifiedName());