Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #4208
Closed
Open
Issue created Oct 21, 2019 by Administrator@rootContributor

[BUG] [MVN Plugin] - <templateDirectory> is ignored

Created by: yuvalishay

I'm running mvn install with the following configuration - but the looks like the is ignored and Template directory always defaults to embedded dir.

Here is the maven plugin section in which the templateDirectory is ignored:

  <build>
        <plugins>
            <plugin>
                <groupId>org.openapitools</groupId>
                <artifactId>openapi-generator-maven-plugin</artifactId>
                <version>4.1.3</version>
                <executions>
                    <execution>
                        <id>swagger-generate-server-code</id>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <inputSpec>${project.parent.parent.basedir}/src/main/resources/swagger-spec-pet-store.json</inputSpec>
                            <templateDirectory>${project.basedir}/src/main/resources</templateDirectory>
                            <modelPackage>com.computrade.restful.services.model</modelPackage>
                            <apiPackage>com.computrade.restful.services.server.api</apiPackage>
                            <invokerPackage>com.computrade.restful.services.server.invoker</invokerPackage>
                            <configOptions>
                                <interfaceOnly>true</interfaceOnly>
                                <java8>true</java8>
                                <dateLibrary>java8</dateLibrary>
                                <skipDefaultInterface>true</skipDefaultInterface>
                            </configOptions>
                            <configHelp>false</configHelp>
                            <generatorName>spring</generatorName>
                            <library>spring-boot</library>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
openapi-generator version
            <groupId>org.openapitools</groupId>
            <artifactId>openapi-generator-maven-plugin</artifactId>
            <version>4.1.3</version>

I tried also earlier from 4.0.0 and above - but still the same.

Related issues/PRs

https://github.com/OpenAPITools/openapi-generator/issues/3364 I see this issue was closed. ( but it wasn't open on the Maven plugin from the beginning )

Thanks, Yuval Ishay

Assignee
Assign to
Time tracking