scala - Cannot specify main class for both running AND packaging jar in SBT 0.12.3 -


for reason cannot simultaneously specify main class run , packaging jar in sbt 0.12.3.

the problem sbt publish-local doesn't put name of main class jar's manifest if don't set explicitly.

but interestingly enough this

mainclass in (compile,run) := some("hi") 

and

mainclass in (compile,packagebin) := some("hi") 

work separately this

mainclass in (compile,run,packagebin) := some("hi") 

causes sbt fail following error

c:\work\test_projects\hw\build.sbt:13: error: reassignment val mainclass in (run,compile,packagebin) := some("hi")                                       ^ [error] type error in expression 

is bug or missing ?

the (compile,run) in

mainclass in (compile,run) := some("hi") 

is specifying 2 axes of 4 axes setting has, (compile,run,packagebin) doesn't make sense. if want grab value other, say:

mainclass in (compile,packagebin) <<= mainclass in (compile,run) 

for more details, check out getting started guide.


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -