SORMAS-Foundation / SORMAS-Project

SORMAS (Surveillance, Outbreak Response Management and Analysis System) is an early warning and management system to fight the spread of infectious diseases.
https://sormas.org
GNU General Public License v3.0
293 stars 143 forks source link

Build without app is not possible / only with workaround #13064

Open fhauptmann opened 7 months ago

fhauptmann commented 7 months ago

Problem Description

When building sormas without the maven profile "with-app" the script sormas-base/dev/collect-artifacts.sh is called during the build process. This script tries to copy sormas-app build artifacts that don't exist:

mkdir -p $COLLECT_ROOT_PATH/android cp -R ../../sormas-app/app/build/outputs/apk/* $COLLECT_ROOT_PATH/android

even when the maven profile "with-app" is not activated. This makes the build fail.

Reproduction Steps

  1. initiate build of sormas-base/pom.xml with goal "install"

Build will fail with error:

Collecting SORMAS artifacts cp: cannot stat ‘../../sormas-app/app/build/outputs/apk/*’: No such file or directory Build step 'Execute shell' marked build as failure

Expected Behavior

Build is successfull without building the Android app.

Affected Area(s)

Android app

SORMAS Version

1.96.0-SNAPSHOT

Android version/Browser

Jenkins

User Role(s)

No user involved

Server URL

No response

Additional Information

As a workaround we tried to put some dummy content to sormas-app/app/build/outputs/apk/