Skip to content

Commit

Permalink
chore: add java-shared-config as parent for consolidated version mana…
Browse files Browse the repository at this point in the history
…gement (#1329)

* chore: add java-shared-config as parent for consolidated version management
  • Loading branch information
mpeddada1 authored Dec 18, 2023
1 parent 1e6b1a0 commit 9e6cdb9
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 110 deletions.
4 changes: 2 additions & 2 deletions .kokoro/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ integration)
;;
graalvm)
# Run Unit and Integration Tests with Native Image
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Pnative-test test -pl 'oauth2_http'
RETURN_CODE=$?
;;
graalvm17)
# Run Unit and Integration Tests with Native Image
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Pnative-test test -pl 'oauth2_http'
RETURN_CODE=$?
;;
samples)
Expand Down
83 changes: 34 additions & 49 deletions oauth2_http/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,57 +23,49 @@

<profiles>
<profile>
<!-- This profile is used to enable GraalVM native image testing -->
<id>native</id>
<dependencies>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>5.10.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>junit-platform-native</artifactId>
<version>0.9.28</version>
<scope>test</scope>
</dependency>
</dependencies>
<id>junit47</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<!-- Must use older version of surefire plugin for native-image testing. -->
<version>2.22.2</version>
<version>${surefire.version}</version>
<configuration>
<!-- Include all tests during native image testing. -->
<excludes combine.self="override"/>
<includes>
<include>**/IT*.java</include>
<include>**/functional/*.java</include>
</includes>
<!-- Excludes integration tests when unit tests are run. -->
<excludes>
<exclude>**/IT*.java</exclude>
<exclude>**/functional/*.java</exclude>
</excludes>
<reportNameSuffix>sponge_log</reportNameSuffix>
</configuration>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>${surefire.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>native-test</id>
<build>
<plugins>
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<version>0.9.28</version>
<extensions>true</extensions>
<executions>
<execution>
<id>test-native</id>
<goals>
<goal>test</goal>
</goals>
<phase>test</phase>
</execution>
</executions>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.version}</version>
<configuration>
<buildArgs>
<buildArg>--no-fallback</buildArg>
<buildArg>--no-server</buildArg>
</buildArgs>
<excludes combine.self="override"></excludes>
<includes>
<include>**/IT*.java</include>
<include>**/functional/*.java</include>
</includes>
</configuration>
</plugin>
</plugins>
Expand Down Expand Up @@ -173,7 +165,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<version>${surefire.version}</version>
<configuration>
<!-- Excludes integration tests when unit tests are run. -->
<excludes>
Expand All @@ -182,13 +174,6 @@
</excludes>
<reportNameSuffix>sponge_log</reportNameSuffix>
</configuration>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>3.0.0-M5</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
3 changes: 2 additions & 1 deletion owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
".kokoro/nightly/integration.cfg",
".kokoro/presubmit/integration.cfg",
".kokoro/presubmit/graalvm-native.cfg",
".kokoro/presubmit/graalvm-native-17.cfg"
".kokoro/presubmit/graalvm-native-17.cfg",
".kokoro/build.sh"
]
)
64 changes: 6 additions & 58 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
</description>
<url>https://github.com/googleapis/google-auth-library-java</url>

<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-shared-config</artifactId>
<version>1.6.1</version>
</parent>

<distributionManagement>
<snapshotRepository>
<id>sonatype-nexus-snapshots</id>
Expand Down Expand Up @@ -69,8 +75,6 @@
<project.appengine.version>2.0.21</project.appengine.version>
<project.findbugs.version>3.0.2</project.findbugs.version>
<deploy.autorelease>false</deploy.autorelease>
<project.autovalue.version>1.8.2</project.autovalue.version>
<auto-value-annotation.version>1.10.4</auto-value-annotation.version>
<project.error-prone.version>2.18.0</project.error-prone.version>
</properties>

Expand Down Expand Up @@ -113,11 +117,6 @@
<artifactId>jsr305</artifactId>
<version>${project.findbugs.version}</version>
</dependency>
<dependency>
<groupId>com.google.auto.value</groupId>
<artifactId>auto-value-annotations</artifactId>
<version>${auto-value-annotation.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down Expand Up @@ -216,14 +215,6 @@
<artifactId>maven-dependency-plugin</artifactId>
<version>3.6.1</version>
</plugin>
<plugin>
<groupId>com.coveo</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.13</version>
<configuration>
<verbose>true</verbose>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>clirr-maven-plugin</artifactId>
Expand Down Expand Up @@ -436,49 +427,6 @@
</plugins>
</build>
</profile>
<profile>
<id>autovalue-java8</id>
<activation>
<jdk>[1.8,)</jdk>
<file>
<exists>${basedir}/EnableAutoValue.txt</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>com.google.auto.value</groupId>
<artifactId>auto-value</artifactId>
<version>${auto-value-annotation.version}</version>
</path>
<!--
Manually pull in auto-service-annotations so that it is part of the
processor path because auto-value has it set to provided scope.
This dependency is needed due to the retention change in
https://github.com/google/auto/commit/628df548685b4fc0f2a9af856f97cc2a68da246b
where the RetentionPolicy changed from SOURCE to CLASS.
Due to the RetentionPolicy change to CLASS we must have the
annotations available on the processor path otherwise the following
error will be thrown. (This is a particular problem with the
annotation processor configuration in IntelliJ)
Error:java: java.lang.NoClassDefFoundError: com/google/auto/service/AutoService
com.google.auto.service.AutoService
-->
<path>
<groupId>com.google.auto.service</groupId>
<artifactId>auto-service-annotations</artifactId>
<version>1.1.1</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>docFX</id>
Expand Down

0 comments on commit 9e6cdb9

Please sign in to comment.