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

documentation for Build.scala files #593

Closed
fommil opened this issue Jun 4, 2015 · 10 comments
Closed

documentation for Build.scala files #593

fommil opened this issue Jun 4, 2015 · 10 comments

Comments

@fommil
Copy link

fommil commented Jun 4, 2015

In the docs http://www.scala-sbt.org/sbt-native-packager/archetypes/java_app/index.html enablePlugins(JavaAppPackaging) is recommended. But this only works for build.sbt style projects. what is the correct magic for Build.scala style projects?

@muuki88
Copy link
Contributor

muuki88 commented Jun 4, 2015

AFAIK AutoPlugins only work with build.sbt files together. There is no way I know to get around this (yet). I know this is a pain when migrating from Build.scala builds to *.sbt builds :(

cc @jsuereth

@fommil
Copy link
Author

fommil commented Jun 4, 2015

So support for .scala style projects is deprecated?

@fommil
Copy link
Author

fommil commented Jun 4, 2015

by fiddling around, I've worked out that adding this at the top

import com.typesafe.sbt.packager.archetypes.JavaAppPackaging
import JavaAppPackaging.autoImport._

and this to a module

  enablePlugins (
    JavaAppPackaging
  )

seems to allow me to type stage. And the keys seem to be available (but I cannot confirm if they work).

@kardapoltsev
Copy link
Member

You could take a look here example of Build.scala with autoplugins and some additional configuration

@muuki88
Copy link
Contributor

muuki88 commented Jun 4, 2015

I'm not sure if *.scala is deprecated (though it gets more and more discouraged).

@muuki88
Copy link
Contributor

muuki88 commented Jun 12, 2015

@fommil I would close this as at this point we have no way to solve this?

@fommil
Copy link
Author

fommil commented Jun 12, 2015

This is just an RFE for better documentation, I'm sure that can be fixed... although whether it will be fixed is another question.

@muuki88
Copy link
Contributor

muuki88 commented Jun 12, 2015

Actually I'm pretty happy, when Build.scala will go away. As a beginner I was really confused, when to use what and why. Still I can understand the issue, when a project is heavily relying on this and all of a sudden you will have to change anything.

@fommil
Copy link
Author

fommil commented Jun 12, 2015

I will kick up a massive fuss if they try to remove Build.scala. It's the only thing that (vaguely) makes any sense to me... the .sbt files are total voodoo and completely useless if you want to do anything non-standard.

@muuki88
Copy link
Contributor

muuki88 commented Jun 13, 2015

I will close this ticket for now as "how to use Build.scala with AutoPlugins" is as an SBT concern and not sbt-native-packager. Feel free to provide a PR, when there are docs available.

@muuki88 muuki88 closed this as completed Jun 13, 2015
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

No branches or pull requests

3 participants