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
