com.ancientlightstudios.quarkus.kotlin.openapi.GenerateSourcesMojo.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-kotlin-openapi-maven-plugin Show documentation
Show all versions of quarkus-kotlin-openapi-maven-plugin Show documentation
A Maven plugin to use the OpenAPI generator.
package com.ancientlightstudios.quarkus.kotlin.openapi
import org.apache.maven.plugins.annotations.LifecyclePhase
import org.apache.maven.plugins.annotations.Mojo
import org.apache.maven.plugins.annotations.Parameter
import java.io.File
@Mojo(name = "generate", defaultPhase = LifecyclePhase.GENERATE_SOURCES, requiresProject = true)
class GenerateSourcesMojo : GenerateMojo() {
/**
* The directory where the generated sources should be put
*/
@Parameter(defaultValue = "\${project.build.directory}/generated-sources/quarkus-kotlin-openapi")
override lateinit var outputDirectory: File
override fun registerSourceRoot() {
project.addCompileSourceRoot(outputDirectory.path)
}
}