Comments (7)
BTW - I'm not 100% certain why you saw this. It means for some reason the tar file was not created, but the process returned success. After the next release of sbt-native-packager, I'd love to here feedback on what the new error message states.
from sbt-native-packager.
Sure. I'm not sure either. I was trying to create my first sbt packager package and I was having a lot of trouble. I was going to get it to work and improve the documentation, but then I ran into this.
from sbt-native-packager.
Anything I can do to help, please let me know. Perhaps if you had an example project with the problem, so I can try it out?
from sbt-native-packager.
Josh, I can give you a GitHub url to sample projects. Beware it has a test case with significant memory resources (this is a pain point for me). I'm probably doing a lot wrong, but I spent some time earlier with the available documentation.
- I found it difficult to figure out which command I needed to run to make a universal linux package. It would be nice for this to be in the README. Maybe I still have it wrong.
- https://github.com/knowitall/openie/tree/package
> sbt clean compile
...
/home/michael/hack/github/knowitall/openie/build.sbt:78: error: not found: value archetypes
archetypes.java_application
^
If I remove the problematic line, the next error I get is:
> sbt clean compile
...
/home/michael/hack/github/knowitall/openie/build.sbt:49: error: not found: value packageSummary
packageSummary in Linux := "The name you want displayed in package summaries"
^
[error] Type error in expression
- If I remove everything beneath packagerSettings, I get an exception like before. Note that this time I'm running this on an entirely different machine (personal machine at home vs work machine at work).
https://github.com/knowitall/openie/tree/package1
> sbt clean compile universal:package-zip-tarball
java.util.NoSuchElementException: next on empty iterator
at scala.collection.Iterator$$anon$3.next(Iterator.scala:27)
at scala.collection.Iterator$$anon$3.next(Iterator.scala:25)
at scala.collection.IndexedSeqLike$Elements.next(IndexedSeqLike.scala:63)
at scala.collection.IterableLike$class.head(IterableLike.scala:90)
at scala.collection.mutable.ArrayOps.scala$collection$IndexedSeqOptimized$$super$head(ArrayOps.scala:38)
at scala.collection.IndexedSeqOptimized$class.head(IndexedSeqOptimized.scala:121)
at scala.collection.mutable.ArrayOps.head(ArrayOps.scala:38)
at com.typesafe.sbt.packager.universal.Archives$$anonfun$makeTarball$1.apply(Archives.scala:126)
at com.typesafe.sbt.packager.universal.Archives$$anonfun$makeTarball$1.apply(Archives.scala:116)
at sbt.IO$.withTemporaryDirectory(IO.scala:262)
at com.typesafe.sbt.packager.universal.Archives$.makeTarball(Archives.scala:116)
at com.typesafe.sbt.packager.universal.Archives$$anonfun$10.apply(Archives.scala:109)
at com.typesafe.sbt.packager.universal.Archives$$anonfun$10.apply(Archives.scala:109)
at sbt.Scoped$$anonfun$hf3$1.apply(Structure.scala:579)
at sbt.Scoped$$anonfun$hf3$1.apply(Structure.scala:579)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:49)
at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311)
at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:41)
at sbt.std.Transform$$anon$5.work(System.scala:71)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
at sbt.Execute.work(Execute.scala:238)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
[error] (universal:package-zip-tarball) java.util.NoSuchElementException: next on empty iterator
[error] Total time: 0 s, completed Oct 7, 2013 3:15:52 PM
from sbt-native-packager.
Ah, so this is definitely a "documentation is poor" error. Specifically, here's a build.sbt that will work for you:
import AssemblyKeys._
import NativePackagerKeys._
assemblySettings
name := "openie"
organization := "edu.washington.cs.knowitall.openie"
version := "4.1.1-SNAPSHOT"
crossScalaVersions := Seq("2.10.2")
scalaVersion <<= crossScalaVersions { (vs: Seq[String]) => vs.head }
resolvers += "Sonatype SNAPSHOTS" at "https://oss.sonatype.org/content/repositories/snapshots/"
libraryDependencies ++= Seq(
// extractor components
"edu.washington.cs.knowitall.srlie" %% "srlie" % "1.0.1",
"edu.washington.cs.knowitall.chunkedextractor" %% "chunkedextractor" % "1.0.6",
// for splitting sentences
"edu.washington.cs.knowitall.nlptools" %% "nlptools-sentence-opennlp" % "2.4.3",
// for remote components
"net.databinder.dispatch" %% "dispatch-core" % "0.11.0",
// resource management
"com.jsuereth" %% "scala-arm" % "1.3",
// logging
"org.slf4j" % "slf4j-api" % "1.7.5",
"ch.qos.logback" % "logback-core" % "1.0.13",
"ch.qos.logback" % "logback-classic" % "1.0.13",
"org.scalatest" % "scalatest_2.10" % "2.0.RC1" % "test")
mainClass in assembly := Some("edu.knowitall.openie.OpenIECli")
scalacOptions ++= Seq("-unchecked", "-deprecation")
// custom options for high memory usage
javaOptions += "-Xmx4G"
javaOptions += "-XX:+UseConcMarkSweepGC"
fork in run := true
fork in Test := true
connectInput in run := true // forward stdin/out to fork
licenses := Seq("Open IE Software License Agreement" -> url("https://raw.github.com/knowitall/openie/master/LICENSE"))
homepage := Some(url("https://github.com/knowitall/openie"))
publishMavenStyle := true
publishTo <<= version { (v: String) =>
val nexus = "https://oss.sonatype.org/"
if (v.trim.endsWith("SNAPSHOT"))
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
pomExtra := (
<scm>
<url>https://github.com/knowitall/openie</url>
<connection>scm:git://github.com/knowitall/openie.git</connection>
<developerConnection>scm:git:[email protected]:knowitall/openie.git</developerConnection>
<tag>HEAD</tag>
</scm>
<developers>
<developer>
<name>Michael Schmitz</name>
</developer>
</developers>)
packageArchetype.java_application
packageSummary in Linux := "The name you want displayed in package summaries"
packageDescription := " A description of your project"
The changes are:
+import NativePackagerKeys._
- archetypes.java_application
+ packageArchetype.java_application
I'm updating the docs now!
from sbt-native-packager.
Cool. I saw both archetypes.java_application
and packageArchetype.java_application
in the docs--so clarifying will definitely help!
from sbt-native-packager.
Yep. One is a carry-over from a rename. Updated the README.md with need-to-know info for now.
from sbt-native-packager.
Related Issues (20)
- Multiplatform builds do not always use buildx
- Changes Not Being Propagated to Image HOT 2
- Getting started description is outdated HOT 5
- Support for Podman as Docker alternative
- generated runit script no_more_snp_opts usage missing $ sign
- sbt docker:publishLocal logs build info as error HOT 1
- No releases for v1.9.17 or v1.9.18 tags HOT 44
- ARM architecture support HOT 2
- plugin load failed with Scala 3 HOT 1
- Let scala-steward visit that repo? HOT 2
- sbt-native-packager fails with dpkg-deb error HOT 4
- sbt-native-packager/formats/universal.html#filter-remove-mappings is stale HOT 1
- `sbt ghpagesPushSite` failed for the 1.10.0 release HOT 5
- The bash script for Ubuntu doesn't seem to have include a given java-home
- Cannot set --add-opens jvm setting HOT 3
- Support for running GrallVM native agent
- JavaServerAppPackaging sometimes ignores javaOptions.
- Graalvm plugin documentation is not correct
- installation for recent <version> is failing
- GraalVMNativeImagePlugin build in docker container should relabel volume mount for target directory
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-native-packager.