ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Ivanov <rambiusparkisan...@yahoo.com>
Subject RE: Ant <script> tag query
Date Wed, 01 Dec 2004 17:02:53 GMT
<project name="MyProject" basedir="." default="main">
   <target name="main">
     <script language="javascript"> <![CDATA[

       importPackage(java.io);
       importPackage(java.lang);
       var outfile = new PrintWriter(new
FileWriter("test.txt"));

       outfile.println("" +
System.getProperty("user.name"));
       outfile.println("" +
project.getProperty("ant.version"));
       outfile.close();
				
     ]]></script>
   </target>
</project>


--- "Rebhan, Gilbert" <Gilbert.Rebhan@huk-coburg.de>
wrote:

> 
> Hi, how to talk to those properties that are already
> set
> by default (user,os ... etc.) via script task ?
> 
> f.e. =
> 
> ...
> 
> importPackage(java.io);
>        var outfile = new PrintWriter(new
> FileWriter("test.txt"));
>  	
> 	// here i want the user	
>         outfile.println("${user}"); <- not working
> 
> ...
> 
> Regards,
>         Gilbert
> 
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message