Hi,

I'm new to maven and after getting started with maven doc and
Vincent Massol's book "Better Builds with Maven" there are still some
obscurities from my point of view.

I hope for some ideas to get my example project running and to help
improving maven
(may it be in code or documentation)

So here are the points I came across:

1) The documentation (
http://maven.apache.org/guides/introduction/introduction-to-the-pom.html)
  states that profiles are inherited like POMs itself, which is NOT true.
  Profiles are applied to the base POM and inheritance is implicit in the
form of <property> entry for example.
  So there will be no <profile> tag in extending POMs.
  Here is a bug report, describing the same problem I had, that could be
closed imho after fixing the doc(s):
  http://jira.codehaus.org/browse/MNG-2485

2)
  Another best practice thing about profiles:
  To build for different target environments, profiles.xml is imho the best
place to store profiles including
  properties of different envs, because profiles.xml could be included in
SCM and is also implicitly inherited
  to poms extending that one including the profile.xml.
  Talking from a multi-module build, one global profiles.xml which is
inherited to all modules but can be
  overridden within the modules seems good for me.

  But:
  Vicent Massol encourages to use profiles within pom.xml for portability
reasons
  (is a profile.xml not checked into SCM/repository and why?)
  The thing is that a big pom.xml with profiles, dependencies etc. is not
very maintainable.
  Also it would be nice to be able to split a profiles.xml into different
files (a file for each environment).


3)
  When customizing the build life-cyle, it seems to me that it should be
possible to UNbind a plugin
  from its default phase to keep flexibility of maven.
  Example:
  WSDL-Files need to be processed (filtering, eg. injecting an IP for
specific environment)
  but BEFORE axis-plugin generates sources from it.
  It's not a problem to bind the plugin to initialize phase, but it will be
executed in its default phase too.

4)
  That's where another problem comes into place, which was already filed
here and I agree with Dan Allen that it's critical:
  http://jira.codehaus.org/browse/MRESOURCES-8

  I'm not sure if that's the correct syntax for configuring a resources dir
for that plugin
  (doc of that plugin doesn't tell sth. about a <resource> tag, only about
<resources> which should be a list).
  But I think it should be possible to configure the plugin that it will:
  - process only src/main/wsdl in initialize phase
  - process only src/main/resources in process-resources phase
    OR that the plugin even is not active in process-resources phase

5)
  Btw, how does the gobal <resources> tag beneath <build> interfere with
the <resources> defined in <configuration>
  within <execution> of the resources-plugin?
  How can I check if I'm really using the correct syntax for a plugin?
  (sth like how can I check what maven would accept and pass to the plugin
and from where maven gets this info)



That's it, thanks a lot for feedback.

Alex

Reply via email to