spring-cli icon indicating copy to clipboard operation
spring-cli copied to clipboard

Add Recipe Catalog

Open fabapp2 opened this issue 1 year ago • 6 comments

Add a simple Recipe Catalog as YAML in src/main/resources. The catalog declares one recipe AddLicenseHeader which can be applied by spring recipe-catalog apply <recipe-id> <params> <path>.

fabapp2 avatar Feb 05 '24 22:02 fabapp2

Some files are missing license header. There's a lot of space instead of tabs we should use.

jvalkeal avatar Feb 06 '24 14:02 jvalkeal

Some files are missing license header. There's a lot of space instead of tabs we should use.

Cries for Spring Java Format & some license-check plugin?

fabapp2 avatar Feb 06 '24 15:02 fabapp2

the point was more so to pick a simple OR recipe...but I get the point.

markpollack avatar Feb 15 '24 15:02 markpollack

when I run the app, it just exits. I don't have this issue in the main branch.

$ git checkout fabapp2-recipe-catalog
Switched to branch 'fabapp2-recipe-catalog'

 (fabapp2-recipe-catalog) ~/projects/spring-cli
$ 

 (fabapp2-recipe-catalog) ~/projects/spring-cli
$ ./gradlew clean build

$ java -jar /home/mark/projects/spring-cli/build/libs/spring-cli-0.9.0-SNAPSHOT.jar

 (fabapp2-recipe-catalog) ~/projects/spring-cli
$

Enabled logging and got the error that a bean was not found. Adding @Component to RecipeParameterParser enabled startup

markpollack avatar Feb 15 '24 15:02 markpollack

not sure how to run this.. tried

$ spring recipe-catalog apply --recipeId AddLicenseHeader
Range [0, -1) out of bounds for length 8
 /tmp/spring/myapp
$ spring recipe-catalog apply --recipeId AddLicenseHeader --parameters licenseText=Copyright
Could not find recipe 'AddLicenseHeader,--parameters,licenseText=Copyright' in catalog.
 /tmp/spring/myapp

markpollack avatar Feb 15 '24 16:02 markpollack

Hey @fabapp2, is this still being worked on? I too would like an easier way to pass params to the recipe and can help out here.

pk-218 avatar May 13 '24 18:05 pk-218