You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Kalle Korhonen <ka...@gmail.com> on 2008/01/09 21:47:08 UTC

Best practices on versioning and releasing distro/installer

I'm facing a similar issue in a couple Maven projects where I'm creating a a
distribution package (e.g. tar.gz) or an installer (e.g rpm, Windows
installer) for a binary (jar, exe). I have a separate module for the
packager that has a dependency to the binary, and a parent pom for these.
Say, for example "application" parent, with application-distro and and
application-jar as child modules. I run the release:prepare from the parent
and I correctly get the dependencies resolved. Now the issue is that since
release:prepare only runs "test verify", building the application-distro
fails because the release-versioned application-jar isn't available yet. I
run the install of application-jar manually (note that the poms are already
modified at this point) and resume release:prepare which now succeeds. Not
too bad overall, but something I cannot imagine automating to a point of
having it in Continuum as a single-button-release.

So I'm looking for best practices and experiences from others in similar
situations. One of the things is that I'm unsure of is if it makes any sense
to version the distro separately; in practice it should always follow the
versioning of the application itself (which I need to produce anyway; for
development and running integration tests it's unnecessary to run the
packager). I can see a few other ways to construct the build: either I can
move the distro build to the parent (but then I need to combat the problems
running assembly in a reactor build with a forked lifecycle or just run
assembly manually and forget about versioning it), or I could make the
assembly as part of the application module and simply use a different
classifier for the installer (but that doesn't sound conceptually right and
in case of Windows app/installers, both would likely produce exe types). How
are others producing distros and installers organizing their Maven projects?

Thanks,
Kalle

Re: Best practices on versioning and releasing distro/installer

Posted by Kalle Korhonen <ka...@gmail.com>.
<bump> Nobody in the same boat?

On 1/9/08, Kalle Korhonen <ka...@gmail.com> wrote:
>
> I'm facing a similar issue in a couple Maven projects where I'm creating a
> a distribution package (e.g. tar.gz) or an installer (e.g rpm, Windows
> installer) for a binary (jar, exe). I have a separate module for the
> packager that has a dependency to the binary, and a parent pom for these.
> Say, for example "application" parent, with application-distro and and
> application-jar as child modules. I run the release:prepare from the parent
> and I correctly get the dependencies resolved. Now the issue is that since
> release:prepare only runs "test verify", building the application-distro
> fails because the release-versioned application-jar isn't available yet. I
> run the install of application-jar manually (note that the poms are already
> modified at this point) and resume release:prepare which now succeeds. Not
> too bad overall, but something I cannot imagine automating to a point of
> having it in Continuum as a single-button-release.
>
> So I'm looking for best practices and experiences from others in similar
> situations. One of the things is that I'm unsure of is if it makes any sense
> to version the distro separately; in practice it should always follow the
> versioning of the application itself (which I need to produce anyway; for
> development and running integration tests it's unnecessary to run the
> packager). I can see a few other ways to construct the build: either I can
> move the distro build to the parent (but then I need to combat the problems
> running assembly in a reactor build with a forked lifecycle or just run
> assembly manually and forget about versioning it), or I could make the
> assembly as part of the application module and simply use a different
> classifier for the installer (but that doesn't sound conceptually right and
> in case of Windows app/installers, both would likely produce exe types). How
> are others producing distros and installers organizing their Maven projects?
>
>
> Thanks,
> Kalle
>

Re: Best practices on versioning and releasing distro/installer

Posted by Kalle Korhonen <ka...@gmail.com>.
Thanks Wendy, I had missed that option. An interestering approach, and while
it might be a bit dodgy in principle (as the modules would now appear as
release "candidates" in your local repo only), it might just do the job.
Still interested to hear if anybody has a better idea, but at least this'll
get me closer to making it releaseable via Continuum.

Kalle


On 1/13/08, Wendy Smoak <ws...@gmail.com> wrote:
>
> On Jan 9, 2008 1:47 PM, Kalle Korhonen <ka...@gmail.com> wrote:
>
> > Say, for example "application" parent, with application-distro and and
> > application-jar as child modules. I run the release:prepare from the
> parent
> > and I correctly get the dependencies resolved. Now the issue is that
> since
> > release:prepare only runs "test verify", building the application-distro
> > fails because the release-versioned application-jar isn't available yet.
> I
> > run the install of application-jar manually (note that the poms are
> already
> > modified at this point) and resume release:prepare which now succeeds.
>
> You can change the goals used during release:prepare to go all the way
> through the install phase.  I don't really like it, but sometimes
> that's the only way to make things work.
>
> --
> Wendy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Best practices on versioning and releasing distro/installer

Posted by Wendy Smoak <ws...@gmail.com>.
On Jan 9, 2008 1:47 PM, Kalle Korhonen <ka...@gmail.com> wrote:

> Say, for example "application" parent, with application-distro and and
> application-jar as child modules. I run the release:prepare from the parent
> and I correctly get the dependencies resolved. Now the issue is that since
> release:prepare only runs "test verify", building the application-distro
> fails because the release-versioned application-jar isn't available yet. I
> run the install of application-jar manually (note that the poms are already
> modified at this point) and resume release:prepare which now succeeds.

You can change the goals used during release:prepare to go all the way
through the install phase.  I don't really like it, but sometimes
that's the only way to make things work.

-- 
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org