You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "krishnan.1000" <kr...@gmail.com> on 2008/03/05 19:43:02 UTC

Newbie Question. Handling the module dependencies

Hi,

I am working on a project which has two modules on the same hierarchy level
foo-utils and foo-core. The foo-core has a dependency on foo-util. If I try
to change something in foo-util, I have to build foo-util before I build
foo-core. I would like to avoid that by having foo-util built before
foo-core is when mvn compile is executed in foo-core directory. I have seen
posts where the dependent modules

Is there a better way to handle dependencies. In my foo-core pom.xml, this
is what I have.




 foo
  foo-utils
  ${project.version} 
  compile    
  


Is there anything else that I can do otherwise?

Thanks,

Karthik
-- 
View this message in context: http://www.nabble.com/Newbie-Question.-Handling-the-module-dependencies-tp15855637s177p15855637.html
Sent from the Maven - Users mailing list archive at Nabble.com.

Re: Newbie Question. Handling the module dependencies

Posted by Wayne Fay <wa...@gmail.com>.
You just declare the dependency in the pom.xml file as any other dependency.

Wayne

On 3/5/08, krishnan.1000 <kr...@gmail.com> wrote:
>
> Hi Wayne,
>
> Suppose, I have a situation where foo-utils is a dependency on some other
> project not under the foo directory. What can I do to add the dependency in
> the pom.xml
>
> Thanks,
>
> Karthik
>
> Wayne Fay wrote:
> >
> > If you want to have both modules built when you change code in one,
> > you must build from the parent (which in your case seems to be foo).
> >
> > foo
> > --foo-utils
> > --foo-core
> >
> > There is no other option.
> >
> > Wayne
> >
> > On 3/5/08, krishnan.1000 <kr...@gmail.com> wrote:
> >>
> >> Hi,
> >>
> >> I am working on a project which has two modules on the same hierarchy
> >> level
> >> foo-utils and foo-core. The foo-core has a dependency on foo-util. If I
> >> try
> >> to change something in foo-util, I have to build foo-util before I build
> >> foo-core. I would like to avoid that by having foo-util built before
> >> foo-core is when mvn compile is executed in foo-core directory. I have
> >> seen
> >> posts where the dependent modules
> >>
> >> Is there a better way to handle dependencies. In my foo-core pom.xml,
> >> this
> >> is what I have.
> >>
> >>
> >>
> >>
> >>  foo
> >>  foo-utils
> >>  ${project.version}
> >>  compile
> >>
> >>
> >>
> >> Is there anything else that I can do otherwise?
> >>
> >> Thanks,
> >>
> >> Karthik
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Newbie-Question.-Handling-the-module-dependencies-tp15855637s177p15855637.html
> >> Sent from the Maven - Users mailing list archive at Nabble.com.
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Newbie-Question.-Handling-the-module-dependencies-tp15855637s177p15860640.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


Re: Newbie Question. Handling the module dependencies

Posted by "krishnan.1000" <kr...@gmail.com>.
Hi Wayne, 

Suppose, I have a situation where foo-utils is a dependency on some other
project not under the foo directory. What can I do to add the dependency in
the pom.xml

Thanks,

Karthik

Wayne Fay wrote:
> 
> If you want to have both modules built when you change code in one,
> you must build from the parent (which in your case seems to be foo).
> 
> foo
> --foo-utils
> --foo-core
> 
> There is no other option.
> 
> Wayne
> 
> On 3/5/08, krishnan.1000 <kr...@gmail.com> wrote:
>>
>> Hi,
>>
>> I am working on a project which has two modules on the same hierarchy
>> level
>> foo-utils and foo-core. The foo-core has a dependency on foo-util. If I
>> try
>> to change something in foo-util, I have to build foo-util before I build
>> foo-core. I would like to avoid that by having foo-util built before
>> foo-core is when mvn compile is executed in foo-core directory. I have
>> seen
>> posts where the dependent modules
>>
>> Is there a better way to handle dependencies. In my foo-core pom.xml,
>> this
>> is what I have.
>>
>>
>>
>>
>>  foo
>>  foo-utils
>>  ${project.version}
>>  compile
>>
>>
>>
>> Is there anything else that I can do otherwise?
>>
>> Thanks,
>>
>> Karthik
>> --
>> View this message in context:
>> http://www.nabble.com/Newbie-Question.-Handling-the-module-dependencies-tp15855637s177p15855637.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Newbie-Question.-Handling-the-module-dependencies-tp15855637s177p15860640.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: Newbie Question. Handling the module dependencies

Posted by Wayne Fay <wa...@gmail.com>.
If you want to have both modules built when you change code in one,
you must build from the parent (which in your case seems to be foo).

foo
--foo-utils
--foo-core

There is no other option.

Wayne

On 3/5/08, krishnan.1000 <kr...@gmail.com> wrote:
>
> Hi,
>
> I am working on a project which has two modules on the same hierarchy level
> foo-utils and foo-core. The foo-core has a dependency on foo-util. If I try
> to change something in foo-util, I have to build foo-util before I build
> foo-core. I would like to avoid that by having foo-util built before
> foo-core is when mvn compile is executed in foo-core directory. I have seen
> posts where the dependent modules
>
> Is there a better way to handle dependencies. In my foo-core pom.xml, this
> is what I have.
>
>
>
>
>  foo
>  foo-utils
>  ${project.version}
>  compile
>
>
>
> Is there anything else that I can do otherwise?
>
> Thanks,
>
> Karthik
> --
> View this message in context: http://www.nabble.com/Newbie-Question.-Handling-the-module-dependencies-tp15855637s177p15855637.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>

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