Hi Chris,

I'm not sure if this is the BEST way to do it, but what I do is create a
parent pom.xml in the root directory. Then add commons, web-app, and
stand-alone app as modules in that parent POM. Maven should figure out that
since webapp and standalone app are dependent on the commons module then
that's what needs to be built first. Then when you call "mvn package" (or
whatever your goal is) on the parent pom, maven will first do the commons
module before anything else. You'll also need to add <parent> tags to your
sub-project (commons, web-app, and stand-alone app).

See the example in the documentation at
http://maven.apache.org/guides/getting-started/index.html#How%20do%20I%20build%20more%20than%20one%20project%20at%20once
?
for more details

Hope that helps!

~Gareth

On 3/28/06, Chris Wall <[EMAIL PROTECTED]> wrote:
>
> Thanks Olivier.
>
> How do I represent this dependency in my webapp pom.xml?  I have the
> following dependency declaration, but M2 tries to download the jar instead
> of resolving that this is internally provided dependency.
>
>
>     <dependency>
>       <groupId>my-common</groupId>
>       <artifactId> my-common</artifactId>
>       <version>1.0-SNAPSHOT</version>
>     </dependency>
>
>

Reply via email to