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

Exclude non-required artifacts from the lib folder #24

Merged
merged 2 commits into from
Sep 3, 2013

Conversation

huntc
Copy link
Contributor

@huntc huntc commented Sep 2, 2013

This PR filters out .pom, sources and javadoc from projectDependencyArtifacts. The presence of the pom.xml would cause the project's jar file to be overwritten given that the xml and the jar have the same name sans extension. The javadoc and source are not required for running the project (which I presume is the motivation behind determining these artefacts).

This issue relates to playframework/playframework#1564

@@ -149,7 +148,13 @@ object JavaAppPackaging {
for {
p <- previous
n <- next
} yield (p ++ n).distinct
} yield (p ++ n)
.distinct
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this isn't your normal project, but I tend to prefer either parenthesis or a () around this kinds of things, for clarity:

(for {
 ...
yield ...).distinct.filterNot { f =>
  ...
}

Yeah, I prefer variable names on the same line as the closure. Also, I believe you can grab this info off the attributes (i.e. the Artifact has a type of src/jar/doc/pom. I think). This works for now. If I have a chance to dig in I while.

@jsuereth
Copy link
Member

jsuereth commented Sep 2, 2013

This looks great, but there's a merge conflict (gitignore?) Can you resubmit? thanks.

…. The presence of the pom.xml would cause the project's jar file to be overwritten given that the xml and the jar have the same name sans extension. The javadoc and source are not required for running the project (which I presume is the motivation behind determining these artefacts).
@huntc
Copy link
Contributor Author

huntc commented Sep 2, 2013

Merge conflicts fixed and pushed.

@@ -1,3 +1,11 @@
project/project
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huh, who added project/project? DOH!

@jsuereth
Copy link
Member

jsuereth commented Sep 3, 2013

Thanks @huntc. LGTM.

jsuereth added a commit that referenced this pull request Sep 3, 2013
Exclude non-required artifacts from the lib folder
@jsuereth jsuereth merged commit fb06623 into sbt:master Sep 3, 2013
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.

2 participants