You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Muralidhar Manku <mu...@gmail.com> on 2009/04/08 16:28:46 UTC

Custom ANT task

Hi ,

I am a third party custom ant task where it accepts a set of  defined
attributes and provision to pass additional attributes.
<snip>
            checkArgIsNull(applicationName, "applicationName");
            checkArgIsNull(name, "name");
            checkArgIsNull(factoryClass, "factoryClass");
            checkArgIsNull(user, "user");
            checkArgIsNull(password, "password");
            checkArgIsNull(url, "url");
            log(_locHelper.getMessage("createJDBCConnectionPool", name));
            List list = new ArrayList();
            ConnPoolProperty property;
            for(Iterator iterator = m_propertiesMap.iterator();
iterator.hasNext(); list.add(property.m_value))
            {
                property = (ConnPoolProperty)iterator.next();
                list.add(property.m_name);
            }

            deploymentManager.createJDBCConnectionPool(applicationName,
name, factoryClass, user, password, url, list);

</snip>

I have created a build file where i am passing all the required
attributes(applicationName,name,url,factoryClass,user,password) . Now i want
to pass one more attribute call "dbcfile" with some value to task. How can I
do that ? It is expecting a list argument

When i add this new attribute, ant task throwing error attribute not
suppoted.

Please let me know , how can i pass this?



Thanks,

-- 
Muralidhar

RE: Custom ANT task

Posted by Martin Gainty <mg...@hotmail.com>.
who/what is consuming the resource configuration?
Glassfish/WebSphere/Tomcat/Resin?

Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung / Note de déni et de confidentialité 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.






> Date: Wed, 8 Apr 2009 19:58:46 +0530
> Subject: Custom ANT task
> From: muralidhar.manku@gmail.com
> To: user@ant.apache.org; user-help@ant.apache.org
> 
> Hi ,
> 
> I am a third party custom ant task where it accepts a set of  defined
> attributes and provision to pass additional attributes.
> <snip>
>             checkArgIsNull(applicationName, "applicationName");
>             checkArgIsNull(name, "name");
>             checkArgIsNull(factoryClass, "factoryClass");
>             checkArgIsNull(user, "user");
>             checkArgIsNull(password, "password");
>             checkArgIsNull(url, "url");
>             log(_locHelper.getMessage("createJDBCConnectionPool", name));
>             List list = new ArrayList();
>             ConnPoolProperty property;
>             for(Iterator iterator = m_propertiesMap.iterator();
> iterator.hasNext(); list.add(property.m_value))
>             {
>                 property = (ConnPoolProperty)iterator.next();
>                 list.add(property.m_name);
>             }
> 
>             deploymentManager.createJDBCConnectionPool(applicationName,
> name, factoryClass, user, password, url, list);
> 
> </snip>
> 
> I have created a build file where i am passing all the required
> attributes(applicationName,name,url,factoryClass,user,password) . Now i want
> to pass one more attribute call "dbcfile" with some value to task. How can I
> do that ? It is expecting a list argument
> 
> When i add this new attribute, ant task throwing error attribute not
> suppoted.
> 
> Please let me know , how can i pass this?
> 
> 
> 
> Thanks,
> 
> -- 
> Muralidhar

_________________________________________________________________
Windows Live™: Keep your life in sync.
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_allup_1a_explore_042009