Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions google-cloud-jar-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<properties>
<skipUnitTests>false</skipUnitTests>
<ignoreNonCompile>true</ignoreNonCompile><!-- maven-dependency-plugin:analyze to skip test scope dependencies -->
<surefire.excludes>**/v*/*ClientTest.java,**/v*/*ClientHttpJsonTest.java</surefire.excludes>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -219,6 +220,15 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>${skipUnitTests}</skip>
<!-- Exclude generated client unit tests directly under versioned packages (e.g., v1, v2)
to save CI execution time. We use the narrow 'v*/*' pattern (single asterisk)
instead of 'v*/**' to ensure we do not exclude manually written unit tests
which live in sub-packages (e.g., v1/client/ or v2/internal/api/).
If a module has customized subclass tests under a versioned package,
override <surefire.excludes/> to empty in its local pom.xml (e.g., google-cloud-bigquerystorage). -->
<excludes>
<exclude>${surefire.excludes}</exclude>
</excludes>
Comment on lines +229 to +231

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

In Maven, when a plugin parameter is of type List (like excludes in maven-surefire-plugin), nesting a comma-separated property inside an <exclude> tag prevents Maven from splitting the string. It treats the entire comma-separated value as a single literal pattern containing a comma, which will fail to match any files and render the exclusion ineffective.

To allow Maven to correctly split the comma-separated property ${surefire.excludes} into individual list elements, pass the property directly to the <excludes> element.

          <excludes>${surefire.excludes}</excludes>

</configuration>
</plugin>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
</parent>
<properties>
<site.installationModule>google-cloud-bigquerystorage</site.installationModule>
<surefire.excludes></surefire.excludes>
</properties>
<dependencyManagement>
<dependencies>
Expand Down
Loading