You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Raja Nagendra Kumar <Na...@tejasoft.com> on 2008/03/20 16:20:23 UTC
JavaC and sourcepath
Hi,
In ant script like the following with both srcdir and sourcepath..
<javac encoding="ascii"
target="1.5"
debug="true"
extdirs=""
srcdir="${src}"
destdir="${classes}"
bootclasspath="${android-jar}">
<sourcepath path="${PROJECT_HOME}/common/src"/>
<sourcepath path="${PROJECT_HOME}/j2me/src"/>
<sourcepath path="${COMMON_SHARED_CODE_HOME}"/>
<sourcepath path="${J2ME_SHARED_CODE_HOME}"/>
</javac>
I am looking to copy the source code files to seperate directory after the
javac task. For this I know all the files in srcdir is one copy and other
source files could be some of the files as referenced in by java code of src
file.
As I don't know what are the referenced files in the directories
<sourcepath path="${PROJECT_HOME}/common/src"/>
<sourcepath path="${PROJECT_HOME}/j2me/src"/>
<sourcepath path="${COMMON_SHARED_CODE_HOME}"/>
<sourcepath path="${J2ME_SHARED_CODE_HOME}"/>
I am unable to copy them, other than copying all.. Could any tell me how to
get all the source files which were compiled by javac task. if this feature
does not exist, it may be good candidate to provide the same in new version
of ant :)
Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com
--
View this message in context: http://www.nabble.com/JavaC-and-sourcepath-tp16181099p16181099.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
Re: JavaC and sourcepath
Posted by Raja Nagendra Kumar <Na...@tejasoft.com>.
I see javac task attribute listfiles.. however not sure how to use this in
the context of copying them to a new location.
Regards,
Nagendra
--
View this message in context: http://www.nabble.com/JavaC-and-sourcepath-tp16181099p16181104.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
Re: JavaC and sourcepath
Posted by Steve Loughran <st...@apache.org>.
Raja Nagendra Kumar wrote:
> Hi,
>
> In ant script like the following with both srcdir and sourcepath..
>
> <javac encoding="ascii"
> target="1.5"
> debug="true"
> extdirs=""
> srcdir="${src}"
> destdir="${classes}"
> bootclasspath="${android-jar}">
> <sourcepath path="${PROJECT_HOME}/common/src"/>
> <sourcepath path="${PROJECT_HOME}/j2me/src"/>
> <sourcepath path="${COMMON_SHARED_CODE_HOME}"/>
> <sourcepath path="${J2ME_SHARED_CODE_HOME}"/>
> </javac>
>
> I am looking to copy the source code files to seperate directory after the
> javac task. For this I know all the files in srcdir is one copy and other
> source files could be some of the files as referenced in by java code of src
> file.
>
> As I don't know what are the referenced files in the directories
>
> <sourcepath path="${PROJECT_HOME}/common/src"/>
> <sourcepath path="${PROJECT_HOME}/j2me/src"/>
> <sourcepath path="${COMMON_SHARED_CODE_HOME}"/>
> <sourcepath path="${J2ME_SHARED_CODE_HOME}"/>
>
> I am unable to copy them, other than copying all.. Could any tell me how to
> get all the source files which were compiled by javac task. if this feature
> does not exist, it may be good candidate to provide the same in new version
> of ant :)
>
1. define <filesets> of source files, use them in the <javac> and the <copy>
2. Ant doesnt know which files got compiled, as java has the right to
-on demand- compile any file it determines it needs. The list of files
Ant felt had changed is not enough.
--
Steve Loughran http://www.1060.org/blogxter/publish/5
Author: Ant in Action http://antbook.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: JavaC and sourcepath
Posted by Raja Nagendra Kumar <Na...@tejasoft.com>.
Thank you Stev for the pointers.. Let me create new taks with the code
snippets from depends filesets etc..
Regards,
Nagendra
Steve Loughran wrote:
>
> Raja Nagendra Kumar wrote:
>> We are using lot of opensource library code, which also gets complied
>> from
>> source code. However, my code many not use all the sources of opensource
>> library. This way, me copying all the opensource source always is not
>> recommended. For this reason only, we wanted to selectively copy only the
>> files which I am using..
>>
>> It also helps in some projects to know what is the exact code which make
>> the
>> complete product.
>>
>> Basically I am want to know though javac after it does the job, list of
>> all
>> the classes it generted and from where the source code of that class was
>> found.
>>
>> From the class files, javac could definately know what files were
>> complied
>> by javac even if we consider on demand approach. Many be though this, if
>> ant
>> javac has a way to say what are the sources location.. it would solve my
>> issue.. else I many have write some thing my self :), i.e go though all
>> the
>> generated class, searching for the respective java file in source and src
>> paths etc..
>
> Ok. The <depends> task contains much of the code to do this..it looks
> inside .class files to see their imports and so work out which files are
> out of date (and deletes them)
>
> But even it has a problem: constant integers and other numbers (maybe
> strings too) get copied into the .class files. They are not referenced
> by import.
>
> You might be able to play with filesets, to select everything in the
> build/classes directory and use that to create a pattern to copy.
>
>
> --
> Steve Loughran http://www.1060.org/blogxter/publish/5
> Author: Ant in Action http://antbook.org/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/JavaC-and-sourcepath-tp16181099p16274178.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
Re: JavaC and sourcepath
Posted by Steve Loughran <st...@apache.org>.
Raja Nagendra Kumar wrote:
> We are using lot of opensource library code, which also gets complied from
> source code. However, my code many not use all the sources of opensource
> library. This way, me copying all the opensource source always is not
> recommended. For this reason only, we wanted to selectively copy only the
> files which I am using..
>
> It also helps in some projects to know what is the exact code which make the
> complete product.
>
> Basically I am want to know though javac after it does the job, list of all
> the classes it generted and from where the source code of that class was
> found.
>
> From the class files, javac could definately know what files were complied
> by javac even if we consider on demand approach. Many be though this, if ant
> javac has a way to say what are the sources location.. it would solve my
> issue.. else I many have write some thing my self :), i.e go though all the
> generated class, searching for the respective java file in source and src
> paths etc..
Ok. The <depends> task contains much of the code to do this..it looks
inside .class files to see their imports and so work out which files are
out of date (and deletes them)
But even it has a problem: constant integers and other numbers (maybe
strings too) get copied into the .class files. They are not referenced
by import.
You might be able to play with filesets, to select everything in the
build/classes directory and use that to create a pattern to copy.
--
Steve Loughran http://www.1060.org/blogxter/publish/5
Author: Ant in Action http://antbook.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
RE: ant sql doesn't recognize the database server name with back slash?
Posted by Chaohua Wang <cw...@incomm.com>.
Thank you, '10.23.23.2\sql5t9' sql5t9 is a name instance, If I use
forward slash, sql5t9 will be treated as a Database name, instead of
name instance.
In this way, 10.23.23.2 can be recognized, but it is not
'10.23.23.2\sql5t9', so I will get login failed issue.
Do I need to track database? I can use '10.23.23.2\sql5t9' as server
name to login in with my password in Toad.
-----Original Message-----
From: Steve Loughran [mailto:stevel@apache.org]
Sent: Tuesday, March 25, 2008 10:25 AM
To: Ant Users List
Subject: Re: ant sql doesn't recognize the database server name with
back slash?
Chaohua Wang wrote:
> Hi Folks,
>
> I am using jdbc driver to connect database. I have 2 database. The url
> is like this 10.23.23.1, another one is 10.23.23.2\sql5t9.
> I am using jtds drvie to connect: jdbc:jtds:sqlserver://10.23.23.1
it
> works fine.
> But for 10.23.23.2\sql5t9, is not working. message shows:
> java.sql.SQLException: Unknown server host name '10.23.23.2\sql5t9'.
> Could you tell what is reason why? Thank you
Its up to the driver how it handles URLS; ant just loads the specific
driver and calls driver.connect(URL). If the driver is rejecting it, it
musnt support backslashes. Given the requirement to be a URL, which
means with forward slashes, this isn't that surprising.
-steve
--
Steve Loughran http://www.1060.org/blogxter/publish/5
Author: Ant in Action http://antbook.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: ant sql doesn't recognize the database server name with back
slash?
Posted by Steve Loughran <st...@apache.org>.
Chaohua Wang wrote:
> I have figured out, I didn't use name instance, instead port number,
> works fine now.
excellent!
>
> -----Original Message-----
> From: Steve Loughran [mailto:stevel@apache.org]
> Sent: Tuesday, March 25, 2008 10:25 AM
> To: Ant Users List
> Subject: Re: ant sql doesn't recognize the database server name with
> back slash?
>
> Chaohua Wang wrote:
>> Hi Folks,
>>
>> I am using jdbc driver to connect database. I have 2 database. The url
>> is like this 10.23.23.1, another one is 10.23.23.2\sql5t9.
>> I am using jtds drvie to connect: jdbc:jtds:sqlserver://10.23.23.1
> it
>> works fine.
>> But for 10.23.23.2\sql5t9, is not working. message shows:
>> java.sql.SQLException: Unknown server host name '10.23.23.2\sql5t9'.
>> Could you tell what is reason why? Thank you
>
> Its up to the driver how it handles URLS; ant just loads the specific
> driver and calls driver.connect(URL). If the driver is rejecting it, it
> musnt support backslashes. Given the requirement to be a URL, which
> means with forward slashes, this isn't that surprising.
>
> -steve
>
--
Steve Loughran http://www.1060.org/blogxter/publish/5
Author: Ant in Action http://antbook.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
RE: ant sql doesn't recognize the database server name with back slash?
Posted by Chaohua Wang <cw...@incomm.com>.
I have figured out, I didn't use name instance, instead port number,
works fine now.
-----Original Message-----
From: Steve Loughran [mailto:stevel@apache.org]
Sent: Tuesday, March 25, 2008 10:25 AM
To: Ant Users List
Subject: Re: ant sql doesn't recognize the database server name with
back slash?
Chaohua Wang wrote:
> Hi Folks,
>
> I am using jdbc driver to connect database. I have 2 database. The url
> is like this 10.23.23.1, another one is 10.23.23.2\sql5t9.
> I am using jtds drvie to connect: jdbc:jtds:sqlserver://10.23.23.1
it
> works fine.
> But for 10.23.23.2\sql5t9, is not working. message shows:
> java.sql.SQLException: Unknown server host name '10.23.23.2\sql5t9'.
> Could you tell what is reason why? Thank you
Its up to the driver how it handles URLS; ant just loads the specific
driver and calls driver.connect(URL). If the driver is rejecting it, it
musnt support backslashes. Given the requirement to be a URL, which
means with forward slashes, this isn't that surprising.
-steve
--
Steve Loughran http://www.1060.org/blogxter/publish/5
Author: Ant in Action http://antbook.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: ant sql doesn't recognize the database server name with back slash?
Posted by Rishi Gogia <ri...@hotmail.com>.
so Steve you mean that for picking up the addresses for a local Windows
machine, we can just give the path with single backward slash? (like
D:\temp\ant) and it will work?
--------------------------------------------------
From: "Steve Loughran" <st...@apache.org>
Sent: Wednesday, March 26, 2008 3:15 PM
To: "Ant Users List" <us...@ant.apache.org>
Subject: Re: ant sql doesn't recognize the database server name with back
slash?
> Rishi Gogia wrote:
>> in case of a unix env, URL should be used with forward slashes ('/')
>> instead of backslashes
>>
>> and in case any string needs to be used backslashes, they need to
>> accompany another backslash. this is because backslash acts as a escape
>> sequence character (remember \n)
>>
>> so to avoid such a situation, use "\\". the ant interpreter will
>> interpret the same as a single "\" and the task will be accomplished
>
> Normally Ant doesn't do that. There are special rules when working with
> regexp stuff, but there its the java.utils.regex package at work.
>
> -steve
>
> ---------------------------------------------------------------------
> 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: ant sql doesn't recognize the database server name with back
slash?
Posted by Steve Loughran <st...@apache.org>.
Rishi Gogia wrote:
> in case of a unix env, URL should be used with forward slashes ('/')
> instead of backslashes
>
> and in case any string needs to be used backslashes, they need to
> accompany another backslash. this is because backslash acts as a escape
> sequence character (remember \n)
>
> so to avoid such a situation, use "\\". the ant interpreter will
> interpret the same as a single "\" and the task will be accomplished
Normally Ant doesn't do that. There are special rules when working with
regexp stuff, but there its the java.utils.regex package at work.
-steve
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: ant sql doesn't recognize the database server name with back slash?
Posted by Rishi Gogia <ri...@hotmail.com>.
in case of a unix env, URL should be used with forward slashes ('/') instead
of backslashes
and in case any string needs to be used backslashes, they need to accompany
another backslash. this is because backslash acts as a escape sequence
character (remember \n)
so to avoid such a situation, use "\\". the ant interpreter will interpret
the same as a single "\" and the task will be accomplished
Rishi
--------------------------------------------------
From: "Steve Loughran" <st...@apache.org>
Sent: Tuesday, March 25, 2008 9:55 PM
To: "Ant Users List" <us...@ant.apache.org>
Subject: Re: ant sql doesn't recognize the database server name with back
slash?
> Chaohua Wang wrote:
>> Hi Folks,
>>
>> I am using jdbc driver to connect database. I have 2 database. The url
>> is like this 10.23.23.1, another one is 10.23.23.2\sql5t9.
>> I am using jtds drvie to connect: jdbc:jtds:sqlserver://10.23.23.1 it
>> works fine. But for 10.23.23.2\sql5t9, is not working. message shows:
>> java.sql.SQLException: Unknown server host name '10.23.23.2\sql5t9'.
>> Could you tell what is reason why? Thank you
>
> Its up to the driver how it handles URLS; ant just loads the specific
> driver and calls driver.connect(URL). If the driver is rejecting it, it
> musnt support backslashes. Given the requirement to be a URL, which means
> with forward slashes, this isn't that surprising.
>
> -steve
>
> --
> Steve Loughran http://www.1060.org/blogxter/publish/5
> Author: Ant in Action http://antbook.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: ant sql doesn't recognize the database server name with back
slash?
Posted by Steve Loughran <st...@apache.org>.
Chaohua Wang wrote:
> Hi Folks,
>
> I am using jdbc driver to connect database. I have 2 database. The url
> is like this 10.23.23.1, another one is 10.23.23.2\sql5t9.
> I am using jtds drvie to connect: jdbc:jtds:sqlserver://10.23.23.1 it
> works fine.
> But for 10.23.23.2\sql5t9, is not working. message shows:
> java.sql.SQLException: Unknown server host name '10.23.23.2\sql5t9'.
> Could you tell what is reason why? Thank you
Its up to the driver how it handles URLS; ant just loads the specific
driver and calls driver.connect(URL). If the driver is rejecting it, it
musnt support backslashes. Given the requirement to be a URL, which
means with forward slashes, this isn't that surprising.
-steve
--
Steve Loughran http://www.1060.org/blogxter/publish/5
Author: Ant in Action http://antbook.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
RE: ant sql doesn't recognize the database server name with back slash?
Posted by Chaohua Wang <cw...@incomm.com>.
Rob, Thank you very much.
-----Original Message-----
From: Anderson, Rob (Global Trade) [mailto:Rob.Anderson@nike.com]
Sent: Tuesday, April 01, 2008 12:54 PM
To: Ant Users List; floess@mindspring.com
Subject: RE: ant sql doesn't recognize the database server name with
back slash?
Try a forward slash...
10.23.23.2/sql5t9
-Rob Anderson
-----Original Message-----
From: Chaohua Wang [mailto:cwang@incomm.com]
Sent: Tuesday, March 25, 2008 8:26 AM
To: Ant Users List; floess@mindspring.com
Subject: ant sql doesn't recognize the database server name with back
slash?
Hi Folks,
I am using jdbc driver to connect database. I have 2 database. The url
is like this 10.23.23.1, another one is 10.23.23.2\sql5t9.
I am using jtds drvie to connect: jdbc:jtds:sqlserver://10.23.23.1 it
works fine.
But for 10.23.23.2\sql5t9, is not working. message shows:
java.sql.SQLException: Unknown server host name '10.23.23.2\sql5t9'.
Could you tell what is reason why? Thank you
cwang
---------------------------------------------------------------------
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: ant sql doesn't recognize the database server name with back slash?
Posted by "Anderson, Rob (Global Trade)" <Ro...@nike.com>.
Try a forward slash...
10.23.23.2/sql5t9
-Rob Anderson
-----Original Message-----
From: Chaohua Wang [mailto:cwang@incomm.com]
Sent: Tuesday, March 25, 2008 8:26 AM
To: Ant Users List; floess@mindspring.com
Subject: ant sql doesn't recognize the database server name with back
slash?
Hi Folks,
I am using jdbc driver to connect database. I have 2 database. The url
is like this 10.23.23.1, another one is 10.23.23.2\sql5t9.
I am using jtds drvie to connect: jdbc:jtds:sqlserver://10.23.23.1 it
works fine.
But for 10.23.23.2\sql5t9, is not working. message shows:
java.sql.SQLException: Unknown server host name '10.23.23.2\sql5t9'.
Could you tell what is reason why? Thank you
cwang
---------------------------------------------------------------------
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
ant sql doesn't recognize the database server name with back slash?
Posted by Chaohua Wang <cw...@incomm.com>.
Hi Folks,
I am using jdbc driver to connect database. I have 2 database. The url
is like this 10.23.23.1, another one is 10.23.23.2\sql5t9.
I am using jtds drvie to connect: jdbc:jtds:sqlserver://10.23.23.1 it
works fine.
But for 10.23.23.2\sql5t9, is not working. message shows:
java.sql.SQLException: Unknown server host name '10.23.23.2\sql5t9'.
Could you tell what is reason why? Thank you
cwang
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: JavaC and sourcepath
Posted by "Scot P. Floess" <fl...@mindspring.com>.
Hmm, I wonder if you can do something by enabling listfiles output to
the javac task? Or verbose?
Anyway that may help you some...
Raja Nagendra Kumar wrote:
> Hi,
>
> Let me rephrase my need..
>
> We are a organisation, which use open source and also lot of common library
> to develop j2me applications.
> Any new J2ME application we develop, we either start from the common library
> or add to common library as we evolve this application. This way over a
> period of 4 years in our bussiness, we do have lot of common library which
> we could for any j2me applications.
>
> However, we need to provide the source code to customer, we don't need to
> provide the full copy of library source code as it does not either makes
> sense to customer nor to us.
>
> This is where we wanted to what is the exact sources in our common libarary
> the customers application depend on so that we just copy those from common
> library code.
>
> Hope this makes our point more clear.
>
> Regards,
> Raja Nagendra Kumar,
> C.T.O
> www.tejasoft.com
>
--
Scot P. Floess
27 Lake Royale
Louisburg, NC 27549
252-478-8087 (Home)
919-754-4592 (Work)
Chief Architect JPlate http://sourceforge.net/projects/jplate
Chief Architect JavaPIM http://sourceforge.net/projects/javapim
Architect Keros http://sourceforge.net/projects/keros
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: JavaC and sourcepath
Posted by "Scot P. Floess" <fl...@mindspring.com>.
Very very interesting. I understand.
I'll have to give this some thought.
Raja Nagendra Kumar wrote:
> Hi,
>
> Let me rephrase my need..
>
> We are a organisation, which use open source and also lot of common library
> to develop j2me applications.
> Any new J2ME application we develop, we either start from the common library
> or add to common library as we evolve this application. This way over a
> period of 4 years in our bussiness, we do have lot of common library which
> we could for any j2me applications.
>
> However, we need to provide the source code to customer, we don't need to
> provide the full copy of library source code as it does not either makes
> sense to customer nor to us.
>
> This is where we wanted to what is the exact sources in our common libarary
> the customers application depend on so that we just copy those from common
> library code.
>
> Hope this makes our point more clear.
>
> Regards,
> Raja Nagendra Kumar,
> C.T.O
> www.tejasoft.com
>
--
Scot P. Floess
27 Lake Royale
Louisburg, NC 27549
252-478-8087 (Home)
919-754-4592 (Work)
Chief Architect JPlate http://sourceforge.net/projects/jplate
Chief Architect JavaPIM http://sourceforge.net/projects/javapim
Architect Keros http://sourceforge.net/projects/keros
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: JavaC and sourcepath
Posted by Raja Nagendra Kumar <Na...@tejasoft.com>.
Hi,
Let me rephrase my need..
We are a organisation, which use open source and also lot of common library
to develop j2me applications.
Any new J2ME application we develop, we either start from the common library
or add to common library as we evolve this application. This way over a
period of 4 years in our bussiness, we do have lot of common library which
we could for any j2me applications.
However, we need to provide the source code to customer, we don't need to
provide the full copy of library source code as it does not either makes
sense to customer nor to us.
This is where we wanted to what is the exact sources in our common libarary
the customers application depend on so that we just copy those from common
library code.
Hope this makes our point more clear.
Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com
--
View this message in context: http://www.nabble.com/JavaC-and-sourcepath-tp16181099p16193121.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
Re: JavaC and sourcepath
Posted by "Scot P. Floess" <fl...@mindspring.com>.
Sorry, I still don't understand why you are doing this copy...in this
fashion... Clearly you can extrapolate based on the class files
generated compared to the source path's defined...
But, why is it important to have just these Java files? Meaning what is
the purpose and why? I just don't understand.
As has been mentioned, this is a function of Javac.
Raja Nagendra Kumar wrote:
> We are using lot of opensource library code, which also gets complied from
> source code. However, my code many not use all the sources of opensource
> library. This way, me copying all the opensource source always is not
> recommended. For this reason only, we wanted to selectively copy only the
> files which I am using..
>
> It also helps in some projects to know what is the exact code which make the
> complete product.
>
> Basically I am want to know though javac after it does the job, list of all
> the classes it generted and from where the source code of that class was
> found.
>
> >From the class files, javac could definately know what files were complied
> by javac even if we consider on demand approach. Many be though this, if ant
> javac has a way to say what are the sources location.. it would solve my
> issue.. else I many have write some thing my self :), i.e go though all the
> generated class, searching for the respective java file in source and src
> paths etc..
>
> Regards,
> Raja Nagendra Kumar.
>
--
Scot P. Floess
27 Lake Royale
Louisburg, NC 27549
252-478-8087 (Home)
919-754-4592 (Work)
Chief Architect JPlate http://sourceforge.net/projects/jplate
Chief Architect JavaPIM http://sourceforge.net/projects/javapim
Architect Keros http://sourceforge.net/projects/keros
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: JavaC and sourcepath
Posted by Raja Nagendra Kumar <Na...@tejasoft.com>.
We are using lot of opensource library code, which also gets complied from
source code. However, my code many not use all the sources of opensource
library. This way, me copying all the opensource source always is not
recommended. For this reason only, we wanted to selectively copy only the
files which I am using..
It also helps in some projects to know what is the exact code which make the
complete product.
Basically I am want to know though javac after it does the job, list of all
the classes it generted and from where the source code of that class was
found.
>From the class files, javac could definately know what files were complied
by javac even if we consider on demand approach. Many be though this, if ant
javac has a way to say what are the sources location.. it would solve my
issue.. else I many have write some thing my self :), i.e go though all the
generated class, searching for the respective java file in source and src
paths etc..
Regards,
Raja Nagendra Kumar.
--
View this message in context: http://www.nabble.com/JavaC-and-sourcepath-tp16181099p16184205.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
Re: JavaC and sourcepath
Posted by "Scot P. Floess" <fl...@mindspring.com>.
If you know the dirs you are compiling, why not copy the files from
there? For example, I see ${PROJECT_HOME}/common/src in your
sourcepath... So why does Javac need this functionality? Stock command
line javac doesn't do this. I don't see why the task javac should
either....
Raja Nagendra Kumar wrote:
> Hi,
>
> In ant script like the following with both srcdir and sourcepath..
>
> <javac encoding="ascii"
> target="1.5"
> debug="true"
> extdirs=""
> srcdir="${src}"
> destdir="${classes}"
> bootclasspath="${android-jar}">
> <sourcepath path="${PROJECT_HOME}/common/src"/>
> <sourcepath path="${PROJECT_HOME}/j2me/src"/>
> <sourcepath path="${COMMON_SHARED_CODE_HOME}"/>
> <sourcepath path="${J2ME_SHARED_CODE_HOME}"/>
> </javac>
>
> I am looking to copy the source code files to seperate directory after the
> javac task. For this I know all the files in srcdir is one copy and other
> source files could be some of the files as referenced in by java code of src
> file.
>
> As I don't know what are the referenced files in the directories
>
> <sourcepath path="${PROJECT_HOME}/common/src"/>
> <sourcepath path="${PROJECT_HOME}/j2me/src"/>
> <sourcepath path="${COMMON_SHARED_CODE_HOME}"/>
> <sourcepath path="${J2ME_SHARED_CODE_HOME}"/>
>
> I am unable to copy them, other than copying all.. Could any tell me how to
> get all the source files which were compiled by javac task. if this feature
> does not exist, it may be good candidate to provide the same in new version
> of ant :)
>
> Regards,
> Raja Nagendra Kumar,
> C.T.O
> www.tejasoft.com
>
--
Scot P. Floess
27 Lake Royale
Louisburg, NC 27549
252-478-8087 (Home)
919-754-4592 (Work)
Chief Architect JPlate http://sourceforge.net/projects/jplate
Chief Architect JavaPIM http://sourceforge.net/projects/javapim
Architect Keros http://sourceforge.net/projects/keros
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org