jpobst / Prototype.Android.MavenBindings

Prototype of MSBuild tasks to facilitate binding of Java libraries from Maven repositories
MIT License
5 stars 3 forks source link

Parent POM not understood #9

Open jpobst opened 1 year ago

jpobst commented 1 year ago

Scenario 1

There seems to be an additional way to specify a parent POM we need to investigate: https://repo1.maven.org/maven2/com/squareup/wire/wire-runtime/4.7.1/wire-runtime-4.7.1.pom

That is, this POM does not specify a <parent> section like our previous examples did: https://repo1.maven.org/maven2/com/google/guava/guava/31.1-android/guava-31.1-android.pom

<parent>
  <groupId>com.google.guava</groupId>
  <artifactId>guava-parent</artifactId>
  <version>31.1-android</version>
</parent>

Instead, it specifies this which I think we need to add support for:

<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>com.squareup.okio</groupId>
      <artifactId>okio-bom</artifactId>
      <version>3.3.0</version>
      <type>pom</type>
      <scope>import</scope>
    </dependency>
  </dependencies>
</dependencyManagement>

This probably allows multiple parent POMs to be specified?

https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html

Scenario 2

Another possible way of specifying dependencies: https://maven.google.com/web/index.html?q=androidx.wear.protolayout#androidx.wear.protolayout:protolayout-expression:1.0.0

POM lists:

<dependency>
  <groupId>org.jetbrains.kotlin</groupId>
  <artifactId>kotlin-stdlib</artifactId>
  <scope>runtime</scope>
</dependency>

But does not include any <type>pom</type> as specified in the above example.