Skip to content

Commit

Permalink
Changes to the maven wrapper for openapi-generator-gradle-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
jmini committed Jun 2, 2018
1 parent d735582 commit 4106857
Showing 1 changed file with 57 additions and 3 deletions.
60 changes: 57 additions & 3 deletions modules/openapi-generator-gradle-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>openapi-generator-gradle-plugin</artifactId>
<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>

<name>openapi-generator-gradle-plugin (gradle-plugin)</name>

<dependencies>
<dependency>
Expand All @@ -25,7 +27,7 @@

<!-- 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. -->
<!-- 1) disable maven install (gradle will install a jar and a pom into the local maven repo) -->
<!-- 1) disable maven install. This wrapper is not needed. (gradle will install a jar and a pom into the local maven repo) -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
Expand Down Expand Up @@ -63,6 +65,58 @@
</execution>
</executions>
</plugin>
<!-- 3) copy the gradle artifacts to '/target/gradle-artifacts'. -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>copy-gradle-artifacts</id>
<phase>install</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.basedir}/target/gradle-artifacts</outputDirectory>
<resources>
<resource>
<directory>${settings.localRepository}/org/openapitools/openapi-generator-gradle-plugin/${project.version}/</directory>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<!-- 4) change maven-deploy-plugin. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<executions>
<!-- deploying this wrapper is not needed -->
<execution>
<id>default-deploy</id>
<configuration>
<skip>true</skip>
</configuration>
</execution>
<!-- deploy the jar and the pom from the local maven repo (the one created by gradle) -->
<execution>
<id>custom-deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy-file</goal>
</goals>
<configuration>
<id>sonatype-nexus-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<file>${project.basedir}/target/gradle-artifacts/openapi-generator-gradle-plugin-${project.version}.jar</file>
<pomFile>${project.basedir}/target/gradle-artifacts/openapi-generator-gradle-plugin-${project.version}.pom</pomFile>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down

0 comments on commit 4106857

Please sign in to comment.