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

Jar with no classes is not included with staged files? #347

Closed
sheavner opened this issue Sep 5, 2014 · 2 comments
Closed

Jar with no classes is not included with staged files? #347

sheavner opened this issue Sep 5, 2014 · 2 comments

Comments

@sheavner
Copy link

sheavner commented Sep 5, 2014

We've got one library (stanford-corenlp-3.4-models.jar below) which has no classes, but is full of large data files. It's so large that github won't let us check it in -- not that we really want to do that.

libraryDependencies ++= Seq(
  "edu.stanford.nlp" % "stanford-corenlp" % "3.4",
  "edu.stanford.nlp" % "stanford-corenlp" % "3.4" classifier "models"
)

When we run play stage or sbt stage, it ignores stanford-corenlp-3.4-models.jar. It does include all the other code jars in the project, including stanford-corenlp-3.4.jar. The other build targets: compile, run, test do find the models jar and include it in the classpath from its location in the appropriate local ivy cache, but stage ignores the jar. The jar isn't bundled with the other jars during staging or appended to the class path.

Is there something rejecting this jar because it has no referenced classes? Is there a way to flag the jar and indicate it must be included with the other staged files even if it is never referenced.

We're using the play framework 2.2.1 with sbt 0.13.0. I think we also tried sbt 0.13.5 and didn't see any difference.

[Transferred from https://github.com/sbt/sbt/issues/1575 at request of jsueret]

@muuki88 muuki88 added bug and removed bug labels Sep 5, 2014
@muuki88
Copy link
Contributor

muuki88 commented Sep 5, 2014

@jsuereth guess is correct and the classifier makes the difference.
JavaApp filters for type jar.

I'll change this to a feature request. What do you think of a setting like this:

packageTypes ++= Seq("jar", "models")

@sheavner
Copy link
Author

sheavner commented Feb 4, 2015

Sounds fine to me, but I'm not much of an expert on the current SBT standard syntax or existing patterns.

jsuereth added a commit that referenced this issue Jun 16, 2015
FIX #347 add ability to add arbitrary stuff from the classpath. Only
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants