Hello Michiel,

I have been playing around for some hours the last weeks with my preferred maven2 build structure. I commited the head to a subversion and started moving the files in the way I wanted it. See http://nico.klasens.net/svn/trunk/mmbase/.

Big advatnages. Simple poms which use the provided mojo's instead of our own. Any level of rhe build can trigger a multimodule build. I creatwd two mojo's. 1 for the INDEX files (copy of yours) and 2 an RemoteGenerator for the rmmci build. A lot is also usable in the current structure, but I would prefer somthing like mine.

Regards,
Nico

Michiel Meeuwissen wrote:
LS,

I've tried to make a maven 2 build for mmbase. That is where all the
'pom.xml' files are aobut.

It was more or less an experiment, based on the initial pom which
Pierre checked in some time ago. I looked into it, because I was
annoyed by the warnings you get when you use a 'legacy' repository in
an maven 2 build, and also a bit by maven 1 itself, and found maven2
actually better. Anyhow, I think it works now. Perhaps other people,
perhaps with more experience with maven2,  are willing to take a look,
and comment on a few choices I've made.

Resulting artifacts can be found a the following repositories:
http://www.mmbase.org/snapshots/org/mmbase/
and
http://www.mmbase.org/maven2/org/mmbase
These directories are not yet regularly updated, but that would be
quite easy to arrange. The second one is quite empty, since no actual
release were built yet.

A few remarks.
- http://www.mmbase.org/maven2/org/mmbase/mmbase-parent/1.9/ is the
'parent' pom for most other poms
- http://www.mmbase.org/maven2/org/mmbase/mmbase-application-parent/
is the 'parent' for applications
- pom of applications extend from mmbase-application-parent. It
arranges how to build a 'war'.
- Application builds also instal/deploy the jar. This is actually a
bit odd, and was a lot harder to arrange than I anticipated. Actually
the idea of maven2 is that every pom produces just one artifact, but
our applications would normally want ot provide two. A jar, which can
be a (compile time) dependency of other applications, but also the
war, in which all templates, jsp-blocks and perhaps (example)
configuration is included.  You would have to place 2 poms for every
application, which seemed to be cumbersome. Now, 1 pom suffices. E.g.:
http://cvs.mmbase.org/viewcvs/applications/mynews/pom.xml?view=markup

- the maven 1 build implemented the 'mmbase-module' artifact. I did
not try to imitate that, since maven 2 support using wars as overlays.
  A war can be constructed from applications like so:
 http://cvs.mmbase.org/viewcvs/all/example-webapp/pom.xml?view=markup
  You simply depend on the correct 'war' and everything sohould be
arranged automaticly.

- To try it out, you can type 'mvn' in any directory where a pom.xml
is present. It should then build and install (in the local repository)
the associated artifact(s). If you have access to mmbase.org you can
also type 'mvn deploy' (arrange that in your settings.xml)


greetings,

Michiel


_______________________________________________
Developers mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/developers

Reply via email to