Browse Source

unit test, doc and fix for the bindtargets task

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1032990 13f79535-47bb-0310-9956-ffa450edef68
master
Nicolas Lalevee 14 years ago
parent
commit
a2b3e159f5
5 changed files with 45 additions and 1 deletions
  1. +3
    -0
      WHATSNEW
  2. +1
    -0
      docs/manual/tasklist.html
  3. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/BindTargets.java
  4. +1
    -0
      src/main/org/apache/tools/ant/taskdefs/defaults.properties
  5. +39
    -0
      src/tests/antunit/core/bindtargets-test.xml

+ 3
- 0
WHATSNEW View File

@@ -270,6 +270,9 @@ Other changes:
BuildExceptions.
Bugzilla Report 48835.

* New task <bindtargets> to make a list of targets bound to some
specified extension point.

Changes from Ant 1.8.0 TO Ant 1.8.1
===================================



+ 1
- 0
docs/manual/tasklist.html View File

@@ -45,6 +45,7 @@
<li><a href="Tasks/augment.html">Augment</a></li>
<li><a href="Tasks/available.html">Available</a></li>
<li><a href="Tasks/basename.html">Basename</a></li>
<li><a href="Tasks/bindtargets.html">Bindtargets</a></li>
<li><a href="Tasks/buildnumber.html">BuildNumber</a></li>
<li><a href="Tasks/unpack.html">BUnzip2</a></li>
<li><a href="Tasks/pack.html">BZip2</a></li>


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/BindTargets.java View File

@@ -85,7 +85,7 @@ public class BindTargets extends Task {
Iterator itTarget = targets.iterator();
while (itTarget.hasNext()) {
helper.getExtensionStack().add(
new String[] { (String) itTarget.next(), extensionPoint,
new String[] { extensionPoint, (String) itTarget.next(),
onMissingExtensionPoint });
}



+ 1
- 0
src/main/org/apache/tools/ant/taskdefs/defaults.properties View File

@@ -23,6 +23,7 @@ apt=org.apache.tools.ant.taskdefs.Apt
augment=org.apache.tools.ant.taskdefs.AugmentReference
available=org.apache.tools.ant.taskdefs.Available
basename=org.apache.tools.ant.taskdefs.Basename
bindtargets=org.apache.tools.ant.taskdefs.BindTargets
buildnumber=org.apache.tools.ant.taskdefs.BuildNumber
bunzip2=org.apache.tools.ant.taskdefs.BUnzip2
bzip2=org.apache.tools.ant.taskdefs.BZip2


+ 39
- 0
src/tests/antunit/core/bindtargets-test.xml View File

@@ -0,0 +1,39 @@
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns:au="antlib:org.apache.ant.antunit" default="antunit">

<import file="../antunit-base.xml"/>

<target name="binded">
<property name="test-binded" value="ok" />
</target>

<target name="binded2">
<property name="test-binded2" value="ok" />
</target>

<extension-point name="extension" />

<bindtargets targets="binded,binded2" extensionPoint="extension" />

<target name="testBind" depends="extension">
<au:assertPropertyEquals name="test-binded" value="ok"/>
<au:assertPropertyEquals name="test-binded2" value="ok"/>
</target>

</project>

Loading…
Cancel
Save