Skip to content

Commit

Permalink
Use Released version in maven samples (#693)
Browse files Browse the repository at this point in the history
* Fixing maven examples:  set version to last released version and other improvements
* Include example poms in the "release_version_update_docs.sh" script
  • Loading branch information
jmini committed Jul 31, 2018
1 parent 0c52fcd commit 8246549
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 16 deletions.
3 changes: 3 additions & 0 deletions bin/utils/release_version_update_docs.sh
Expand Up @@ -36,6 +36,9 @@ echo "IMPORTANT: this script works on Mac only"
echo "Release preparation: replacing $FROM with $TO in different files"

declare -a files=("modules/openapi-generator-maven-plugin/README.md"
"modules/openapi-generator-maven-plugin/examples/java-client.xml"
"modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml"
"modules/openapi-generator-maven-plugin/examples/non-java.xml"
"modules/openapi-generator-gradle-plugin/README.adoc"
"modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties"
"modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle"
Expand Down
33 changes: 21 additions & 12 deletions modules/openapi-generator-maven-plugin/examples/java-client.xml
Expand Up @@ -12,15 +12,15 @@
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>3.1.1-SNAPSHOT</version>
<version>3.1.2</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<!-- specify the swagger yaml -->
<inputSpec>swagger.yaml</inputSpec>
<inputSpec>${project.basedir}/swagger.yaml</inputSpec>

<!-- target to generate java client code -->
<generatorName>java</generatorName>
Expand All @@ -39,13 +39,22 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<!-- dependencies are needed for the client being generated -->

<dependency>
<groupId>org.openapitools</groupId>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>${swagger-annotations-version}</version>
</dependency>
Expand All @@ -55,18 +64,18 @@

<!-- HTTP client: jersey-client -->
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
<version>${jersey-version}</version>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
<version>${jersey-version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
<artifactId>jersey-media-multipart</artifactId>
<version>${jersey-version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-multipart</artifactId>
<artifactId>jersey-media-json-jackson</artifactId>
<version>${jersey-version}</version>
</dependency>

Expand Down Expand Up @@ -96,7 +105,7 @@
<artifactId>jackson-jaxrs-json-provider</artifactId>
<version>${jackson-version}</version>
</dependency>

<!-- Joda time: if you use it -->
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
Expand All @@ -107,19 +116,19 @@
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>${jodatime-version}</version>
</dependency>
</dependency>

<!-- Base64 encoding that works in both JVM and Android -->
<dependency>
<groupId>com.brsanthu</groupId>
<artifactId>migbase64</artifactId>
<version>2.2</version>
</dependency>
</dependency>
</dependencies>

<properties>
<swagger-annotations-version>1.5.8</swagger-annotations-version>
<jersey-version>2.22.2</jersey-version>
<jersey-version>2.27</jersey-version>
<jackson-version>2.8.9</jackson-version>
<jodatime-version>2.7</jodatime-version>
<maven-plugin-version>1.0.0</maven-plugin-version>
Expand Down
Expand Up @@ -12,15 +12,15 @@
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>3.1.1-SNAPSHOT</version>
<version>3.1.2</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<validateSpec>false</validateSpec>
<inputSpec>petstore-v3.0-invalid.yaml</inputSpec>
<inputSpec>${project.basedir}/petstore-v3.0-invalid.yaml</inputSpec>
<generatorName>aspnetcore</generatorName>
<configOptions>
<additional-properties>optionalProjectFile=true</additional-properties>
Expand Down
4 changes: 2 additions & 2 deletions modules/openapi-generator-maven-plugin/examples/non-java.xml
Expand Up @@ -12,14 +12,14 @@
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>3.1.1-SNAPSHOT</version>
<version>3.1.2</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>swagger.yaml</inputSpec>
<inputSpec>${project.basedir}/swagger.yaml</inputSpec>
<generatorName>aspnetcore</generatorName>
<configOptions>
<additional-properties>optionalProjectFile=true</additional-properties>
Expand Down

0 comments on commit 8246549

Please sign in to comment.