aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes How to get rid of messages like Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "How to get rid of messages like " Trying to override old definition of task MarkStart " " Watch "How to get rid of messages like " Trying to override old definition of task MarkStart " " New topic
Author

How to get rid of messages like " Trying to override old definition of task MarkStart "

Naveen Kellaka
Greenhorn

Joined: Dec 03, 2008
Posts: 5
Hi,

I am new to ant tool. I got some kind of strange msgs while running ant command.

Trying to override old definition of task PresetForSql
Trying to override old definition of task MarkStart
Trying to override old definition of task MarkEnd
Trying to override old definition of task RunSql
Trying to override old definition of task DropIndexes
Trying to override old definition of task RunSp
Trying to override old definition of task TruncateTable
Trying to override old definition of task UpdateStatistics
Trying to override old definition of task CreateDdl
Trying to override old definition of task CreatePerm
Trying to override old definition of task CreateDdlInstall
Trying to override old definition of task DeploySourceView
Trying to override old definition of task Bcp
Trying to override old definition of task RestoreIndexes
Trying to override old definition of task LoadFromFile
Trying to override old definition of task UnloadTable
Trying to override old definition of task LoadInternalTable
Trying to override old definition of task GetTableList
Trying to override old definition of task UnloadTableList
Trying to override old definition of task Archive
Trying to override old definition of task Extract
Trying to override old definition of task NetBackup
Trying to override old definition of task NetRestore
Trying to override old definition of task SqlFlatExcel
Trying to override old definition of task SqlXYExcelReport
Trying to override old definition of task QueryCycle



I found these messages when I started using <antcallback> tag in my build file.

Are these warnings???

The reason for using <antcallback> in my build file is to get the property values that are set in the calling target present in another build file are to be obtained and used in the called target in the current build file.

Please provide me a solution to get rid of these kind of messages or suggest me any way of getting property values that are set in the calling target to be obtained in the called target using <antcall> tag while running ant...

Thanks in advance.

Regards,
Naveen
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

I do not see antcallback as one of the task available in Ant. Is this task from an extension package that you installed? Also, I think that all of the tasks mentioned are from optional packages, and not from ant itself.

Anyway, I think that the issue is that if you are re-processing your build.xml (essentially what the antcall task does) that the second time through when it is reloading the optional tasks, it gives these warnings/notifications. Without knowing the reason for using antcallback, and knowing how the build file is structured, it would be hard to say what you could do other than to learn to live with this message.


JBoss In Action
Naveen Kellaka
Greenhorn

Joined: Dec 03, 2008
Posts: 5
Thanks for your reply.
Basically <antcallback> comes from ant-contrib.jar file. Is it not fine working with this jar??
Its not mandatory for me to work with only <antcallback> in my application.

Please suggest me the way how to get the values of properties set in the calling targets of other build file to the called target in the current build file whether by using <antcall> or by any other means without getting these kind of warning messages. This is my actual requirement.

If possible provide me any example.

Regards,
Naveen
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

I have no problem with using ant-contrib, I use it myself. But you never mentioned it - if you are using any Ant plugins you should mention them in your post to help those who would help you.

As I stated earlier, these messages probably come about because your build script is loading external tasks. One way to avoid the messages is to move the loading of the external tasks into a target, and to run that target only from the parent build and to not run that target as part of the antcallback.
Naveen Kellaka
Greenhorn

Joined: Dec 03, 2008
Posts: 5
Thanks for your reply.
Please suggest me how to get the property values those are set in the target of the calling build file(callingbuild.xml) to the called biuld file(calledbuild.xml) so that these properties can be used in the calledbuild.xml when using <ant> task.

Provide me any example if possible.
Nick Boldt
Greenhorn

Joined: Apr 04, 2010
Posts: 1
Recently solved this problem. See blog here:

http://divby0.blogspot.com/2010/04/cleaner-ant-build-logs-get-rid-of.html

Hope it helps!

Nick
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Hi Nick and welcome to Javaranch!


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get rid of messages like " Trying to override old definition of task MarkStart "