You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by fernando da Motta hildebrand <fe...@gmail.com> on 2007/01/22 20:12:51 UTC

Subproject recursive dependency....

Ok,

Got subproject with source of class A,
and got subproject with source of class B,

Here are examples of the two classes:

import org.pack.B
publica class A{
    private B;
    ...
}

import org.pack.A
publica class B{
    private A;
    ....
}

As you can see, both are inter-dependent, but rest in diferent subprojects
of maven (using maven 1.x by the way...).

How do I build this project?


-- 
Fernando da Motta Hildebrand
Desenvolvedor
Brooks' Law : "adding manpower to a late software project makes it later..."

Fwd: Subproject recursive dependency....

Posted by fernando da Motta hildebrand <fe...@gmail.com>.
---------- Forwarded message ----------
From: fernando da Motta hildebrand <fe...@gmail.com>
Date: 22/01/2007 17:12
Subject: Subproject recursive dependency....
To: Maven_users <us...@maven.apache.org>

Ok,

Got subproject with source of class A,
and got subproject with source of class B,

Here are examples of the two classes:

import org.pack.B
publica class A{
    private B;
    ...
}

import org.pack.A
publica class B{
    private A;
    ....
}

As you can see, both are inter-dependent, but rest in diferent subprojects
of maven (using maven 1.x by the way...).

How do I build this project?


-- 
Fernando da Motta Hildebrand
Desenvolvedor
Brooks' Law : "adding manpower to a late software project makes it later..."


-- 
Fernando da Motta Hildebrand
Desenvolvedor
Brooks' Law : "adding manpower to a late software project makes it later..."

Re: Subproject recursive dependency....

Posted by fernando da Motta hildebrand <fe...@gmail.com>.
Ok. Thanks for your help.

2007/1/22, Wayne Fay <wa...@gmail.com>:
>
> In short, no, that is not right. In your example, you have not
> eliminated the circular dependency. You still have A {B} and B {A}.
> This is not acceptable.
>
> In short, decide if A builds upon B or if B builds upon A; you cannot
> have both. Then change your code to implement A->B or B->A, depending
> on how you've chosen.
>
> You may want to ask for help in this area on the Refactoring
> Yahoogroup. The Maven Users list is not the right place for this
> discussion.
>
> Wayne
>
> On 1/22/07, fernando da Motta hildebrand <fe...@gmail.com>
> wrote:
> > Would be like:
> >
> > pak.a
> > public interface A1{
> >    ...
> > }
> >
> >  pak.b
> > public interface B1{
> >    ...
> > }
> >
> > import pak.B1
> > publica class A{
> >    private B1;
> >    ...
> > }
> >
> > import pak.A1
> > publica class B{
> >    private A1;
> >    ....
> > }
> >
> > ?
> >
> > Could you send some examples?
> >
> >
> > 2007/1/22, Wayne Fay <wa...@gmail.com>:
> > >
> > > You don't. You need to do some refactoring (extract interfaces) or
> > > something so you have a very clear A->B or B->A dependency.
> > >
> > > Wayne
> > >
> > > On 1/22/07, fernando da Motta hildebrand <fernandohildebrand@gmail.com
> >
> > > wrote:
> > > > Ok,
> > > >
> > > > Got subproject with source of class A,
> > > > and got subproject with source of class B,
> > > >
> > > > Here are examples of the two classes:
> > > >
> > > > import org.pack.B
> > > > publica class A{
> > > >    private B;
> > > >    ...
> > > > }
> > > >
> > > > import org.pack.A
> > > > publica class B{
> > > >    private A;
> > > >    ....
> > > > }
> > > >
> > > > As you can see, both are inter-dependent, but rest in diferent
> > > subprojects
> > > > of maven (using maven 1.x by the way...).
> > > >
> > > > How do I build this project?
> > > >
> > > >
> > > > --
> > > > Fernando da Motta Hildebrand
> > > > Desenvolvedor
> > > > Brooks' Law : "adding manpower to a late software project makes it
> > > later..."
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
> >
> > --
> > Fernando da Motta Hildebrand
> > Desenvolvedor
> > Brooks' Law : "adding manpower to a late software project makes it
> later..."
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Fernando da Motta Hildebrand
Desenvolvedor
Brooks' Law : "adding manpower to a late software project makes it later..."

Re: Subproject recursive dependency....

Posted by Wayne Fay <wa...@gmail.com>.
In short, no, that is not right. In your example, you have not
eliminated the circular dependency. You still have A {B} and B {A}.
This is not acceptable.

In short, decide if A builds upon B or if B builds upon A; you cannot
have both. Then change your code to implement A->B or B->A, depending
on how you've chosen.

You may want to ask for help in this area on the Refactoring
Yahoogroup. The Maven Users list is not the right place for this
discussion.

Wayne

On 1/22/07, fernando da Motta hildebrand <fe...@gmail.com> wrote:
> Would be like:
>
> pak.a
> public interface A1{
>    ...
> }
>
>  pak.b
> public interface B1{
>    ...
> }
>
> import pak.B1
> publica class A{
>    private B1;
>    ...
> }
>
> import pak.A1
> publica class B{
>    private A1;
>    ....
> }
>
> ?
>
> Could you send some examples?
>
>
> 2007/1/22, Wayne Fay <wa...@gmail.com>:
> >
> > You don't. You need to do some refactoring (extract interfaces) or
> > something so you have a very clear A->B or B->A dependency.
> >
> > Wayne
> >
> > On 1/22/07, fernando da Motta hildebrand <fe...@gmail.com>
> > wrote:
> > > Ok,
> > >
> > > Got subproject with source of class A,
> > > and got subproject with source of class B,
> > >
> > > Here are examples of the two classes:
> > >
> > > import org.pack.B
> > > publica class A{
> > >    private B;
> > >    ...
> > > }
> > >
> > > import org.pack.A
> > > publica class B{
> > >    private A;
> > >    ....
> > > }
> > >
> > > As you can see, both are inter-dependent, but rest in diferent
> > subprojects
> > > of maven (using maven 1.x by the way...).
> > >
> > > How do I build this project?
> > >
> > >
> > > --
> > > Fernando da Motta Hildebrand
> > > Desenvolvedor
> > > Brooks' Law : "adding manpower to a late software project makes it
> > later..."
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
> --
> Fernando da Motta Hildebrand
> Desenvolvedor
> Brooks' Law : "adding manpower to a late software project makes it later..."
>
>

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


Re: Subproject recursive dependency....

Posted by fernando da Motta hildebrand <fe...@gmail.com>.
Would be like:

pak.a
public interface A1{
    ...
}

 pak.b
public interface B1{
    ...
}

import pak.B1
publica class A{
    private B1;
    ...
}

import pak.A1
publica class B{
    private A1;
    ....
}

?

Could you send some examples?


2007/1/22, Wayne Fay <wa...@gmail.com>:
>
> You don't. You need to do some refactoring (extract interfaces) or
> something so you have a very clear A->B or B->A dependency.
>
> Wayne
>
> On 1/22/07, fernando da Motta hildebrand <fe...@gmail.com>
> wrote:
> > Ok,
> >
> > Got subproject with source of class A,
> > and got subproject with source of class B,
> >
> > Here are examples of the two classes:
> >
> > import org.pack.B
> > publica class A{
> >    private B;
> >    ...
> > }
> >
> > import org.pack.A
> > publica class B{
> >    private A;
> >    ....
> > }
> >
> > As you can see, both are inter-dependent, but rest in diferent
> subprojects
> > of maven (using maven 1.x by the way...).
> >
> > How do I build this project?
> >
> >
> > --
> > Fernando da Motta Hildebrand
> > Desenvolvedor
> > Brooks' Law : "adding manpower to a late software project makes it
> later..."
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Fernando da Motta Hildebrand
Desenvolvedor
Brooks' Law : "adding manpower to a late software project makes it later..."

Re: Subproject recursive dependency....

Posted by Wayne Fay <wa...@gmail.com>.
You don't. You need to do some refactoring (extract interfaces) or
something so you have a very clear A->B or B->A dependency.

Wayne

On 1/22/07, fernando da Motta hildebrand <fe...@gmail.com> wrote:
> Ok,
>
> Got subproject with source of class A,
> and got subproject with source of class B,
>
> Here are examples of the two classes:
>
> import org.pack.B
> publica class A{
>    private B;
>    ...
> }
>
> import org.pack.A
> publica class B{
>    private A;
>    ....
> }
>
> As you can see, both are inter-dependent, but rest in diferent subprojects
> of maven (using maven 1.x by the way...).
>
> How do I build this project?
>
>
> --
> Fernando da Motta Hildebrand
> Desenvolvedor
> Brooks' Law : "adding manpower to a late software project makes it later..."
>
>

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