which is where the versions maven plugin can help by running it from the builder pom you can update the dependencies within all the modules of the builder pom

Sent from my iPod

On 6 Nov 2008, at 15:29, "Rafael Trestini" <[EMAIL PROTECTED]> wrote:

John

The Jorg's solution is very nice for your technical problem, mainly if
just one developer is working on codes.

But let me know about development lifecycles of your projects: If A
depends B, but have no common code between them, I suppose their have
different life cycles. So when you're coding into A, you must depend
of a certain version of B (ex: B-0.0.1-SNAPSHOT.jar) that is in your
local repository. If you have to modify B, when you use 'mvn install',
this version of B will be updated in repo, consequently, available
locally to A, without have to use 'mvn install' in A. ('mvn install'
installs the package to local repository).
In other hand, if there's a modification in B which broken
compatibility with A, you must to generate a new version of B (ex:
B-0.1.0-SNAPSHOT.jar) and update pom.xml of A, for new version of
dependency (re-generating your IDE metadata, if was the case).

Rafael

On Thu, Nov 6, 2008 at 8:42 AM, Jörg Schaible
<[EMAIL PROTECTED]> wrote:
[EMAIL PROTECTED] wrote:
Hi Rafael,

Thanks for your response.

My question surrounds dependencies, and while I understand how to
declare a dependency, what I want to know is how I make maven
recompile dependencies.

So if A depends on B, and I run 'mvn jar' in project B, how can I make
it recompile (and I guess, run 'mvn install') in A?  My
scenerio is that
I will be making changes to both A and B, but both are
separate projects
and I don't want to have to run 'mvn install' in A before
doing anything
with project B. Obviously, if A depends on B, A will not compile if B
has been modified in some way given A fetches A.jar from the
repository.

Neither A or B share a common parent.  In fact, they could easily
have different parents.

You can use what I call a "builder POM". Create a pom.xml somewhere with minimal entries and a module section ...

<modules>
      <module>path to A</module>
      <module>path to B</module>
</modules>

... and build from the location of this builder POM. You can give the pom a different name if you start Maven with the -f option.

- Jörg

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Responsibility is the price of freedom

---------------------------------------------------------------------
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