Load file through URL : Properties « Ant « Java






Load file through URL

 
<?xml version="1.0"?>

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


  <target name="properties.url">

    <property url="http://localhost:8080/antBook/properties/build.properties"/>

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

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

    <echo message="Server URL: ${server.url}"/>
    <echo message="Build classpath: ${build.classpath}"/>
    <echo message="Build classpath converted: ${build.classpath.property}"/>
  </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.Referrence property: basedir
5.Custom properties
6.Define custom property based on existing properties
7.Ant buildin properties
8.Separate two values
9.Reference ant.project.name
10.In init target set the properties
11.Define and reference property