Skip to content

Commit

Permalink
Fix version tags for samples (#34092)
Browse files Browse the repository at this point in the history
* Fix version tags for samples

* exlude storageexplorer sample from version check

* remove unwanted var

* Skip entire samples directory from version scanning
  • Loading branch information
srnagar authored Mar 17, 2023
1 parent 848f8e6 commit 36077ac
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
1 change: 1 addition & 0 deletions eng/versioning/external_dependencies.txt
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ org.springframework.data:spring-data-commons;2.7.8
org.springframework.data:spring-data-mongodb;3.4.8
org.springframework.data:spring-data-redis;2.7.8
org.springframework.experimental:spring-aot;0.11.4
org.springframework.experimental:spring-aot-maven-plugin;0.11.4
org.springframework.integration:spring-integration-core;5.5.16
org.springframework.kafka:spring-kafka;2.8.11
org.springframework.security:spring-security-config;5.7.7
Expand Down
10 changes: 10 additions & 0 deletions eng/versioning/pom_file_version_scanner.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ $ValidParents = ("azure-sdk-parent", "azure-client-sdk-parent", "azure-data-sdk-
$SpringSampleParents = ("spring-boot-starter-parent", "azure-spring-boot-test-parent")

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

# Not all POM files have a parent entry
$PomFilesIgnoreParent = ("$($Path)\parent\pom.xml")
Expand Down Expand Up @@ -401,6 +402,15 @@ Get-ChildItem -Path $Path -Filter pom*.xml -Recurse -File | ForEach-Object {
return
}

# Exclude everything that's in samples as this folder contains end to end samples
# that uses BOM and some dependencies will not have versions as they are deduced from
# the BOM. Running version checks on these samples will always fail. So, we'll skip
# all version checks in the root samples directory.
if ($_.FullName.StartsWith($SamplesPath))
{
return
}

# azure-core-jackson-tests verifies compatibility with different
# Jackson versions, it should be excluded from version checks
if ($_.FullName -like "*azure-core-jackson-tests*")
Expand Down
10 changes: 4 additions & 6 deletions samples/azure-samples-graalvm-spring-storageexplorer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@

<properties>
<java.version>11</java.version>
<spring-native.version>0.11.4</spring-native.version>
<graalvm.version>22.3.0</graalvm.version>
<native-maven-plugin.version>0.9.19</native-maven-plugin.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -47,14 +45,14 @@
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>5.11.0</version>
<version>5.6.0</version>
</dependency>

<!-- this enables the Spring support for native-image compilation -->
<dependency>
<groupId>org.springframework.experimental</groupId>
<artifactId>spring-native</artifactId>
<version>${spring-native.version}</version>
<version>0.11.4</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -84,7 +82,7 @@
<plugin>
<groupId>org.springframework.experimental</groupId>
<artifactId>spring-aot-maven-plugin</artifactId>
<version>${spring-native.version}</version>
<version>0.11.4</version>
<executions>
<execution>
<id>test-generate</id>
Expand Down Expand Up @@ -140,7 +138,7 @@
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<version>${native-maven-plugin.version}</version>
<version>0.9.19</version>
<configuration>
<mainClass>com.azure.samples.graalvm.spring.storageexplorer.SpringNativeApplication</mainClass>
<imageName>storageexplorer</imageName>
Expand Down

0 comments on commit 36077ac

Please sign in to comment.