-
Notifications
You must be signed in to change notification settings - Fork 29
Upload specs to Boat bay server #230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| @Parameter(property = "artifactId", defaultValue = "${project.artifactId}", required = true) | ||
| private String artifactId; | ||
|
|
||
| @Parameter(property = "version", defaultValue = "${project.version}", required = true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"The property parameter can be used to allow configuration of the mojo parameter from the command line by referencing a system property that the user sets via the -D option.", hence it is common to namespace them. e.g. boat.radio I would expect there could be other maven plugins/mojos with properties called things like version, or even system properties like username. The output parameter can then be just output with property="boat.radio.output" etc. Although that does make the command line longer, indeed a lot of Apaches maven plugins don't do this e.g. https://maven.apache.org/plugins/maven-dependency-plugin/get-mojo.html, just something to consider...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boat-bay radio is to be executed on spec projects as created by the ssdk archetype. We should inherit the GAV from the project. Why make these configurable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GAV?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was a bit confused about where the plugin would be used. We usually have:
- specs
- api (built from specs)
- BOM (reference above)
At the moment, a project can only be registered via BOM (bom are only cal_ver). Can the plugin be used from api/spec level? Or it can only be used from the BOM level only. In that case, I guess I have to unzip and parse through all files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bartveenstra Should we add unzip logic incase the plugin is used from bom.
Or are we planning to add project creation in boatbay other than bom too?
| BoatMavenPluginApi api = apiClient.buildClient(BoatMavenPluginApi.class); | ||
|
|
||
| UploadRequestBody uploadRequestBody = new UploadRequestBody(); | ||
| uploadRequestBody.setGroupId(groupId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of plugins allow the use of <artifact> A string of the form groupId:artifactId:version[:packaging[:classifier]].
https://maven.apache.org/plugins/maven-dependency-plugin/get-mojo.html#artifact
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Contract is specified by boat-bay. So we need to change it there as well to a single string. Might as well change the data model to use this string instead of separate fields?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would have just been a convenience option for the mojo. Technically not important so no need to change anything.
boat-maven-plugin/src/main/java/com/backbase/oss/boat/RadioMojo.java
Outdated
Show resolved
Hide resolved
boat-maven-plugin/src/main/java/com/backbase/oss/boat/RadioMojo.java
Outdated
Show resolved
Hide resolved
boat-maven-plugin/src/main/java/com/backbase/oss/boat/RadioMojo.java
Outdated
Show resolved
Hide resolved
boat-maven-plugin/src/main/java/com/backbase/oss/boat/RadioMojo.java
Outdated
Show resolved
Hide resolved
boat-maven-plugin/src/main/java/com/backbase/oss/boat/RadioMojo.java
Outdated
Show resolved
Hide resolved
|
Does this PR invalides #214? If so, please close that PR. |
|
With such a major feature, lets move to 0.15! |
Updated all poms to 0.15.0-SNAPSHOT. |
bartveenstra
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome stuff. I want to add some more output to the logging section. Also, I think you can also inject the slf4j logger. I'll add that a bit later today.
|
@bartveenstra Added 3 conditions to fail the build:
|
|
Kudos, SonarCloud Quality Gate passed! |








Using the openapi-generator-maven-plugin to generate sources from
boat-maven-plugin-api.yaml. Using Feign for internal requests. The dependencies were taken from the sample here.For test using mockwebserver to mock the rest call. Using exsisting open-api sample yaml for tests.