Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6323955
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:37:00+00:00 2026-05-24T16:37:00+00:00

Is there a possibility to literally override a target or emulate this somehow? So,

  • 0

Is there a possibility to literally override a target or emulate this somehow?

So, when I call

<target perform-after="release">
     <do-something />
</target>

It will act like this:

<target name="release">
     <antcall target="release" /> <!-- call previous version, not recursion -->
     <do-something /> 
</target>

I think it has a meaning, I’ll describe on Android example:

We have an .xml templates for every build.xml in SDK folder ({$SDK}/tools/ant/*.xml), these files are included in every generated build.xml for each project. There are only -pre-compile, -pre-build and -post-compile targets that empty and easy to override. But there is no empty -post-release target, for example. Google recommends in generated build.xml comments just to copy-paste a target to my own build.xml and then tune it. But I think it is not ok, because if Google will change something in this target inside a template, I will never know about I am using outdated version.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T16:37:01+00:00Added an answer on May 24, 2026 at 4:37 pm

    See the “Target overriding” section of the import task or the “Target rewriting” section of the include task. In short, give the common build.xml a project name like “common”, and then use “common.release” in the antcall.

    I’ll note that antcall isn’t quite the same since it starts a new project at runtime, which means variables set by the target won’t be visible later. I don’t have Ant available on this machine to test, but you might try something like this to avoid the antcall:

    <target name="release" depends="common.release, -post-release"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was always curious is there any possibility to overload function literal, something like
is there a possibility to see which objects will be removed with the garbage
Is there a possibility to pass current UIComponent as this in action's MethodExpression? XHTML
Is there a possibility to check if something is a partial function in Clojure?
Is there any possibility to call webservice using jQuery 1.0.pack.js?
is there a possibility to animate an uibutton in this way that a thing
is there a possibility to execute an sql script, after EclipseLink generated the ddl?
Is there any possibility of retrieving missed phone call numbers from WP7? As far
Is there possibility to compile windows service using only mingw c++ compiler and library?
Is there any possibility that GetPropInfo returns nil even if the given class is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.