Hi Peter,

On Thu, May 6, 2010 at 4:49 AM, Peter Schröder <[email protected]> wrote:

> i have a buildfile that produces a complex war. i want to duplicate that
> war and add some libraries for testing before deploying it to our
> testserver.
>
> the original war must not be changed, because it is published to our
> integration server afterwards.
>
> is there some way of cloning or copying or duplicating a
> package-definition?
>
> i tried to create a new war and merge both, but it seems that files from
> include/exclude patterns are not recognized at that time.
>

I think this qualifies as a bug.

As workaround you could create two wars in one go, e.g.,

  [project.name, "#{project.name}-test"].each do |id|
    package(:war, :id => id).tap do |war|
      war.path('META-INF').include(_(:src, :main, :resources,
"descriptor.xml"))
      war.path('WEB-INF/classes').exclude(_(:target, :classes,
"org/example/**.class"))
    end
  end

alex

Reply via email to