I created a simple spring boot app using the online initializer, downloaded the resultant zip, unzipped it an opened the files in intellij and added some hello world code. However, I haven't found a way to run it from intellij. I runs fine from command line using "./mvnw spring-boot:run".
The intellij documentation says that you should be able to hit the run arrow next to the main class, but this doesn't work at all. Presumably it only works with paid for version of intellij.
I tried creating a new run configuration with type of "maven", and "spring-boot:run" as the run parameter.
When I run this config, it starts well, but fails with this:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.3.1:resources (default-resources) on project kafka1: filtering /Users/xxx/dev/kafka/kafka1/src/main/resources/application.properties to /Users/xxx/dev/kafka/kafka1/target/classes/application.properties failed with MalformedInputException: Input length = 1 -> [Help 1]
Basically it cant copy the application.properties file to target/classes.
Looking deeper, all files and directories in source have the "@" attribute set, and doing "xattr -l application.properties" it gives:
com.apple.provenance:
com.apple.quarantine: 0081;65d7b0ba;Chrome;
This is set for all files and directories that were downloaded from the spring initalizer.
This is a bit of a show stopper for all users of spring boot initializer and intellij (at least free version)?
Does anyone have a hand script which will traverse the project structure "fixing" the quarantine issue, so that intellij can actually run the project?
The solution was to do the following to the projects root dir:
Then do "cd kafka1", then "mvn clean", then you can finally use your new intellij run profile to run the app.