Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle source, docs artifacts correctly for Ivy [1.0.x] #2475

Merged
merged 7 commits into from
Feb 25, 2016

Conversation

oxbowlakes
Copy link

This is a re-installment of #1016 for the 1.0.x branch, sitting on top of changes already merged in sbt/librarymanagement#25.

To reiterate, specifically in this PR we are addressing the following:

  • Introduce the SettingKeys sourceArtifactTypes and docArtifactTypes: Sets which contain the artifact types that would qualify them as either source or doc artifacts.
  • Use the new ArtifactTypeFilter introduced in Handle source, docs artifacts correctly for Ivy librarymanagement#25 in the update task (specifically, I added it to UpdateConfiguration) to allow "all artifact types except those found in either sourceArtifactTypes ordocArtifactTypes"
  • In updateClassifiers / updateSbtClassifiers, invert the filter from the UpdateConfiguration: it will therefore only let through sources and docs
  • srcTypes and docTypes now have to also be explicitly passed into GetClassifiersConfiguration because (since Handle source, docs artifacts correctly for Ivy librarymanagement#25) after finishing the update in updateClassifiers, it will map over all artifacts to set their classifier to either sources or javadoc, if it's not already set, according to a reverse mapping from the (src|doc)Types to "source" and "javadoc" respectively (well, Artifact.SourceClassifier and Artifact.DocClassifier, to be precise). This is because the artifacts retrieved from Ivy publications might well not have this attribute set, and last time I checked, IDE plugins such as IntelliJ's depended exactly on this value to classify the artifacts.

Hopefully, after this, plugins could just look at the artifact's type and see in which of the two sets contains it. That would also resolve a great deal of pain surrounding "e:classifier". For instance, I've discovered that it's impossible to use that attribute in an ivy repository if its value is not either "sources" or "javadoc" (e.g. if it's src), because plugins expect it to be one of those two values as mentioned before.

@lightbend-cla-validator

Hi @dansanduleac,

Thank you for your contribution! We really value the time you've taken to put this together.

Before we proceed with reviewing this pull request, please sign the Typesafe Contributors License Agreement:

http://www.lightbend.com/contribute/cla

@eed3si9n eed3si9n added the ready label Feb 23, 2016
@oxbowlakes
Copy link
Author

This PR is not from @dansanduleac, it's from @oxbowlakes. I believe that we've already signed the typesafe CLA

@eed3si9n
Copy link
Member

Yea you guys should be fine.

@dansanduleac
Copy link
Contributor

Looks like this needs to wait on sbt/zinc#70, and then subsequently on further changes that would get this project to compile cleanly against incrementalcompiler.

@Duhemm
Copy link
Contributor

Duhemm commented Feb 24, 2016

I think this is superseded by #2478. Thanks @oxbowlakes & @dansanduleac!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants