[jira] [Work logged] (BEAM-4050) Move pom generation metadata logic out of build_rules.gradle
[ https://issues.apache.org/jira/browse/BEAM-4050?focusedWorklogId=111235&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-111235 ] ASF GitHub Bot logged work on BEAM-4050: Author: ASF GitHub Bot Created on: 12/Jun/18 19:37 Start Date: 12/Jun/18 19:37 Worklog Time Spent: 10m Work Description: lukecwik closed pull request #5608: [BEAM-4050] Use new DSL methods for generated POM metadata URL: https://github.com/apache/beam/pull/5608 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/build_rules.gradle b/build_rules.gradle index 50d18c7bdc6..09a2a66d9b8 100644 --- a/build_rules.gradle +++ b/build_rules.gradle @@ -740,58 +740,65 @@ artifactId=${project.name} classifier "javadoc" } - pom.withXml { -def root = asNode() -root.appendNode('name', project.description) + pom { +name = project.description if (project.hasProperty("summary")) { -root.appendNode('description', project.summary) +description = project.summary +} +url = "http://beam.apache.org"; +inceptionYear = "2016" +licenses { + license { +name = "Apache License, Version 2.0" +url = "http://www.apache.org/licenses/LICENSE-2.0.txt"; +distribution = "repo" + } +} +scm { + connection = "scm:git:https://gitbox.apache.org/repos/asf/beam.git"; + developerConnection = "scm:git:https://gitbox.apache.org/repos/asf/beam.git"; + url = "https://gitbox.apache.org/repos/asf?p=beam.git;a=summary"; +} +issueManagement { + system = "jira" + url = "https://issues.apache.org/jira/browse/BEAM"; +} +mailingLists { + mailingList { +name = "Beam Dev" +subscribe = "dev-subscr...@beam.apache.org" +unsubscribe = "dev-unsubscr...@beam.apache.org" +post = "d...@beam.apache.org" +archive = "http://www.mail-archive.com/dev%beam.apache.org"; + } + mailingList { +name = "Beam User" +subscribe = "user-subscr...@beam.apache.org" +unsubscribe = "user-unsubscr...@beam.apache.org" +post = "u...@beam.apache.org" +archive = "http://www.mail-archive.com/user%beam.apache.org"; + } + mailingList { +name = "Beam Commits" +subscribe = "commits-subscr...@beam.apache.org" +unsubscribe = "commits-unsubscr...@beam.apache.org" +post = "commits@beam.apache.org" +archive = "http://www.mail-archive.com/commits%beam.apache.org"; + } +} +developers { + developer { +name = "The Apache Beam Team" +email = "d...@beam.apache.org" +url = "http://beam.apache.org"; +organization = "Apache Software Foundation" +organizationUrl = "http://www.apache.org"; + } } -root.appendNode('url', "http://beam.apache.org";) -root.appendNode('inceptionYear', "2016") - -def licenseNode = root.appendNode('licenses').appendNode('license') -licenseNode.appendNode('name', "Apache License, Version 2.0") -licenseNode.appendNode('url', "http://www.apache.org/licenses/LICENSE-2.0.txt";) -licenseNode.appendNode('distribution', "repo") - -def scmNode = root.appendNode('scm') -scmNode.appendNode('connection', "scm:git:https://gitbox.apache.org/repos/asf/beam.git";) -scmNode.appendNode('developerConnection', "scm:git:https://gitbox.apache.org/repos/asf/beam.git";) -scmNode.appendNode('url', "https://gitbox.apache.org/repos/asf?p=beam.git;a=summary";) - -def issueMgmtNode = root.appendNode('issueManagement') -issueMgmtNode.appendNode('system', "jira") -issueMgmtNode.appendNode('url', "https://issues.apache.org/jira/browse/BEAM";) - -def mailingListsNode = root.appendNode('mailingLists') -def devListNode = mailingListsNode.appendNode('mailingList') -devListNode.appendNode('name', "Beam Dev") -devListNode.appendNode('subscribe', "dev-subscr...@beam.apache.org") -devListNode.appendNode('unsubscribe', "dev-unsubscr...@beam.apache.org
[jira] [Work logged] (BEAM-4050) Move pom generation metadata logic out of build_rules.gradle
[ https://issues.apache.org/jira/browse/BEAM-4050?focusedWorklogId=111202&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-111202 ] ASF GitHub Bot logged work on BEAM-4050: Author: ASF GitHub Bot Created on: 12/Jun/18 18:44 Start Date: 12/Jun/18 18:44 Worklog Time Spent: 10m Work Description: lukecwik commented on issue #5608: [BEAM-4050] Use new DSL methods for generated POM metadata URL: https://github.com/apache/beam/pull/5608#issuecomment-396693592 This is pretty sweet clean-up. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 111202) Time Spent: 0.5h (was: 20m) > Move pom generation metadata logic out of build_rules.gradle > > > Key: BEAM-4050 > URL: https://issues.apache.org/jira/browse/BEAM-4050 > Project: Beam > Issue Type: Sub-task > Components: build-system >Reporter: Scott Wegner >Assignee: Luke Cwik >Priority: Minor > Time Spent: 0.5h > Remaining Estimate: 0h > > When preparing a release, we generate pom files for each artifact to be > released. Most of the pom structure is filled in automatically, but there is > a good deal of metadata that needs to be manually added. The [code for > manipulating the XML > structure|https://github.com/apache/beam/blob/c78b96a67c0313f44d78262ee46f86aa4866a3aa/build_rules.gradle#L605] > is verbose and it would make more sense to actually express it as XML rather > than groovy DOM manipulations. > It would be nice to refactor this and clean up the build_rules.gradle file a > bit. Some potential ideas for refactoring: > # Check in a "base pom.xml" file pre-filled with metadata, and use this as > the source for generated pom manipulations. > # Check in and release a parent pom file which contains all required > metadata. Other artifacts can reference it as a parent and then drop the > duplicated metadata. > # At the very least, refactor the pom manipulation logic out to a different > method or different file. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work logged] (BEAM-4050) Move pom generation metadata logic out of build_rules.gradle
[ https://issues.apache.org/jira/browse/BEAM-4050?focusedWorklogId=111201&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-111201 ] ASF GitHub Bot logged work on BEAM-4050: Author: ASF GitHub Bot Created on: 12/Jun/18 18:43 Start Date: 12/Jun/18 18:43 Worklog Time Spent: 10m Work Description: swegner commented on issue #5608: [BEAM-4050] Use new DSL methods for generated POM metadata URL: https://github.com/apache/beam/pull/5608#issuecomment-396693214 I did a manual diff of the before-and-after of this change; a couple of the sections get re-ordered in the POM but otherwise the content is identical. ``` ./gradlew :beam-sdks-java-core:publishToMavenLocal -Ppublishing && meld \ pom_diff/before.xml \ ~/.m2/repository/org/apache/beam/beam-sdks-java-core/2.6.0-SNAPSHOT/beam-sdks-java-core-2.6.0-SNAPSHOT.pom ``` R: @lukecwik This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 111201) Time Spent: 20m (was: 10m) > Move pom generation metadata logic out of build_rules.gradle > > > Key: BEAM-4050 > URL: https://issues.apache.org/jira/browse/BEAM-4050 > Project: Beam > Issue Type: Sub-task > Components: build-system >Reporter: Scott Wegner >Assignee: Luke Cwik >Priority: Minor > Time Spent: 20m > Remaining Estimate: 0h > > When preparing a release, we generate pom files for each artifact to be > released. Most of the pom structure is filled in automatically, but there is > a good deal of metadata that needs to be manually added. The [code for > manipulating the XML > structure|https://github.com/apache/beam/blob/c78b96a67c0313f44d78262ee46f86aa4866a3aa/build_rules.gradle#L605] > is verbose and it would make more sense to actually express it as XML rather > than groovy DOM manipulations. > It would be nice to refactor this and clean up the build_rules.gradle file a > bit. Some potential ideas for refactoring: > # Check in a "base pom.xml" file pre-filled with metadata, and use this as > the source for generated pom manipulations. > # Check in and release a parent pom file which contains all required > metadata. Other artifacts can reference it as a parent and then drop the > duplicated metadata. > # At the very least, refactor the pom manipulation logic out to a different > method or different file. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work logged] (BEAM-4050) Move pom generation metadata logic out of build_rules.gradle
[ https://issues.apache.org/jira/browse/BEAM-4050?focusedWorklogId=99&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-99 ] ASF GitHub Bot logged work on BEAM-4050: Author: ASF GitHub Bot Created on: 12/Jun/18 18:38 Start Date: 12/Jun/18 18:38 Worklog Time Spent: 10m Work Description: swegner opened a new pull request #5608: [BEAM-4050] Use new DSL methods for generated POM metadata URL: https://github.com/apache/beam/pull/5608 POM generation APIs were improved in Gradle 4.8; this change takes advantage of new DSL APIs to define generated POM metadata when available. Some metadata (notably dependencies) still need to be directly added to the XML. Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Format the pull request title like `[BEAM-XXX] Fixes bug in ApproximateQuantiles`, where you replace `BEAM-XXX` with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue. - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). It will help us expedite review of your Pull Request if you tag someone (e.g. `@username`) to look at it. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 99) Time Spent: 10m Remaining Estimate: 0h > Move pom generation metadata logic out of build_rules.gradle > > > Key: BEAM-4050 > URL: https://issues.apache.org/jira/browse/BEAM-4050 > Project: Beam > Issue Type: Sub-task > Components: build-system >Reporter: Scott Wegner >Assignee: Luke Cwik >Priority: Minor > Time Spent: 10m > Remaining Estimate: 0h > > When preparing a release, we generate pom files for each artifact to be > released. Most of the pom structure is filled in automatically, but there is > a good deal of metadata that needs to be manually added. The [code for > manipulating the XML > structure|https://github.com/apache/beam/blob/c78b96a67c0313f44d78262ee46f86aa4866a3aa/build_rules.gradle#L605] > is verbose and it would make more sense to actually express it as XML rather > than groovy DOM manipulations. > It would be nice to refactor this and clean up the build_rules.gradle file a > bit. Some potential ideas for refactoring: > # Check in a "base pom.xml" file pre-filled with metadata, and use this as > the source for generated pom manipulations. > # Check in and release a parent pom file which contains all required > metadata. Other artifacts can reference it as a parent and then drop the > duplicated metadata. > # At the very least, refactor the pom manipulation logic out to a different > method or different file. -- This message was sent by Atlassian JIRA (v7.6.3#76005)