FileSet with copy fails with NPE..

2008-12-10 Thread Raja Nagendra Kumar

Hi,

We are writing ant task, which needs to copy files based on  fileset
defination like this..

Copy c = createCopyTask();
FileSet fs = new FileSet();
fs.setProject(getProject());
fs.setDir(new File("."));
fs.setFile(f);
c.addFileset(fs);
c.execute();

where createCopyTask() is

private final Copy createCopyTask()
{
final Copy c = new Copy();
c.setTodir(new File(getDestdir().getPath()));
c.setIncludeEmptyDirs(false);
c.setFailOnError(true);
c.setOverwrite(false);
c.setFlatten(false);
return c;
}

However this code is resulting in NPE with the following exception..

Could any one guide what is wrong here..

Regards,
Nagendra

[C2SCp] java.lang.NullPointerException
[C2SCp] at
org.apache.tools.ant.types.AbstractFileSet.setupDirectoryScanner(AbstractFileSet.java:477)
[C2SCp] at
org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:442)
[C2SCp] at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:431)
[C2SCp] at
com.tejasoft.ant.c2s.Class2SRCCopyTask.execute(Class2SRCCopyTask.java:73)
[C2SCp] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[C2SCp] at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown
Source)
[C2SCp] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[C2SCp] at java.lang.reflect.Method.invoke(Method.java:623)
[C2SCp] at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[C2SCp] at org.apache.tools.ant.Task.perform(Task.java:348)
[C2SCp] at
org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:62)
[C2SCp] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[C2SCp] at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown
Source)
[C2SCp] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[C2SCp] at java.lang.reflect.Method.invoke(Method.java:623)
[C2SCp] at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[C2SCp] at org.apache.tools.ant.Task.perform(Task.java:348)
[C2SCp] at
org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:394)
[C2SCp] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[C2SCp] at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown
Source)
[C2SCp] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[C2SCp] at java.lang.reflect.Method.invoke(Method.java:623)
-- 
View this message in context: 
http://www.nabble.com/FileSet-with-copy-fails-with-NPE..-tp20935877p20935877.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FileSet with copy fails with NPE..

2008-12-10 Thread Raja Nagendra Kumar

Hi Mark,

Thank you for quick reply.. I saw that listed in forum and thought I need to
set the project fileset..
However, the issue was to set project for copy taks it self.

To Ant Dev Team,

It was 3 hours of wasted time to figure this out.. 

Simple copy without fileset usage works fine without setting the project and
fails only when the fileset is added to copy task.

The actual cause with line 431 of org.apache.tools.ant.taskdefs.Copy

ds = fs.getDirectoryScanner(getProject());

Which inturn results in NPE in FileSet NPE during log at line 477 in
org.apache.tools.ant.types.AbstractFileSet

 p.log(getDataTypeName() + ": Setup scanner in dir " + dir
+ " with " + ps, Project.MSG_DEBUG);

In future, it would be nice if ant could do one or more of the following
changes in all such places, where it depends of project value should not be
null

1. Make sure proper asserts are done for getProject() method if it should
not be null at all
2. Or focus on Methods which depend on non null value of getProject() and 
should throw proper exception
3. AbstractFileSet could use getProject() of its own task rather than
depending on the parameter passed to it. Not sure, why the project is passed
as parameter..(may be I don't understand the need due to my currrent limited
understanding)

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com
-A Competent Java Specialized Product Development Team. 




-- 
View this message in context: 
http://www.nabble.com/FileSet-with-copy-fails-with-NPE..-tp20935877p20936814.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FileSet with copy fails with NPE..

2008-12-10 Thread Raja Nagendra Kumar

Pl. find the fix for the same in ProjectComponent

We are defining a GOBAL_DEFAULT_PROJECT which would be same as the first non
null setProject call parameter.

getProject() value on any tag if null, the non null GOBAL_DEFAULT_PROJECT
value is assumed with debug log message saying about this assumption.

Pl. find unix style diff below..

Compare:
(<)C:\temp\apache-ant-1.7.1\src\main\org\apache\tools\ant\ProjectComponent.java
(5545 bytes)
   with:
(>)C:\temp\apache-ant-1.7.1new\src\main\org\apache\tools\ant\ProjectComponent.java
(5888 bytes)

29a29,30
> private static Project GOBAL_DEFAULT_PROJECT;
> 
70a72,74
>   if(GOBAL_DEFAULT_PROJECT == null && project !=null) {
>   GOBAL_DEFAULT_PROJECT = project;
>   }
78a83,87
>   if(project == null && GOBAL_DEFAULT_PROJECT !=null) {
>  setProject(GOBAL_DEFAULT_PROJECT);
>  GOBAL_DEFAULT_PROJECT.log("Assuming Default Project as" +
> GOBAL_DEFAULT_PROJECT, Project.MSG_DEBUG);
>   }
> 

Mark,

Is there a specific process for patch other than providing the diffs, pl.
let me know, I shall follow the same.

Also Mark or any one of you point me to the location of where custome tags
creating is junit tested in the ant sources pl.

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com
-A Competent Java Product Development Team
-- 
View this message in context: 
http://www.nabble.com/FileSet-with-copy-fails-with-NPE..-tp20935877p20949162.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FileSet with copy fails with NPE..

2008-12-11 Thread Raja Nagendra Kumar

Thank you Stefan for providing the insites..

I complete see the point related to 
>  tasks and maybe even .

Based on lifecycle link you provided I see that there is a mention of 
> The task gets references to its project and location inside the buildfile
> via its inherited project and location variables. 

In such cases, why should the user initialise them explicitly, when run from
build file.

Pl. suggest any other better approach, so that, when the user does not
explicitly intialise the task, it could take parents project and other info
related to parent.

If you could provide me details on the classes to look for this, I shall try
providing fix based on that understanding.

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com






Stefan Bodewig wrote:
> 
> On 2008-12-11, Raja Nagendra Kumar <[EMAIL PROTECTED]> wrote:
> 
>> Pl. find the fix for the same in ProjectComponent
> 
>> We are defining a GOBAL_DEFAULT_PROJECT which would be same as the first
>> non
>> null setProject call parameter.
> 
> That would be a pretty bad idea, in particular in the presence of
>  tasks and maybe even .
> 
> Generally Ant's API is not designed to be used in an embedded way and
> if you create any sort of task programatically you better make sure it
> is initialized properly, which includes setting the project instance.
> 
> If you create a task programatically, make sure you implement the full
> lifecycles as defined
> <http://ant.apache.org/manual/develop.html#writingowntask> because the
> existing task will depend on it.
> 
> I don't see you method setting the location, owning target or invoking
> init() either, which might get you in trouble as well.
> 
> You may want to use Task.bindToOwner() to copy the most important
> properties from your current task to the manualy created copy task but
> should still invoke init() (some tasks use it, Copy does not).
> 
> Stefan
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/FileSet-with-copy-fails-with-NPE..-tp20935877p20951371.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FileSet with copy fails with NPE..

2008-12-11 Thread Raja Nagendra Kumar

I understand initialisation is very impl. however if this could come free
from parent.. then it is better..so trying to make the fix in those lines..
-- 
View this message in context: 
http://www.nabble.com/FileSet-with-copy-fails-with-NPE..-tp20935877p20951392.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FileSet with copy fails with NPE..

2008-12-11 Thread Raja Nagendra Kumar

Hi Stefan,

Thank you the code changes. I shall go with the changed code.

However Stefan, not able to convince on why this can't be done
automatically, as it is so obvious that  new Copy Object is created while
wring the cutom tag extentions to ant. This code are used with in project
context and it gets invoked though custom xml  tags only in build file only.

I understand of explicit initialisation, if used as libarary in normal java
applications.

Regards,
Nagendra


Stefan Bodewig wrote:
> 
> On 2008-12-11, Raja Nagendra Kumar  wrote:
> 
>> Based on lifecycle link you provided I see that there is a mention
>> of
> 
>>> The task gets references to its project and location inside the
>>> buildfile via its inherited project and location variables.
> 
>> In such cases, why should the user initialise them explicitly, when
>> run from build file.
> 
> Because Ant can only intialize task it creates itself.
> 
>> Pl. suggest any other better approach, so that, when the user does not
>> explicitly intialise the task, it could take parents project and other
>> info
>> related to parent.
> 
> That would be the wrong approach.  The user is responsible for
> lifecycle handling when he creates tasks manually IMHO.  If your
> method was changed to read
> 
> private final Copy createCopyTask()
> {
>   final Copy c = new Copy();
> +   c.bindToOwner(this);
> +   c.init();
>   c.setTodir(new File(getDestdir().getPath()));
>   c.setIncludeEmptyDirs(false);
>   c.setFailOnError(true);
>   c.setOverwrite(false);
>   c.setFlatten(false);
>   return c;
> }
> 
> things should work as expected.
> 
> Ant really is not a general purpose API, if we wanted to make it one,
> we'd have bigger problems than providing default project instances.
> We shouldn't pretend it is one.
> 
> Stefan
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
> For additional commands, e-mail: dev-h...@ant.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/FileSet-with-copy-fails-with-NPE..-tp20935877p20970202.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Re: FileSet with copy fails with NPE..

2008-12-12 Thread Raja Nagendra Kumar



Steve Loughran wrote:
> 
> Raja Nagendra Kumar wrote:
>> Pl. find the fix for the same in ProjectComponent
>> 
>> We are defining a GOBAL_DEFAULT_PROJECT which would be same as the first
>> non
>> null setProject call parameter.
>> 
>> getProject() value on any tag if null, the non null GOBAL_DEFAULT_PROJECT
>> value is assumed with debug log message saying about this assumption.
>> 
> 
> No, this is lethal. 
> 
> Agreed.. This fix was made with intention of supporting some default
> project, without clearly knowing the significance project object. thanks
> to the team pointing out this very clearly..
> 
> 
>>An NPE is a validity check to ensure that every task has an owning 
>>project. Not a friendly one, but one that certainly halts the app with a 
>>stack trace.  
> 
> nope.. this can't be the way once wishes to use ant.. as the stack traced
> points to source code of ant and the source code of users. One has to
> spend at least hours..(in my case 3 hours) to figure out this..
> 
> Better message always make the usablity of the product in genral a breeze.
> Having said that, Ant is great.. 
> 
> 
>>Its something the developers get to see, usually the first 
>>time a task tries to log something. by the time the end users get to see 
>>it, it should have been fixed. That's the one nice thing about NPEs: 
>>they are hard to ignore.
> 
> Agreed pl. see if this could be fixed in feature versions of ant with a
> proper message.
> 
> 
>>Tasks that create other tasks should bind them with 
>>bindToOwner(ProjectComponent). This ensures that not only is project 
>>picked up, the child task even picks up the same name in the logs.
> 
> Still not clear, why should the custom task developer know these, when
> this could be automatically inherited due to ant extention.
> 
> How does these extra calls of bindToOwner help custom task developers.. I
> would do these because you are asking me.. but I see no interest in
> developing simple extentions.. such as some kind of custom copy etc..
> 
> To us API should take safe/straight assumptions (in this case of custom
> task, it is straigth due to my previous post explanation) without needing
> the users to know about sequence of api calls before he could actually do
> his work.
> 
> I would love see safe assumption on this .. however I welcome any
> convencing explanation.
> 
> Regards,
> Nagendra
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
> For additional commands, e-mail: dev-h...@ant.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/FileSet-with-copy-fails-with-NPE..-tp20935877p20976158.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Re: FileSet with copy fails with NPE..

2008-12-12 Thread Raja Nagendra Kumar

Jeff,

Sorry.. if my reply gave a such a feeling..

My indent was to really understand and take a pride to contribute to ant in
any small way on a right cause.. If the discussion is going wrongly.. pl.
ingore all my reply to this thread.

I remeber the pain of 3 hours in figuring out what the issue was.. that if I
am able to convey to respective ant developers, I think I am done.

Regards,
Nagendra





Jeffrey E Care wrote:
> 
> Raja Nagendra Kumar  wrote on 12/12/2008 
> 09:00:57 AM:
> 
>> Still not clear, why should the custom task developer know these, when
>> this could be automatically inherited due to ant extention.
> 
> I think this discussion has crossed the line into "titlting at windmills" 
> territory...
> 

-- 
View this message in context: 
http://www.nabble.com/FileSet-with-copy-fails-with-NPE..-tp20935877p20978212.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Re: FileSet with copy fails with NPE..

2008-12-15 Thread Raja Nagendra Kumar

Hi Stefen,

Thank you for the follow up questions..
I am getting to feel that, I did not explain the senario correctly.. Let me
try again to support why I feel it is obvious.

This is my ant description..









  






In this macro defination of mine.. I have a copy taks.. which is a direct
ant copy using as it is with me explicitly setting project to which it
belongs too..

DeepCopy is custom Ant task.. which internally uses Copy with some custom
organisation specific logic to copy.

Its defination uses taskdef some thing like this..



As DeepCopy is used with in the build xml file, could ant consider all the
copy or any other api used with in  DeepCopyTask be part of the same
project! (in this case project called J2MECommon)

If we could do this, I consider this as safe and right assumption from the
design..

Pl. let me know what I am missing here.. 

I wish to limit my self,  if by design this is the correct thing to be do.
if yes, we could explore on impl. options and complications it may bring in
due to various things  as told by forum members such as IDE, Parallel
execution etc..

Regards,
Nagendra


Stefan Bodewig wrote:
> 
> On 2008-12-12, Raja Nagendra Kumar  wrote:
> 
>> However Stefan, not able to convince on why this can't be done
>> automatically, as it is so obvious that  new Copy Object is created while
>> wring the cutom tag extentions to ant.
> 
> How is this obvious?  Your code is creating the instance of the Copy
> class, Ant is not involved at all.  I don't really see how Ant could
> or should interfere with that.  If you used
> getProject().createTask("copy") then Ant could know it (and actually
> will set the project instance) but it has other problems.
> 
>> This code are used with in project context and it gets invoked
>> though custom xml tags only in build file only.
> 
> Again, I don't see who should recognize this build file context if not
> your very own code.
> 
> Stefan
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
> For additional commands, e-mail: dev-h...@ant.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/FileSet-with-copy-fails-with-NPE..-tp20935877p21014177.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Re: FileSet with copy fails with NPE..

2008-12-15 Thread Raja Nagendra Kumar

Ok Jeff.

I take the documentation of the base and close this..  Though I would
personally loved this to be resolved differently by way of parent and child
approach or by some global defaults automatically initialized in this
context.

Regards,
Nagendra



Jeffrey E Care wrote:
> 
> Raja Nagendra Kumar  wrote on 12/15/2008 
> 08:40:48 AM:
> 
>>>   patterns="${deviceID}.*,*.xml,vendor.*, global.*">
>>   
>>
> 
> This is very simple: Ant is creating DeepCopy & that's it. Since Ant is 
> creating DeepCopy as a result of parsing a project file (i.e. build.xml) 
> it will configure DeepCopy. 
> 
> You're creating copy instances within the DeepCopy code, so Ant has no 
> idea that you've created them. You created them so you're responsible for 
> configuring them correctly. It's unreasonable to expect Ant to be 
> omniscient about what you apparently expect it to be omniscient about.
> 
> I understand you're upset that you lost three hours trying to figure this 
> out, but your intransigent pursuit of this issue is baffling considering 
> that you've already been told multiple times what the problem is and 
> pointed to the documentation that explains how all of this works.
> 

-- 
View this message in context: 
http://www.nabble.com/FileSet-with-copy-fails-with-NPE..-tp20935877p21015811.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Ant arguments handling

2009-04-01 Thread Raja Nagendra Kumar

Hi,

I have a build xml with target say 'compile'

However if the user says 'ant comp' or any other target which does not
exists, I want to handle them using a my custom code either a macro or a ant
custom task or groovy. 

Is this possible, if yes, could you pl. let me know the right place to get
more info on this.

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com
-- 
View this message in context: 
http://www.nabble.com/Ant-arguments-handling-tp22827023p22827023.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Re: AW: Ant arguments handling

2009-04-01 Thread Raja Nagendra Kumar

Thank You Jan, This details of yours and Ant support to meet such needs is
simple and helps us to designg a powerver target handling system for our
Mobile Development/Porting Product Development Platform.

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com
-- 
View this message in context: 
http://www.nabble.com/Ant-arguments-handling-tp22827023p22841535.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Re: Ant arguments handling (Virtual Ant Targets handling using custom code)

2009-04-02 Thread Raja Nagendra Kumar

Hi,

Jan, we are trying to set our own executor, however we are phasing the
following issues 

* it looks like we need to place the custom executor calss in ant lib folder
   - Is there a way to tell the ant to look for my project libraries to find
this custom executor
* What is the default Executor the ant uses, so that for certain tasks we
wish to deligate to the default executor - is this reference avaiable some
where so that I could use that reference to deligate
* for IDE integration by giving the build.xml to the ide, how do we tell the
IDE that vitural targets exists so that it could display as one of the valid
target with in the listed targests supported by the ant xml file.
  - Is there any interface which we need to impl. which gives the list of
valid targets. Executor should have had this method.. but it does not seem
to have one.

* Could you pl. give more details on what the significance of
getSubProjectExecutor()

Regards,
Nagendra


-- 
View this message in context: 
http://www.nabble.com/Ant-arguments-handling-tp22827023p22846177.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Project Specific Classpath to customise ant

2009-04-02 Thread Raja Nagendra Kumar

Hi,

Is there a way to tell core ant to looking into project specific class path
, in case one is definable (with the project xml defination i.e in build.xml
file rather than ant -lib or environment classpath etc) for some of the
custom classes which ant supports by way of properties.

e.g each project could provide its own class to hook to the excution by way
of setting a project specific class to the property ant.executor.class

The probable approach may exist already are:

1. Some thing like if I define a ant propertly say ant.project.cp=xyz etc.
2. for every customisable class, is there a way to tell ant the path it
should look for



 Some think like the way we define the jars for taskdef.

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com
-- 
View this message in context: 
http://www.nabble.com/Project-Specific-Classpath-to-customise-ant-tp22849190p22849190.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



ant -p does not list all the targets

2009-04-02 Thread Raja Nagendra Kumar

Ant -p lists only the targests which has a description attribute value set. 

Is there any other command to simply see the list of targets even if the
description tag is not set.

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com


-- 
View this message in context: 
http://www.nabble.com/ant--p-does-not-list-all-the-targets-tp22861610p22861610.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



IDE's integration with Ant any clues

2009-04-03 Thread Raja Nagendra Kumar

Hi,

Most of the IDE's do support directly accepting the build file and showing
the targets and running the targets, going to the respective xml source code
and showing the ant build file output.

For all these, does ant have any extra intefaces, which ide vendors could
use to integrate e.g setting the ant out redirection, query the ant api to
get the list of targets etc.  In case no, I assume that each IDE vendor must
be writing their own xml parser to get these details etc.

If no, are there any plans to extend ant api for IDE plugin developers in
future.

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com

-- 
View this message in context: 
http://www.nabble.com/IDE%27s-integration-with-Ant-any-clues-tp22870203p22870203.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Re: IDE's integration with Ant any clues

2009-04-04 Thread Raja Nagendra Kumar

Hi Jesse,

Nice to note that there is some code available as part of apache ant tools
and get to know your integration experience.  To further think big.. does
the forum member think that there should more such support from ant
libraries to integrate with IDE's

e.g Query interface to know the list of targets, an approach to add virtual
ant targets to any project (say if the project is JavaME project, the ant
integration could add open emulator etc.)

Some think in the scope of Ant Plugin Development Support API focused around
IDE integration, so that these api could much richer and closure to ease IDE
integration support.

Jesse, I did not understand - (Calling into Ant code merely for browsing
would be pose security and reliability issues.) , could pl. explain.

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com

-- 
View this message in context: 
http://www.nabble.com/IDE%27s-integration-with-Ant-spi-%28Server-Provider-Interface%29-support-tp22870203p22890423.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



support programatic resolving of properties files

2009-04-10 Thread Raja Nagendra Kumar

Hi,

We have a need to provide a programatic values for some of the properties
which are not declared with in ant script.

e.g if foundation.src=c:\src is declared and user would also use
foundation.resources (which is nothing but c:\src\resources) which is not
declared with in the script. 

If there is a way to custom resolve the properties, pl. guide.. we wish to
resolve them with business logic or naming conventions related to our work.

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com
f...@tejasoft.com


-- 
View this message in context: 
http://www.nabble.com/support-programatic-resolving-of-properties-files-tp22985931p22985931.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Ant IDE Integration API to ease IDE plugin or any generic plugin development

2009-04-10 Thread Raja Nagendra Kumar

Hi,

In continuation to my discussion at

http://www.nabble.com/IDE%27s-integration-with-Ant-spi-%28Server-Provider-Interface%29-support-tt22870203.html#a22890423

Looking for ant team to consider if ant could provide a certain api for
plugin development, e.g Query for targets, run a certain target with debug
enabled, get the output of the ant, adding few vitual targets to better
handle the integration (this would also be usef full in non ide context too)

Currently I understand from the Netbeans impl. they seem to do lot of
parsing them self
  - This approach could mean when the ant changes each ide's had to do lot
of job.

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com
  



-- 
View this message in context: 
http://www.nabble.com/Ant-IDE-Integration-API-to-ease-IDE-plugin-or-any-generic-plugin-development-tp22986009p22986009.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Re: AW: ant -p does not list all the targets

2009-04-10 Thread Raja Nagendra Kumar

-v does give more info including Other targets.

But it has lot of unwanted debug kind of into too.

Like the proposed -pa do we have any thing to get the list of macros, if no
could you consider.
-- 
View this message in context: 
http://www.nabble.com/ant--p-does-not-list-all-the-targets-tp22861610p22986120.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Re: Ant IDE Integration API to ease IDE plugin or any generic plugin development

2009-04-10 Thread Raja Nagendra Kumar

Few Other Query needs are

1. Is certain property is set if yes, what is its value
2. What are the error areas on the script.. so that IDE could highlight
3. Where is the property xyz defined


-- 
View this message in context: 
http://www.nabble.com/Ant-IDE-Integration-API-to-ease-IDE-plugin-or-any-generic-plugin-development-tp22986009p2299.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



target call info, even when the if condition not met

2009-08-01 Thread Raja Nagendra Kumar

Ant 1.7.1 is printing the name of the target like this

copyPrepocessingFiles:

for a call to a target copyPrepocessingFiles, which is defined as



the target name gets printed as above even when the property
porting.friendly.enabled is not defined.

in such context, I was expecting it show on the console skipping the target
call copyPrepocessingFiles etc.

Pl. see if such change makes sense for the next release

Regards,
Raja Nagendra Kumar,
www.tejasoft.com
-- 
View this message in context: 
http://www.nabble.com/target-call-info%2C-even-when-the-if-condition-not-met-tp24769843p24769843.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Ant XML Files precompilation

2009-08-06 Thread Raja Nagendra Kumar

Hi,

We have a very simple but many xml ant files.. which get imported
dynamically and create entire build tasks to make our complex product/tool
(this is used by TejaSoft Mobile Applications team to build midlets for
100's of devices).

However, due to imports and multiple times using of  task with no
inheritance, time taken per device is more than an minute.. so for 100
devices.. it needs lot more time than tolerable..

In this context, is there a way Reduce the time of XML parsing/time of
importing of xmls by way of any precompilation such as convert the xml file
in .class files once and use the class files rest of the time etc..
Some thing in lines to pre-compilation of jsp is there any thing for ant xml
files pre-compilation.

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com
-Offshore Mobile Applications Excellence
-- 
View this message in context: 
http://www.nabble.com/Ant-XML-Files-precompilation-tp24846081p24846081.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Fetch properties with name matching to a regular expression

2009-09-01 Thread Raja Nagendra Kumar

Hi,

Does Ant API has any property query mechanism to find the declared
properties either by regular expression value. 

Currently I am looking to read all the properties with name dID,
irrespective of case ie.. did, dId etc..

We could definitely write our own wrapper.. if some thing already exists..
considering to use that.

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com
-Offshore Java Product Services Excellence
-- 
View this message in context: 
http://www.nabble.com/Fetch-properties-with-name-matching-to-a-regular-expression-tp25250557p25250557.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Re: Fetch properties with name matching to a regular expression

2009-09-01 Thread Raja Nagendra Kumar

Thank You Jeffrey.. this is exactly what I am looking far..
-- 
View this message in context: 
http://www.nabble.com/Fetch-properties-with-name-matching-to-a-regular-expression-tp25250557p25252566.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



how to call a predefined target or macroin build.xml from Custom Ant task

2009-09-02 Thread Raja Nagendra Kumar

Hi,

I am looking to call a Macro defined in the project though custom task.
Similarly calling of target.
Both macro and target are defined the build.xml and my java based custom
task should be able to call it with min overhead.. i.e with the same
overhead as calling the macro from build.xml or calling one target from
other either by depends.

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com




-- 
View this message in context: 
http://www.nabble.com/how-to-call-a-predefined-target-or-macroin-build.xml-from-Custom-Ant-task-tp25260761p25260761.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Peformance Task usage from custom task

2009-09-02 Thread Raja Nagendra Kumar

Hi,

Is it possible to set the performance monitoring as described in 
http://antelope.tigris.org/nonav/docs/manual/bk03ch27.html (i.e enable and
disable such data collection) from a custom ant tasks java code.

My need to enable monitoring only during the execution of the custom task
and remove it once that is executed.

Also, I am not interested to change the ant launch time parameters as this
would impact entire build completion and not ideal for our needs.

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com

-- 
View this message in context: 
http://www.nabble.com/Peformance-Task-usage-from-custom-task-tp25260860p25260860.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Re: how to call a predefined target or macroin build.xml from Custom Ant task

2009-09-02 Thread Raja Nagendra Kumar

Hi,

I see there is a way to execut target using getProject().executeTarget()..
but don't find a way to execute the macro. Any pointers pl.

Regards,
Nagendra



-- 
View this message in context: 
http://www.nabble.com/how-to-call-a-predefined-target-or-macroin-build.xml-from-Custom-Ant-task-tp25260761p25263010.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Re: Peformance Task usage from custom task

2009-09-02 Thread Raja Nagendra Kumar

Hi Dale,

Thank you for the pointer.

Tried this in custom ant askgetProject().addBuildListener(new
net.sf.antcontrib.perf.AntPerformanceListener());

this at the end of the build give the below exception..

java.lang.NullPointerException
at
net.sf.antcontrib.perf.AntPerformanceListener.buildFinished(AntPerfor
manceListener.java:62)
at org.apache.tools.ant.Project.fireBuildFinished(Project.java:2037)
at org.apache.tools.ant.Main.runBuild(Main.java:778)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

Not sure what else needs to be added..


Dale Anson wrote:
> 
> From a custom task, you have access to a Project object, which has
> both add and remove build listener methods, which means you should be
> able to add and remove listeners on the fly.   I haven't tried this,
> but I don't see why it wouldn't work.
> 
> Dale
> 

-- 
View this message in context: 
http://www.nabble.com/Peformance-Task-usage-from-custom-task-tp25260860p25263224.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Re: AW: how to call a predefined target or macroin build.xml from Custom Ant task

2009-09-03 Thread Raja Nagendra Kumar

Thank You Jon, this rocks..

instead of createTask() every time, is there a way to reuse the already
existing one (either may be created by xml files or with in other script
file..)

Not sure how memory and cpu intesive is createTask() specially when it is
for loop (in our case this macro is run many times).

Regards,
Raja Nagendra Kumar
TejaSoft


-- 
View this message in context: 
http://www.nabble.com/how-to-call-a-predefined-target-or-macroin-build.xml-from-Custom-Ant-task-tp25260761p25271525.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Re: AW: Peformance Task usage from custom task

2009-09-03 Thread Raja Nagendra Kumar

Nope Jan..

On making such correction it giving error in  line  188

i.e the line 
StopWatch sw = ( StopWatch ) targetStats.get( be.getTarget() );

of targetFinished()..

It appears to me that AntPerformanceListener or the interface BuildListener
is not custom tag friendly.. 

Some of the things I see from the interface are.. they are meant for
printing the report of entire build and not between when it is added and
when it is removed..

I saw some where SubAntListener etc.. which means not sure impact of calls
antcall and ant and subant tags usage..

May be it would be nice to put  AntPerformanceListener  or BuildListener 
towards TaskPerfListener level rather than entire build level..


Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com



-- 
View this message in context: 
http://www.nabble.com/Peformance-Task-usage-from-custom-task-tp25260860p25271781.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



OS Independent file strings in resourcecollections

2009-09-17 Thread Raja Nagendra Kumar

Hi,

I am using ResourceCollections such as Union etc. However when ever I
iterate, I am seeing the file names be as per the OS conventions. 
e.g if the file on windows matches to the collections and it is located in 

f:\work\nag\test.txt

the the union iterator gives it as f:\work\nag\test.txt and not as
f:/work/nag/test.txt.

due to this my name matching , using restrict etc are failing. as my match
pattern uses / instead of \ for os independency.

In this context, is there a way to tell the ant to use always OS independent
file path separator..

Regards,
Nagendra
www.tejasoft.com




-- 
View this message in context: 
http://www.nabble.com/OS-Independent-file-strings-in-resourcecollections-tp25486284p25486284.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Re: OS Independent file strings in resourcecollections

2009-09-17 Thread Raja Nagendra Kumar

Hi Stefan as suggested I have filed the issue and the same is found at

https://issues.apache.org/bugzilla/show_bug.cgi?id=47858

Regards,
Nagendra
-- 
View this message in context: 
http://www.nabble.com/OS-Independent-file-strings-in-resourcecollections-tp25486284p25489409.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



SubAnt performance

2009-09-24 Thread Raja Nagendra Kumar

Hi,

Currently I see  is launching new ant even if the build file is same
as the current one being executed.

Would it not be more fast to excute the target in the current ant process it
self, provided build file and directory are same.

Regards,
Nagendra
-- 
View this message in context: 
http://www.nabble.com/SubAnt-performance-tp25605193p25605193.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Re: SubAnt performance

2009-09-24 Thread Raja Nagendra Kumar

>isolation between the calling and thecalled project.

stefan, it is true of inherit* properties, however here are some scenarios 

1. The developers may want to call clean, startTomcat... etc and some other
targets from root to all the sub directories. However module developers are
more interested in current module only (as there would be no sub build.xml
files any way)
2. the inherit properties are set to true only and isolation is not a
concern in such scenario.

I know does complicate subant to be little context aware.. but if there are
no side effects as in the above context,  it could boost performance
specially what if many targets are called using subant way.


Regards,
Regards,
Nagendra
-- 
View this message in context: 
http://www.nabble.com/SubAnt-performance-tp25605193p25606351.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Re: SubAnt performance

2009-09-25 Thread Raja Nagendra Kumar

>Then I'd think subant is the wrong task in that context.  I don't
> understand why you'd be calling subant "on yourself" anyway.

we have a target like 'clean' which deletes current directories 'build'
folder and calls all the sub directories clean target. The sub directories
build build file calls the same clean target..

the clean targets is impl. some thing very similar to recursions with
different directory roots sets by subant.

Regards,
Nagendra  
-- 
View this message in context: 
http://www.nabble.com/SubAnt-performance-tp25605193p25622292.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Performance of Ant Move

2009-09-25 Thread Raja Nagendra Kumar

Hi,

We are observing ant move is way too much time for directory renaming with
contents more than 100mb.

How efficient is move for rename of directory names with the same parent.

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com
-- 
View this message in context: 
http://www.nabble.com/Performance-of-Ant-Move-tp25622347p25622347.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Expression lanauge for ant

2009-09-26 Thread Raja Nagendra Kumar

Hi,

Is any one aware of any good expression language to be used in ant custom
tasks.. is there one already.. if not could any one suggest a good one of
the ones at http://java-source.net/open-source/expression-languages..

We want this expression language to be useful in many contexts inlcuding
plain java, custom ant and other web applications (I am aware of jsp el for
web applications).

We are looking for somthing unversal at base and all others are built on
this unversal one.. as extensions and it should be easy to learn and well
supported opensource.

Regards,
Nagendra
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com
-- 
View this message in context: 
http://www.nabble.com/Expression-lanauge-for-ant-tp25631105p25631105.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



project.replaceProperties()

2009-09-27 Thread Raja Nagendra Kumar

In a custom task, when using replaceProperties() method is replacing the all
the properties, including those does exist. For properties which does not
exist, it replace them with null. Would it be possible to control not to
touch upon those properties which does not exist.

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com
-- 
View this message in context: 
http://www.nabble.com/project.replaceProperties%28%29-tp25631397p25631397.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Re: project.replaceProperties()

2009-09-30 Thread Raja Nagendra Kumar

Stefan, you are correct.. We did make few modifcations to ant source and this
has side effect else where..

We are trying to support multiple property references resolutions with in a
string some thing like this..

Project p = getProject();
p.setProperty("nagrama", "nagiest");
p.setProperty("n", "nag");
p.setProperty("m", "rama");
p.replaceProperties("${${n}${m}}")//${${n}rama}
p.replaceProperties("${${m}${n}}") //${${m}nag}
p.replaceProperties("${${n}${m}${n}}")//${${n}ramanag}
p.replaceProperties("${nag${m}}")//${nag${m}}
p.replaceProperties("${nag${m}${n}}")//${nag${m}nag}
p.replaceProperties("${nag${m}${n}${m}}")//${nag${m}nagrama}
p.replaceProperties("${nag${m}${${n}${m}}}")//${nag${m}${${n}rama}}

the one in comments is current behaviors in original ant code.
Pl. observe that there is misbehavior of replace properties.. i.e 2nd one
gets replaced but not the first one..

May be it would be nice for properties and replaceProperties to support such
multi level property resolutions.

We are seeing such need to define the properties based on the module id,
this helps in writing macros and custom tasks based generic property names.

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com










Stefan Bodewig wrote:
> 
> On 2009-09-27, Raja Nagendra Kumar  wrote:
> I haven't tested this but I'm pretty sure replaceProperties("${foo}")
> returns "${foo}" if there is no property named "foo", doesn't it?
> 

-- 
View this message in context: 
http://www.nabble.com/project.replaceProperties%28%29-tp25631397p25676498.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Re: project.replaceProperties()

2009-09-30 Thread Raja Nagendra Kumar

Nice to know that good changes happening in the next release of ant.

Thank you Stefan.

Regards,
Nagendra

-- 
View this message in context: 
http://www.nabble.com/project.replaceProperties%28%29-tp25631397p25677980.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Javac or a New Task (ClassSourceCopy) with Source Files Copy option

2009-10-02 Thread Raja Nagendra Kumar

In the world of internet and pressure to reuse as much as possible, there is
a need for able to copy only the files which were used to generate the class
files.

In a declarations like this











 










The sourcepath would result in compile the needed sources as used by the
files defined in src.
This approach would mean lesser classes and hence jar size. However, for
version management and reference and for back up, one needs to store all the
files including all sources as defined in sourcepath. For a SME's where
every thing matter including to be more simple backup, we see the need for
having only the copy the sources which are used and not all the sources
which are not used by this compile.

Seeing such generality need, thought of putting across to forum if it is
nice to have a option for javac to copy the sources which are used. 

I understand ant's javac task does not do this dependency check directory
but the underlaying javac.exe of sun does this.

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com
-- 
View this message in context: 
http://www.nabble.com/Javac-or-a-New-Task--%28ClassSourceCopy%29-with-Source-Files-Copy-option-tp25712826p25712826.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



doFileOperations() and doResourceOperations in Copy task impl.

2009-10-17 Thread Raja Nagendra Kumar

Hi,

I see two methods doFileOperations and doResourceOperations copy task. What
is the difference between these two methods. How does Resource and File
Operations differ.

Our need in looking to this is to customize copy so that every file copied
would be replaced with all the ant properties in case the file has reference
to ant properties.

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com
-- 
View this message in context: 
http://www.nabble.com/doFileOperations%28%29-and-doResourceOperations-in-Copy-task-impl.-tp25940536p25940536.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Re: Feature Request - Executor setting though the script

2009-11-05 Thread Raja Nagendra Kumar

Woh..

Ant seems to have most of what we are looking for..
Your suggestion works.. small change was the name of the attribute was
classname instead of class










This takes care of it. 

Stefan, when we supply it as ANT_ARGS, we used 'ant.executor.class' instead
of 'ant.executor' .. Not sure why such difference.. 

Stefan, is this approach works with all other ANT_ARGS, such as -listener 
etc.. if yes, could you let me know how to find the respective id name.
Trying to get to know org.apache.tools.ant.Main better.

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com



-- 
View this message in context: 
http://old.nabble.com/Feature-Request---Executor-setting-though-the-script-tp26208582p26226565.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Ant properties access based Object notation rather than script based

2009-12-07 Thread Raja Nagendra Kumar

Hi,

My thoughts are still vague.. thought to share this with ant dev and making
it better based on all your reply..

Currently I see the toughest thing in managing the huge ant scripts is
remembering property names and referencing to them.

The issues I see are 
1. properties can be declared though  tag which are global and
readonly nature. Global nature has huge impact on choosing the names. To an
extent we could control to this though names such as compile.classpath etc..
i.e using the . as seperator
2. Many properties could also be declared though  custom tasks
Many new properties may be declared through java interfaces constants..
however one has to remember their names when referred with in ant script.
Many chances are there that the name may get changed in interface value but
not in script.

In this context was thinking is there a way/or think of a new feature to
declare ant properties as interface constants/enums in java and refer them
through the interface only.. many be though class import and referring them
directly (not using the 

Re: Ant properties access based Object notation rather than script based

2009-12-07 Thread Raja Nagendra Kumar

Wow.. good to know about adding of Custom property definition and resolution
features in the 1.8.x..

Stefan, are there any time line for 1.8.. I see many people asking the same
thing but no clear answer we see.

Regards,
Nagendra
-- 
View this message in context: 
http://old.nabble.com/Ant-properties-access-based-Object-notation-rather-than-script-based-tp26688713p26689170.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Re: Ant properties access based Object notation rather than script based

2009-12-09 Thread Raja Nagendra Kumar

Tried to use this feature of nightly build of ant 1.8 and understand that
still there is a issue in custom tasks.

Is there a replacement for  Variable task of ant contrib as Variable task is
not adopted to ant 1.8 Property helpers and hence the interface methods are
not called yet.

Regards,
Nagendra
-- 
View this message in context: 
http://old.nabble.com/Ant-properties-access-based-Object-notation-rather-than-script-based-tp26688713p26708490.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Re: Ant properties access based Object notation rather than script based

2009-12-09 Thread Raja Nagendra Kumar

true, project.setProperty() does allow overides and setNewProperty() is read
only/set only once method.

Regards,
Nagendra
-- 
View this message in context: 
http://old.nabble.com/Ant-properties-access-based-Object-notation-rather-than-script-based-tp26688713p26722475.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Re: Naming of target-group

2009-12-19 Thread Raja Nagendra Kumar

How about some thing like

 

or 




-- 
View this message in context: 
http://old.nabble.com/Naming-of-target-group-tp26844828p26854047.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Re: [VOTE] name for target-group

2010-01-04 Thread Raja Nagendra Kumar

 and 

It is good not have  '-' is not a general convention in ant tasks.

regarding the alternate syntax of 

may have impact in future, if in future one may have macrogroup or other
groups etc.. better way for the same with future proof would be



Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com


Martijn Kruithof-2 wrote:
> 
> I would be in favour of using
> 
>  and  or even
>  and 
> the dash in the name is not something we usually do in ant
> 
> Martijn
> 
> Antoine Levy Lambert wrote:
>> Hi,
>>
>> I would like to start a formal vote on the name of target-group.
>>
>> [ ]  for the group and > ... for the members of the group
>> this is the current codebase
>>
>> [ ]  for the group and > extensionOf="foo" ... for members of the group
>>
>> [ ] others
>>
>> Regards,
>>
>> Antoine
>>
>> -
>> To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
>> For additional commands, e-mail: dev-h...@ant.apache.org
>>
> 
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
> For additional commands, e-mail: dev-h...@ant.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/-VOTE--name-for-target-group-tp26891028p27015357.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



refactoring

2010-04-18 Thread Raja Nagendra Kumar

There are 4 references to the encoding string "ISO-8859-1" in ant source
code.. may be it is good to introduce a constant..

1 in org.apache.tools.ant.filters.ClassConstants
3 in org.apache.tools.ant.util.LayoutPreservingProperties


Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com

-- 
View this message in context: 
http://old.nabble.com/refactoring-tp28281028p28281028.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Iteration of ant properties in the same natural order

2010-04-18 Thread Raja Nagendra Kumar

Hi,

Does ant api has any class, which read ant/java properties files and allows
the iteration in the same order they were present in the original file.

e.g if the properties
a=k
b=c
d=10

etc exists..My iterator for the properties should give me the keys in the
order of a,b,d.. 

I was looking at org.apache.tools.ant.util.LayoutPreservingProperties .. but
does not seem to expose 

Regards,
Nagendra

-- 
View this message in context: 
http://old.nabble.com/Iteration-of-ant-properties--in-the-same-natural-order-tp28281060p28281060.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Refactoring of ant scripts

2010-04-19 Thread Raja Nagendra Kumar

Hi,

It would be great for experts of ant dev, consider enhancements to ant to
make it refactoring friendly.

Some of the thoughts I have here are

1. All the tasks, which has a reference to path/file should support include
patterns as in fileset.
Such support of patterns would enable script writers to choose not to
have absolute paths.
2. Should support referring of ant files's directory (like ant.this.dir or
ant.this.file)
3. All the tasks which need a root directory, can be configured to take
either basedir (could be the default as it is today) or ant.this.dir.

It would nice to capture much more such needs of writing refactoring
friendly needs from others and give a big push to ant tasks design.


Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com
-The Java Code Audit Experts 'We Report, You Decide'
-- 
View this message in context: 
http://old.nabble.com/Refactoring-of-ant-scripts-tp28287801p28287801.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



JavaDoc and API matching issue

2010-06-04 Thread Raja Nagendra Kumar

Hi 

On reference to task definition of FileList, I see there are only two
attributes dir and files. However, below it talks about id and refid too.

http://ant.apache.org/manual/Types/filelist.html

In the API I don't see any setId() method at all and setRefid() method is
deprecated.

I am looking for setId() method to use it in my custom ant task. 

The api I am using is in package org.apache.tools.ant.types.FileList;


Could any one help where is the gap pl.

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com
-- 
View this message in context: 
http://old.nabble.com/JavaDoc-and-API-matching-issue-tp28778760p28778760.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Re: JavaDoc and API matching issue

2010-06-04 Thread Raja Nagendra Kumar

Thank you.
-- 
View this message in context: 
http://old.nabble.com/JavaDoc-and-API-matching-issue-tp28778760p28780688.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Force all location properties to be resolved in Unix Style

2012-06-11 Thread Raja Nagendra Kumar
Hi,

Is it possible for ant location property to be resolved or echoed always in
unix style path seperator.. irrespective of os on which ant is used..

e.g

 

 

should print c:/java/portals/liferay/vers/

when this script is run in windows os too..

Basically every reference of ant property with paths should use separator /
rather than os specific one..

Is that possible through some global property


Regards,
Raja Nagendra Kumar
C.T.O
www.tejasoft.com

--
View this message in context: 
http://ant.1045680.n5.nabble.com/Force-all-location-properties-to-be-resolved-in-Unix-Style-tp5713314.html
Sent from the Ant - Dev mailing list archive at Nabble.com.

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



import ask to support path structures

2008-03-29 Thread Raja Nagendra Kumar

It may be a good value, if import supports fileset or any path structures to
disover list of files it needs to import.

e.g






Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com
-- 
View this message in context: 
http://www.nabble.com/import-ask-to-support-path-structures-tp16378253p16378253.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Ant Jar doubt

2005-04-12 Thread Raja Nagendra Kumar
Hi,

When ever we jar I see in the manifest 'Ant-Version: Apache Ant 1.6.2' this
line. Could any one tell me how to avoid this. And also I want to put few
properties of mine in a way the squence of these properties are maintinated
in manifest. My observation here is sqence is altered.

Thank you in advance

Regards,
Nagendra


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Ant Jar doubt

2005-04-12 Thread Raja Nagendra Kumar
Hi,

Thanks for the reply. My reply in-line


- Original Message - 
From: "Steve Loughran" <[EMAIL PROTECTED]>
To: "Ant Developers List" <[EMAIL PROTECTED]>
Sent: Tuesday, April 12, 2005 4:41 PM
Subject: Re: Ant Jar doubt


> Raja Nagendra Kumar wrote:
> > Hi,
> >
> > When ever we jar I see in the manifest 'Ant-Version: Apache Ant 1.6.2'
this
> > line. Could any one tell me how to avoid this.
>
> I dont know if there is a way to do this (yet)
>

Is there any custom tasks written by any one which could be used for this
purpose.


> > And also I want to put few
> > properties of mine in a way the squence of these properties are
maintinated
> > in manifest. My observation here is sqence is altered.
>
> I dont believe that code should depend on the order; its part of the
> manifest specification. We'd only be encouraging bad practices if enabled.

This is because, my client (J2ME Game publisher) is asking for this order..
Any case why should the oder be manipulated by the jar command. Why does it
not take the things in way it has been provided ..

Regards,
Nagendra

>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



instert or append a new line using replace task

2005-05-25 Thread Raja Nagendra Kumar
Hi All,

I am looking for a solution on how to add a new line to existing file as a
fall back approach I want to use replace as below to add the new line
Enable-Cheat-Codes: true

But \n in the new replaced string is not interpreted as new line. Any help
please..




or

 
 


Regards,
Nagendra


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]