Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] Providing alternative "root dependencies" for the project


On Sep 24, 2011, at 2:33 AM, Laurent PETIT wrote:

2011/9/24 Jason van Zyl <jason@xxxxxxxxxxxx>
Take a look at this for ideas:


Specifically the Clojure work:


What you want is probably already implemented on the Maven side.


Hello Jason, thanks for the links.
I'll look at them again, but I was already aware of these. So maybe I don't understand what you're implying.

To restate my problem more briefly : is it possible to have m2e work with something else than a pom.xml file for loading the pom in memory ? Can I replace the loading of the pom in memory with my own "strategy" in m2e ?


That is what you would use to use a pom.clj to create a org.apache.maven.model.Model. m2e uses Maven's internals to load models. To load any source into an org.apache.maven.model.Model you would create a ModelReader and there's an example exists:


The ModelReader and ModelWriter are the place the start.

m2e works with Models internally, but there are no editing facilities for anything other than a pom.xml files and some changes would have to be made in m2e to make this work generally. There's no facility to incorporate models coming from alternate sources at the moment.

 

On Sep 23, 2011, at 7:15 PM, Laurent PETIT wrote:

Hello,

Is it possible to extend/reuse m2e so that root project dependencies could be provided by an extension of mine ?

I'm thinking of the best way to reuse m2e from not a pom.xml file, but from a leiningent's project.clj file.

Granted, some features of m2e will make no sense (esp. the pom editors, the maven goal launchers), but all the machinery which is only driven from the contents of pom.xml in their AST form could potentially be reused if I'm able to load from not a pom.xml file, but a project.clj file, no ?

I've searched through the existing "*maven" extension points, without success, so far.

I know I could go ahead with just using Aether for my own feature independent of m2e, but in the end I would en up rewriting lots of supporting code e.g. in the GUI area, for user options (one example among others: support for user configurable "force check of remote repositories for SNAPSHOT deps" option, etc.).


I am asking here if you think it is a reasonable expectation for me to think what I want to achieve is feasible ; and if so, if you could help me start by givin me some advices.

Thanks in advance,

-- Laurent Petit
_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-dev

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
http://twitter.com/jvanzyl
---------------------------------------------------------

There's no sense in being precise when you don't even know what you're talking about.

 -- John von Neumann




_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-dev


_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-dev

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
http://twitter.com/jvanzyl
---------------------------------------------------------

People develop abstractions by generalizing from concrete examples.
Every attempt to determine the correct abstraction on paper without
actually developing a running system is doomed to failure. No one
is that smart. A framework is a resuable design, so you develop it by
looking at the things it is supposed to be a design of. The more examples
you look at, the more general your framework will be.

  -- Ralph Johnson & Don Roberts, Patterns for Evolving Frameworks 



Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
http://twitter.com/jvanzyl
---------------------------------------------------------

In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.

  -- Jacques Ellul, The Technological Society




Back to the top