[2.1-java] dist task fail

631 views
Skip to first unread message

antoine....@gmail.com

unread,
Jan 22, 2013, 12:15:33 PM1/22/13
to play-fr...@googlegroups.com
Since I upgraded to play 2.1-RC2, when I try to dist I've got this error :

[error] java.lang.AssertionError: assertion failed: Internal task engine error: nothing running.  This usually indicates a cycle in tasks.
[error]   Calling tasks (internal task engine state):
[error] Task((task-definition-key: ScopedKey(Scope(Select(ProjectRef(file:/home/aleveugl/workspace/utils-univers-core/,utils-univers-core)),Global,Global,Global),play-package-everything))) -> Calling
[error] Use 'last' for the full log.
[utils-univers-core] $ last
[debug] Running task... Cancelable: false, check cycles: false
[info] Wrote /home/aleveugl/workspace/utils-univers-core/target/scala-2.10/utils-univers-core_2.10-3.0.2-SNAPSHOT.pom
[info] Updating {file:/home/aleveugl/workspace/utils-univers-core/}utils-univers-core...
[info] Done updating.
java
.lang.AssertionError: assertion failed: Internal task engine error: nothing running.  This usually indicates a cycle in tasks.
 
Calling tasks (internal task engine state):
Task((task-definition-key: ScopedKey(Scope(Select(ProjectRef(file:/home/aleveugl/workspace/utils-univers-core/,utils-univers-core)),Global,Global,Global),play-package-everything))) -> Calling
    at scala
.Predef$.assert(Predef.scala:160)
    at sbt
.Execute$$anonfun$next$1$1.apply$mcV$sp(Execute.scala:81)
    at sbt
.Execute.pre(Execute.scala:349)
    at sbt
.Execute.next$1(Execute.scala:77)
    at sbt
.Execute.processAll(Execute.scala:88)
    at sbt
.Execute.runKeep(Execute.scala:68)
    at sbt
.EvaluateTask$.run$1(EvaluateTask.scala:162)
    at sbt
.EvaluateTask$.runTask(EvaluateTask.scala:177)
    at sbt
.Aggregation$$anonfun$4.apply(Aggregation.scala:46)
    at sbt
.Aggregation$$anonfun$4.apply(Aggregation.scala:44)
    at sbt
.EvaluateTask$.withStreams(EvaluateTask.scala:137)
    at sbt
.Aggregation$.runTasksWithResult(Aggregation.scala:44)
    at sbt
.Aggregation$.runTasks(Aggregation.scala:59)
    at sbt
.Aggregation$$anonfun$applyTasks$1.apply(Aggregation.scala:31)
    at sbt
.Aggregation$$anonfun$applyTasks$1.apply(Aggregation.scala:30)
    at sbt
.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:62)
    at sbt
.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:62)
    at sbt
.Command$.process(Command.scala:90)
    at sbt
.MainLoop$$anonfun$next$1$$anonfun$apply$1.apply(MainLoop.scala:71)
    at sbt
.MainLoop$$anonfun$next$1$$anonfun$apply$1.apply(MainLoop.scala:71)
    at sbt
.State$$anon$2.process(State.scala:170)
    at sbt
.MainLoop$$anonfun$next$1.apply(MainLoop.scala:71)
    at sbt
.MainLoop$$anonfun$next$1.apply(MainLoop.scala:71)
    at sbt
.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
    at sbt
.MainLoop$.next(MainLoop.scala:71)
    at sbt
.MainLoop$.run(MainLoop.scala:64)
    at sbt
.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:53)
    at sbt
.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:50)
    at sbt
.Using.apply(Using.scala:25)
    at sbt
.MainLoop$.runWithNewLog(MainLoop.scala:50)
    at sbt
.MainLoop$.runAndClearLast(MainLoop.scala:33)
    at sbt
.MainLoop$.runLoggedLoop(MainLoop.scala:17)
    at sbt
.MainLoop$.runLogged(MainLoop.scala:13)
    at sbt
.xMain.run(Main.scala:26)
    at xsbt
.boot.Launch$.run(Launch.scala:55)
    at xsbt
.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:45)
    at xsbt
.boot.Launch$.launch(Launch.scala:69)
    at xsbt
.boot.Launch$.apply(Launch.scala:16)
    at xsbt
.boot.Boot$.runImpl(Boot.scala:31)
    at xsbt
.boot.Boot$.main(Boot.scala:20)
    at xsbt
.boot.Boot.main(Boot.scala)
[error] java.lang.AssertionError: assertion failed: Internal task engine error: nothing running.  This usually indicates a cycle in tasks.
[error]   Calling tasks (internal task engine state):
[error] Task((task-definition-key: ScopedKey(Scope(Select(ProjectRef(file:/home/aleveugl/workspace/utils-univers-core/,utils-univers-core)),Global,Global,Global),play-package-everything))) -> Calling



This is happenning only when I add this setting to my play Project :
.settings(
            publishArtifact
in (Compile, packageDoc) := false
           
)

It's blocking for me since the doc generation fail due to inner classes apparently not supported ([error] (compile:doc) Scaladoc generation failed)

Here is my dist setting :
.settings(addArtifact(Artifact (appName, "dist", "zip"), dist).settings: _*)

Thank you for your help.
Antoine.

antoine....@gmail.com

unread,
Jan 22, 2013, 12:34:28 PM1/22/13
to play-fr...@googlegroups.com
Actually it's also happening without the setting
.settings(
            publishArtifact
in (Compile, packageDoc) := false
           
)



antoine....@gmail.com

unread,
Jan 23, 2013, 5:22:15 AM1/23/13
to play-fr...@googlegroups.com

https://github.com/playframework/Play20/pull/535

There is a problem with this new implementation :

In play 2.0.4, when I wanted to publish the zip file containing all the jars, I just had to add the following setting to my build.scala :


.settings(addArtifact(Artifact (appName, "dist", "zip"), dist).settings: _*)

"I believe a better approach is for the "dist" command to take its input from the packagedArtifacts"

So now the dist command is calling the playPackageEverything command which try to build all the artifacts (including my dist zip) -> ERROR :

[error] java.lang.AssertionError: assertion failed: Internal task engine error: nothing running. This usually indicates a cycle in tasks.
[error] Calling tasks (internal task engine state):


So how to publish the zip file ?

I'm using play 2.1-RC2 java.


Thank you for your help.


On Tuesday, January 22, 2013 6:15:33 PM UTC+1, antoine....@gmail.com wrote:

Manuel Bernhardt

unread,
Jan 31, 2013, 11:47:41 AM1/31/13
to play-fr...@googlegroups.com
Hi,

I'm having exactly the same issue. Any ideas on how to configure an
aggregated artifact from "dist" would be excellent.

Thanks,

Manuel
> --
>
>

antoine....@gmail.com

unread,
Jan 31, 2013, 2:04:15 PM1/31/13
to play-fr...@googlegroups.com
I implemented a deploy plugin to do this. I will share my code tomorow. Just do a up to this post tomorow in case I forgot. :-)

volker...@eligotech.com

unread,
Feb 28, 2013, 8:47:12 AM2/28/13
to play-fr...@googlegroups.com
HI Antoine

could you please share your deploy-plugin.

Thanks
Volker

Stefan De Boey

unread,
Mar 3, 2013, 11:56:09 AM3/3/13
to play-fr...@googlegroups.com
i was experiencing the same problem and i managed to get around this with the following settings:

val distHack = TaskKey[sbt.File]("dist-hack", "Hack to publish dist")

val myDistSettings = Seq[Setting[_]] (
  publish <<= (publish) dependsOn play.Project.dist,
  publishLocal <<= (publishLocal) dependsOn play.Project.dist,
  artifact in distHack ~= { (art: Artifact) =>
    art.copy(`type` = "zip", extension = "zip")
  },
  distHack <<= (distDirectory, version) map { (d, v) =>
    val packageName = "%s-%s" format(projectName, v)
    val zip = d / (packageName + ".zip")
    zip
  }
) ++ Seq(addArtifact(artifact in distHack, distHack).settings: _*)

you can add myDistSettings to the settings of your project.

projectName is the just the name of the main project.

volker...@eligotech.com

unread,
Mar 4, 2013, 3:02:49 AM3/4/13
to play-fr...@googlegroups.com
This works great, thanks a lot. To avoid referencing the "global" projectName I added a dependency on normalizedName like this:

      distPublish <<= (distDirectory, normalizedName, version) map { (distDir, id, version) =>
        val packageName
= "%s-%s" format(id, version)
        distDir
/ (packageName + ".zip")
     
},

Stefan De Boey

unread,
Mar 5, 2013, 6:07:59 PM3/5/13
to play-fr...@googlegroups.com
np, indeed, even better.

but today i noticed the zip file doesn't contain the jar for the main app. but i didn't a have a chance to investigate this, so i'm not sure if this is caused by this 'hack'. don't think so, but you never know :) 

volker...@eligotech.com

unread,
Mar 6, 2013, 2:09:48 AM3/6/13
to play-fr...@googlegroups.com

I assume this is caused by disabling the jar artifact with a setting like this:

publishArtifact in (Compile, packageBin) := false,

at least I had this setting before (with play 2.0) and noticed that with play 2.1 this "removes" the main-jar from the zip.

Stefan De Boey

unread,
Mar 6, 2013, 4:08:57 AM3/6/13
to play-fr...@googlegroups.com
ah, yes, of course, i'll try that one. thnx

Assaf Segev

unread,
Dec 16, 2013, 8:40:51 AM12/16/13
to play-fr...@googlegroups.com
I'm experiencing a problem with the settings:

.settings(addArtifact(Artifact (appName, "dist", "zip"), dist).settings: _*) 
I'm getting compilation error: "...project/Build.scala:26: not found: value dist", 
any idea why is it not recognizing it?
Thanks!

volker...@eligotech.com

unread,
Dec 16, 2013, 8:59:29 AM12/16/13
to play-fr...@googlegroups.com
Did you try play.Project.dist?
Reply all
Reply to author
Forward
0 new messages