For an example, please have a look at the parent pom for all Apache projects: http://repo1.maven.org/maven2/org/apache/apache/4/apache-4.pom
This example does not specify anything regarding plugin management, but you could do that for your scenario. Also, notice that it is located separated from all Apache projects. Also notice that it is versioned a little bit different (just v1, v2, v3, etc.). IMHO it is sufficient to use this kind of versioning for a corporate parent pom (no need for major.minor[.bugfix]). Regarding defining the compiler version in the settings.xml file, I would strongly recommend against that (even if it would be possible). Builds would then rely on the user's configuration to be correct. This kind of settings should be in the pom. /Anders monika7 wrote: > > I didn't know that and always assumed that parent pom is used only for > project nesting. > Where is parent pom file located (local maven repository?) and how does > the maven recognize it from the scope of child project. Can you recommend > a working example I could use as basis of my setup? > > > > Stephen Connolly-2 wrote: >> >> actually the parent _does not have to be in the parent directory_ >> >> in fact a number of people specifically recommend having the parent in >> a different directory entirely >> >> Sent from my iPod >> >> On 15 Aug 2008, at 22:21, monika7 <[EMAIL PROTECTED]> wrote: >> >>> >>> But that is not much different from having plugin configuration in the >>> project file. >>> Besides, if I use parent pom file, don't I need to have physically all >>> children projects in subdirectories of the parent project? If that >>> is the >>> case, than this is not going to work for me, because I am trying to >>> establish common environment for a development team that may work on >>> unrelated projects. >>> >>> As far as I know, it is impossible to configure a plugin in >>> settings.xml. >>> >>> Wouldn't be nice if the plugin were capable to pickup the compiler >>> version >>> based on e.g. JAVA_HOME variable? >>> >>> >>> >>> Stephen Connolly-2 wrote: >>>> >>>> Have all your projects with a common parent. >>>> >>>> In the common parent add a pluginManagement section that defines the >>>> defaults for the compiler plugin. >>>> >>>> On Fri, Aug 15, 2008 at 1:51 PM, monika7 <[EMAIL PROTECTED]> >>>> wrote: >>>> >>>>> >>>>> I know that current default for maven-compiler-plugin is java 1.3 >>>>> and >>>>> that >>>>> I >>>>> can override it in pom.xml file by adding source and target >>>>> attributes to >>>>> the plugin configuration. >>>>> However I would prefer to override the default compiler version >>>>> permanently >>>>> without having to include the plugin in pom.xml. >>>>> I don't see anything in the settings.xml that would allow me to do >>>>> it. Is >>>>> that possible and if yes, can someone suggest how to do it? >>>>> -- >>>>> View this message in context: >>>>> http://www.nabble.com/Changing-default-compiler-version-for--maven-compiler-plugin-%28outside-pom.xml%29-tp18998146p18998146.html >>>>> Sent from the Maven - Users mailing list archive at Nabble.com. >>>>> >>>>> >>>>> --- >>>>> ------------------------------------------------------------------ >>>>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>>>> For additional commands, e-mail: [EMAIL PROTECTED] >>>>> >>>>> >>>> >>>> >>> >>> -- >>> View this message in context: >>> http://www.nabble.com/Changing-default-compiler-version-for--maven-compiler-plugin-%28outside-pom.xml%29-tp18998146p19005153.html >>> Sent from the Maven - Users mailing list archive at Nabble.com. >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> > > -- View this message in context: http://www.nabble.com/Changing-default-compiler-version-for--maven-compiler-plugin-%28outside-pom.xml%29-tp18998146p19029582.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
