geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <>
Subject Re: [PROPOSAL] Indent 2 spaces in xml and vm files to match more common usage, especially maven.
Date Fri, 14 Mar 2008 07:04:13 GMT

On Mar 13, 2008, at 10:49 PM, Jason Dillon wrote:

> On Mar 14, 2008, at 8:39 AM, Alan D. Cabrera wrote:
>> -0
>> I find 2 space indenting difficult to read.
> This is one reason why I'm -1.

I do too, but after dealing with trying to compare our files to maven  
2 space indented files I consider that an infinitesimal price to pay  
for the enormous advantage of consistence with the model build system.

>>> - in genesis geronimo-skin we have a site.vm file that is a  
>>> slightly modified copy of the default .vm file from doxia- 
>>> sitetools.  Trying to update it or compare it with different  
>>> indents is quite an experience.
> I made many modifications to the site.vm, so I don't really  
> understand why anyone would want to diff it to the original.

maybe to find out what you changed?  I could detect only one change,  
which i don't understand the reason for -- adding a table to the menu  
column.  What does that do?

When I tried working on it to generate a couple sites, it didn't seem  
to be working as well as the default skin, so to try to investigate I  
compared it to the default.  The only difference I could find was the  
table, so I reverted the other parts to copy the default so the next  
person to encounter this particular hell wouldn't have so much work  
to do.

Having a copy is bad enough without reformatting it so its really  
hard to tell how it was changed.

>> I'm not terribly familiar w/ site generation.  I was under the  
>> impression that we leave cookies by the wiki and elves make it.  :)
>> Could we not just reformat the site.vm file to have 4 space indents?
> Well that is what I did... but David is trying to diff it against  
> the original ste.vm for some reason, which comes from Maven and is  
> 2 space indented.

because it didn't appear to be working right and I was trying to find  
out how it was different from the default as a clue about why.
>>> - maven archetypes pop out xml with 2 space indenting, and maven  
>>> xml has 2 space indenting.  Re-indenting our stuff any time you  
>>> run an archetype or borrow some configuration from maven is a  
>>> nuisance that frequently is ignored and again the spacing  
>>> difference makes comparison quite difficult.
>> For those of us sensible enough to use IntelliJ, alt-cmd-L makes  
>> our world tidy.  Maybe we could get the archetype generator to  
>> take the number of spaces for an indent as a configuration parameter?
> IMO the archetype plugin needs to have this... as I know many folks  
> that don't care for 2 space indented xmls.  If needed though we can  
> whip up a reindenter in groovy quite easily.

I'm not sure us making maven more complicated is a long-term solution  
to this problem.  There are plenty of problems with the archetype  
plugin, I'm not sure making modello generated xml output pretty  
printed is one of the more pressing.
> * * *
> IMO changing our XML indent from 4 to 2 spaces just because Maven  
> uses a 2 space indent is not a hot idea... and I'm still a strong  
> -1 on the matter.

How do you reliably do a diff between 4 and 2 space indented files  
and get a real result of actual non-whitespace differences?  Emacs  
doesn't work, it usually flakes out halfway through the file for no  
reason I can discern.  How do you do this without spending hours  
finding the right tooling every time you need to do it?

david jencks

> --jason

View raw message