Thank you for the response. I checked it locally and this command works but in the container, it seems to fail. Checked the special character scenario but I couldn’t verify any such characters.
command used - mvn clean install -Pdev -DactiveProfile=dev -DconfigFile=config-dev.properties
Nevertheless, I refactored the code and removed the dependency for the -Pdev option. Once I did this the existing error was resolved.
New commands used in refactored code
mvn clean install -DactiveProfile=dev -DconfigFile=config-dev.properties
docker build --build-arg MAVEN_OPTS=“-DactiveProfile=dev -DconfigFile=config-dev.properties” -t selenium-app .
Updated the above-mentioned Docker file with this change
# Build the Maven project and create the JAR file
ARG MAVEN_OPTS=“-DactiveProfile=dev -DconfigFile=config-dev.properties”
RUN mvn clean install $MAVEN_OPTS