Skip to content

Commit

Permalink
Bumps dependencies and Docker base. Also enables the version suffix o…
Browse files Browse the repository at this point in the history
…n JS files to prevent browser caching between versions.
  • Loading branch information
simonbrowndotje committed Nov 4, 2024
1 parent 5e5721d commit 29f920b
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 38 deletions.
4 changes: 2 additions & 2 deletions structurizr-onpremises-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ repositories {
}

dependencies {
def structurizrVersion = '3.0.0'
def structurizrVersion = '3.1.0'
api "com.structurizr:structurizr-client:${structurizrVersion}"

testImplementation 'org.junit.jupiter:junit-jupiter:5.11.0'
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.3'
}

compileJava.options.encoding = 'UTF-8'
Expand Down
4 changes: 2 additions & 2 deletions structurizr-onpremises/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM tomcat:10.1.30-jre17-temurin-jammy
ENV PORT 8080
FROM tomcat:10.1.31-jre17-temurin-jammy
ENV PORT=8080

RUN set -eux; \
apt-get update; \
Expand Down
25 changes: 13 additions & 12 deletions structurizr-onpremises/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ repositories {
maven {
url "https://build.shibboleth.net/maven/releases/"
}
//mavenLocal()
}

testing {
Expand Down Expand Up @@ -48,7 +49,7 @@ dependencies {

implementation project(':structurizr-onpremises-plugin')

def structurizrVersion = '3.0.0'
def structurizrVersion = '3.1.0'
implementation "com.structurizr:structurizr-annotation:${structurizrVersion}"
implementation "com.structurizr:structurizr-dsl:${structurizrVersion}"
implementation "com.structurizr:structurizr-inspection:${structurizrVersion}"
Expand All @@ -60,37 +61,37 @@ dependencies {

implementation 'javax.annotation:javax.annotation-api:1.3.2'

def springVersion = '6.1.13'
def springSecurityVersion = '6.3.3'
def springVersion = '6.1.14'
def springSecurityVersion = '6.3.4'
implementation "org.springframework:spring-webmvc:${springVersion}"
implementation "org.springframework.security:spring-security-web:${springSecurityVersion}"
implementation "org.springframework.security:spring-security-config:${springSecurityVersion}"
implementation "org.springframework.security:spring-security-ldap:${springSecurityVersion}"
implementation "org.springframework.security:spring-security-saml2-service-provider:${springSecurityVersion}"
implementation 'org.springframework.session:spring-session-data-redis:3.3.2'
implementation 'org.springframework.session:spring-session-data-redis:3.3.3'
implementation 'redis.clients:jedis:5.1.5'

def luceneVersion = '9.11.1'
def luceneVersion = '9.12.0'
implementation "org.apache.lucene:lucene-core:${luceneVersion}"
implementation "org.apache.lucene:lucene-queryparser:${luceneVersion}"

def log4jVersion = '2.24.0'
def log4jVersion = '2.24.1'
implementation "org.apache.logging.log4j:log4j-api:${log4jVersion}"
implementation "org.apache.logging.log4j:log4j-core:${log4jVersion}"
implementation "org.apache.logging.log4j:log4j-jcl:${log4jVersion}"
implementation "org.apache.logging.log4j:log4j-slf4j-impl:${log4jVersion}"

implementation 'org.elasticsearch.client:elasticsearch-rest-client:7.17.24'
implementation 'org.elasticsearch.client:elasticsearch-rest-client:7.17.25'
implementation 'org.apache.httpcomponents:httpasyncclient:4.1.5'

implementation 'com.amazonaws:aws-java-sdk-s3:1.12.771'
implementation 'com.amazonaws:aws-java-sdk-sts:1.12.771'
implementation 'com.amazonaws:aws-java-sdk-s3:1.12.777'
implementation 'com.amazonaws:aws-java-sdk-sts:1.12.777'

implementation 'com.azure:azure-storage-blob:12.28.0'
implementation 'com.azure:azure-storage-blob:12.28.1'

implementation 'javax.cache:cache-api:1.1.1'
implementation 'org.ehcache:ehcache:3.10.8'
implementation 'org.redisson:redisson:3.36.0'
implementation 'org.redisson:redisson:3.38.1'

// forced for fewer CVEs
implementation('org.bouncycastle:bcutil-jdk18on') {
Expand All @@ -104,7 +105,7 @@ dependencies {
}
}

testImplementation 'org.testcontainers:elasticsearch:1.20.1'
testImplementation 'org.testcontainers:elasticsearch:1.20.3'
}

configurations.all {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ public class Configuration extends ConfigLookup {

private static final String PLUGINS_DIRECTORY_NAME = "plugins";

private final String versionSuffix;

private File dataDirectory;
private String webUrl;
private Set<String> adminUsersAndRoles = new HashSet<>();
Expand All @@ -41,6 +43,13 @@ public static void init() {
}

private Configuration() {
String buildNumber = new Version().getBuildNumber();
if (StringUtils.isNullOrEmpty(buildNumber)) {
versionSuffix = "";
} else {
versionSuffix = "-" + buildNumber;
}

setDataDirectory(new File(getDataDirectoryLocation()));
setEncryptionPassphrase(getConfigurationParameter("structurizr.encryption", "STRUCTURIZR_ENCRYPTION", StructurizrProperties.ENCRYPTION_PASSPHRASE_PROPERTY, null));
setWebUrl(getConfigurationParameterFromStructurizrPropertiesFile(StructurizrProperties.URL_PROPERTY, ""));
Expand Down Expand Up @@ -128,7 +137,7 @@ public String getCdnUrl() {
}

public String getVersionSuffix() {
return "";
return versionSuffix;
}

public Set<String> getAdminUsersAndRoles() {
Expand Down
3 changes: 0 additions & 3 deletions structurizr-onpremises/src/main/resources/build.properties

This file was deleted.

This file was deleted.

20 changes: 18 additions & 2 deletions ui.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# - this is a temporary script that merges the contents of the structurizr/ui repository into this directory,
# - it will likely be migrated in the Gradle build file at some point in the future
# - this script merges the contents of the structurizr/ui repository into this directory,
# - this has only been tested on MacOS

export STRUCTURIZR_BUILD_NUMBER=$1

export STRUCTURIZR_UI_DIR=../structurizr-ui
export STRUCTURIZR_ONPREMISES_DIR=./structurizr-onpremises

Expand All @@ -13,6 +14,21 @@ cp $STRUCTURIZR_UI_DIR/src/js/* $STRUCTURIZR_ONPREMISES_DIR/src/main/webapp/stat
mkdir $STRUCTURIZR_ONPREMISES_DIR/src/main/webapp/static/js/ace
cp $STRUCTURIZR_UI_DIR/src/js/ace/* $STRUCTURIZR_ONPREMISES_DIR/src/main/webapp/static/js/ace

if [[ $STRUCTURIZR_BUILD_NUMBER != "" ]]
then
for file in $STRUCTURIZR_ONPREMISES_DIR/src/main/webapp/static/js/structurizr*.js
do
filename="${file%.*}"

if [[ $file == *structurizr-embed.js ]]
then
echo "Skipping $filename"
else
mv "$filename.js" "$filename-$STRUCTURIZR_BUILD_NUMBER.js"
fi
done
fi

# CSS
mkdir $STRUCTURIZR_ONPREMISES_DIR/src/main/webapp/static/css
cp $STRUCTURIZR_UI_DIR/src/css/* $STRUCTURIZR_ONPREMISES_DIR/src/main/webapp/static/css
Expand Down

0 comments on commit 29f920b

Please sign in to comment.