You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by NonySingh <no...@yahoo.com> on 2009/04/06 09:44:37 UTC
Generics code Compile in Eclipse 3.4 , compilation fails in ANT1.7
(JRE 1.6.0_07)
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.
RE: Getting substring in ANT
Posted by Pankaj Arora01 <Pa...@infosys.com>.
Thank you all. Its done
-----Original Message-----
From: Pankaj Arora01 [mailto:Pankaj_Arora01@infosys.com]
Sent: Monday, April 06, 2009 6:13 PM
To: Juergen.Knuplesch@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.Knuplesch@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:
<propertyregex property="vm.propertyname" input="${vm.propertytupel}"
regexp="([^#]*)#([^#]*)"
select="\1"
defaultvalue="Error"
override="true"/>
<echo>Property vm.propertyname=${vm.propertyname}</echo>
--
Jürgen Knuplesch
--
Jürgen Knuplesch www.icongmbh.de
icon Systemhaus GmbH Tel. +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_Arora01@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-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
RE: Getting substring in ANT
Posted by Pankaj Arora01 <Pa...@infosys.com>.
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.Knuplesch@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:
<propertyregex property="vm.propertyname" input="${vm.propertytupel}"
regexp="([^#]*)#([^#]*)"
select="\1"
defaultvalue="Error"
override="true"/>
<echo>Property vm.propertyname=${vm.propertyname}</echo>
--
Jürgen Knuplesch
--
Jürgen Knuplesch www.icongmbh.de
icon Systemhaus GmbH Tel. +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_Arora01@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-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
AW: Getting substring in ANT
Posted by "Knuplesch, Juergen" <Ju...@icongmbh.de>.
As I wrote last week in a different context:
I use propertyregex from antcontrib:
<propertyregex property="vm.propertyname" input="${vm.propertytupel}"
regexp="([^#]*)#([^#]*)"
select="\1"
defaultvalue="Error"
override="true"/>
<echo>Property vm.propertyname=${vm.propertyname}</echo>
--
Jürgen Knuplesch
--
Jürgen Knuplesch www.icongmbh.de
icon Systemhaus GmbH Tel. +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_Arora01@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-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
AW: Getting substring in ANT
Posted by Ja...@rzf.fin-nrw.de.
Maybe <basedir> ?
Jan
>-----Ursprüngliche Nachricht-----
>Von: Pankaj Arora01 [mailto:Pankaj_Arora01@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-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Getting substring in ANT
Posted by Pankaj Arora01 <Pa...@infosys.com>.
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***
Re: Generics code Compile in Eclipse 3.4 , compilation fails in
ANT1.7 (JRE 1.6.0_07)
Posted by NonySingh <no...@yahoo.com>.
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 :
>
> <H1>Class TestAntError</H1>
> <PRE>public class TestANtError {
>
>
> final protected<K extends SetDS<?, ?>> void add(final K setDS) throws
> Exception {
>
> //synchronized final protected<K extends SetDS> 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);
>
> }
>
> }</PRE>
>
>
>
> <H1>Class SetDS</H1>
> <PRE>import java.util.Map;
> import java.util.Set;
> import java.util.TreeMap;
>
>
>
> public class SetDS<K extends Set<K>, T extends Comparable<T>> {
>
> private Map<K, T> vecMap_ = new TreeMap<K, T>();
>
> final public boolean add(SetDS<K, T> rhs) {
> if(rhs == null) {
> throw new NullPointerException("rhs cannot be null !!");
> }
> return false;
> }
>
> public SetDS()
> {
>
> }
> }</PRE>
>
>
>
> In Eclipse IT compiles fine with just warnings but when I try to build it
> with ANT Build fails with following error.
>
>
> <PRE>TestANtError.java:14: add(SetDS<capture#4 of ?,capture#583 ?>) in
> SetDS<capture#4 of ?,capture#583 ?> cannot
> be applied to (K)
> [javac] thisSetDS.add(setDS);
> [javac] ^
> [javac] 1 error
> </PRE>
>
>
> 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-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org