springboot-keycloak-openldap
springboot-keycloak-openldap copied to clipboard
Run simple-service using Maven returns error
Starting the application with
./mvnw clean spring-boot:run --projects simple-service -Dspring-boot.run.jvmArguments="-Dserver.port=9080"
downloads the dependencies but ends with the following error:
[ERROR] Unknown lifecycle phase ".run.jvmArguments=-Dserver.port=9080". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: pre-clean, clean, post-clean, validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-site, site, post-site, site-deploy. -> [Help 1]
It seems like maven doesn't understand the specified goals/lifecycle phase clean
or run
? I also tried this with my local maven, bit it produced the same result.
I have
openjdk 17.0.2 2022-01-18
OpenJDK Runtime Environment (build 17.0.2+8-86)
OpenJDK 64-Bit Server VM (build 17.0.2+8-86, mixed mode, sharing)
installed. Do you have an idea what the issue could be? Maybe something in the formatting is not right?
PS: I am executing this on windows in powershell
Hi @BoProc
I do not know as I am Mac user.
One alternative is to set the server.port
, in the application.properties
file,
server.port=9080
Then you run
mvnw.cmd clean spring-boot:run --projects simple-service
According to Maven Wrapper documentation, on Windows, we need to use mvnw.cmd
Thanks for the reply :-) Both suggestions worked, although i had to prefix ./
./mvnw.cmd clean spring-boot:run --projects simple-service
Maybe it is worth uploading the image to dockerhub? This would also make it easier to spin up different containers with different configurations.
That is nice, it has worked on your side.
About building and uploading a Docker image of simple-service app, I believe there won't be many users interested in it.