dcsaorg / DCSA-BKG

0 stars 1 forks source link

No plugin found for prefix '.run.arguments=--DB_HOSTNAME=localhost' i #122

Closed Sigurdur42 closed 2 years ago

Sigurdur42 commented 2 years ago

I am following the installation guide and do get this error: [ERROR] No plugin found for prefix '.run.arguments=--DB_HOSTNAME=localhost' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\michael.wagner\.m2\repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]

What am I missing here? Unfortunately, I am not a Java expert :(

nt-gt commented 2 years ago

As a work around, I think you can skip that parameter entirely if you set DB_HOSTNAME and the others as environment variables instead.

pimg commented 2 years ago

Hi @Sigurdur42 thank you for reporting this. In the README the Spring boot run options are incorrect. In order to run the application from Maven the following command can be used (README will be updated): mvn spring-boot:run -Dspring-boot.run.arguments="--db_hostname=localhost:5432"

ergo the argument db_hostname needs to be lowercase, whereas the README has this currently in uppercase.

Sigurdur42 commented 2 years ago

Hi, Thx for the update. Unfortunately, this does not change the error message: PS C:\sourcen\github\DCSA-Core> mvn spring-boot:run -Dspring-boot.run.arguments="--db_hostname=localhost:5432" [INFO] Scanning for projects... Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml (14 kB at 30 kB/s) Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml (20 kB at 43 kB/s) [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.688 s [INFO] Finished at: 2022-05-13T10:11:08+02:00 [INFO] ------------------------------------------------------------------------ [ERROR] No plugin found for prefix '.run.arguments=--db_hostname=localhost' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\michael.wagner\.m2\repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException

It looks like the -Dspring-boot.run.arguments is somehow not parsed correctly

Sigurdur42 commented 2 years ago

Update: Calling this in PowerShell causes the issue. Running in cmd passes that step - but brings another issue. I will open a separate topic for that