Comments (12)
It should be included by default. Could you create gist of your build.sbt?
from sbt-assembly.
https://gist.github.com/1933146
from sbt-assembly.
I don't see anything wrong with it. Are you able to run your app using run
task?
from sbt-assembly.
Yes, it works great ;).
from sbt-assembly.
I am using class Main extends App { ... }
, could it be the problem?
from sbt-assembly.
In my environment using class Main extends App { ... }
raises:
Failed to load Main-Class manifest attribute from
xyz.jar
but using object Main extends App { ... }
works.
from sbt-assembly.
Does it print out:
[info] Including scala-library.jar
when you run assembly
?
from sbt-assembly.
Sorry, it is object Main extends App { ... }
.
from sbt-assembly.
No, it does not print out [info] Including scala-library.jar
.
from sbt-assembly.
Is it possible for you to zip up the project and email it to me, or create some other reproducible sample that you can share?
from sbt-assembly.
This is the sample: https://github.com/odwrotnie/hello-swt.
I think it runs now but ignores this settings:
javaOptions := Seq("-XstartOnFirstThread", "-d64"),
fork := true,
./sbt run
works.
from sbt-assembly.
I grabbed your code, ran assembly
from sbt:
Main> assembly
[info] Updating {file:/Users/foo/work/quick-demo/hello-swt/}Main...
[info] Resolving org.scala-lang#scala-library;2.9.1 ...
[info] Done updating.
[info] Compiling 1 Scala source to /Users/foo/work/quick-demo/hello-swt/main/target/scala-2.9.1/classes...
[info] No tests to run for test:test
[info] Including swt.jar
[info] Including scala-library.jar
[info] Packaging /Users/foo/work/quick-demo/hello-swt/main/target/Main-assembly-0.1.jar ...
[info] Done packaging.
[success] Total time: 7 s, completed Mar 3, 2012 8:33:28 AM
As you can see, it does print out [info] Including scala-library.jar
to the shell.
Next, I exited sbt, and ran the created jar as follows:
$ java -jar main/target/Main-assembly-0.1.jar
***WARNING: Display must be created on main thread due to Cocoa restrictions.
Exception in thread "main" org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(Unknown Source)
at org.eclipse.swt.SWT.error(Unknown Source)
at org.eclipse.swt.SWT.error(Unknown Source)
at org.eclipse.swt.widgets.Display.error(Unknown Source)
at org.eclipse.swt.widgets.Display.createDisplay(Unknown Source)
at org.eclipse.swt.widgets.Display.create(Unknown Source)
at org.eclipse.swt.graphics.Device.<init>(Unknown Source)
at org.eclipse.swt.widgets.Display.<init>(Unknown Source)
at org.eclipse.swt.widgets.Display.<init>(Unknown Source)
at Main$delayedInit$body.apply(main.scala:7)
at scala.Function0$class.apply$mcV$sp(Function0.scala:34)
at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
at scala.App$$anonfun$main$1.apply(App.scala:60)
at scala.App$$anonfun$main$1.apply(App.scala:60)
at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
at scala.collection.immutable.List.foreach(List.scala:45)
at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:30)
at scala.App$class.main(App.scala:60)
at Main$.main(main.scala:5)
at Main.main(main.scala)
The App is running. Whatever that's going on inside App is throwing the error.
So I simplified the application to just println.
hello
from sbt-assembly.
Related Issues (20)
- Inconsistent merge strategy logging vs counts
- Logback does not work with รผber-JAR HOT 1
- Migrate to `com.github.sbt`? HOT 1
- Assembly no longer creating directories defined in assemblyOutputPath HOT 4
- executable jar args
- Concatenating files without a newline HOT 4
- META-INF/javax.annotation.processing.Processor is included empty when shading is enabled - log4j HOT 1
- Add setting to allow adding arbitrary files to output Jar HOT 1
- Merge error not comprehensible HOT 3
- Definition of a repeatable build HOT 1
- InvalidPathException on Assembly 2.1.1 HOT 13
- Current alternative to assembledMappings HOT 6
- Document log4j2 plugins custom merge strategy HOT 2
- sbt clean assembly fails
- issue with zip64 headers in jars generated using sbt-assembly HOT 1
- Files from project's sources overwrite merged dependencies (2.0.0 regression)
- Shading breaks META-INF/services (1.2.0 regression) HOT 1
- Exception thrown "pomProperties" is null
- Abort build if shading fails HOT 1
- question about Mappings
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sbt-assembly.