diff --git a/gradle-plugins/src/integTest/groovy/com/linkedin/pegasus/gradle/publishing/PegasusPluginMavenPublishIntegrationTest.groovy b/gradle-plugins/src/integTest/groovy/com/linkedin/pegasus/gradle/publishing/PegasusPluginMavenPublishIntegrationTest.groovy new file mode 100644 index 0000000000..3614525811 --- /dev/null +++ b/gradle-plugins/src/integTest/groovy/com/linkedin/pegasus/gradle/publishing/PegasusPluginMavenPublishIntegrationTest.groovy @@ -0,0 +1,338 @@ +package com.linkedin.pegasus.gradle.publishing + +import org.gradle.testkit.runner.GradleRunner +import org.gradle.testkit.runner.TaskOutcome +import org.junit.Rule +import org.junit.rules.TemporaryFolder +import spock.lang.Specification + +import java.util.zip.ZipFile + +/** + * Regression test to certify Maven publication behavior + * + *
Historically rest.li is tightly coupled to the features of Ivy - specifically, Ivy's ability to publish + * an alternate set of parallel dependencies for the dataTemplate configuration and its associated artifact. + * + *
The Maven POM format is incapable of representing this pattern. Therefore the only alternative to produce and + * consume Maven-style metadata is by augmenting it with Gradle Module Metadata. + * + *
NB: this test runs with Gradle 6.6, which introduces the API + * {@link org.gradle.api.publish.Publication#withoutBuildIdentifier()}. This is not strictly required but aids in test + * reproducibility, as otherwise a random UUID is persisted to the .module file. Note that the build Id will be omitted + * by default starting with Gradle 7.0. See gradle/gradle#13800. + * + *
For more about Gradle Module Metadata, see Understanding Gradle Module Metadata. + * + *
Grandparent -> parent -> child pattern certifies that the child project can transitively resolve references
+ * to schemas contained in grandparent's data-template jar
+ */
+class PegasusPluginMavenPublishIntegrationTest extends Specification {
+
+ @Rule
+ TemporaryFolder grandparentProject
+
+ @Rule
+ TemporaryFolder parentProject
+
+ @Rule
+ TemporaryFolder childProject
+
+ @Rule
+ TemporaryFolder localRepo
+
+ URL localMavenRepo
+
+ def setup() {
+ localMavenRepo = localRepo.newFolder('local-maven-repo').toURI().toURL()
+ }
+
+ def 'publishes and consumes dataTemplate configurations with Gradle Module Metadata'() {
+ given:
+ def gradlePropertiesFile = grandparentProject.newFile('gradle.properties')
+ gradlePropertiesFile << '''
+ |group=com.linkedin.pegasus-grandparent-demo
+ |version=1.0.0
+ |'''.stripMargin()
+
+ def settingsFile = grandparentProject.newFile('settings.gradle')
+ settingsFile << "rootProject.name = 'grandparent'"
+
+ grandparentProject.newFile('build.gradle') << """
+ |plugins {
+ | id 'maven-publish'
+ | id 'pegasus'
+ |}
+ |
+ |repositories {
+ | mavenCentral()
+ |}
+ |
+ |dependencies {
+ | dataTemplateCompile files(${System.getProperty('integTest.dataTemplateCompileDependencies')})
+ | pegasusPlugin files(${System.getProperty('integTest.pegasusPluginDependencies')})
+ |}
+ |
+ |//modern maven-publish configuration
+ |publishing {
+ | publications {
+ | maven(MavenPublication) {
+ | from components.java
+ | withoutBuildIdentifier()
+ | }
+ | }
+ | repositories {
+ | maven { url '$localMavenRepo' }
+ | }
+ |}
+ """.stripMargin()
+
+ // Create a simple pdl schema, borrowed from restli-example-api
+ def schemaFilename = 'LatLong.pdl'
+ def grandparentPegasusDir = grandparentProject.newFolder('src', 'main', 'pegasus', 'com', 'linkedin', 'grandparent')
+ def grandparentPdlFile = new File("$grandparentPegasusDir.path$File.separator$schemaFilename")
+ grandparentPdlFile << '''namespace com.linkedin.grandparent
+ |
+ |record LatLong {
+ | latitude: optional float
+ | longitude: optional float
+ |}'''.stripMargin()
+
+ when:
+ def grandparentRunner = GradleRunner.create()
+ .withProjectDir(grandparentProject.root)
+ .withPluginClasspath()
+ .withGradleVersion('6.6') // the minimum version supporting the Publication#withoutBuildIdentifier() API
+ .withArguments('publish', '-is')
+ //.forwardOutput()
+ //.withDebug(true)
+
+ def grandparentResult = grandparentRunner.build()
+
+ then:
+ grandparentResult.task(':compileMainGeneratedDataTemplateJava').outcome == TaskOutcome.SUCCESS
+ grandparentResult.task(':generatePomFileForMavenPublication').outcome == TaskOutcome.SUCCESS
+
+ def grandparentProjectPomFile = new File(localMavenRepo.path, 'com/linkedin/pegasus-grandparent-demo/grandparent/1.0.0/grandparent-1.0.0.pom')
+ grandparentProjectPomFile.exists()
+ def grandparentProjectPomFileContents = grandparentProjectPomFile.text
+ def expectedGrandparentContents = new File(Thread.currentThread().contextClassLoader.getResource('maven/expectedGrandparentPomFile.pom').toURI()).text
+ grandparentProjectPomFileContents == expectedGrandparentContents
+
+ def grandparentProjectModuleFile = new File(localMavenRepo.path, 'com/linkedin/pegasus-grandparent-demo/grandparent/1.0.0/grandparent-1.0.0.module')
+ grandparentProjectModuleFile.exists()
+ def grandparentProjectModuleFileContents = grandparentProjectModuleFile.text
+ def expectedGrandparentModuleContents = new File(Thread.currentThread().contextClassLoader.getResource('maven/expectedGrandparentModuleFile.module').toURI()).text
+ grandparentProjectModuleFileContents == expectedGrandparentModuleContents
+
+ def grandparentProjectPrimaryArtifact = new File(localMavenRepo.path, 'com/linkedin/pegasus-grandparent-demo/grandparent/1.0.0/grandparent-1.0.0.jar')
+ grandparentProjectPrimaryArtifact.exists()
+ //NB note naming scheme of data-template jar changes when classifier, not appendix, is used
+ def grandparentProjectDataTemplateArtifact = new File(localMavenRepo.path, 'com/linkedin/pegasus-grandparent-demo/grandparent/1.0.0/grandparent-1.0.0-data-template.jar')
+ grandparentProjectDataTemplateArtifact.exists()
+
+ assertZipContains(grandparentProjectDataTemplateArtifact, 'com/linkedin/grandparent/LatLong.class')
+ assertZipContains(grandparentProjectDataTemplateArtifact, 'pegasus/com/linkedin/grandparent/LatLong.pdl')
+
+ when: 'a parent project consumes the grandparent project data-template jar'
+
+ gradlePropertiesFile = parentProject.newFile('gradle.properties')
+ gradlePropertiesFile << '''
+ |group=com.linkedin.pegasus-parent-demo
+ |version=1.0.0
+ |'''.stripMargin()
+
+ settingsFile = parentProject.newFile('settings.gradle')
+ settingsFile << "rootProject.name = 'parent'"
+
+ parentProject.newFile('build.gradle') << """
+ |plugins {
+ | id 'maven-publish'
+ | id 'pegasus'
+ |}
+ |
+ |repositories {
+ | maven { url '$localMavenRepo' }
+ | mavenCentral()
+ |}
+ |
+ |dependencies {
+ | dataTemplateCompile files(${System.getProperty('integTest.dataTemplateCompileDependencies')})
+ | pegasusPlugin files(${System.getProperty('integTest.pegasusPluginDependencies')})
+ |
+ | //dataModel group: 'com.linkedin.pegasus-grandparent-demo', name: 'grandparent', version: '1.0.0', configuration: 'dataTemplate'
+ | dataModel ('com.linkedin.pegasus-grandparent-demo:grandparent:1.0.0') {
+ | capabilities {
+ | requireCapability('com.linkedin.pegasus-grandparent-demo:grandparent-data-template:1.0.0') // TODO Gradle 6.0 requires an explicit version, 6.? does not
+ | }
+ | }
+ |}
+ |
+ |//modern maven-publish configuration
+ |publishing {
+ | publications {
+ | maven(MavenPublication) {
+ | from components.java
+ | withoutBuildIdentifier()
+ | }
+ | }
+ | repositories {
+ | maven { url '$localMavenRepo' }
+ | }
+ |}
+ """.stripMargin()
+
+ // Create a simple pdl schema which references a grandparent type
+ schemaFilename = 'EXIF.pdl'
+ def parentPegasusDir = parentProject.newFolder('src', 'main', 'pegasus', 'com', 'linkedin', 'parent')
+ def parentPdlFile = new File("$parentPegasusDir.path$File.separator$schemaFilename")
+ parentPdlFile << '''namespace com.linkedin.parent
+ |
+ |import com.linkedin.grandparent.LatLong
+ |
+ |record EXIF {
+ | isFlash: optional boolean = true
+ | location: optional LatLong
+ |}'''.stripMargin()
+
+ def parentRunner = GradleRunner.create()
+ .withProjectDir(parentProject.root)
+ .withPluginClasspath()
+ .withGradleVersion('6.6') // the minimum version supporting the Publication#withoutBuildIdentifier() API
+ .withArguments('publish', '-is')
+ //.forwardOutput()
+ //.withDebug(true)
+
+ def parentResult = parentRunner.build()
+
+ then:
+ parentResult.task(':compileMainGeneratedDataTemplateJava').outcome == TaskOutcome.SUCCESS
+ parentResult.task(':generatePomFileForMavenPublication').outcome == TaskOutcome.SUCCESS
+
+ def parentProjectPomFile = new File(localMavenRepo.path, 'com/linkedin/pegasus-parent-demo/parent/1.0.0/parent-1.0.0.pom')
+ parentProjectPomFile.exists()
+ def parentProjectPomFileContents = parentProjectPomFile.text
+ def expectedParentContents = new File(Thread.currentThread().contextClassLoader.getResource('maven/expectedParentPomFile.pom').toURI()).text
+ parentProjectPomFileContents == expectedParentContents
+
+ def parentProjectModuleFile = new File(localMavenRepo.path, 'com/linkedin/pegasus-parent-demo/parent/1.0.0/parent-1.0.0.module')
+ parentProjectModuleFile.exists()
+ def parentProjectModuleFileContents = parentProjectModuleFile.text
+ def expectedParentModuleContents = new File(Thread.currentThread().contextClassLoader.getResource('maven/expectedParentModuleFile.module').toURI()).text
+ parentProjectModuleFileContents == expectedParentModuleContents
+
+ def parentProjectPrimaryArtifact = new File(localMavenRepo.path, 'com/linkedin/pegasus-parent-demo/parent/1.0.0/parent-1.0.0.jar')
+ parentProjectPrimaryArtifact.exists()
+ //NB note naming scheme of data-template jar changes when classifier, not appendix, is used
+ def parentProjectDataTemplateArtifact = new File(localMavenRepo.path, 'com/linkedin/pegasus-parent-demo/parent/1.0.0/parent-1.0.0-data-template.jar')
+ parentProjectDataTemplateArtifact.exists()
+
+ assertZipContains(parentProjectDataTemplateArtifact, 'com/linkedin/parent/EXIF.class')
+ assertZipContains(parentProjectDataTemplateArtifact, 'pegasus/com/linkedin/parent/EXIF.pdl')
+
+ when: 'a child project transitively consumes the grandparent project data-template jar'
+
+ gradlePropertiesFile = childProject.newFile('gradle.properties')
+ gradlePropertiesFile << '''
+ |group=com.linkedin.pegasus-child-demo
+ |version=1.0.0
+ |'''.stripMargin()
+
+ settingsFile = childProject.newFile('settings.gradle')
+ settingsFile << "rootProject.name = 'child'"
+
+ childProject.newFile('build.gradle') << """
+ |plugins {
+ | id 'maven-publish'
+ | id 'pegasus'
+ |}
+ |
+ |repositories {
+ | maven { url '$localMavenRepo' }
+ | mavenCentral()
+ |}
+ |
+ |dependencies {
+ | dataTemplateCompile files(${System.getProperty('integTest.dataTemplateCompileDependencies')})
+ | pegasusPlugin files(${System.getProperty('integTest.pegasusPluginDependencies')})
+ |
+ | //dataModel group: 'com.linkedin.pegasus-parent-demo', name: 'parent', version: '1.0.0', configuration: 'dataTemplate'
+ | dataModel ('com.linkedin.pegasus-parent-demo:parent:1.0.0') {
+ | capabilities {
+ | requireCapability('com.linkedin.pegasus-parent-demo:parent-data-template:1.0.0') // TODO Gradle 6.0 requires an explicit version, 6.? does not
+ | }
+ | }
+ |}
+ |
+ |//modern maven-publish configuration
+ |publishing {
+ | publications {
+ | maven(MavenPublication) {
+ | from components.java
+ | withoutBuildIdentifier()
+ | }
+ | }
+ | repositories {
+ | maven { url '$localMavenRepo' }
+ | }
+ |}
+ """.stripMargin()
+
+ // Create a simple pdl schema which references parent and grandparent types
+ schemaFilename = 'Photo.pdl'
+ def childPegasusDir = childProject.newFolder('src', 'main', 'pegasus', 'com', 'linkedin', 'child')
+ def childPdlFile = new File("$childPegasusDir.path$File.separator$schemaFilename")
+ childPdlFile << '''namespace com.linkedin.child
+ |
+ |import com.linkedin.grandparent.LatLong
+ |import com.linkedin.parent.EXIF
+ |
+ |record Photo {
+ | id: long
+ | urn: string
+ | title: string
+ | exif: EXIF
+ | backupLocation: optional LatLong
+ |}'''.stripMargin()
+
+ def childRunner = GradleRunner.create()
+ .withProjectDir(childProject.root)
+ .withPluginClasspath()
+ .withGradleVersion('6.6') // the minimum version supporting the Publication#withoutBuildIdentifier() API
+ .withArguments('publish', '-is')
+ //.forwardOutput()
+ //.withDebug(true)
+
+ def childResult = childRunner.build()
+
+ then:
+ childResult.task(':compileMainGeneratedDataTemplateJava').outcome == TaskOutcome.SUCCESS
+ childResult.task(':generatePomFileForMavenPublication').outcome == TaskOutcome.SUCCESS
+
+ def childProjectPomFile = new File(localMavenRepo.path, 'com/linkedin/pegasus-child-demo/child/1.0.0/child-1.0.0.pom')
+ childProjectPomFile.exists()
+ def childProjectPomFileContents = childProjectPomFile.text
+ def expectedChildContents = new File(Thread.currentThread().contextClassLoader.getResource('maven/expectedChildPomFile.pom').toURI()).text
+ childProjectPomFileContents == expectedChildContents
+
+ def childProjectModuleFile = new File(localMavenRepo.path, 'com/linkedin/pegasus-child-demo/child/1.0.0/child-1.0.0.module')
+ childProjectModuleFile.exists()
+ def childProjectModuleFileContents = childProjectModuleFile.text
+ def expectedChildModuleContents = new File(Thread.currentThread().contextClassLoader.getResource('maven/expectedChildModuleFile.module').toURI()).text
+ childProjectModuleFileContents == expectedChildModuleContents
+
+ def childProjectPrimaryArtifact = new File(localMavenRepo.path, 'com/linkedin/pegasus-child-demo/child/1.0.0/child-1.0.0.jar')
+ childProjectPrimaryArtifact.exists()
+ //NB note naming scheme of data-template jar changes when classifier, not appendix, is used
+ def childProjectDataTemplateArtifact = new File(localMavenRepo.path, 'com/linkedin/pegasus-child-demo/child/1.0.0/child-1.0.0-data-template.jar')
+ childProjectDataTemplateArtifact.exists()
+
+ assertZipContains(childProjectDataTemplateArtifact, 'com/linkedin/child/Photo.class')
+ assertZipContains(childProjectDataTemplateArtifact, 'pegasus/com/linkedin/child/Photo.pdl')
+ }
+
+ private static boolean assertZipContains(File zip, String path) {
+ return new ZipFile(zip).getEntry(path)
+ }
+
+}
\ No newline at end of file
diff --git a/gradle-plugins/src/integTest/resources/maven/expectedChildModuleFile.module b/gradle-plugins/src/integTest/resources/maven/expectedChildModuleFile.module
new file mode 100644
index 0000000000..5670a36e30
--- /dev/null
+++ b/gradle-plugins/src/integTest/resources/maven/expectedChildModuleFile.module
@@ -0,0 +1,418 @@
+{
+ "formatVersion": "1.1",
+ "component": {
+ "group": "com.linkedin.pegasus-child-demo",
+ "module": "child",
+ "version": "1.0.0",
+ "attributes": {
+ "org.gradle.status": "release"
+ }
+ },
+ "createdBy": {
+ "gradle": {
+ "version": "6.6"
+ }
+ },
+ "variants": [
+ {
+ "name": "apiElements",
+ "attributes": {
+ "org.gradle.category": "library",
+ "org.gradle.dependency.bundling": "external",
+ "org.gradle.jvm.version": 8,
+ "org.gradle.libraryelements": "jar",
+ "org.gradle.usage": "java-api"
+ },
+ "dependencies": [
+ {
+ "group": "com.linkedin.pegasus-parent-demo",
+ "module": "parent",
+ "version": {
+ "requires": "1.0.0"
+ },
+ "requestedCapabilities": [
+ {
+ "group": "com.linkedin.pegasus-parent-demo",
+ "name": "parent-data-template",
+ "version": "1.0.0"
+ }
+ ]
+ },
+ {
+ "group": "com.google.code.findbugs",
+ "module": "jsr305",
+ "version": {
+ "requires": "3.0.2"
+ }
+ }
+ ],
+ "files": [
+ {
+ "name": "child-1.0.0.jar",
+ "url": "child-1.0.0.jar",
+ "size": 261,
+ "sha512": "747d2f00a7f5f379582e33e452f30f3a25732a510971d9ed5161355bf7ef0fc507fef30883960dbfc780d36b6e8215fba01086b4ee053358805686e2f2c1aa85",
+ "sha256": "69e1a62e5752ca3f43fb1607f161379bbe88b64af89c1a543c126160adf7cc53",
+ "sha1": "5b8f86fea035328fc9e8c660773037a3401ce25f",
+ "md5": "e7e9f45eb9d74540092920528bb0abf0"
+ }
+ ]
+ },
+ {
+ "name": "runtimeElements",
+ "attributes": {
+ "org.gradle.category": "library",
+ "org.gradle.dependency.bundling": "external",
+ "org.gradle.jvm.version": 8,
+ "org.gradle.libraryelements": "jar",
+ "org.gradle.usage": "java-runtime"
+ },
+ "dependencies": [
+ {
+ "group": "com.linkedin.pegasus-parent-demo",
+ "module": "parent",
+ "version": {
+ "requires": "1.0.0"
+ },
+ "requestedCapabilities": [
+ {
+ "group": "com.linkedin.pegasus-parent-demo",
+ "name": "parent-data-template",
+ "version": "1.0.0"
+ }
+ ]
+ },
+ {
+ "group": "com.google.code.findbugs",
+ "module": "jsr305",
+ "version": {
+ "requires": "3.0.2"
+ }
+ }
+ ],
+ "files": [
+ {
+ "name": "child-1.0.0.jar",
+ "url": "child-1.0.0.jar",
+ "size": 261,
+ "sha512": "747d2f00a7f5f379582e33e452f30f3a25732a510971d9ed5161355bf7ef0fc507fef30883960dbfc780d36b6e8215fba01086b4ee053358805686e2f2c1aa85",
+ "sha256": "69e1a62e5752ca3f43fb1607f161379bbe88b64af89c1a543c126160adf7cc53",
+ "sha1": "5b8f86fea035328fc9e8c660773037a3401ce25f",
+ "md5": "e7e9f45eb9d74540092920528bb0abf0"
+ }
+ ]
+ },
+ {
+ "name": "mainGeneratedDataTemplateJavadocElements",
+ "attributes": {
+ "org.gradle.category": "documentation",
+ "org.gradle.dependency.bundling": "external",
+ "org.gradle.docstype": "javadoc",
+ "org.gradle.usage": "java-runtime"
+ },
+ "files": [
+ {
+ "name": "child-1.0.0-data-template-javadoc.jar",
+ "url": "child-1.0.0-data-template-javadoc.jar",
+ "size": 24626,
+ "sha512": "f200e2552cd8b12f8972201ec35a00d6d82589db33d9cc1b375a06ce2bcd98f998e1cabaf0d143e96ef5915db6514be72305dfd54114c982530e2f5daa18eadb",
+ "sha256": "689bce1ff8ee2866341b1ef42ed41427a7b0a029acec021434b1f6739d1e6f60",
+ "sha1": "2d455cb57a94608d4ecb1d02f45b8b64af188657",
+ "md5": "4edf48ee6294d0153fd5b97b4011c434"
+ }
+ ],
+ "capabilities": [
+ {
+ "group": "com.linkedin.pegasus-child-demo",
+ "name": "child-data-template",
+ "version": "1.0.0"
+ }
+ ]
+ },
+ {
+ "name": "mainGeneratedDataTemplateSourcesElements",
+ "attributes": {
+ "org.gradle.category": "documentation",
+ "org.gradle.dependency.bundling": "external",
+ "org.gradle.docstype": "sources",
+ "org.gradle.usage": "java-runtime"
+ },
+ "files": [
+ {
+ "name": "child-1.0.0-data-template-sources.jar",
+ "url": "child-1.0.0-data-template-sources.jar",
+ "size": 6315,
+ "sha512": "d519c3102519d6cba849ec0641cf36c5dcefae1d825ebf9602618f6432ce617455bf5f97d557c06a34cea8d1f691052c162b3cc7800223e3739ac0c0d6c47520",
+ "sha256": "532d5a6e920f80ff500dc43ee62803d00da169a558c1f5654bdadb24692a670d",
+ "sha1": "137105f141875fa63c0265fc4b90853602590ac9",
+ "md5": "ecee9fe068fe21efefe86de7d5e07bf3"
+ }
+ ],
+ "capabilities": [
+ {
+ "group": "com.linkedin.pegasus-child-demo",
+ "name": "child-data-template",
+ "version": "1.0.0"
+ }
+ ]
+ },
+ {
+ "name": "mainGeneratedDataTemplateApiElements",
+ "attributes": {
+ "org.gradle.category": "library",
+ "org.gradle.dependency.bundling": "external",
+ "org.gradle.jvm.version": 8,
+ "org.gradle.libraryelements": "jar",
+ "org.gradle.usage": "java-api"
+ },
+ "dependencies": [
+ {
+ "group": "com.linkedin.pegasus-parent-demo",
+ "module": "parent",
+ "version": {
+ "requires": "1.0.0"
+ },
+ "requestedCapabilities": [
+ {
+ "group": "com.linkedin.pegasus-parent-demo",
+ "name": "parent-data-template",
+ "version": "1.0.0"
+ }
+ ]
+ },
+ {
+ "group": "com.google.code.findbugs",
+ "module": "jsr305",
+ "version": {
+ "requires": "3.0.2"
+ }
+ }
+ ],
+ "files": [
+ {
+ "name": "child-1.0.0-data-template.jar",
+ "url": "child-1.0.0-data-template.jar",
+ "size": 9750,
+ "sha512": "2e0f0b7b0ef2479416c8451676eac5a02697b6523f53b30f3e109cc46e831afedb6c186541490a9283a421a5c0213496d68bae7fb113da9c0c779f40eb849011",
+ "sha256": "fa0a997dc6db048f9e8d9a7d96b6df9a2d9ac00dfdc4e4a497666bd4962f360a",
+ "sha1": "7402e1931977f3d309a93bb30db0f149de7f8f12",
+ "md5": "2ef44a5e7cca13e87d7a58a6d134aee4"
+ }
+ ],
+ "capabilities": [
+ {
+ "group": "com.linkedin.pegasus-child-demo",
+ "name": "child-data-template",
+ "version": "1.0.0"
+ }
+ ]
+ },
+ {
+ "name": "mainGeneratedDataTemplateRuntimeElements",
+ "attributes": {
+ "org.gradle.category": "library",
+ "org.gradle.dependency.bundling": "external",
+ "org.gradle.jvm.version": 8,
+ "org.gradle.libraryelements": "jar",
+ "org.gradle.usage": "java-runtime"
+ },
+ "dependencies": [
+ {
+ "group": "com.linkedin.pegasus-parent-demo",
+ "module": "parent",
+ "version": {
+ "requires": "1.0.0"
+ },
+ "requestedCapabilities": [
+ {
+ "group": "com.linkedin.pegasus-parent-demo",
+ "name": "parent-data-template",
+ "version": "1.0.0"
+ }
+ ]
+ },
+ {
+ "group": "com.google.code.findbugs",
+ "module": "jsr305",
+ "version": {
+ "requires": "3.0.2"
+ }
+ }
+ ],
+ "files": [
+ {
+ "name": "child-1.0.0-data-template.jar",
+ "url": "child-1.0.0-data-template.jar",
+ "size": 9750,
+ "sha512": "2e0f0b7b0ef2479416c8451676eac5a02697b6523f53b30f3e109cc46e831afedb6c186541490a9283a421a5c0213496d68bae7fb113da9c0c779f40eb849011",
+ "sha256": "fa0a997dc6db048f9e8d9a7d96b6df9a2d9ac00dfdc4e4a497666bd4962f360a",
+ "sha1": "7402e1931977f3d309a93bb30db0f149de7f8f12",
+ "md5": "2ef44a5e7cca13e87d7a58a6d134aee4"
+ }
+ ],
+ "capabilities": [
+ {
+ "group": "com.linkedin.pegasus-child-demo",
+ "name": "child-data-template",
+ "version": "1.0.0"
+ }
+ ]
+ },
+ {
+ "name": "testGeneratedDataTemplateJavadocElements",
+ "attributes": {
+ "org.gradle.category": "documentation",
+ "org.gradle.dependency.bundling": "external",
+ "org.gradle.docstype": "javadoc",
+ "org.gradle.usage": "java-runtime"
+ },
+ "files": [
+ {
+ "name": "child-1.0.0-test-data-template-javadoc.jar",
+ "url": "child-1.0.0-test-data-template-javadoc.jar",
+ "size": 24626,
+ "sha512": "f200e2552cd8b12f8972201ec35a00d6d82589db33d9cc1b375a06ce2bcd98f998e1cabaf0d143e96ef5915db6514be72305dfd54114c982530e2f5daa18eadb",
+ "sha256": "689bce1ff8ee2866341b1ef42ed41427a7b0a029acec021434b1f6739d1e6f60",
+ "sha1": "2d455cb57a94608d4ecb1d02f45b8b64af188657",
+ "md5": "4edf48ee6294d0153fd5b97b4011c434"
+ }
+ ],
+ "capabilities": [
+ {
+ "group": "com.linkedin.pegasus-child-demo",
+ "name": "child-test-data-template",
+ "version": "1.0.0"
+ }
+ ]
+ },
+ {
+ "name": "testGeneratedDataTemplateSourcesElements",
+ "attributes": {
+ "org.gradle.category": "documentation",
+ "org.gradle.dependency.bundling": "external",
+ "org.gradle.docstype": "sources",
+ "org.gradle.usage": "java-runtime"
+ },
+ "files": [
+ {
+ "name": "child-1.0.0-test-data-template-sources.jar",
+ "url": "child-1.0.0-test-data-template-sources.jar",
+ "size": 261,
+ "sha512": "747d2f00a7f5f379582e33e452f30f3a25732a510971d9ed5161355bf7ef0fc507fef30883960dbfc780d36b6e8215fba01086b4ee053358805686e2f2c1aa85",
+ "sha256": "69e1a62e5752ca3f43fb1607f161379bbe88b64af89c1a543c126160adf7cc53",
+ "sha1": "5b8f86fea035328fc9e8c660773037a3401ce25f",
+ "md5": "e7e9f45eb9d74540092920528bb0abf0"
+ }
+ ],
+ "capabilities": [
+ {
+ "group": "com.linkedin.pegasus-child-demo",
+ "name": "child-test-data-template",
+ "version": "1.0.0"
+ }
+ ]
+ },
+ {
+ "name": "testGeneratedDataTemplateApiElements",
+ "attributes": {
+ "org.gradle.category": "library",
+ "org.gradle.dependency.bundling": "external",
+ "org.gradle.jvm.version": 8,
+ "org.gradle.libraryelements": "jar",
+ "org.gradle.usage": "java-api"
+ },
+ "dependencies": [
+ {
+ "group": "com.linkedin.pegasus-parent-demo",
+ "module": "parent",
+ "version": {
+ "requires": "1.0.0"
+ },
+ "requestedCapabilities": [
+ {
+ "group": "com.linkedin.pegasus-parent-demo",
+ "name": "parent-data-template",
+ "version": "1.0.0"
+ }
+ ]
+ },
+ {
+ "group": "com.google.code.findbugs",
+ "module": "jsr305",
+ "version": {
+ "requires": "3.0.2"
+ }
+ }
+ ],
+ "files": [
+ {
+ "name": "child-1.0.0-test-data-template.jar",
+ "url": "child-1.0.0-test-data-template.jar",
+ "size": 261,
+ "sha512": "747d2f00a7f5f379582e33e452f30f3a25732a510971d9ed5161355bf7ef0fc507fef30883960dbfc780d36b6e8215fba01086b4ee053358805686e2f2c1aa85",
+ "sha256": "69e1a62e5752ca3f43fb1607f161379bbe88b64af89c1a543c126160adf7cc53",
+ "sha1": "5b8f86fea035328fc9e8c660773037a3401ce25f",
+ "md5": "e7e9f45eb9d74540092920528bb0abf0"
+ }
+ ],
+ "capabilities": [
+ {
+ "group": "com.linkedin.pegasus-child-demo",
+ "name": "child-test-data-template",
+ "version": "1.0.0"
+ }
+ ]
+ },
+ {
+ "name": "testGeneratedDataTemplateRuntimeElements",
+ "attributes": {
+ "org.gradle.category": "library",
+ "org.gradle.dependency.bundling": "external",
+ "org.gradle.jvm.version": 8,
+ "org.gradle.libraryelements": "jar",
+ "org.gradle.usage": "java-runtime"
+ },
+ "dependencies": [
+ {
+ "group": "com.linkedin.pegasus-parent-demo",
+ "module": "parent",
+ "version": {
+ "requires": "1.0.0"
+ },
+ "requestedCapabilities": [
+ {
+ "group": "com.linkedin.pegasus-parent-demo",
+ "name": "parent-data-template",
+ "version": "1.0.0"
+ }
+ ]
+ },
+ {
+ "group": "com.google.code.findbugs",
+ "module": "jsr305",
+ "version": {
+ "requires": "3.0.2"
+ }
+ }
+ ],
+ "files": [
+ {
+ "name": "child-1.0.0-test-data-template.jar",
+ "url": "child-1.0.0-test-data-template.jar",
+ "size": 261,
+ "sha512": "747d2f00a7f5f379582e33e452f30f3a25732a510971d9ed5161355bf7ef0fc507fef30883960dbfc780d36b6e8215fba01086b4ee053358805686e2f2c1aa85",
+ "sha256": "69e1a62e5752ca3f43fb1607f161379bbe88b64af89c1a543c126160adf7cc53",
+ "sha1": "5b8f86fea035328fc9e8c660773037a3401ce25f",
+ "md5": "e7e9f45eb9d74540092920528bb0abf0"
+ }
+ ],
+ "capabilities": [
+ {
+ "group": "com.linkedin.pegasus-child-demo",
+ "name": "child-test-data-template",
+ "version": "1.0.0"
+ }
+ ]
+ }
+ ]
+}
diff --git a/gradle-plugins/src/integTest/resources/maven/expectedChildPomFile.pom b/gradle-plugins/src/integTest/resources/maven/expectedChildPomFile.pom
new file mode 100644
index 0000000000..c84587aa3c
--- /dev/null
+++ b/gradle-plugins/src/integTest/resources/maven/expectedChildPomFile.pom
@@ -0,0 +1,27 @@
+
+