Skip to content

Commit

Permalink
chore: update run scripts and flatten poms
Browse files Browse the repository at this point in the history
  • Loading branch information
matteo-s committed Mar 19, 2024
1 parent 6bac7e9 commit 913efbe
Show file tree
Hide file tree
Showing 12 changed files with 48 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .flattened-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<modelVersion>4.0.0</modelVersion>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>digitalhub-core</artifactId>
<version>0.0.29</version>
<version>0.0.32</version>
<packaging>pom</packaging>
</project>
19 changes: 19 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
MIN_VERSION=21
CUR_VERSION=`java -version 2>&1 | grep 'version' 2>&1 | awk -F\" '{ split($2,a,"."); print a[1]}'`

if [[ "$CUR_VERSION" ]]; then
echo "Detected java version $CUR_VERSION."
if [[ "$CUR_VERSION" -lt "$MIN_VERSION" ]]; then
echo "Required java version is $MIN_VERSION. Exit."
exit
fi
else
echo "Missing java. Exit"
exit
fi


# Build Root Project
echo "Building project"
./mvnw clean install -DskipTests
4 changes: 2 additions & 2 deletions frontend/.flattened-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-console</artifactId>
<version>0.0.29</version>
<version>0.0.32</version>
<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
Expand Down Expand Up @@ -40,7 +40,7 @@
<dependency>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-commons</artifactId>
<version>0.0.29</version>
<version>0.0.32</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion modules/commons/.flattened-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-commons</artifactId>
<version>0.0.29</version>
<version>0.0.32</version>
<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
Expand Down
6 changes: 3 additions & 3 deletions modules/framework-k8s/.flattened-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
<modelVersion>4.0.0</modelVersion>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-framework-k8s</artifactId>
<version>0.0.29</version>
<version>0.0.32</version>
<dependencies>
<dependency>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-commons</artifactId>
<version>0.0.29</version>
<version>0.0.32</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-fsm</artifactId>
<version>0.0.29</version>
<version>0.0.32</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions modules/fsm/.flattened-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<modelVersion>4.0.0</modelVersion>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-fsm</artifactId>
<version>0.0.29</version>
<version>0.0.32</version>
<dependencies>
<dependency>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-commons</artifactId>
<version>0.0.29</version>
<version>0.0.32</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
6 changes: 3 additions & 3 deletions modules/runtime-container/.flattened-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-runtime-container</artifactId>
<version>0.0.29</version>
<version>0.0.32</version>
<dependencies>
<dependency>
<groupId>org.springdoc</groupId>
Expand All @@ -15,13 +15,13 @@
<dependency>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-commons</artifactId>
<version>0.0.29</version>
<version>0.0.32</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-framework-k8s</artifactId>
<version>0.0.29</version>
<version>0.0.32</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
6 changes: 3 additions & 3 deletions modules/runtime-dbt/.flattened-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
<modelVersion>4.0.0</modelVersion>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-runtime-dbt</artifactId>
<version>0.0.29</version>
<version>0.0.32</version>
<dependencies>
<dependency>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-commons</artifactId>
<version>0.0.29</version>
<version>0.0.32</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-framework-k8s</artifactId>
<version>0.0.29</version>
<version>0.0.32</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
6 changes: 3 additions & 3 deletions modules/runtime-mlrun/.flattened-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
<modelVersion>4.0.0</modelVersion>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-runtime-mlrun</artifactId>
<version>0.0.29</version>
<version>0.0.32</version>
<dependencies>
<dependency>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-commons</artifactId>
<version>0.0.29</version>
<version>0.0.32</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-framework-k8s</artifactId>
<version>0.0.29</version>
<version>0.0.32</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
6 changes: 3 additions & 3 deletions modules/runtime-nefertem/.flattened-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
<modelVersion>4.0.0</modelVersion>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-runtime-nefertem</artifactId>
<version>0.0.29</version>
<version>0.0.32</version>
<dependencies>
<dependency>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-commons</artifactId>
<version>0.0.29</version>
<version>0.0.32</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-framework-k8s</artifactId>
<version>0.0.29</version>
<version>0.0.32</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
27 changes: 7 additions & 20 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,15 @@ if [[ $# == 0 ]]; then
PROFILE="default"
fi

# cd modules || exit 1

# # Build each modules
# for module in commons fsm framework-k8s runtime-container runtime-dbt runtime-mlrun runtime-nefertem; do
# echo "Building module: $module"
# cd "$module" || exit 1
# mvn clean install -DskipTests
# cd ..
# done

# cd .. || exit 1
PWD=`pwd`
if [ ! -d "${PWD}/application/target" ]; then
./build.sh
fi

# # Build Application Module
# cd application || exit 1
# echo "Building application module"
# mvn clean install -DskipTests
# cd .. || exit 1

# Build Root Project
echo "Building project"
./mvnw clean install -DskipTests

DB="${PWD}/data/db"
# Run the application
echo "Running Spring Boot application with profile $PROFILE..."
echo "Running Spring Boot application with profile $PROFILE, using $DB..."
export JDBC_URL="jdbc:h2:file:${DB}"
./mvnw spring-boot:run -pl application -Dspring-boot.run.profiles=$PROFILE

0 comments on commit 913efbe

Please sign in to comment.