Using antrun is not Maven 

________________________________

Curt Yanko | Continuous Integration Services | UnitedHealth Group IT 
Making IT Happen, one build at a time

-----Original Message-----
From: Kenneth McDonald [mailto:[email protected]] 
Sent: Tuesday, October 12, 2010 8:36 PM
To: Maven Users List
Subject: maven is a swamp

Yes, I realize this is flamebait, but after trying to puzzle out the
following maven plugin:

            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.6</version>
                <executions>
                    <execution>
                        <phase>deploy</phase>
                        <id>deploy-gh-pages</id>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <property name="gh-pages-dir"
location=""/>
                                <exec executable="git"
dir="${gh-pages-dir}">
                                    <arg line="add ."/>
                                </exec>
                                <exec executable="git"
dir="${gh-pages-dir}">
                                    <arg line="commit"/>
                                </exec>
                                <exec executable="git"
dir="${gh-pages-dir}">
                                    <arg line="push origin gh-pages"/>
                                </exec>
                            </target>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

I simply can't resist. Whoever in their right mind decided software
developers to think that requiring other developers to write config
files in XML was a proper decision?

Python, Ruby, and (yes even Perl) have had had much more elegant and
concise ways of managing complex data structures for years now. And
there's a reason JSON has become so popular--primarily because XML is
not, and was never intended to be, a format for developers to write
specifications in.

Let's take a look at the most obvious of the problems in the above:

                                <property name="gh-pages-dir"
location=""/>
                                <exec executable="git"
dir="${gh-pages-dir}">
                                    <arg line="add ."/>
                                </exec>
                                <exec executable="git"
dir="${gh-pages-dir}">
                                    <arg line="commit"/>
                                </exec>
                                <exec executable="git"
dir="${gh-pages-dir}">
                                    <arg line="push origin gh-pages"/>
                                </exec>

Now, I'm still very new to maven, but it strikes me that what the above
is saying is (in Pythonic code, but feel free to convert to your own):

import git
gh-pages-dir = ""
git(dir=gh-pages-dir, "add .")
git(dir=gh-pages-dir, "commit")
git(dir=gh-pages-dir, "push origin gh-pages")

I'm sure there are errors in the translation--but I'm equally sure that
if these errors were corrected, they would not substantially alter the
ratio of XML to Pythonic code. Ruby and even Perl would do just as well.


So here's a challenge to the (very intelligent) folks at apache. Open
your minds to the fact that XML is not only the Final Solution, but
isn't even close to the best solution, and start producing some products
that are configurable without an entire manual in front of oneself. I
realize that arriving at an optimal solution is not really possible, but
XML is so suboptimal as to beggar belief.

I am just so sick of using crappy "solutions" (read: XML) layered over
top of what could be good solutions.

Sorry, had to vent. Who knows, maybe it'll do some good?

Ken McDonald


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


This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity
to which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified
that any dissemination, distribution or copying of this e-mail is
prohibited. If you have received this e-mail in error, please notify the
sender by replying to this message and delete this e-mail immediately.


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

Reply via email to