forked from loafle/openapi-generator-original
Fix inputSpec for multi module builds (#7883)
Prefix path to `inputSpec` with maven's `${project.basedir}`. The codegen-maven-plugin will look inside the current working directory so whether a relative path works or not is depending on where the maven build is invoked from. Using `${project.basedir}` makes the path absolute.
This commit is contained in:
parent
ea2474d707
commit
40c30dd2f1
@ -18,7 +18,7 @@ Add to your `build->plugins` section (default phase is `generate-sources` phase)
|
|||||||
<goal>generate</goal>
|
<goal>generate</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<inputSpec>src/main/resources/api.yaml</inputSpec>
|
<inputSpec>${project.basedir}/src/main/resources/api.yaml</inputSpec>
|
||||||
<language>java</language>
|
<language>java</language>
|
||||||
<configOptions>
|
<configOptions>
|
||||||
<sourceFolder>src/gen/java/main</sourceFolder>
|
<sourceFolder>src/gen/java/main</sourceFolder>
|
||||||
@ -76,7 +76,7 @@ Specifying a custom generator is a bit different. It doesn't support the classpa
|
|||||||
<goal>generate</goal>
|
<goal>generate</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<inputSpec>src/main/resources/yaml/yamlfilename.yaml</inputSpec>
|
<inputSpec>${project.basedir}/src/main/resources/yaml/yamlfilename.yaml</inputSpec>
|
||||||
<!-- language file, like e.g. JavaJaxRSCodegen shipped with swagger -->
|
<!-- language file, like e.g. JavaJaxRSCodegen shipped with swagger -->
|
||||||
<language>com.my.package.for.GeneratorLanguage</language>
|
<language>com.my.package.for.GeneratorLanguage</language>
|
||||||
<templateDirectory>myTemplateDir</templateDirectory>
|
<templateDirectory>myTemplateDir</templateDirectory>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user