[not for merge] Trying the Libraries BOM with the shared dependencies BOM content#2162
[not for merge] Trying the Libraries BOM with the shared dependencies BOM content#2162
Conversation
|
google-oauth-client-bom includes google-oauth-client-assembly, which depends on google-play-services:google-play-services. This artifact requires a special installation. |
|
Same error on google-api-client-android |
|
google-api-client-assembly |
|
I've hit that play services issue before, though not, so far as I recall, in oauth-client. It's worth trying to rip that out at the root. We really shouldn't need it. We also might not need assemblies any more. |
|
@elharo Thanks. I agree. I'll try to get rid of these artifacts from their BOMs after checking whether they are unused or not. |
| <artifactId>google-cloud-core</artifactId> | ||
| <version>${google.core.version}</version> | ||
| <type>test-jar</type> |
There was a problem hiding this comment.
Linkage Checker is not handling the google-cloud-core artifact that appears multiple times with different classifiers.
The error is shown as if google-cloud-core is missing.
Error: testForNewLinkageErrors(com.google.cloud.MaximumLinkageErrorsTest) Time elapsed: 161.994 s <<< FAILURE!
java.lang.AssertionError:
Baseline BOM: com.google.cloud:libraries-bom:20.9.0
Newly introduced problems:
Class com.google.cloud.ServiceOptions is not found;
referenced by 24 class files
com.google.cloud.ServiceOptionsTest (com.google.cloud:google-cloud-core:1.95.4)
com.google.cloud.BaseWriteChannelTest (com.google.cloud:google-cloud-core:1.95.4)
com.google.cloud.SerializationTest (com.google.cloud:google-cloud-core:1.95.4)
com.google.cloud.bigquery.BigQueryOptions (com.google.cloud:google-cloud-bigquery:1.137.1)
There was a problem hiding this comment.
The dependency management includes type and classifier.
pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<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>
<groupId>org.example</groupId>
<artifactId>maven-dependency-management-classifier</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-core</artifactId>
<version>1.96.0</version><!-- {x-version-update:google-cloud-core:current} -->
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-core</artifactId>
<type>test-jar</type>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-core</artifactId>
<classifier>tests</classifier>
</dependency>
</dependencies>
</project>
The build fails:
suztomo@suztomo-macbookpro44 maven-dependency-management-classifier % mvn dependency:tree
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] 'dependencies.dependency.version' for com.google.cloud:google-cloud-core:test-jar is missing. @ line 28, column 17
[ERROR] 'dependencies.dependency.version' for com.google.cloud:google-cloud-core:jar:tests is missing. @ line 33, column 17
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.example:maven-dependency-management-classifier:1.0-SNAPSHOT (/Users/suztomo/maven-dependency-management-classifier/pom.xml) has 2 errors
[ERROR] 'dependencies.dependency.version' for com.google.cloud:google-cloud-core:test-jar is missing. @ line 28, column 17
[ERROR] 'dependencies.dependency.version' for com.google.cloud:google-cloud-core:jar:tests is missing. @ line 33, column 17
[ERROR]
There was a problem hiding this comment.
Interestingly, the two Maven coordinates (com.google.cloud:google-cloud-core:tests and com.google.cloud:google-cloud-core:test-jar:tests) refer to the same JAR file.
The code change at the former: https://github.com/googleapis/java-shared-dependencies/pull/59/files#diff-9c5fb3d1b7e3b0f54bc5c4182965c4fe1f9023d449017cece3005d3f90e8e4d8R246
The code change at the latter: https://github.com/googleapis/java-shared-dependencies/pull/40/files#diff-9c5fb3d1b7e3b0f54bc5c4182965c4fe1f9023d449017cece3005d3f90e8e4d8R286
As per documentation (http://maven.apache.org/guides/mini/guide-attached-tests.html), test-jar type and the tests classifier should be specified.
|
The classifier fix remediated the problem around Still there are linkage errors on the test related dependencies, as expected. |


This PR is not going to be merged.
Trying replacing the shared dependencies BOM content to see any failures.