You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2016/10/27 10:21:41 UTC

[Bug 60312] New: Create, or document how to embed Ant in Java

https://bz.apache.org/bugzilla/show_bug.cgi?id=60312

            Bug ID: 60312
           Summary: Create, or document how to embed Ant in Java
           Product: Ant
           Version: unspecified
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
          Assignee: notifications@ant.apache.org
          Reporter: jochen.wiedmann@gmail.com

It is no unusual requirement, to invoke an Ant script from within a Java class.
This procedure is, what I would describe as ("Embed Ant in Java").

To support such a use case, there shuld be an EmbeddedAnt bean, or something
similar, with methods like getBuildFile(), setBuildFile(File pFile), and the
like, which does just that. However, AFAIK, there is no such thing.

In the "Running Apache Ant" document
(https://ant.apache.org/manual/running.html), there's a section "Running Ant
via Java". However, that advice is close to unusable. It suggests either of the
classes Main, or Launcher. Neither of these is suited for embedding, because
they both invoke System.exit(), which is clearly not allowed in an embedded
solution.

This request is to create a solution for embedding Ant. Or, if such a solution
exists, have it documented.

Thanks,

Jochen

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 60312] Create, or document how to embed Ant in Java

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60312

--- Comment #1 from Gintas Grigelionis <gi...@apache.org> ---
Would it be sufficient, as in Ivy, to provide a public run() in Launcher?

-- 
You are receiving this mail because:
You are the assignee for the bug.