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

How to "run" Java Application Archetype? #640

Closed
drozzy opened this issue Aug 4, 2015 · 5 comments
Closed

How to "run" Java Application Archetype? #640

drozzy opened this issue Aug 4, 2015 · 5 comments
Labels
documentation Documentation should be extended or updated

Comments

@drozzy
Copy link

drozzy commented Aug 4, 2015

On the usage page there is no command (like "sbt java-package"?):
http://www.scala-sbt.org/sbt-native-packager/archetypes/java_app/index.html#usage

Forgive the stupid question, but for the life of me I can't figure out how to invoke the "build" of the java application archetype?

Or am I confusing something? Please let me know.

@drozzy
Copy link
Author

drozzy commented Aug 4, 2015

EDIT: The command I ran was sbt stage.

Ok, I found the bins in /target/universal/stage/bin.
The docs (http://www.scala-sbt.org/sbt-native-packager/archetypes/) simply refer to bin/ so it's a bit confusing.

@drozzy drozzy closed this as completed Aug 4, 2015
@muuki88
Copy link
Contributor

muuki88 commented Aug 4, 2015

On no. That's not good if you needed that long to figure it out! There is an example on the start page, the third box. Didn't you see it or didn't you associate it with the archetypes?

@drozzy
Copy link
Author

drozzy commented Aug 4, 2015

I guess it's confusing because it mentions debian... had it been "sbt stage" I would have picked up on it. At least that's what worked for me, and the only place where I found sbt stage command, was on the "My First Package Project":

http://www.scala-sbt.org/sbt-native-packager/archetypes/java_app/my-first-project.html

which I only looked at as a last resort...

Maybe sbt stage should be up-front-and-center somewhere, or at least mentioned here:
http://www.scala-sbt.org/sbt-native-packager/archetypes/java_app/index.html

P.S.: In fact, I am still not sure whether sbt stage is doing the archetype thing or the packaging thing... but that is probably just my lack of SBT knowledge? I only use sbt run/compile most of the time.

@muuki88
Copy link
Contributor

muuki88 commented Aug 4, 2015

Well, native packager gives you the possibility to create different output packages. So the intended flow would be

  1. Choose an archetype -> JavaAppPackaging or JavaSeverAppPackaging ( docs describe what they provide and how to customise )
  2. Choose a package format, e.g. zip, docker, debian, ... and go to the package format docs page for usage and required configuration.

The stage task only creates the package content in its own folder, but doesn't create any package.

@muuki88 muuki88 added the documentation Documentation should be extended or updated label Aug 4, 2015
@muuki88
Copy link
Contributor

muuki88 commented Aug 4, 2015

Ah, I just got what you mean by bins/. That is only the bash/bat script executing your application jar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation should be extended or updated
Projects
None yet
Development

No branches or pull requests

2 participants