Just put the version number in the parent and have the child poms
refer to the version. Then always use the release plugin to update the
version. There is a circular dependency when you try to lookup a
parent by its version number when the version number is declared in
the parent.

Hth,

Nick Stolwijk
~Java Developer~

Iprofs BV.
Claus Sluterweg 125
2012 WS Haarlem
www.iprofs.nl



On Wed, Apr 29, 2009 at 9:53 PM, Jeffrey N Hagelberg
<[email protected]> wrote:
>
> Hi,
>
> We're trying to define a project structure where the version is defined in
> the top level project and inherited by all of the sub-projects.  This type
> of structure would make it so that we only have to define the version number
> in one place and allow us to maintain one maven repository with all of the
> versions of our project in it.  I've attached what we have right now.  What
> we've basically done is defined a variable in the top level pom.xml called
> "mmi.version" and then referenced that everywhere we need a version.  This
> has worked up to a point.  The problem I'm seeing occurs when it is trying
> to obtain the plugin "mmi-xmeta-installer-plugin" from the local maven
> repository.  It succeeds in obtaining the plugin itself from the local maven
> repository.  However, when it tries to get the artifacts for the parent
> project (mmi_plugins), it dies with the following error:
>
> Cannot find parent: com.ibm.mmi:mmi_plugins for project:
> null:mmi-xmeta-installer-plugin:maven-plugin:null for project
> null:mmi-xmeta-installer-plugin:maven-plugin:null
>
> I guess my first question is whether anyone has been able to to successfully
> get a child project to inherit the version of its parent project and if so,
> how they made it work.  What we have defined is a little wierd, since we're
> attempting to use a variable defined in the parent pom.xml to resolve the
> parent itself.  That may be the root cause of this error.  However, it's the
> best we have been able to do so far.  We do not want to have to duplicate
> the version in all of our pom.xmls.
>
> Thanks for any help you can provide.
>
> -Jeff
>
>
>
> Jeffrey Hagelberg, Software Engineer
> XMeta Development
> IBM Software Group
> Phone: 978-899-2055 T/L:276-2055)
> Email:[email protected]
>
> ---------------------------------------------------------------------
> 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]

Reply via email to