#255

precompileTemplatesAction can run before prepareWebapp, which deletes its output

    • Created on: Wed, Aug 24 2011 (9 months ago)
    • Reported by: drewp
    • Assigned to: -
    • Milestone: -
    • Estimate: None/Small/Medium/Large None
    • Status: New
    • Priority: Normal (3)
    • Component: sbt-scalate-plugin
    • Permission type: None
    Simply using "extends DefaultWebProject(info) with PrecompilerWebProject" on my SBT project was leading to irregular results, where the output template .class files would usually not get into my .war, but sometimes would, especially after I touched a .scala file and re-published. Generally, the .class files would get built, but then the prepare-webapp step would delete them.

    The fine folks on #scalatra channel suggested this line in my Project:
      override def precompileTemplatesAction = super.precompileTemplatesAction dependsOn prepareWebapp

    This seems to successfully order the PCT step after the prepare-webapp step, and my builds have been working since.

    casualjim also suggested override def runAction = task { args => super.runAction(args) dependsOn(precompileTemplatesAction) }, which I did not try.
  • Followers
     
    Ico-users drewp 
     
    Attachments
    No attachments
    Associations
     
    No associations
    Activity
    Time Expenditure
    Loading