Separate two values : Properties « Ant « Java

Java
1. 2D Graphics GUI
2. 3D
3. Advanced Graphics
4. Ant
5. Apache Common
6. Chart
7. Collections Data Structure
8. Database SQL JDBC
9. Design Pattern
10. Development Class
11. Email
12. Event
13. File Input Output
14. Game
15. Hibernate
16. J2EE
17. J2ME
18. JDK 6
19. JSP
20. JSTL
21. Language Basics
22. Network Protocol
23. PDF RTF
24. Regular Expressions
25. Security
26. Servlets
27. Spring
28. Swing Components
29. Swing JFC
30. SWT JFace Eclipse
31. Threads
32. Tiny Application
33. Velocity
34. Web Services SOA
35. XML
Microsoft Office Word 2007 Tutorial
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Java » Ant » PropertiesScreenshots 
Separate two values

<?xml version="1.0"?>

<project name="Apache Ant Properties Project" default="properties.custom" basedir=".">

  <target name="properties.custom">
    <!-- Windows users should leave this line uncommented -->
    <property name="build.path" 
              value="${basedir}/build.xml:${basedir}/build.properties"/>

    <!-- Unix users should remove the above line 
         and uncomment the below line -->
    <!--
    <property name="build.path" 
              value="${basedir}\build.xml;${basedir}\build.properties"/>
    -->

    <path id="build.path.id">  
      <pathelement path="${build.path}"/>
    </path>

    <property name="build.path.property" refid="build.path.id"/>

    <!-- The converted string that Ant uses as a path -->
    <echo message="Converted string: ${build.path.property}"/>

    <!-- The unconverted string, which Ant treats as a string -->
    <echo message="Path: ${build.path}"/>
  </target>


</project>

           
       
AntBasicTags.zip( 2 k)
Related examples in the same category
1. Value in the properties file overwrite the value in the build.xml
2. Redefine property in the children target
3. Redefine property in the children target 2
4. Load file through URL
5. Referrence property: basedir
6. Custom properties
7. Define custom property based on existing properties
8. Ant buildin properties
w___w__w_.___j__a___va___2_s_.__c__o__m | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.