Kalle Korhonen wrote:
On Wed, Mar 4, 2009 at 2:12 PM, Wendy Smoak <[email protected]> wrote:
On Wed, Mar 4, 2009 at 3:06 PM, David C. Hicks <[email protected]> wrote:
I'm trying to run release:prepare on my project. There are to modules in
the project that other modules depend on. The project builds just fine.
The problem seems to be that release:prepare does not do an "install" on
the modules, so those dependent modules cannot find the artifacts in the
repository. How does one get around this problem? Is there some way to
force release:prepare to install the artifacts that it builds?
It should find them in the reactor, but in some cases it doesn't (or
maybe can't -- not sure if this is a bug or just the way it has to
be.)
I'd say it "works as designed". I think the reasoning behind not running the
install goal by default is that at the time that version isn't released yet,
so it shouldn't be installed (the release may fail later, which would
incorrectly leave artifacts with that version in your local repository).
It'll work if you use straight-up reactor dependencies, but will fail for
example if you use dependency:copy somewhere in the same build (in which
case you need to add install as a preparationGoal).
These are straight-up reactor dependencies. I'll try to "tell you"
about them. I think posting the pom.xml files would get cumbersome and
noisy.
So, I have a few modules that each need things like Spring and/or
Hibernate. So, following an example in the Definitive Guide, I created
POM type modules that define nothing more than a set of dependencies.
There are two of these at present. They both live in their own module
and are grouped in another module called "dependencies". So, I end up
with something like this...
MyProject
Dependencies
SpringDependencies
HibernateDependencies
Model
Business
War
IntegrationTests
The Business, War, and IntegrationTests modules all rely on at least one
of those dependency modules.
So, now I go to do a release:prepare. The dependencies build find with
the new version number applied by the release plugin. Then, we get to,
say, the "War" module, and it cannot find those dependencies because
they're not in the repository. There is *a* version of them in the
repo, but not the new version, as labeled by the release plugin. I
think I'm understanding this correctly, but I'm perfectly prepared to be
told I'm doing something really dumb. :-)
I'll try adding the install as a preparation goal, but it seems to me
that this should work, as is.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]