Skip to content

Instantly share code, notes, and snippets.

View jstrachan's full-sized avatar

James Strachan jstrachan

View GitHub Profile
20:06:31.068 [qtp367355325-22] ERROR o.f.s.layout.DefaultLayoutStrategy - Caught: org.fusesource.scalate.ResourceNotFoundException: Could not load resource: [/org/fusesource/scalate/console/console_head.scaml]; are you sure it's within [/workspace/java/scalate/scalate-sample/target/tmp/webinf]?
org.fusesource.scalate.ResourceNotFoundException: Could not load resource: [/org/fusesource/scalate/console/console_head.scaml]; are you sure it's within [/workspace/java/scalate/scalate-sample/target/tmp/webinf]?
at org.fusesource.scalate.servlet.ServletResourceLoader.toFileOrFail(ServletResourceLoader.scala:43) [scalate-core-1.0-SNAPSHOT.jar:na]
at org.fusesource.scalate.FileResourceLoader.load(ResourceLoader.scala:56) [scalate-core-1.0-SNAPSHOT.jar:na]
at org.fusesource.scalate.scaml.ScamlCodeGenerator.generate(ScamlCodeGenerator.scala:650) [scalate-core-1.0-SNAPSHOT.jar:na]
at org.fusesource.scalate.TemplateEngine.generateScala(TemplateEngine.scala:154) [scalate-core-1.0-SNAPSHOT.ja
val foo:Option[Person] = ($_scalate_$_context.attributes.get("foo") match {
case Some(value: Option[Person]) => value
case None => None
});
def generate(fragments: List[PageFragment]):Unit = {
val (imports, others) = fragments.partition(isImportStatement)
imports.foreach{ generate(_) }
others.foreach{ generate(_) }
}
def isImportStatement(fragment: PageFragment) = fragment match {
case s: ScriptletFragment if (s.code.trim.startsWith("import ")) => true
case _ => false
table.people {
- val people = someFunction
- for (person <- people)
td.name {
color: blue; /** style rule */
= person.name /** data rule */
}
}
Staging Ruleset Evaluation Has Failed!
- Staging Javadoc Validation (Staging Javadoc Validation)
Failed to validate '/org/fusesource/scalate/scalate-core/1.0/scalate-core-1.0.pom' on repository 'orgfusesourcescalate-013'. No javadoc jar found for this artifact.
Failed to validate '/org/fusesource/scalate/scalate-test/1.0/scalate-test-1.0.pom' on repository 'orgfusesourcescalate-013'. No javadoc jar found for this artifact.
Failed to validate '/org/fusesource/scalate/scalate-guice/1.0/scalate-guice-1.0.pom' on repository 'orgfusesourcescalate-013'. No javadoc jar found for this artifact.
Failed to validate '/org/fusesource/scalate/scalate-camel/1.0/scalate-camel-1.0.pom' on repository 'orgfusesourcescalate-013'. No javadoc jar found for this artifact.
Failed to validate '/org/fusesource/scalate/tooling/scalate-archetypes-itests/1.0/scalate-archetypes-itests-1.0.pom' on repository 'orgfusesourcescalate-013'. No javadoc jar found for this artifact.
Failed to validate '/org/fusesource/sc
Staging Ruleset Evaluation Has Failed!
- Staging Javadoc Validation (Staging Javadoc Validation)
Failed to validate '/org/fusesource/scalate/scalate-core/1.0/scalate-core-1.0.pom' on repository 'orgfusesourcescalate-014'. No javadoc jar found for this artifact.
Failed to validate '/org/fusesource/scalate/scalate-test/1.0/scalate-test-1.0.pom' on repository 'orgfusesourcescalate-014'. No javadoc jar found for this artifact.
Failed to validate '/org/fusesource/scalate/scalate-guice/1.0/scalate-guice-1.0.pom' on repository 'orgfusesourcescalate-014'. No javadoc jar found for this artifact.
Failed to validate '/org/fusesource/scalate/scalate-camel/1.0/scalate-camel-1.0.pom' on repository 'orgfusesourcescalate-014'. No javadoc jar found for this artifact.
Failed to validate '/org/fusesource/scalate/tooling/scalate-archetypes-itests/1.0/scalate-archetypes-itests-1.0.pom' on repository 'orgfusesourcescalate-014'. No javadoc jar found for this artifact.
Failed to validate '/org/fusesource/sc
[INFO] [copy] Copying 1 file to /workspace/java/scalate-release/scalate-website/target
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [ERROR] BUILD ERROR
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] An Ant BuildException has occured: java.lang.ClassNotFoundException: com.petebevin.markdown.MarkdownFilter
Staging Ruleset Evaluation Has Failed!
- Staging Sources Validation (Staging Sources Validation)
Failed to validate '/org/fusesource/scalate/tooling/scalate-archetypes-itests/1.0/scalate-archetypes-itests-1.0.pom' on repository 'orgfusesourcescalate-015'. No sources jar found for this artifact.
object transformer extends Transformer {
$(".people") { node =>
val odd = node.$("tr.odd")
val even = node.$("tr.even")
var c=0
people.flatMap { p =>
c += 1
transform(if (c%2 == 0) even else odd) { t =>
$(".name").contents = p.name
$(".location").contents = p.location
val xml =
<table class="people">
<thead>
<tr>
<th>Name</th>
<th>Location</th>
</tr>
</thead>
<tbody>
<tr>