You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Chris <sh...@yahoo.com> on 2008/12/10 19:50:43 UTC

Force build of another eclipse project?

Is there a way for one Maven/Eclipse project to force the build of another?

I asked this question once before, and the answer was to create a 
"reactor" project and make the dependent projects modules. This is not 
possible; we can't rearrange our directory structures. These two 
projects are peers and are not part of a larger structure.

All I need is a command, which can be issued from within a Maven POM or 
an Ant script, to trigger a "mvn install" in another project in the 
Eclipse environment.


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


Re: Force build of another eclipse project?

Posted by John Stoneham <ly...@lyrically.net>.
On Wed, Dec 10, 2008 at 2:17 PM, Baptiste MATHUS <ml...@batmat.net> wrote:
> Well, I'm not aware of such a command. But what do you mean by "they are
> peers". If they are compulsorily side by side, then you could design a
> parent pom to make them related.

You don't actually need any sort of virtual parent directory. Couldn't
you just make a fullbuild_pom.xml that featured pointers to
../project1 and ../project2, and make that a peer of the others?

Does Eclipse already know they are related? If so wouldn't it rerun
the other build automatically if you have 'Build automatically' turned
on?

- John

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


Re: Force build of another eclipse project?

Posted by Baptiste MATHUS <ml...@batmat.net>.
Well, I'm not aware of such a command. But what do you mean by "they are
peers". If they are compulsorily side by side, then you could design a
parent pom to make them related.

Note: are you using subversion? If so, the you might be able to use
svn:external keyword to create a virtual parent directory that would contain
the two project you're speaking about.

And if you really want, you might want to consider maven-exec-plugin:
http://mojo.codehaus.org/exec-maven-plugin/exec-mojo.html. You could launch
the mvn install command. But this would be a lot dirtier than the previous
solution imo.

Cheers.

2008/12/10 Chris <sh...@yahoo.com>

> Is there a way for one Maven/Eclipse project to force the build of another?
>
> I asked this question once before, and the answer was to create a "reactor"
> project and make the dependent projects modules. This is not possible; we
> can't rearrange our directory structures. These two projects are peers and
> are not part of a larger structure.
>
> All I need is a command, which can be issued from within a Maven POM or an
> Ant script, to trigger a "mvn install" in another project in the Eclipse
> environment.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Baptiste <Batmat> MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !