Skip to content

Allow the generate mojos (lint, doc, code gen, etc) to be able to read the specs from maven artefacts coordinates #180

@torrespro

Description

@torrespro

Instead of pointing to a single file as we do with inputSpec the idea is to create a new property in the configuration inputMavenArtifact to be able to download the artifact, unzip it and then generate code from it. Because our zips contain multiple yaml files and versions we need a param to specify the fileName.

https://github.com/Backbase/blade/blob/cdebbc6c462c691d1354c003b0d66b875982329f/blade-maven-plugin/src/main/java/com/backbase/oss/blade/mojo/AbstractBladeMojo.java#L149

           <plugin>
                <groupId>com.backbase.oss</groupId>
                <artifactId>boat-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>generate-client-api-code-v1</id>
                        <goals>
                            <goal>generate-spring-boot-embedded</goal>
                        </goals>
                        <phase>generate-sources</phase>
                        <configuration>
<!--                            <inputSpec>${project.build.directory}/specs/review-service-api-v1.0.0.yaml</inputSpec>-->
                            <inputMavenArtifact>     
                                    <groupId>com.backbase.message</groupId>
                                    <artifactId>messaging-api</artifactId>
                                    <version>1.0.0-SNAPSHOT</version>
                                    <classifier>api</classifier>
                                    <type>zip</type>
                                    <overWrite>true</overWrite>
                                    <fileName>review-service-api-v1.0.0.yaml</fileName>
                            </inputMavenArtifact>
                            <apiPackage>com.backbase.reviews.api.service.v1</apiPackage>
                            <modelPackage>com.backbase.reviews.api.service.v1.model</modelPackage>
                        </configuration>
                    </execution>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions