Generics code Compile in Eclipse 3.4 , compilation fails in ANT1.7 (JRE 1.6.0_07)

2009-04-06 Thread NonySingh

Hi Experts

I am seeking help from you guys for my below problem.

I have following classes :

Class TestAntError
public class TestANtError {


final protected>  void add(final K setDS) throws Exception {

//synchronized final protected  void add(final K setDS) throws 
Exception {
if(setDS == null) {
throw new NullPointerException("setDS cannot be 
null !!");
}
K thisSetDS =(K) new SetDS();

thisSetDS.add(setDS);

}

}




Class SetDS
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;



public class SetDS, T extends Comparable> {

private Map vecMap_ = new TreeMap();

final public boolean add(SetDS rhs) {
if(rhs == null) {
throw new NullPointerException("rhs cannot be null !!");
}   
return false;
}

public SetDS()
{

}
}




In Eclipse IT compiles fine with just warnings but when I try to build it
with ANT Build fails with following error.


TestANtError.java:14: add(SetDS) in SetDS cannot 
be applied to (K)
[javac] thisSetDS.add(setDS);
[javac]  ^
[javac] 1 error



I am not sure whats the problem. 

Please help.

Regards

Nony
-- 
View this message in context: 
http://www.nabble.com/Generics-code-Compile-in-Eclipse-3.4-%2C-compilation-fails-in-ANT1.7-%28JRE-1.6.0_07%29-tp22903702p22903702.html
Sent from the Ant - Users mailing list archive at Nabble.com.


[Ant 1.7.1] Problem with records task logging different targets via antcall

2009-04-06 Thread Grimm, Markus
Hi all,

I upgraded my ant installation from 1.6.5 to 1.7.1
now I've got the follwing problem with the record-task.

Look at this sample script:





















   







the record task works until  in the same way as
in 1.6.5. But if I do an ant-call the test.log is empty?! What's the
reason? I expected that all echo-messages are logged to test.log.
Without calling t3 I see t1 and t2. in other case I see an empty file.
In my original build scripts I call various targets (in other xml-files,
too) an I've got strange effects, f.e. only the last target-output is
"logged" via record-task.
the same script works by 1.6.5 as expected.
Do I something basically wrong so it can't work by 1.7.1 ?

Thanks for a good advice.

Markus
 
 

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



Getting substring in ANT

2009-04-06 Thread Pankaj Arora01
HI All,



I have following directory structure:



C:\abc\deploy\oracle\NAAM09102NNAQAE\NAAM09102NNAQAE_core01

C:\abc\deploy\oracle\NAAM09102NNAQBX\NAAM09102NNAQBX_ext_point_address01

C:\abc\deploy\oracle\ NAAM09102NNAQCF\NAAM09102NNAQCF_ext_sdo01



I have a variable x that contains following value:

C:\abc\deploy\oracle



Now I need to iterate through above directory and for each of the above 
directories, I need two values in the same loop:



1) C:\abc\deploy\oracle\NAAM09102NNAQAE\NAAM09102NNAQAE_core01

2) NAAM09102NNAQAE_core01



I am able to retrieve the 1) but not the second one. I need something like 
substring...



Please help...





















 CAUTION - Disclaimer *
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are 
not 
to copy, disclose, or distribute this e-mail or its contents to any other 
person and 
any such actions are unlawful. This e-mail may contain viruses. Infosys has 
taken 
every reasonable precaution to minimize this risk, but is not liable for any 
damage 
you may sustain as a result of any virus in this e-mail. You should carry out 
your 
own virus checks before opening the e-mail or attachment. Infosys reserves the 
right to monitor and review the content of all messages sent to or from this 
e-mail 
address. Messages sent to or from this e-mail address may be stored on the 
Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***


AW: Getting substring in ANT

2009-04-06 Thread Knuplesch, Juergen
As I wrote last week in a different context:

I use propertyregex from antcontrib:

  
  Property vm.propertyname=${vm.propertyname} 


--
Jürgen Knuplesch 


-- 
Jürgen Knupleschwww.icongmbh.de
icon Systemhaus GmbHTel. +49 711 806098-275
Sophienstraße 40
D-70178 Stuttgart   Fax. +49 711 806098-299

Geschäftsführer: Uwe Seltmann
HRB Stuttgart 17655
USt-IdNr.: DE 811944121 
-Ursprüngliche Nachricht-
Von: Pankaj Arora01 [mailto:pankaj_aror...@infosys.com] 
Gesendet: Montag, 6. April 2009 12:17
An: Ant Users List
Betreff: Getting substring in ANT

HI All,



I have following directory structure:



C:\abc\deploy\oracle\NAAM09102NNAQAE\NAAM09102NNAQAE_core01

C:\abc\deploy\oracle\NAAM09102NNAQBX\NAAM09102NNAQBX_ext_point_address01

C:\abc\deploy\oracle\ NAAM09102NNAQCF\NAAM09102NNAQCF_ext_sdo01



I have a variable x that contains following value:

C:\abc\deploy\oracle



Now I need to iterate through above directory and for each of the above 
directories, I need two values in the same loop:



1) C:\abc\deploy\oracle\NAAM09102NNAQAE\NAAM09102NNAQAE_core01

2) NAAM09102NNAQAE_core01



I am able to retrieve the 1) but not the second one. I need something like 
substring...



Please help...





















 CAUTION - Disclaimer * This e-mail contains 
PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the 
addressee(s). If you are not the intended recipient, please notify the sender 
by e-mail and delete the original message. Further, you are not to copy, 
disclose, or distribute this e-mail or its contents to any other person and any 
such actions are unlawful. This e-mail may contain viruses. Infosys has taken 
every reasonable precaution to minimize this risk, but is not liable for any 
damage you may sustain as a result of any virus in this e-mail. You should 
carry out your own virus checks before opening the e-mail or attachment. 
Infosys reserves the right to monitor and review the content of all messages 
sent to or from this e-mail address. Messages sent to or from this e-mail 
address may be stored on the Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***

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



Re: Generics code Compile in Eclipse 3.4 , compilation fails in ANT1.7 (JRE 1.6.0_07)

2009-04-06 Thread NonySingh

Hi

Hey guys why are u polluting the actual query with your own query and
answers. It would be great if you can post this other query and answers into
another thread.

Nony



NonySingh wrote:
> 
> Hi Experts
> 
> I am seeking help from you guys for my below problem.
> 
> I have following classes :
> 
> Class TestAntError
> public class TestANtError {
> 
>   
> final protected>  void add(final K setDS) throws
> Exception {
>   
>   //synchronized final protected  void add(final 
> K setDS)
> throws Exception {
>   if(setDS == null) {
>   throw new NullPointerException("setDS cannot be 
> null !!");
>   }
>   K thisSetDS =(K) new SetDS();
>   
>   thisSetDS.add(setDS);
>   
>   }
> 
> }
> 
> 
> 
> Class SetDS
> import java.util.Map;
> import java.util.Set;
> import java.util.TreeMap;
> 
> 
> 
> public class SetDS, T extends Comparable> {
> 
>   private Map vecMap_ = new TreeMap();
>   
>   final public boolean add(SetDS rhs) {
>   if(rhs == null) {
>   throw new NullPointerException("rhs cannot be null !!");
>   }   
>   return false;
>   }
>   
>   public SetDS()
>   {
>   
>   }
> }
> 
> 
> 
> In Eclipse IT compiles fine with just warnings but when I try to build it
> with ANT Build fails with following error.
> 
> 
> TestANtError.java:14: add(SetDS) in
> SetDS cannot 
> be applied to (K)
> [javac]   thisSetDS.add(setDS);
> [javac]^
> [javac] 1 error
> 
> 
> 
> I am not sure whats the problem. 
> 
> Please help.
> 
> Regards
> 
> Nony
> 

-- 
View this message in context: 
http://www.nabble.com/Generics-code-Compile-in-Eclipse-3.4-%2C-compilation-fails-in-ANT1.7-%28JRE-1.6.0_07%29-tp22903702p22906706.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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



Input Handler that will echo default if user hits enter but not if user types in a value and then hits enter

2009-04-06 Thread Dylan Farre
I have written a small installer tool using Ant.

One small problem that I have is related to the input task. I want a Input
Handler that will echo default if user hits enter but not if user types in a
value (even if the value is the same as the default) and then hits enter. Of
course, I can just echo the value that the user entered, but this does it in
both cases (enter and typing), I only want the value echoed if the user hit
enter, to select the default value.

Does such an input Handler exist? Or is there a way of configuring an input
handler to do this. I would prefer not to have to implement this in Java.

Another question that I have is, is there a way to configure the
SecureInputHandler to output a space or an asterisk (or some other
character), for each character that the user enters?

Thanks


AW: Getting substring in ANT

2009-04-06 Thread Jan.Materne
Maybe  ?

Jan 

>-Ursprüngliche Nachricht-
>Von: Pankaj Arora01 [mailto:pankaj_aror...@infosys.com] 
>Gesendet: Montag, 6. April 2009 12:17
>An: Ant Users List
>Betreff: Getting substring in ANT
>
>HI All,
>
>
>
>I have following directory structure:
>
>
>
>C:\abc\deploy\oracle\NAAM09102NNAQAE\NAAM09102NNAQAE_core01
>
>C:\abc\deploy\oracle\NAAM09102NNAQBX\NAAM09102NNAQBX_ext_point_
>address01
>
>C:\abc\deploy\oracle\ NAAM09102NNAQCF\NAAM09102NNAQCF_ext_sdo01
>
>
>
>I have a variable x that contains following value:
>
>C:\abc\deploy\oracle
>
>
>
>Now I need to iterate through above directory and for each of 
>the above directories, I need two values in the same loop:
>
>
>
>1) C:\abc\deploy\oracle\NAAM09102NNAQAE\NAAM09102NNAQAE_core01
>
>2) NAAM09102NNAQAE_core01
>
>
>
>I am able to retrieve the 1) but not the second one. I need 
>something like substring...
>
>
>
>Please help...
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> CAUTION - Disclaimer *
>This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION 
>intended solely 
>for the use of the addressee(s). If you are not the intended 
>recipient, please 
>notify the sender by e-mail and delete the original message. 
>Further, you are not 
>to copy, disclose, or distribute this e-mail or its contents 
>to any other person and 
>any such actions are unlawful. This e-mail may contain 
>viruses. Infosys has taken 
>every reasonable precaution to minimize this risk, but is not 
>liable for any damage 
>you may sustain as a result of any virus in this e-mail. You 
>should carry out your 
>own virus checks before opening the e-mail or attachment. 
>Infosys reserves the 
>right to monitor and review the content of all messages sent 
>to or from this e-mail 
>address. Messages sent to or from this e-mail address may be 
>stored on the 
>Infosys e-mail system.
>***INFOSYS End of Disclaimer INFOSYS***
>

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



RE: Getting substring in ANT

2009-04-06 Thread Pankaj Arora01
Hi Jürgen ,

Can you please help me in finding the regular expression that needs to be used?

In a loop, @{file} contains 
"C:\abc\deploy\oracle\NAAM09102NNAQAE\NAAM09102NNAQAE_core01".

What regular expression shall I use so that I get NAAM09102NNAQAE_core01?

Thanks
Pankaj 

-Original Message-
From: Knuplesch, Juergen [mailto:juergen.knuple...@icongmbh.de] 
Sent: Monday, April 06, 2009 4:03 PM
To: Ant Users List
Subject: AW: Getting substring in ANT

As I wrote last week in a different context:

I use propertyregex from antcontrib:

  
  Property vm.propertyname=${vm.propertyname} 


--
Jürgen Knuplesch 


-- 
Jürgen Knupleschwww.icongmbh.de
icon Systemhaus GmbHTel. +49 711 806098-275
Sophienstraße 40
D-70178 Stuttgart   Fax. +49 711 806098-299

Geschäftsführer: Uwe Seltmann
HRB Stuttgart 17655
USt-IdNr.: DE 811944121 
-Ursprüngliche Nachricht-
Von: Pankaj Arora01 [mailto:pankaj_aror...@infosys.com] 
Gesendet: Montag, 6. April 2009 12:17
An: Ant Users List
Betreff: Getting substring in ANT

HI All,



I have following directory structure:



C:\abc\deploy\oracle\NAAM09102NNAQAE\NAAM09102NNAQAE_core01

C:\abc\deploy\oracle\NAAM09102NNAQBX\NAAM09102NNAQBX_ext_point_address01

C:\abc\deploy\oracle\ NAAM09102NNAQCF\NAAM09102NNAQCF_ext_sdo01



I have a variable x that contains following value:

C:\abc\deploy\oracle



Now I need to iterate through above directory and for each of the above 
directories, I need two values in the same loop:



1) C:\abc\deploy\oracle\NAAM09102NNAQAE\NAAM09102NNAQAE_core01

2) NAAM09102NNAQAE_core01



I am able to retrieve the 1) but not the second one. I need something like 
substring...



Please help...





















 CAUTION - Disclaimer * This e-mail contains 
PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the 
addressee(s). If you are not the intended recipient, please notify the sender 
by e-mail and delete the original message. Further, you are not to copy, 
disclose, or distribute this e-mail or its contents to any other person and any 
such actions are unlawful. This e-mail may contain viruses. Infosys has taken 
every reasonable precaution to minimize this risk, but is not liable for any 
damage you may sustain as a result of any virus in this e-mail. You should 
carry out your own virus checks before opening the e-mail or attachment. 
Infosys reserves the right to monitor and review the content of all messages 
sent to or from this e-mail address. Messages sent to or from this e-mail 
address may be stored on the Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***

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


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



Input Handler that will echo default if user hits enter

2009-04-06 Thread Dylan Farre
I have written a small installer tool using Ant.

One small problem that I have is related to the input task. I want a Input
Handler that will echo default if user hits enter but not if user types in a
value (even if the value is the same as the default) and then hits enter. Of
course, I can just echo the value that the user entered, but this does it in
both cases (enter and typing), I only want the value echoed if the user hit
enter, to select the default value.

Does such an input Handler exist? Or is there a way of configuring an input
handler to do this. I would prefer not to have to implement this in Java.

Another question that I have is, is there a way to configure the
SecureInputHandler to output a space or an asterisk (or some other
character), for each character that the user enters?

Thanks


RE: Getting substring in ANT

2009-04-06 Thread Pankaj Arora01
Thank you all. Its done

-Original Message-
From: Pankaj Arora01 [mailto:pankaj_aror...@infosys.com] 
Sent: Monday, April 06, 2009 6:13 PM
To: juergen.knuple...@icongmbh.de; Ant Users List
Subject: RE: Getting substring in ANT

Hi Jürgen ,

Can you please help me in finding the regular expression that needs to be used?

In a loop, @{file} contains 
"C:\abc\deploy\oracle\NAAM09102NNAQAE\NAAM09102NNAQAE_core01".

What regular expression shall I use so that I get NAAM09102NNAQAE_core01?

Thanks
Pankaj 

-Original Message-
From: Knuplesch, Juergen [mailto:juergen.knuple...@icongmbh.de] 
Sent: Monday, April 06, 2009 4:03 PM
To: Ant Users List
Subject: AW: Getting substring in ANT

As I wrote last week in a different context:

I use propertyregex from antcontrib:

  
  Property vm.propertyname=${vm.propertyname} 


--
Jürgen Knuplesch 


-- 
Jürgen Knupleschwww.icongmbh.de
icon Systemhaus GmbHTel. +49 711 806098-275
Sophienstraße 40
D-70178 Stuttgart   Fax. +49 711 806098-299

Geschäftsführer: Uwe Seltmann
HRB Stuttgart 17655
USt-IdNr.: DE 811944121 
-Ursprüngliche Nachricht-
Von: Pankaj Arora01 [mailto:pankaj_aror...@infosys.com] 
Gesendet: Montag, 6. April 2009 12:17
An: Ant Users List
Betreff: Getting substring in ANT

HI All,



I have following directory structure:



C:\abc\deploy\oracle\NAAM09102NNAQAE\NAAM09102NNAQAE_core01

C:\abc\deploy\oracle\NAAM09102NNAQBX\NAAM09102NNAQBX_ext_point_address01

C:\abc\deploy\oracle\ NAAM09102NNAQCF\NAAM09102NNAQCF_ext_sdo01



I have a variable x that contains following value:

C:\abc\deploy\oracle



Now I need to iterate through above directory and for each of the above 
directories, I need two values in the same loop:



1) C:\abc\deploy\oracle\NAAM09102NNAQAE\NAAM09102NNAQAE_core01

2) NAAM09102NNAQAE_core01



I am able to retrieve the 1) but not the second one. I need something like 
substring...



Please help...





















 CAUTION - Disclaimer * This e-mail contains 
PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the 
addressee(s). If you are not the intended recipient, please notify the sender 
by e-mail and delete the original message. Further, you are not to copy, 
disclose, or distribute this e-mail or its contents to any other person and any 
such actions are unlawful. This e-mail may contain viruses. Infosys has taken 
every reasonable precaution to minimize this risk, but is not liable for any 
damage you may sustain as a result of any virus in this e-mail. You should 
carry out your own virus checks before opening the e-mail or attachment. 
Infosys reserves the right to monitor and review the content of all messages 
sent to or from this e-mail address. Messages sent to or from this e-mail 
address may be stored on the Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***

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


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


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



How to access value of propertyfile command line inside script

2009-04-06 Thread goelshek

When I run ant as follows:

ant -propertyfile  
e.g.
ant -propertyfile myProps.properties test

how do I find out the the name of the properties file that the user passed
in the command line argument. So my ant script looks like:



  
  
  


Essentially, is there a place/property where the command line argument is
stored that can be accessed inside the script? I haven't been able to find
anything so far in my search.

Thanks.
-- 
View this message in context: 
http://www.nabble.com/How-to-access-value-of-propertyfile-command-line-inside-script-tp22909968p22909968.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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



Ant task to pre-compile JSPs

2009-04-06 Thread dave.alvarado
Hi,

What is the Ant task to pre-compile JSPs into class/java files?  I'm using Ant 
1.6, WebLogic 9.2.2 with Java 1.5.  

Thanks, - Dave

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



Re: Installing Apache Ivy 2.1.0-rc1 - missing jar files on the download site for automatic install

2009-04-06 Thread Maarten Coene

Hi Jeff,

we have to update these installation instructions...

You can download the ivy.jar from a maven repository, like:
http://repo2.maven.org/maven2/org/apache/ivy/ivy/2.1.0-rc1/ivy-2.1.0-rc1.jar

Maarten




- Original Message 
From: jeff.t.bowman 
To: ivy-u...@ant.apache.org
Sent: Monday, April 6, 2009 6:31:13 PM
Subject: Installing Apache Ivy 2.1.0-rc1 - missing jar files on the download 
site for automatic install


In the install instructions
(http://ant.apache.org/ivy/history/2.1.0-rc1/install.html), there is a
build.xml code snippet to automatically install ivy without having to
download the source code and manually compile it. However, the only jar
files that exist seem to be for 2.0.0-beta1. I'm not interested in
downloading and compiling ivy manually for my entire organization. I'd like
to be able to just change my build settings to get the version I'm
interested in (in this case 2.1.0-rc1). Are you going to put ivy.jar on the
download site?

Thanks!

Jeff

-- 
View this message in context: 
http://www.nabble.com/-ANNOUNCE--Apache-Ivy-2.1.0-rc1-released-tp22862973p22912440.html
Sent from the ivy-user mailing list archive at Nabble.com.


  


Re: How to access value of propertyfile command line inside script

2009-04-06 Thread supareno

goelshek,

you can use this:

ant -D= 

which in your case will produce

ant -Duser.property.file=foo.properties test



   
   
  property file name: ${user.property.file}
   


if in your properties file you define some properties
e.g.
prop1=foo
prop2=bar

then, you can access them in ant with
${prop1}
$[prop2}

your new target will look like this:
[...]
   
  property file name: ${user.property.file}
  ${prop1} and ${prop2}
   
[..]

hope this help

regards

supareno


When I run ant as follows:

ant -propertyfile  
e.g.
ant -propertyfile myProps.properties test

how do I find out the the name of the properties file that the user passed
in the command line argument. So my ant script looks like:



  
  
  


Essentially, is there a place/property where the command line argument is
stored that can be accessed inside the script? I haven't been able to find
anything so far in my search.

Thanks.
  



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



Re: How to access value of propertyfile command line inside script

2009-04-06 Thread goelshek

hmm...

That's an interesting solution. I'm not a big fan of specifying a property
on the command line. Especially with the -D. But this would be a way to get
things done. Thanks.

I just feel that saying:
ant -propertyfile filename.properties test
looks a lot better/user-friendly than
ant -Duser.propertyfile=filename.properties test

Can you, or anyone else for that matter, confirm that there is no way to
access properties file name in the ant script when it is specified using the
-propertyfile flag? In my limited experience, whenever we specify a command
line argument, there generally is a way to access that argument inside the
program to which it is passed. It just seems surprisingly non-intuitive that
the -propertyfile is not accessible inside the script itself.

I'd certainly be interested if anyone can satisfy this curiosity.



supareno wrote:
> 
> goelshek,
> 
> you can use this:
> 
> ant -D= 
> 
> which in your case will produce
> 
> ant -Duser.property.file=foo.properties test
> 
> 
> 
> 
> 
>property file name: ${user.property.file}
> 
> 
> 
> if in your properties file you define some properties
> e.g.
> prop1=foo
> prop2=bar
> 
> then, you can access them in ant with
> ${prop1}
> $[prop2}
> 
> your new target will look like this:
> [...]
> 
>property file name: ${user.property.file}
>${prop1} and ${prop2}
> 
> [..]
> 
> hope this help
> 
> regards
> 
> supareno
> 
>> When I run ant as follows:
>>
>> ant -propertyfile  
>> e.g.
>> ant -propertyfile myProps.properties test
>>
>> how do I find out the the name of the properties file that the user
>> passed
>> in the command line argument. So my ant script looks like:
>>
>> 
>> 
>>   
>>   
>>   
>> 
>>
>> Essentially, is there a place/property where the command line argument is
>> stored that can be accessed inside the script? I haven't been able to
>> find
>> anything so far in my search.
>>
>> Thanks.
>>   
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
> For additional commands, e-mail: user-h...@ant.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-access-value-of-propertyfile-command-line-inside-script-tp22909968p22916503.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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



Re: How to access value of propertyfile command line inside script

2009-04-06 Thread David Weintraub
My build.xml files include something like this:




[...]


This way, the default name of the build properties file is
build.properties, so if the user uses that as their build properties
file, they don't have to put anything on the command line. If the user
wants to use a different one, they can give that on the command line,
and the program will use that instead of build.properties:

 $ ant -Dbuild.properties.file="my.build.properties"

I also include "default" values, so if a user doesn't have a build
properties file, they get the default values. For example:





 [...]


   [...]



If the user wants to turn on Java debugging and verbose copying, they
can simply do this:

$ant -Djavac.debug.flag=true -Dcopy.verbose.flag=true

Otherwise, the build uses the default values I gave it before. Of
course, the user may also use a build.properties file too to specify
all of these flags:

$ ant -Dbuild.properties.file=debug.build.properties


Or, they can use put these values into the "build.properties file",
and use that. Then, they don't need to use any "-D" parameters on the
command line.

I usually create a file in the build.xml directory called
build.properties.template with the various options that the user may
want to set (and their default values). That way, all a user has to do
is copy build.properties.template to build.properties and edit the
values they want to change.

Remember that  will not fail if the file
mentioned doesn't exist and that  you can override
properties values set in your build.xml file  upon the command line.

On Mon, Apr 6, 2009 at 10:32 AM, goelshek  wrote:
>
> When I run ant as follows:
>
> ant -propertyfile  
> e.g.
> ant -propertyfile myProps.properties test
>
> how do I find out the the name of the properties file that the user passed
> in the command line argument. So my ant script looks like:
>
> 
> 
>  
>  
>  
> 
>
> Essentially, is there a place/property where the command line argument is
> stored that can be accessed inside the script? I haven't been able to find
> anything so far in my search.
>
> Thanks.
> --
> View this message in context: 
> http://www.nabble.com/How-to-access-value-of-propertyfile-command-line-inside-script-tp22909968p22909968.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
> For additional commands, e-mail: user-h...@ant.apache.org
>
>



-- 
David Weintraub
qazw...@gmail.com

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



Re: How to access value of propertyfile command line inside script

2009-04-06 Thread goelshek

Thanks David. I got essentially the same information from supareno above. But
yours goes into much more details and I'm sure that would be helpful to
other people who are even newer to ant than I am.

My original question/curiosity remains: Is there no way to access the name
of the file passed in as a command line parameter of the -propertyfile flag?
I read somewhere that the properties "auto"-loaded using the -propertyfile
CL arg are in some way different than the properties loaded using the
 task. That they are even more
immutable than the ones loaded using the  task (if that makes any
sense whatsoever). Could that be a reason that the filename is not available
in the script?

I certainly have a solution to my problem and thank you both for that. At
this point its just more of a curiosity as to whether things are really done
in such a non-intuitive manner or am I just missing something.


David Weintraub wrote:
> 
> My build.xml files include something like this:
> 
> 
> 
> 
> [...]
> 
> 
> This way, the default name of the build properties file is
> build.properties, so if the user uses that as their build properties
> file, they don't have to put anything on the command line. If the user
> wants to use a different one, they can give that on the command line,
> and the program will use that instead of build.properties:
> 
>  $ ant -Dbuild.properties.file="my.build.properties"
> 
> I also include "default" values, so if a user doesn't have a build
> properties file, they get the default values. For example:
> 
> 
> 
> 
> 
>  [...]
>   verbose="${copy.verbose.flag}""/>
> 
>[...]
> 
>[...]
>   debug="${javac.debug.flag}">
> 
> If the user wants to turn on Java debugging and verbose copying, they
> can simply do this:
> 
> $ant -Djavac.debug.flag=true -Dcopy.verbose.flag=true
> 
> Otherwise, the build uses the default values I gave it before. Of
> course, the user may also use a build.properties file too to specify
> all of these flags:
> 
> $ ant -Dbuild.properties.file=debug.build.properties
> 
> 
> Or, they can use put these values into the "build.properties file",
> and use that. Then, they don't need to use any "-D" parameters on the
> command line.
> 
> I usually create a file in the build.xml directory called
> build.properties.template with the various options that the user may
> want to set (and their default values). That way, all a user has to do
> is copy build.properties.template to build.properties and edit the
> values they want to change.
> 
> Remember that  will not fail if the file
> mentioned doesn't exist and that  you can override
> properties values set in your build.xml file  upon the command line.
> 
> On Mon, Apr 6, 2009 at 10:32 AM, goelshek  wrote:
>>
>> When I run ant as follows:
>>
>> ant -propertyfile  
>> e.g.
>> ant -propertyfile myProps.properties test
>>
>> how do I find out the the name of the properties file that the user
>> passed
>> in the command line argument. So my ant script looks like:
>>
>> 
>> 
>>  
>>  
>>  
>> 
>>
>> Essentially, is there a place/property where the command line argument is
>> stored that can be accessed inside the script? I haven't been able to
>> find
>> anything so far in my search.
>>
>> Thanks.
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-access-value-of-propertyfile-command-line-inside-script-tp22909968p22909968.html
>> Sent from the Ant - Users mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
>> For additional commands, e-mail: user-h...@ant.apache.org
>>
>>
> 
> 
> 
> -- 
> David Weintraub
> qazw...@gmail.com
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
> For additional commands, e-mail: user-h...@ant.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-access-value-of-propertyfile-command-line-inside-script-tp22909968p22918340.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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



Re: How to access value of propertyfile command line inside script

2009-04-06 Thread David Weintraub
I just played around with the -properties parameter. Whatever  
propertyfile file you select with -propertfile takes presidence over  
any properties loaded with the  task, but any  
properties specified with the -D command line parameter takes  
presidence over the ones set via the -propertyfile parameter.


I've never used it, but it can be handy if your build.xml isn't set up  
with a  task.


David Weintraub

On Apr 6, 2009, at 6:00 PM, goelshek  wrote:



Thanks David. I got essentially the same information from supareno  
above. But
yours goes into much more details and I'm sure that would be helpful  
to

other people who are even newer to ant than I am.

My original question/curiosity remains: Is there no way to access  
the name
of the file passed in as a command line parameter of the - 
propertyfile flag?
I read somewhere that the properties "auto"-loaded using the - 
propertyfile

CL arg are in some way different than the properties loaded using the
 task. That they are even  
more
immutable than the ones loaded using the  task (if that  
makes any
sense whatsoever). Could that be a reason that the filename is not  
available

in the script?

I certainly have a solution to my problem and thank you both for  
that. At
this point its just more of a curiosity as to whether things are  
really done

in such a non-intuitive manner or am I just missing something.


David Weintraub wrote:


My build.xml files include something like this:


   
   
   [...]


This way, the default name of the build properties file is
build.properties, so if the user uses that as their build properties
file, they don't have to put anything on the command line. If the  
user

wants to use a different one, they can give that on the command line,
and the program will use that instead of build.properties:

$ ant -Dbuild.properties.file="my.build.properties"

I also include "default" values, so if a user doesn't have a build
properties file, they get the default values. For example:



   
   
[...]
   

  [...]

   

If the user wants to turn on Java debugging and verbose copying, they
can simply do this:

   $ant -Djavac.debug.flag=true -Dcopy.verbose.flag=true

Otherwise, the build uses the default values I gave it before. Of
course, the user may also use a build.properties file too to specify
all of these flags:

   $ ant -Dbuild.properties.file=debug.build.properties


Or, they can use put these values into the "build.properties file",
and use that. Then, they don't need to use any "-D" parameters on the
command line.

I usually create a file in the build.xml directory called
build.properties.template with the various options that the user may
want to set (and their default values). That way, all a user has to  
do

is copy build.properties.template to build.properties and edit the
values they want to change.

Remember that  will not fail if the file
mentioned doesn't exist and that  you can override
properties values set in your build.xml file  upon the command line.

On Mon, Apr 6, 2009 at 10:32 AM, goelshek  wrote:


When I run ant as follows:

ant -propertyfile  
e.g.
ant -propertyfile myProps.properties test

how do I find out the the name of the properties file that the user
passed
in the command line argument. So my ant script looks like:



 
 
 


Essentially, is there a place/property where the command line  
argument is
stored that can be accessed inside the script? I haven't been able  
to

find
anything so far in my search.

Thanks.
--
View this message in context:
http://www.nabble.com/How-to-access-value-of-propertyfile-command-line-inside-script-tp22909968p22909968.html
Sent from the Ant - Users mailing list archive at Nabble.com.


--- 
--

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






--
David Weintraub
qazw...@gmail.com

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





--
View this message in context: 
http://www.nabble.com/How-to-access-value-of-propertyfile-command-line-inside-script-tp22909968p22918340.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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



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



Generics Compiling in Eclipse(3.4) and compilation fails in ANT(1.7). JRE 1.6.0_07

2009-04-06 Thread naveen varma
Hi All 
 
I am seeking help from you guys for my below problem. 
 
I have following classes : 
 
Class TestAntError 
public class TestANtError {


final protected>  void add(final K setDS) throws 
Exception {

//synchronized final protected  void add(final 
K setDS) throws Exception {
if(setDS == null) {
throw new NullPointerException("setDS cannot be 
null !!");
}
K thisSetDS =(K) new SetDS();

thisSetDS.add(setDS);

}

}
Class SetDS 
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;



public class SetDS, T extends Comparable> {

private Map vecMap_ = new TreeMap();

final public boolean add(SetDS rhs) {
if(rhs == null) {
throw new NullPointerException("rhs cannot be null !!");
}   
return false;
}

public SetDS()
{

}
}
In Eclipse it compiles fine with just warnings but when I try to build it with 
ANT, Build fails with following error. 
TestANtError.java:14: add(SetDS) in 
SetDS cannot 
be applied to (K)
[javac] thisSetDS.add(setDS);
[javac]  ^
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 1 error
I am not sure whats the problem. 

Please help. 

Regards Nony



  

AW: Ant task to pre-compile JSPs

2009-04-06 Thread Jan.Materne
>What is the Ant task to pre-compile JSPs into class/java 
>files?  I'm using Ant 1.6, WebLogic 9.2.2 with Java 1.5.  

This is an often asked question, so I added a FAQ entry
http://ant.apache.org/faq.html#precompile-jsps

"Ant has a built in optional task   which was intended for that.
But this task is deprecated.  Here the alternative suggested by the
manual:

Instead of relying on container specific JSP-compilers we suggest
deploying the raw files (*.jsp) and use the container build-in
functions: after deploying run a test suite (e.g. with Cactus or
HttpUnit) against the deployed web application. So you'll get then test
result and the compiled JSPs."


Jan

p.s.
The website need a little bit time for being updated.

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