buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Boisvert <alex.boisv...@gmail.com>
Subject Re: war is not being created although packaging war message appears
Date Wed, 15 Aug 2012 21:19:44 GMT
Ok so the code should actually be,

  war = package(:war, :id => "MyBuild")
  war.with :libs => project('Common')
  package.enhance do
      sh "$CATALINA_HOME/bin/shutdown.sh" rescue nil
      cp war.to_s, _(ENV['CATALINA_HOME'], 'webapps')
      sh "$CATALINA_HOME/bin/startup.sh"
  end

The issue being that code inside war.enhance (as suggested previously) is
run before the .war file is actually created (hence why the cp command
would fail).   Doing the 'enhance' on the package task instead works around
this issue.

alex


On Wed, Aug 15, 2012 at 8:04 AM, Odelya <odelya@alicanto.com> wrote:

> I realized also, that if I remove the lines
>
> sh "$CATALINA_HOME/bin/shutdown.sh"
> cp war.to_s, _(ENV['CATALINA_HOME'], 'webapps')
> sh "$CATALINA_HOME/bin/startup.sh"
>
> The war is actually being created.
>
> But how would cp command work if the war is not being created?
>
>
>
> --
> View this message in context:
> http://buildr-users.1056619.n5.nabble.com/war-is-not-being-created-although-packaging-war-message-appears-tp5706557p5706559.html
> Sent from the Buildr Users mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message