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 720057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T05:42:54+00:00 2026-05-14T05:42:54+00:00

When you define an extension-point in an Ant build file you can have it

  • 0

When you define an extension-point in an Ant build file you can have it conditional by using the if or unless attribute. On a target the if/unless prevent it’s tasks from being run. But an extension-point doesn’t have any tasks to conditionally run, so what does the condition do? My thought (which proved to be incorrect in Ant 1.8.0) is it would prevent any tasks that extend the extension-point from being run. Here is an example build script showing the problem:

<project name = "ext-test"
    default   = "main">

  <property name = "do.it" value = "false" />

  <extension-point name = "init"/>
  <extension-point name = "doit" depends = "init" if = "${do.it}" />

  <target name = "extend-init" extensionOf = "init">
    <echo message = "Doing extend-init." />
  </target>

  <target name = "extend-doit" extensionOf = "doit">
    <echo message = "Do It! (${do.it})" />
  </target>

  <target name = "main" depends = "doit">
    <echo message = "Doing main." />
  </target>

</project>

Using the command:

ant -v

Relults in:

Apache Ant version 1.8.0 compiled on February 1 2010
Trying the default build file: build.xml
Buildfile: /Users/bob/build.xml
Detected Java version: 1.6 in: /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
Detected OS: Mac OS X
parsing buildfile /Users/bob/build.xml with URI = file:/Users/bob/build.xml
Project base dir set to: /Users/bob
parsing buildfile jar:file:/Users/bob/Documents/Development/3P-Tools/apache-ant-1.8.0/lib/ant.jar!/org/apache/tools/ant/antlib.xml with URI = jar:file:/Users/bob/Documents/Development/3P-Tools/apache-ant-1.8.0/lib/ant.jar!/org/apache/tools/ant/antlib.xml from a zip file
Build sequence for target(s) `main' is [extend-init, init, extend-doit, doit, main]
Complete build sequence is [extend-init, init, extend-doit, doit, main, ]

extend-init:
     [echo] Doing extend-init.

init:

extend-doit:
     [echo] Do It! (false)

doit:
Skipped because property 'false' not set.

main:
     [echo] Doing main.

BUILD SUCCESSFUL
Total time: 0 seconds

You will notice the target extend-doit is executed but the extention-point itself is skipped. Since an extention-point doesn’t have any tasks exactly what has been skipped? Any targets that depend on the extention-point still get executed since a skipped target is a successful target. What is the value of the if/unless attributes on an extention-point?

  • 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-14T05:42:54+00:00Added an answer on May 14, 2026 at 5:42 am

    I’m guessing there is no actual use for them, they probably appear as attributes because extension-point extends target (the associated java classes do).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

With Spring, you can define an array property and have Spring inject one of
When using the objectContribution -element (which is part of the org.eclipse.ui.popupMenus -extension point), I
I have an RCP application that uses extension points to defined various pluggable bits
Basically I want to implement a simple Rails extension to define the seriousness of
I've defined 2 preferences in the extension's config.xml file: <preference name=interval value=1800 readonly=false />
To print debug messages in my program, I have a that can be used
Can anything be done to define a Show instance for an undefined value? Maybe
I have been using Yii Bootstrap in an application for a while. Now, I
I have a number of extension methods defined in my current project. It is
I'm writing an extension for the Yii framework which I have asked on here

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.