groovy

AntBuilder: support import task and allow to define targets

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.5.4
  • Fix Version/s: 1.5.5
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

AntBuilder should:

  • provide support for import task
  • allow to define a new target like:
    ant.target(name: 'myTarget', depends: 'someOtherTarget')
    {
    echo(message: 'blabla')
    }

Activity

Hide
Marc Guillemot added a comment -

Implemented in build 1195.

Show
Marc Guillemot added a comment - Implemented in build 1195.
Hide
Paul King added a comment -

This feature may have caused a feature conflict as reported in GROOVY-3763

Show
Paul King added a comment - This feature may have caused a feature conflict as reported in GROOVY-3763
Hide
Paul King added a comment -

I also noted that ant.target seems to both define and execute the target. Is that expected behavior?

def ant = new AntBuilder()
ant.target(name:'foo') {
    echo(message:'Hello from foo')
}
ant.project.executeTarget('foo')

Results in:

     [echo] Hello from foo

foo:
     [echo] Hello from foo
Show
Paul King added a comment - I also noted that ant.target seems to both define and execute the target. Is that expected behavior?
def ant = new AntBuilder()
ant.target(name:'foo') {
    echo(message:'Hello from foo')
}
ant.project.executeTarget('foo')
Results in:
     [echo] Hello from foo

foo:
     [echo] Hello from foo
Hide
Paul King added a comment -

I also noticed that I can't replace ant.project.executeTarget('foo') with ant.antcall(target:'foo') in the example from the previous comment. Is that just normal Ant late binding coming into play?

Show
Paul King added a comment - I also noticed that I can't replace ant.project.executeTarget('foo') with ant.antcall(target:'foo') in the example from the previous comment. Is that just normal Ant late binding coming into play?
Hide
Paul King added a comment -

I don't believe antcall can be made to work with AntBuilder. It was working by fluke because the build file happened to be in the current directory and was being re-processed.

Show
Paul King added a comment - I don't believe antcall can be made to work with AntBuilder. It was working by fluke because the build file happened to be in the current directory and was being re-processed.

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: