[xwiki-dev] Maven/build help
Marc Lijour
marc at lijour.net
Wed Jan 3 06:02:29 CET 2007
On Tuesday 02 January 2007 17:41, Vincent Massol wrote:
> > When I checked out xwiki/trunk as a project in eclipse and I enable the
> > maven2 plugin, it starts downloading a bunch of stuff and it complains
> > about 2 items (see log below). Is that normal? Did I checked out
> > everything I need?
>
> That's because I haven't published these artifacts in the xwiki remote
> repo, so you have to build them before they can be used by a module
> requiring them.
>
> The full build is available when you check xwiki/trunks-dev but this will
> only work for xwiki committers as it required svn+ssh access. I'll create a
> trunks-users for you if you want to try it out.
Curiously I could check something out. But my version only contains pom.xml
and a soft link to a pom folder.
Part of the confusion comes from the many directories under svnroot/xwiki. I
see:
- pom
- trunk-devs
- trunk-users (thank you)
- vendor
- xwiki
- xwiki-{apps,client,plugins,sandbox,tools}
Which one(s) do I need? Only trunk-users?
Could we document briefly what each folder is holding and what to check out?
> > Is everybody using maven2 or ant or something else?
>
> I am but it's not finished. That said it's building fine. It's just that
> tests have not all been moved yet, some modules have no maven2 build and I
> haven't fully tested the generated WAR yet so it may be missing some
> runtime dependencies.
>
> > A few pointers would be nice. Thanks.
>
> Sure. We can start workong on this together if you want and document it as
> we progress.
I can do that from the point of view of the perfect maven2 newbie :)
> > (I still wonder why it has to download stuff since everything is
> > available in the svn repository.
>
> Well that's how maven works... :-) Each module has binary dependencies and
> each module produces artifacts which are depended upon by other modules.
> When you build with mvn install generated artifacts are put in your local
> repo (mvn deploy deploys them in the remote repo). They are then available
> to other modules.
>
> You can of course build everything from sources if you cd to the top level
> of the source tree (trunks-dev for now, see above).
>
> To better understand this see
> http://blogs.codehaus.org/people/vmassol/archives/think_tank.html#000953_bi
>n ary_dependency_builds
Yes, very interesting.
When dealing with dependencies in the past I used the ant svn task to update
the subproject local image as a prerequisite for the build. But I see that
using a continuous build to generate working libraries once and making them
available on a server is much more efficient (if you trust the binaries that
is ; but then you already trust the source so that nullifies the security
argument anyway).
> > Actually it would be a good idea to
> > keep the libraries aside, in another folder, if they have to be re-used
> > in different places but then why keeping them in the repository as
> > well?)
>
> Jars in libs/ will be removed when we remove the Ant build as Maven2
> handles this with the notion of repositories (local and remote).
Now I understand. Thanks.
More information about the devs
mailing list