openapi-generator-gradle-plugin-mvn-wrapper
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-gradle-plugin-mvn-wrapper</artifactId>
<version>7.21.0</version>
</dependency><project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-project</artifactId>
<!-- RELEASE_VERSION -->
<version>7.21.0</version>
<!-- /RELEASE_VERSION -->
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>openapi-generator-gradle-plugin-mvn-wrapper</artifactId>
<packaging>pom</packaging>
<name>openapi-generator-gradle-plugin (maven wrapper)</name>
<description>This is a maven wrapper to call gradle during installation phase</description>
<properties>
<skipNexusStagingDeployMojo>true</skipNexusStagingDeployMojo>
<gradleVersion>8.14.4</gradleVersion>
<gradle-tooling.version>7.4.2</gradle-tooling.version>
</properties>
<pluginRepositories>
<pluginRepository>
<id>Gradle Releases</id>
<name>Gradle Releases repository</name>
<url>https://repo.gradle.org/gradle/libs-releases/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<!-- NOTE: Consider this temporary, as a way to cleanly hook into our pipeline.
We've discussed moving the entire project to gradle https://github.com/OpenAPITools/openapi-generator/issues/200, which would avoid this fitting. -->
<pluginManagement>
<plugins>
<!-- 1) disable maven install. This wrapper is not needed. (gradle will install a jar and a pom into the local maven repo) -->
<plugin>
<artifactId>maven-install-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<!-- 3) disable maven deploy. This wrapper is not needed. -->
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>${project.parent.basedir}${file.separator}google_checkstyle.xml</configLocation>
</configuration>
</plugin>
<!-- 2) run gradle -->
<plugin>
<groupId>org.fortasoft</groupId>
<artifactId>gradle-maven-plugin</artifactId>
<version>1.0.8</version>
<!-- The plugin is no longer supported, so dependency has to be overridden -->
<!-- https://github.com/LendingClub/gradle-maven-plugin/issues/39 -->
<dependencies>
<dependency>
<groupId>org.gradle</groupId>
<artifactId>gradle-tooling-api</artifactId>
<version>${gradle-tooling.version}</version>
</dependency>
</dependencies>
<configuration>
<gradleVersion>${gradleVersion}</gradleVersion>
<args>
<arg>-P openApiGeneratorVersion=${project.version}</arg>
<!--
<arg>-Psigning.keyId=${env.SIGNING_KEY}</arg>
<arg>-Psigning.password=${env.SIGNING_PASSPHRASE}</arg>
<arg>-Psigning.secretKeyRingFile=${env.TRAVIS_BUILD_DIR}/sec.gpg</arg>
-->
</args>
<!-- Force the Gradle daemon to use the same JVM Maven is running with.
This prevents Gradle from picking up a system-level JDK (e.g. JDK 25)
when Maven is configured to run on a different JDK (e.g. JDK 21). -->
<jvmArgs>
<jvmArg>-Dorg.gradle.java.home=${java.home}</jvmArg>
</jvmArgs>
</configuration>
<executions>
<execution>
<id>gradle-build</id>
<phase>install</phase>
<goals>
<!-- goal must be "invoke" -->
<goal>invoke</goal>
</goals>
<configuration>
<tasks>
<!-- calls "clean build publishToMavenLocal" (build includes tests) -->
<task>clean</task>
<task>build</task>
<task>publishToMavenLocal</task>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>skip-gradle-tests</id>
<activation>
<property>
<name>maven.test.skip</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.fortasoft</groupId>
<artifactId>gradle-maven-plugin</artifactId>
<executions>
<!-- Override the gradle-build execution: keep `build` (so checkstyle,
spotbugs, and other check-lifecycle tasks still run) but add
`-x test` to exclude only the Gradle test task, mirroring
Maven's maven.test.skip behaviour which does not skip quality checks. -->
<execution>
<id>gradle-build</id>
<configuration>
<args combine.children="append">
<arg>-x</arg>
<arg>test</arg>
</args>
<tasks>
<task>clean</task>
<task>build</task>
<task>publishToMavenLocal</task>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>skip-gradle-tests-skipTests</id>
<activation>
<property>
<name>skipTests</name>
<!-- Maven maps bare -DskipTests to the string "true", so this matches
both -DskipTests and -DskipTests=true but NOT -DskipTests=false. -->
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.fortasoft</groupId>
<artifactId>gradle-maven-plugin</artifactId>
<executions>
<!-- Override the gradle-build execution: keep `build` (so checkstyle,
spotbugs, and other check-lifecycle tasks still run) but add
`-x test` to exclude only the Gradle test task.
combine.children="append" appends to the plugin-level <args>
instead of replacing them, preserving -P openApiGeneratorVersion. -->
<execution>
<id>gradle-build</id>
<configuration>
<args combine.children="append">
<arg>-x</arg>
<arg>test</arg>
</args>
<tasks>
<task>clean</task>
<task>build</task>
<task>publishToMavenLocal</task>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>static-analysis</id>
<build>
<plugins>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<excludeFilterFile>${project.parent.basedir}${file.separator}spotbugs-exclude.xml</excludeFilterFile>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
</plugin>
<plugin>
<groupId>se.bjurr.violations</groupId>
<artifactId>violations-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>