On Apr 4, 2010, at 9:31 AM, Max Bowsher wrote:

Christian Edward Gruber wrote:
I wouldn't try to fill it in to use maven-eclipse-plugin - you need far
less to make m2eclipse work

I've not used m2eclipse, but I don't understand how the above can be
true: all you need for the maven-eclipse-plugin is a correct listing of
dependencies and the correct source directories, which m2eclipse must
surely require too.

Sorry - I wrote this in a flu fever... clearly mis-read. Yes, as far as a full dependency list, you would need that. Re-phrased to what i mean... m-e-p creates eclipse project files which are then separate from the pom.xml file. m2eclipse is an eclipse plugin which lets it understand maven, and use maven's embedded system for dependency resolution, so your project is always based on the pom.xml - change that, it alters your eclipse environment automagically. No keeping things in sync.

Often, in fact, it means that I literally just check out a project, use "import" in eclipse, and it all pulls in with all modules becoming different projects, magically working together. Also, m2eclipse lets eclipse's proejcts short-cut the dependency graph, so if you have A-1.0-SNAPSHOT and B-1.0-SNAPSHOT both in the workspace, then B's dependency on A is satisfied by the in-memory workspace version in eclipse, not the local repository. This means you can edit A, and B will see it without a maven recompile. Very good for rapid development of complex component interactions.


(I had a pom working last year, I can maybe
dig it out).

I've got it working myself already. My random playing around with the
POMs is in a Bazaar branch at https://code.launchpad.net/~maxb/guice/ dev .

Sweet. I'd definitely appreciate having that in head. I keep re- doing it every time I pull out guice.

But yeah, I wouldn't try to use ant-run... better to make
a maven build work, then use ant's maven tags to use m2 to resolve
dependencies/download-jars, but keeping all that metadata in the pom.xml.

I don't really understand quite what you're suggesting, but to start
with I'll be happy if I can just get to the point where I can use Maven
to set up Eclipse project files.

Much like m2eclipse lets you use the pom.xml for project metadata, there are ant tasks which let you load a pom.xml and it creates filesets that you can use in your ant build rules. So you can have an ant-based build which doesn't require that you store the .jar files in a /lib folder, and which, if you change the depenedencies, will just download them as needed, because it uses the embedded maven pieces to handle some of that metadata. Even in places where I wanted just an ant build I've done that, because maintaining dependencies in one place is way easier than in many places. Also this is good for people who really like maven's dependency management, but hate it as a build tool, because of all the plugin configuration. They can make an ant build but get the benefits of that powerful feature.

cheers,
Christian.




--
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-guice?hl=en.

Reply via email to