Skip to content

Commit

Permalink
Make azure-spring-boot-test-keyvault support both spring-web and spri…
Browse files Browse the repository at this point in the history
…ng-webflux. (#18670)
  • Loading branch information
Rujun Chen committed Jan 28, 2021
1 parent 02314dd commit 528b736
Show file tree
Hide file tree
Showing 22 changed files with 252 additions and 328 deletions.
2 changes: 1 addition & 1 deletion eng/versioning/pom_file_version_scanner.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ $ValidParents = ("azure-sdk-parent", "azure-client-sdk-parent", "azure-data-sdk-
# The problem with this is, it's a BOM file and the spring dependencies are pulled in through that which means any
# dependencies may or may not have versions. Unfortunately, there are still version tags azure sdk client libraries
# which means these files have to be "sort of" scanned.
$SpringSampleParents = ("spring-boot-starter-parent")
$SpringSampleParents = ("spring-boot-starter-parent", "azure-spring-boot-test-parent")

$Path = Resolve-Path ($PSScriptRoot + "/../../")

Expand Down
2 changes: 1 addition & 1 deletion eng/versioning/update_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def update_versions_all(update_type, build_type, target_file, skip_readme, auto_
for root, _, files in os.walk("."):
for file_name in files:
file_path = root + os.sep + file_name
if (file_name.endswith('.md') and not skip_readme) or (file_name.startswith('pom.') and file_name.endswith('.xml')):
if (file_name.endswith('.md') and not skip_readme) or (file_name.startswith('pom') and file_name.endswith('.xml')):
update_versions(update_type, version_map, ext_dep_map, file_path, skip_readme, auto_version_increment)

# This is a temporary stop gap to deal with versions hard coded in java files.
Expand Down
2 changes: 2 additions & 0 deletions eng/versioning/version_client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ com.azure.spring:azure-spring-boot-test-aad-resource-server-by-filter;1.0.0;1.0.
com.azure.spring:azure-spring-boot-test-core;1.0.0;1.0.0
com.azure.spring:azure-spring-boot-test-cosmosdb;1.0.0;1.0.0
com.azure.spring:azure-spring-boot-test-keyvault;1.0.0;1.0.0
com.azure.spring:azure-spring-boot-test-keyvault-reactive;1.0.0;1.0.0
com.azure.spring:azure-spring-boot-test-parent;1.0.0;1.0.0
com.azure.spring:azure-spring-boot-test-servicebus-jms;1.0.0;1.0.0
com.azure.spring:azure-spring-cloud-test-eventhubs;1.0.0;1.0.0
com.azure.spring:azure-spring-cloud-test-storage;1.0.0;1.0.0
Expand Down
44 changes: 13 additions & 31 deletions sdk/spring/azure-spring-boot-test-aad-b2c/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.7.RELEASE</version> <!-- {x-version-update;org.springframework.boot:spring-boot-starter-parent;external_dependency} -->
<relativePath/> <!-- lookup parent from repository -->
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-test-parent</artifactId>
<version>1.0.0</version> <!-- {x-version-update;com.azure.spring:azure-spring-boot-test-parent;current} -->
<relativePath>../azure-spring-boot-test-parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-test-aad-b2c</artifactId>
<version>1.0.0</version> <!-- {x-version-update;com.azure.spring:azure-spring-boot-test-b2c;current} -->

Expand All @@ -25,28 +26,25 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>

<dependency>
<groupId>org.thymeleaf.extras</groupId>
<artifactId>thymeleaf-extras-springsecurity5</artifactId>
</dependency>

<!-- test dependencies. -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-test-selenium-common</artifactId>
Expand All @@ -55,20 +53,4 @@
</dependency>
</dependencies>

<properties>
<skipSpringITs>true</skipSpringITs>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.0</version> <!-- {x-version-update;org.apache.maven.plugins:maven-failsafe-plugin;external_dependency} -->
<configuration>
<skipITs>${skipSpringITs}</skipITs>
</configuration>
</plugin>
</plugins>
</build>
</project>
29 changes: 7 additions & 22 deletions sdk/spring/azure-spring-boot-test-aad-obo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.7.RELEASE</version> <!-- {x-version-update;org.springframework.boot:spring-boot-starter-parent;external_dependency} -->
<relativePath/> <!-- lookup parent from repository -->
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-test-parent</artifactId>
<version>1.0.0</version> <!-- {x-version-update;com.azure.spring:azure-spring-boot-test-parent;current} -->
<relativePath>../azure-spring-boot-test-parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-test-aad-obo</artifactId>
<version>1.0.0</version> <!-- {x-version-update;com.azure.spring:azure-spring-boot-test-aad-obo;current} -->

Expand Down Expand Up @@ -49,20 +50,4 @@
</dependency>
</dependencies>

<properties>
<skipSpringITs>true</skipSpringITs>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.0</version> <!-- {x-version-update;org.apache.maven.plugins:maven-failsafe-plugin;external_dependency} -->
<configuration>
<skipITs>${skipSpringITs}</skipITs>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.7.RELEASE</version> <!-- {x-version-update;org.springframework.boot:spring-boot-starter-parent;external_dependency} -->
<relativePath/> <!-- lookup parent from repository -->
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-test-parent</artifactId>
<version>1.0.0</version> <!-- {x-version-update;com.azure.spring:azure-spring-boot-test-parent;current} -->
<relativePath>../azure-spring-boot-test-parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-test-aad-resource-server-by-filter</artifactId>
<version>1.0.0</version> <!-- {x-version-update;com.azure.spring:azure-spring-boot-test-aad;current} -->

Expand Down Expand Up @@ -41,20 +42,4 @@
</dependency>
</dependencies>

<properties>
<skipSpringITs>true</skipSpringITs>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.0</version> <!-- {x-version-update;org.apache.maven.plugins:maven-failsafe-plugin;external_dependency} -->
<configuration>
<skipITs>${skipSpringITs}</skipITs>
</configuration>
</plugin>
</plugins>
</build>
</project>
29 changes: 7 additions & 22 deletions sdk/spring/azure-spring-boot-test-aad-resource-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.7.RELEASE</version> <!-- {x-version-update;org.springframework.boot:spring-boot-starter-parent;external_dependency} -->
<relativePath/> <!-- lookup parent from repository -->
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-test-parent</artifactId>
<version>1.0.0</version> <!-- {x-version-update;com.azure.spring:azure-spring-boot-test-parent;current} -->
<relativePath>../azure-spring-boot-test-parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-test-aad-resource-server</artifactId>
<version>1.0.0</version> <!-- {x-version-update;com.azure.spring:azure-spring-boot-test-aad-resource-server;current} -->

Expand Down Expand Up @@ -45,20 +46,4 @@
</dependency>
</dependencies>

<properties>
<skipSpringITs>true</skipSpringITs>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.0</version> <!-- {x-version-update;org.apache.maven.plugins:maven-failsafe-plugin;external_dependency} -->
<configuration>
<skipITs>${skipSpringITs}</skipITs>
</configuration>
</plugin>
</plugins>
</build>
</project>
29 changes: 7 additions & 22 deletions sdk/spring/azure-spring-boot-test-aad/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.7.RELEASE</version> <!-- {x-version-update;org.springframework.boot:spring-boot-starter-parent;external_dependency} -->
<relativePath/> <!-- lookup parent from repository -->
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-test-parent</artifactId>
<version>1.0.0</version> <!-- {x-version-update;com.azure.spring:azure-spring-boot-test-parent;current} -->
<relativePath>../azure-spring-boot-test-parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-test-aad</artifactId>
<version>1.0.0</version> <!-- {x-version-update;com.azure.spring:azure-spring-boot-test-aad;current} -->

Expand Down Expand Up @@ -45,20 +46,4 @@
</dependency>
</dependencies>

<properties>
<skipSpringITs>true</skipSpringITs>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.0</version> <!-- {x-version-update;org.apache.maven.plugins:maven-failsafe-plugin;external_dependency} -->
<configuration>
<skipITs>${skipSpringITs}</skipITs>
</configuration>
</plugin>
</plugins>
</build>
</project>
16 changes: 7 additions & 9 deletions sdk/spring/azure-spring-boot-test-application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.7.RELEASE</version> <!-- {x-version-update;org.springframework.boot:spring-boot-starter-parent;external_dependency} -->
<relativePath/> <!-- lookup parent from repository -->
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-test-parent</artifactId>
<version>1.0.0</version> <!-- {x-version-update;com.azure.spring:azure-spring-boot-test-parent;current} -->
<relativePath>../azure-spring-boot-test-parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-test-application</artifactId>
<version>1.0.0</version> <!-- {x-version-update;com.azure.spring:azure-spring-boot-test-application;current} -->
<packaging>jar</packaging>

<properties>
<java.version>1.8</java.version>
Expand All @@ -26,13 +26,11 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-starter-keyvault-secrets</artifactId>
Expand Down
9 changes: 3 additions & 6 deletions sdk/spring/azure-spring-boot-test-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.7.RELEASE</version> <!-- {x-version-update;org.springframework.boot:spring-boot-starter-parent;external_dependency} -->
<relativePath/> <!-- lookup parent from repository -->
</parent>
<modelVersion>4.0.0</modelVersion>

<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-test-core</artifactId>
<version>1.0.0</version> <!-- {x-version-update;com.azure.spring:azure-spring-boot-test-core;current} -->
<packaging>jar</packaging>

<dependencies>
<dependency>
Expand All @@ -25,10 +26,6 @@
<artifactId>spring-context</artifactId>
<version>5.2.10.RELEASE</version> <!-- {x-version-update;org.springframework:spring-context;external_dependency} -->
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-embedder</artifactId>
Expand Down
Loading

0 comments on commit 528b736

Please sign in to comment.