Re: Commons Configuration Ant Task(s)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Commons Configuration Ant Task(s)

Moran Ben-David
Oliver,

I didn't have a chance to reply to this message previously.  I lost it in my
mail client (too many emails in the day I will blame).  I fished this out
from an archive luckily.  So forgive the late reply.

>>4. Is this the right list to discuss such bridges between commons-conf
>>and ant?

>For the configuration side yes (this list or the commons-dev list if
>discussion drifts to technical details). But thinking about it, what you
>suggest seems to be an enhancement for ant rather than one for commons-
>configuration, right? So maybe you should check out the ant mailing lists.

Good point.. I'll try and contribute this to the Ant-Contrib project.

I guess as Ant becomes more ubiquitous, we'll see more frameworks starting
to include ant tasks themselves.  For example, the way tomcat offers Tomcat
specific Ant Tasks with the Tomcat codebase (maybe I'm wrong in that).

Thanks,
Moran Ben-David


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Commons Configuration Ant Task(s)

Jacob Kjome
At 10:36 AM 8/17/2005 -0400, you wrote:
 >Oliver,
 >
 >I didn't have a chance to reply to this message previously.  I lost it in my
 >mail client (too many emails in the day I will blame).  I fished this out
 >from an archive luckily.  So forgive the late reply.
 >
 >>>4. Is this the right list to discuss such bridges between commons-conf
 >>>and ant?
 >

This might be useful, but have you looked at <xmlproperty>?
http://ant.apache.org/manual/CoreTasks/xmlproperty.html

It does a lot of what commons-configuration would do.  In fact, there are
certain things about <xmlproperty> that appeal to me over
commons-configuration such as the ability to treat attributes the same way
as the elements themselves.  For instance...

<xmlproperty
     file="props.xml"
     collapseAttributes="true"
     keepRoot="false"
     semanticAttributes="true"/>


<url ant="http://ant.apache.org/"/>

is equivalent to

<url>
     <ant>http://ant.apache.org/</ant>
</url>

When I reference this property elsewhere, I don't have to worry about
whether I defined "ant" as an attribute or an element.  I just reference it
as ${url.ant}.  This is because of collapseAttributes="true".  I would
think this would be a decent commons-configuration enhancement,
no?  commons-configuration shines in being able to reference individual
items in a collection rather than as a comma-delimited list as
<xmlproperty> would generate.  But I haven't found a need for this within
Ant as of yet.

There are a few other things more Ant specific such as semanticAttributes
that are nice to have in the Ant environment as well.  Anyway, my point is,
make sure that you've exhausted the solutions that Ant provides before
running off and writing tasks that might very well do exactly the same
thing, or at least an equivalent that you could live with.

Jake

 >
 >Thanks,
 >Moran Ben-David


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Commons Configuration Ant Task(s)

Emmanuel Bourg-3
In reply to this post by Moran Ben-David
Moran Ben-David wrote:
> I guess as Ant becomes more ubiquitous, we'll see more frameworks starting
> to include ant tasks themselves.  For example, the way tomcat offers Tomcat
> specific Ant Tasks with the Tomcat codebase (maybe I'm wrong in that).

Interesting task Moran, I would suggest putting a reference to it in the
wiki of Commons Configuration.

Emmanuel Bourg

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]