Jacob Kjome | 1 Dec 2004 06:44
Favicon

Re: Strange JSPC/Taskdef issues

At 10:09 AM 11/30/2004 -0800, you wrote:
 >Jake,
 >
 >I tried doing that via <ant> but it didn't really work -- IOW, it
 >didn't reinitialize. Should I use antcall instead? What's the
 >difference?

Did you set <ant> so that properties and references don't get 
propagated?  See the Ant task manual for info on what attributes you need 
to set to do this.  <ant> is actually the way to go here.  It if doesn't 
work with <ant> (properly configured), it almost certainly won't work with 
<antcall>.

Jake

 >
 >Thanks,
 >--Bill
 >
 >
 >On Mon, 29 Nov 2004 23:36:35 -0600, Jacob Kjome <hoju <at> visi.com> wrote:
 >>
 >> Does it work if you use <antcall> and (re)initialize the taskdef within the
 >> <antcall>?
 >>
 >> Jake
 >
 >---------------------------------------------------------------------
 >To unsubscribe, e-mail: user-unsubscribe <at> ant.apache.org
 >For additional commands, e-mail: user-help <at> ant.apache.org
(Continue reading)

Robert Soesemann | 1 Dec 2004 11:00

Write log file during xslt and xmlvalidate

Hello,

I have implemented a migration process in Ant with xsl transformations
and XML Schema validations. I want to write the errors/warnings during
validation and xsl:messages during  into a log file.

I know there is the echo task which can write to a file, but it is only
able to write from the built script and not from the task. There must be
a way to pass task output to a log file.

Has anybody done this before?

Thanks Robert
Alex Feseto | 1 Dec 2004 12:53
Favicon

Ant <script> tag query

Hi, I'm trying to write to a file using the <script> tag...

Everything config-wise is set up correctly (js.jar et al) and the 
following snippet executes no problem.

However, the resultant "outfile" is blank.

<project name="MyProject" basedir="." default="main">
   <target name="main">
     <script language="javascript"> <![CDATA[

       importPackage(java.io);
       var outfile = new PrintWriter(new FileWriter("test.txt"));
		
       outfile.println("Testing1");
       outfile.println("Testing2");
       outfile.close;
				
     ]]></script>
   </target>
</project>

Apologies if this is an obvious question, but I'm quite stuck!

Any help would be greatly appreciated.

--

-- 
Regards,

Alex Feseto
(Continue reading)

Jan.Materne | 1 Dec 2004 13:03
Picon

AW: Ant <script> tag query

write
   close()
instead of 
   close

Jan

> -----Ursprüngliche Nachricht-----
> Von: Alex Feseto [mailto:alex <at> smoothwall.net]
> Gesendet am: Mittwoch, 1. Dezember 2004 12:53
> An: user <at> ant.apache.org
> Betreff: Ant <script> tag query
> 
> Hi, I'm trying to write to a file using the <script> tag...
> 
> Everything config-wise is set up correctly (js.jar et al) and the 
> following snippet executes no problem.
> 
> However, the resultant "outfile" is blank.
> 
> 
> <project name="MyProject" basedir="." default="main">
>    <target name="main">
>      <script language="javascript"> <![CDATA[
> 
>        importPackage(java.io);
>        var outfile = new PrintWriter(new FileWriter("test.txt"));
> 		
>        outfile.println("Testing1");
>        outfile.println("Testing2");
(Continue reading)

Ivan Ivanov | 1 Dec 2004 13:05
Picon
Favicon

Re: Ant <script> tag query

Alex, flush the outfile, the follwing should works:
<project name="MyProject" basedir="." default="main">
   <target name="main">
     <script language="javascript"> <![CDATA[

       importPackage(java.io);
       var outfile = new PrintWriter(new
FileWriter("test.txt"));
		
       outfile.println("Testing1");
       outfile.println("Testing2");
       outfile.flush();
       outfile.close;
				
     ]]></script>
   </target>
</project>

--- Alex Feseto <alex <at> smoothwall.net> wrote:

> Hi, I'm trying to write to a file using the <script>
> tag...
> 
> Everything config-wise is set up correctly (js.jar
> et al) and the 
> following snippet executes no problem.
> 
> However, the resultant "outfile" is blank.
> 
> 
(Continue reading)

Jan.Materne | 1 Dec 2004 13:06
Picon

AW: Ant <script> tag query

A valid close() would also do a flush().
Problem was that he didnt close the stream (and therefore didnt flushed).

Jan

> -----Ursprüngliche Nachricht-----
> Von: Ivan Ivanov [mailto:rambiusparkisanius <at> yahoo.com]
> Gesendet am: Mittwoch, 1. Dezember 2004 13:06
> An: Ant Users List
> Betreff: Re: Ant <script> tag query
> 
> Alex, flush the outfile, the follwing should works:
> <project name="MyProject" basedir="." default="main">
>    <target name="main">
>      <script language="javascript"> <![CDATA[
> 
>        importPackage(java.io);
>        var outfile = new PrintWriter(new
> FileWriter("test.txt"));
> 		
>        outfile.println("Testing1");
>        outfile.println("Testing2");
>        outfile.flush();
>        outfile.close;
> 				
>      ]]></script>
>    </target>
> </project>
> 
> --- Alex Feseto <alex <at> smoothwall.net> wrote:
(Continue reading)

Jan.Materne | 1 Dec 2004 13:14
Picon

AW: AW: Ant <script> tag query

Yeah - sometimes we are fast - and sometimes we´re seeing also lot
of trees. BTW happy Xmas (mmmh what is -Xmas for a JVM option?)  ;-)

Jan

> -----Ursprüngliche Nachricht-----
> Von: Alex Feseto [mailto:alex <at> smoothwall.net]
> Gesendet am: Mittwoch, 1. Dezember 2004 13:11
> An: Ant Users List
> Betreff: Re: AW: Ant <script> tag query
> 
> Oh man, schoolboy error!
> 
> Couldn't see the wood for the trees even when I stripped it 
> down to that 
> simple example!
> 
> Thanks people, amazingly quick responses :-)
> 
> 
> Jan.Materne <at> rzf.fin-nrw.de wrote:
> > A valid close() would also do a flush().
> > Problem was that he didnt close the stream (and therefore 
> didnt flushed).
> > 
> > Jan
> > 
> > 
> >>-----Ursprüngliche Nachricht-----
> >>Von: Ivan Ivanov [mailto:rambiusparkisanius <at> yahoo.com]
(Continue reading)

Ivan Ivanov | 1 Dec 2004 13:20
Picon
Favicon

Re: AW: AW: Ant <script> tag query


--- Jan.Materne <at> rzf.fin-nrw.de wrote:

> Yeah - sometimes we are fast - and sometimes we´re
> seeing also lot

Well, I had my noon tea and so you were quicker than
men

> of trees. BTW happy Xmas (mmmh what is -Xmas for a
> JVM option?)  ;-)

It is a unregonized option:
java -Xmas PropertiesTest
Unrecognized option: -Xmas
Could not create the Java virtual machine.

> 
> Jan
> 
> > -----Ursprüngliche Nachricht-----
> > Von: Alex Feseto [mailto:alex <at> smoothwall.net]
> > Gesendet am: Mittwoch, 1. Dezember 2004 13:11
> > An: Ant Users List
> > Betreff: Re: AW: Ant <script> tag query
> > 
> > Oh man, schoolboy error!
> > 
> > Couldn't see the wood for the trees even when I
> stripped it 
(Continue reading)

Ivan Ivanov | 1 Dec 2004 13:09
Picon
Favicon

Re: AW: Ant <script> tag query

Jan,
Yes I saw that but posted my message before reading
yours. It is just a syntax error.

--- Jan.Materne <at> rzf.fin-nrw.de wrote:

> A valid close() would also do a flush().
> Problem was that he didnt close the stream (and
> therefore didnt flushed).
> 
> Jan
> 
> > -----Ursprüngliche Nachricht-----
> > Von: Ivan Ivanov
> [mailto:rambiusparkisanius <at> yahoo.com]
> > Gesendet am: Mittwoch, 1. Dezember 2004 13:06
> > An: Ant Users List
> > Betreff: Re: Ant <script> tag query
> > 
> > Alex, flush the outfile, the follwing should
> works:
> > <project name="MyProject" basedir="."
> default="main">
> >    <target name="main">
> >      <script language="javascript"> <![CDATA[
> > 
> >        importPackage(java.io);
> >        var outfile = new PrintWriter(new
> > FileWriter("test.txt"));
> > 		
(Continue reading)

Alex Feseto | 1 Dec 2004 13:10
Favicon

Re: AW: Ant <script> tag query

Oh man, schoolboy error!

Couldn't see the wood for the trees even when I stripped it down to that 
simple example!

Thanks people, amazingly quick responses :-)

Jan.Materne <at> rzf.fin-nrw.de wrote:
> A valid close() would also do a flush().
> Problem was that he didnt close the stream (and therefore didnt flushed).
> 
> Jan
> 
> 
>>-----Ursprüngliche Nachricht-----
>>Von: Ivan Ivanov [mailto:rambiusparkisanius <at> yahoo.com]
>>Gesendet am: Mittwoch, 1. Dezember 2004 13:06
>>An: Ant Users List
>>Betreff: Re: Ant <script> tag query
>>
>>Alex, flush the outfile, the follwing should works:
>><project name="MyProject" basedir="." default="main">
>>   <target name="main">
>>     <script language="javascript"> <![CDATA[
>>
>>       importPackage(java.io);
>>       var outfile = new PrintWriter(new
>>FileWriter("test.txt"));
>>		
>>       outfile.println("Testing1");
(Continue reading)


Gmane