OK, I solved my problem as you'll see from my previous post.

More comments below...

On 2011-05-03 7:12 PM, Wayne Fay wrote:
Except that then Maven complains it cannot find the repository that it is
in.
If you haven't run "mvn install" from the common-module, then the jar
does not exist (as far as Maven is concerned) when you build in the
service-module.

I had to do a maven install on the top level POM as well, that was the last thing tripping me up.
So, I had to flatten my Eclipse projects because I am using IBM Rational
Team Concert for SCM and it does not yet support nested projects the way
I am not a fan of "flat" multimodule projects and don't use them. I
know that things generally work OK with them but I would not be
surprised if you run into issues.

I'm not a fan either, but it was the only way to get things to work with Jazz RTC. I know IBM plan to fix the problems in RTC with nested Eclipse projects as they have a lot of customers who are using Jazz and Maven together.

By the way, I'm growing more and more fond of the Jazz development environment (as I am Maven). I recommend people check out the free community version of RTC (for up to 10 users). I think IBM give open source organizations a special deal on running with more than 10 licenses.
When I tried running from the parent Maven threw a NullPointerException. I
found an article  somewhere where other people had this same problem. There
was some advice there, but I have not got back to researching it further.
Maybe I just need to configure the parent POM properly?
This is a problem you MUST RESOLVE first and foremost. None of the
rest of this will work until you get this fixed. If you can't build
from the parent, then the reactor cannot find the common-module
artifact to use when it is building service-module. Thus, you will get
the problems you keep complaining about. Fix this first!

As I mentioned, I have solved this problem now.
OK, that makes sense - I will try that after my system backup finishes.
Did you run "mvn install" or not?

After my backup completed I found that doing a "mvn install" on the top level POM solved the problem.
"Versioned artifacts are immutable in Maven." That sounds serious? Can I
take that to mean that you typically version a project after it has been
released because you are never going to change it again? If you changed it
then it would be another version wouldn't it?
Yes, that's exactly the point. A versioned artifact can never change.
If you have changes to make to an artifact, they must be made in a new
version of that artifact. Never fall into the trap of just making some
tweaks to a jar file and leaving it with the same version.

That totally makes sense.
As it is, I don't even know how to change the version yet.
The release plugin can help when you get to that point. But I don't
know how well it handles flat multimodule projects like yours.

Wayne
Thanks again for all the advice :-)

Cheers, Eric
---------------------------------------------------------------------
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