Skip to content

Commit

Permalink
update deps and build on JDK 11+
Browse files Browse the repository at this point in the history
  • Loading branch information
frantuma committed Mar 6, 2023
1 parent 743cd19 commit 770b670
Show file tree
Hide file tree
Showing 13 changed files with 311 additions and 263 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/maven-v1-pulls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 8 ]
java: [ 11, 17 ]

steps:
- uses: actions/checkout@v2
Expand Down
21 changes: 15 additions & 6 deletions .github/workflows/maven-v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ name: Build Test Deploy 1.5
on:
push:
branches: [ "1.5" ]
pull_request:
branches: [ "1.5" ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
java: [ 8 ]
java: [ 11, 17 ]

steps:
- uses: actions/checkout@v2
Expand All @@ -31,13 +33,20 @@ jobs:
- name: Build with Maven and Gradle
run: |
./mvnw -B -Dhttps.protocols=TLSv1.2 verify --file pom.xml
export MY_POM_VERSION=`./mvnw -q -Dexec.executable="echo" -Dexec.args='${projects.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec`
echo "POM VERSION" ${MY_POM_VERSION}
if [[ $MY_POM_VERSION =~ ^.*SNAPSHOT$ ]];
export MY_JAVA_VERSION=`java -version 2>&1 | head -1 | cut -d'"' -f2 | sed '/^1\./s///' | cut -d'.' -f1`
echo "JAVA VERSION" ${MY_JAVA_VERSION}
if [[ ${MY_JAVA_VERSION} == "11" ]];
then
./mvnw -B -Dhttps.protocols=TLSv1.2 clean deploy
export MY_POM_VERSION=`./mvnw -q -Dexec.executable="echo" -Dexec.args='${projects.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec`
echo "POM VERSION" ${MY_POM_VERSION}
if [[ $MY_POM_VERSION =~ ^.*SNAPSHOT$ ]];
then
./mvnw -B -Dhttps.protocols=TLSv1.2 clean deploy
else
echo "not deploying release: " ${MY_POM_VERSION}
fi
else
echo "not deploying release: " ${MY_POM_VERSION}
echo "not deploying on java version: " ${MY_JAVA_VERSION}
fi
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
Expand Down
22 changes: 13 additions & 9 deletions modules/swagger-annotations/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,25 @@
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>1.6.10-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>swagger-annotations</name>
<build>
<sourceDirectory>src/main/java</sourceDirectory>
<defaultGoal>install</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>${felix-version}</version>
<extensions>true</extensions>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<instructions>
<Export-Package>io.swagger.annotations</Export-Package>
</instructions>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
<manifestEntries>
<Automatic-Module-Name>io.swagger.annotations</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
Expand Down Expand Up @@ -125,4 +129,4 @@
</build>
</profile>
</profiles>
</project>
</project>
48 changes: 29 additions & 19 deletions modules/swagger-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>swagger-core</artifactId>
<packaging>bundle</packaging>
<name>swagger-core</name>
<build>
<sourceDirectory>src/main/java</sourceDirectory>
Expand All @@ -28,31 +27,38 @@
</testResources>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>${felix-version}</version>
<extensions>true</extensions>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<configuration>
<instructions>
<Export-Package>
io.swagger.converter,
io.swagger.core,
io.swagger.core.filter,
io.swagger.core.util,
io.swagger.reader,
io.swagger.config,
io.swagger.model,
io.swagger.util
</Export-Package>
<Import-Package>javax.validation.constraints;version="[1.1,3)",*</Import-Package>
</instructions>
<bnd>
Import-Package: javax.validation.constraints;version="[1.1,3)",*
Export-Package: \
io.swagger.converter,\
io.swagger.core,\
io.swagger.core.filter,\
io.swagger.core.util,\
io.swagger.reader,\
io.swagger.config,\
io.swagger.model,\
io.swagger.util
</bnd>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>default-jar</id>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
<manifestEntries>
<Automatic-Module-Name>io.swagger.core</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</execution>
<execution>
<goals>
<goal>test-jar</goal>
Expand All @@ -63,6 +69,10 @@
</plugins>
</build>
<dependencies>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
Expand Down
49 changes: 34 additions & 15 deletions modules/swagger-hibernate-validations/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,43 @@
</testResources>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>${felix-version}</version>
<extensions>true</extensions>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<configuration>
<instructions>
<Export-Package>
io.swagger.converter,
io.swagger.core,
io.swagger.core.util,
io.swagger.reader,
io.swagger.config,
io.swagger.models
</Export-Package>
<Import-Package>javax.validation.constraints;version="[1.1,3)",*</Import-Package>
</instructions>
<bnd>
Import-Package: javax.validation.constraints;version="[1.1,3)",*
Export-Package: \
io.swagger.converter,\
io.swagger.core,\
io.swagger.core.util,\
io.swagger.reader,\
io.swagger.config,\
io.swagger.models
</bnd>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>default-jar</id>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
<manifestEntries>
<Automatic-Module-Name>io.swagger.validator</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</execution>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
Expand Down
106 changes: 63 additions & 43 deletions modules/swagger-jaxrs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>swagger-jaxrs</artifactId>
<packaging>bundle</packaging>
<name>swagger-jaxrs</name>
<build>
<sourceDirectory>src/main/java</sourceDirectory>
Expand All @@ -29,25 +28,41 @@
</testResources>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>${felix-version}</version>
<extensions>true</extensions>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<configuration>
<instructions>
<Export-Package>
io.swagger.jaxrs,
io.swagger.jaxrs.config,
io.swagger.jaxrs.ext,
io.swagger.jaxrs.listing
</Export-Package>
<Import-Package>
javax.ws.rs*;version="[1.1,3)",
*
</Import-Package>
</instructions>
<bnd>
Import-Package: javax.ws.rs*;version="[1.1,3)",*
Export-Package: \
io.swagger.jaxrs,\
io.swagger.jaxrs.config,\
io.swagger.jaxrs.ext,\
io.swagger.jaxrs.listing
</bnd>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>default-jar</id>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
<manifestEntries>
<Automatic-Module-Name>io.swagger.jaxrs</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</execution>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
Expand All @@ -68,25 +83,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${failsafe-plugin-version}</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<configuration>
<systemPropertyVariables>
<jetty.port>${jetty.port}</jetty.port>
</systemPropertyVariables>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
Expand All @@ -96,10 +92,18 @@
<httpConnector><port>${jetty.port}</port></httpConnector>
<stopKey>a</stopKey>
<stopPort>${jetty.port.stop}</stopPort>
<supportedPackagings>
<supportedPackaging>jar</supportedPackaging>
</supportedPackagings>
<useTestScope>true</useTestScope>
<webAppSourceDirectory>${project.basedir}/src/test/webapp</webAppSourceDirectory>
</configuration>
<dependencies>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>${jakarta.xml.bind-api-version}</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-servlet</artifactId>
Expand All @@ -126,6 +130,24 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${failsafe-plugin-version}</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<configuration>
<systemPropertyVariables>
<jetty.port>${jetty.port}</jetty.port>
</systemPropertyVariables>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
Expand Down Expand Up @@ -207,22 +229,20 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.jayway.restassured</groupId>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<version>${rest-assured-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<artifactId>mockito-core</artifactId>
<version>${mockito-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
</dependencies>
<properties>
<coverage.complexity.minimum>0.50</coverage.complexity.minimum>
<coverage.line.minimum>0.00</coverage.line.minimum>
<coverage.missed.classes>4</coverage.missed.classes>
</properties>
</project>
Loading

0 comments on commit 770b670

Please sign in to comment.