gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leo Simons <m...@leosimons.com>
Subject Re: gump3 and Maven
Date Wed, 06 Apr 2005 08:22:58 GMT
On 06-04-2005 02:45, "Brett Porter" <brett.porter@gmail.com> wrote:
> Hi,

Hi Brett!

> I was reminded of Gump and Maven metadata this morning, and with all
> the gump3 activity thought I would check in.

:-D. Nice to hear from you. How's maven2 progressing? I was kinda hoping
we'd be hearing something about it at AC Europe...

> I haven't been completely across the gump3 plans, but was wondering
> what plans there are for a couple of things:
> 
> - using Maven IDs. Last Leo and I said on this was...
> http://mail-archives.eu.apache.org/mod_mbox/gump-general/200501.mbox/%3cBE0706
> 2E.1BDFB%25mail@leosimons.com%3e

Well, it's still the plan IMO. This is something I feel deserves fixing on
the "metadata" side of things more than in the code.

> - being able to read Maven POMs as well as gump descriptor files
> (IIRC, Stefano suggested this would be a good idea last year)

I've already got hooks in the code to make that happen. At some point in the
feature I want to extract all the logic from the maven gump plugin and
transform that into a nice little bit of python code (I don't really want to
write a jelly-to-python bridge :-D).

> I can offer moral support and design decisions if necessary

Both are most welcome! Anything on your mind?

Basically the way the code is layed out right now, we have a "Normalizer"
python class 
(http://svn.apache.org/asf/gump/branches/Gump3/pygump/python/gump/engine/mod
eller.py) that at some point needs to walk a huge DOM tree and convert
everything that looks like a maven POM into the gump OM equivalent.

>, just not
> coding due to bandwidth, and having to learn Python, as always. I can
> possibly write a generator for a python script to read a POM and
> populate a data model from the Maven model definition (which we now do
> with the Java code), allowing the parsing of Maven 1.0, Maven 2.0 and
> any later versions of the POM.

That sounds real cool! Where I'm at now is that we get something like

<workspace>
  <projects>
    <project type="maven" href="some/where/project.xml"/>
  </projects>
</workspace>

Which becomes

<workspace>
  <projects>
    <project type="maven">
       <!-- maven pom here -->
    </project>
  </projects>
</workspace>

And basically the relevant DOM statements that do the transformation need to
be inserted into a method named something like
transformMavenPomsIntoGumpForm(workspaceDomRoot).

If you don't feel like python, that could happen in any other language: the
dom is the same everywhere, and the same holds true for iterations if/else,
etc. I'd have no trouble converting it :-D. If you do feel like trying a
little python I can create the stub testcase 'n everything so most of the
tricky bits get out of your way.

Sounds like fun? If so I should probably get to work on a demo workspace to
detail the above. I think I started on it already somewhere...


Cheers,


Leo



---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


Mime
View raw message