forked from pantsbuild/pants
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for extra publication metadata.
In particular this change adds support for OSSRH required metadata for publishing to maven central. An object is exposed for pantsbuild/pants use that encapsulates the boilerplate common to all jars it will publish to maven central and this object is used to prepare all publishable java targets for maven central publishing. Testing Done: Local publishes and verification of most permutations of OSSRHPublicationMetadata in the existing JarPublishIntegrationTest#test_scala_publish test via new golden data. CI went green here: https://travis-ci.org/pantsbuild/pants/builds/61845618 Bugs closed: 1411, 1511 Reviewed at https://rbcommons.com/s/twitter/r/2184/
- Loading branch information
Showing
20 changed files
with
524 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,8 @@ | |
|
||
import os | ||
|
||
from pants.backend.jvm.ossrh_publication_metadata import (Developer, License, | ||
OSSRHPublicationMetadata, Scm) | ||
from pants.backend.jvm.repository import Repository | ||
from pants.base.build_file_aliases import BuildFileAliases | ||
from pants.base.build_manual import manual | ||
|
@@ -21,6 +23,30 @@ | |
push_db_basedir=os.path.join('testprojects', 'ivy', 'pushdb')) | ||
|
||
|
||
def org_pantsbuild_publication_metadata(description): | ||
return OSSRHPublicationMetadata( | ||
description=description, | ||
url='http://pantsbuild.github.io/', | ||
licenses=[ | ||
License( | ||
name='Apache License, Version 2.0', | ||
url='http://www.apache.org/licenses/LICENSE-2.0' | ||
) | ||
], | ||
developers=[ | ||
Developer( | ||
name='The pants developers', | ||
email='[email protected]', | ||
url='https://github.com/pantsbuild/pants' | ||
) | ||
], | ||
scm=Scm.github( | ||
user='pantsbuild', | ||
repo='pants' | ||
) | ||
) | ||
|
||
|
||
# Your repositories don't need this manual.builddict magic. | ||
# It keeps these examples out of http://pantsbuild.github.io/build_dictionary.html | ||
manual.builddict(suppress=True)(public_repo) | ||
|
@@ -32,5 +58,6 @@ def build_file_aliases(): | |
objects={ | ||
'public': public_repo, # key 'public' must match name='public' above | ||
'testing': testing_repo, | ||
'pants_library': org_pantsbuild_publication_metadata | ||
}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.