ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Davies <>
Subject RE: Project name
Date Thu, 21 Dec 2000 17:45:19 GMT
I was thinking the same thing. I would love to be able to access the
project's name as a built in property also.

- Jeff

-----Original Message-----
From: Dennis Brake []
Sent: Thursday, December 21, 2000 8:46 AM
To: ''
Subject: Project name

I would like to use the project name in some of my tasks (e.g. as the
name of a jar file) 

For example,

 <project name="Neo" default="compile" basedir="."> 
    <property name=""    value="Neo"/>
    <property name="project.output"  value="package" /> 
    <property name="project.lib"     value="lib" /> 


    <target name="jar" depends="compile">
     <mkdir dir="${project.lib}"/>
     <jar jarfile="${project.lib}/${}.jar"

It's redundant to have to enter the name in the property tag and then
it in a separate property tag.

I looked at the Ant build.xml file and it starts with the following:

<?xml version="1.0"?>

<!-- =======================================================================
<!-- Ant own build file
<!-- =======================================================================

<project name="Ant" default="main" basedir=".">

  <!-- Give user a chance to override without editing this file 
       (and without typing -D each time it compiles it) -->
  <property file="${user.home}/" />

  <property name="Name" value="Ant"/>
  <property name="name" value="ant"/>

This should be available as a built in property ( ??).
Am I missing something?

Dennis Brake
Global InfoTek Inc.
(703) 319-6902 

View raw message