You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Dimitris Mouchritsas <dm...@gmail.com> on 2007/12/21 10:11:37 UTC

Resolving cyclical dependencies

Hi everyone. I'm into a project that started recently. The "powers that be"
wanted the dev team to re-use another project which supposedly is similar to
ours. The problem is that this project is also based on a "base" project of
the company. I forgot to mention I'm talking about a J2EE 1.3 project, using
EJBs 2.0, XDoclet, Hibernate and Struts 1.2
I tried to fix the build file only to discover that the "base" project has
cyclical dependencies. Classes that are in the util package talk to DAOs,
DAO's referring to common classes, web classes talking to DAO's. In short I
can't compile one without the other. It's a nightmare. My manager is
reluctant about doing some heavy refactoring to correct all this. Since we
have a build file that works (even though it compiles classes and then
deletes them to resolve the dependencies) he says, no let's try it by
improving upon this; and we'll see.
What do you suggest? Is there a way to create a proper build file for this
project, having seperation of concerns (e.g. commom-compile, ejb-compile,
web-compile etc)

-- 
Dimitris Mouchritsas
Computer Services

Re: Resolving cyclical dependencies

Posted by "Scot P. Floess" <fl...@mindspring.com>.
Any luck yet?

Scot P. Floess wrote:
> OK...so can you elaborate a little more?  Is the source all in one 
> tree?  Separate trees?  Or what?
>
> Dimitris Mouchritsas wrote:
>> No, it's worse. It's package cyclic dependencies. Someone thought 
>> that it
>> was a good idea, instead of making a business.util package (in 
>> business we
>> put our ejb's) to put all utilities in a util package.
>>
>> On Dec 21, 2007 3:22 PM, Scot P. Floess <fl...@mindspring.com> wrote:
>>
>>  
>>> So, the source is cyclic?  Does the source exist such that everything
>>> has something like this:
>>>
>>> src/com/Foo.java (uses Bar.java)
>>> src/com/Bar.java (uses Foo.java)
>>>
>>> Or something different?
>>>
>>> If so, just define you sourcepath for javac to include src
>>>
>>> If not, can you further elaborate?
>>>
>>> Dimitris Mouchritsas wrote:
>>>    
>>>> Hi everyone. I'm into a project that started recently. The "powers 
>>>> that
>>>>       
>>> be"
>>>    
>>>> wanted the dev team to re-use another project which supposedly is
>>>>       
>>> similar to
>>>    
>>>> ours. The problem is that this project is also based on a "base" 
>>>> project
>>>>       
>>> of
>>>    
>>>> the company. I forgot to mention I'm talking about a J2EE 1.3 project,
>>>>       
>>> using
>>>    
>>>> EJBs 2.0, XDoclet, Hibernate and Struts 1.2
>>>> I tried to fix the build file only to discover that the "base" project
>>>>       
>>> has
>>>    
>>>> cyclical dependencies. Classes that are in the util package talk to
>>>>       
>>> DAOs,
>>>    
>>>> DAO's referring to common classes, web classes talking to DAO's. In
>>>>       
>>> short I
>>>    
>>>> can't compile one without the other. It's a nightmare. My manager is
>>>> reluctant about doing some heavy refactoring to correct all this. 
>>>> Since
>>>>       
>>> we
>>>    
>>>> have a build file that works (even though it compiles classes and then
>>>> deletes them to resolve the dependencies) he says, no let's try it by
>>>> improving upon this; and we'll see.
>>>> What do you suggest? Is there a way to create a proper build file for
>>>>       
>>> this
>>>    
>>>> project, having seperation of concerns (e.g. commom-compile,
>>>>       
>>> ejb-compile,
>>>    
>>>> web-compile etc)
>>>>
>>>>
>>>>       
>>> -- 
>>> Scot P. Floess
>>> 27 Lake Royale
>>> Louisburg, NC  27549
>>>
>>> 252-478-8087 (Home)
>>> 919-754-4592 (Work)
>>>
>>> Chief Architect JPlate   http://sourceforge.net/projects/jplate
>>> Chief Architect JavaPIM  http://sourceforge.net/projects/javapim
>>> QA Engineer OpenQabal    http://openqabal.dev.java.net
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>>> For additional commands, e-mail: user-help@ant.apache.org
>>>
>>>
>>>     
>>
>>
>>   
>

-- 
Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-754-4592 (Work)

Chief Architect JPlate   http://sourceforge.net/projects/jplate
Chief Architect JavaPIM  http://sourceforge.net/projects/javapim
QA Engineer OpenQabal    http://openqabal.dev.java.net


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Resolving cyclical dependencies

Posted by "Scot P. Floess" <fl...@mindspring.com>.
OK...so can you elaborate a little more?  Is the source all in one 
tree?  Separate trees?  Or what?

Dimitris Mouchritsas wrote:
> No, it's worse. It's package cyclic dependencies. Someone thought that it
> was a good idea, instead of making a business.util package (in business we
> put our ejb's) to put all utilities in a util package.
>
> On Dec 21, 2007 3:22 PM, Scot P. Floess <fl...@mindspring.com> wrote:
>
>   
>> So, the source is cyclic?  Does the source exist such that everything
>> has something like this:
>>
>> src/com/Foo.java (uses Bar.java)
>> src/com/Bar.java (uses Foo.java)
>>
>> Or something different?
>>
>> If so, just define you sourcepath for javac to include src
>>
>> If not, can you further elaborate?
>>
>> Dimitris Mouchritsas wrote:
>>     
>>> Hi everyone. I'm into a project that started recently. The "powers that
>>>       
>> be"
>>     
>>> wanted the dev team to re-use another project which supposedly is
>>>       
>> similar to
>>     
>>> ours. The problem is that this project is also based on a "base" project
>>>       
>> of
>>     
>>> the company. I forgot to mention I'm talking about a J2EE 1.3 project,
>>>       
>> using
>>     
>>> EJBs 2.0, XDoclet, Hibernate and Struts 1.2
>>> I tried to fix the build file only to discover that the "base" project
>>>       
>> has
>>     
>>> cyclical dependencies. Classes that are in the util package talk to
>>>       
>> DAOs,
>>     
>>> DAO's referring to common classes, web classes talking to DAO's. In
>>>       
>> short I
>>     
>>> can't compile one without the other. It's a nightmare. My manager is
>>> reluctant about doing some heavy refactoring to correct all this. Since
>>>       
>> we
>>     
>>> have a build file that works (even though it compiles classes and then
>>> deletes them to resolve the dependencies) he says, no let's try it by
>>> improving upon this; and we'll see.
>>> What do you suggest? Is there a way to create a proper build file for
>>>       
>> this
>>     
>>> project, having seperation of concerns (e.g. commom-compile,
>>>       
>> ejb-compile,
>>     
>>> web-compile etc)
>>>
>>>
>>>       
>> --
>> Scot P. Floess
>> 27 Lake Royale
>> Louisburg, NC  27549
>>
>> 252-478-8087 (Home)
>> 919-754-4592 (Work)
>>
>> Chief Architect JPlate   http://sourceforge.net/projects/jplate
>> Chief Architect JavaPIM  http://sourceforge.net/projects/javapim
>> QA Engineer OpenQabal    http://openqabal.dev.java.net
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>>
>>
>>     
>
>
>   

-- 
Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-754-4592 (Work)

Chief Architect JPlate   http://sourceforge.net/projects/jplate
Chief Architect JavaPIM  http://sourceforge.net/projects/javapim
QA Engineer OpenQabal    http://openqabal.dev.java.net


Re: Resolving cyclical dependencies

Posted by Dimitris Mouchritsas <dm...@gmail.com>.
No, it's worse. It's package cyclic dependencies. Someone thought that it
was a good idea, instead of making a business.util package (in business we
put our ejb's) to put all utilities in a util package.

On Dec 21, 2007 3:22 PM, Scot P. Floess <fl...@mindspring.com> wrote:

> So, the source is cyclic?  Does the source exist such that everything
> has something like this:
>
> src/com/Foo.java (uses Bar.java)
> src/com/Bar.java (uses Foo.java)
>
> Or something different?
>
> If so, just define you sourcepath for javac to include src
>
> If not, can you further elaborate?
>
> Dimitris Mouchritsas wrote:
> > Hi everyone. I'm into a project that started recently. The "powers that
> be"
> > wanted the dev team to re-use another project which supposedly is
> similar to
> > ours. The problem is that this project is also based on a "base" project
> of
> > the company. I forgot to mention I'm talking about a J2EE 1.3 project,
> using
> > EJBs 2.0, XDoclet, Hibernate and Struts 1.2
> > I tried to fix the build file only to discover that the "base" project
> has
> > cyclical dependencies. Classes that are in the util package talk to
> DAOs,
> > DAO's referring to common classes, web classes talking to DAO's. In
> short I
> > can't compile one without the other. It's a nightmare. My manager is
> > reluctant about doing some heavy refactoring to correct all this. Since
> we
> > have a build file that works (even though it compiles classes and then
> > deletes them to resolve the dependencies) he says, no let's try it by
> > improving upon this; and we'll see.
> > What do you suggest? Is there a way to create a proper build file for
> this
> > project, having seperation of concerns (e.g. commom-compile,
> ejb-compile,
> > web-compile etc)
> >
> >
>
> --
> Scot P. Floess
> 27 Lake Royale
> Louisburg, NC  27549
>
> 252-478-8087 (Home)
> 919-754-4592 (Work)
>
> Chief Architect JPlate   http://sourceforge.net/projects/jplate
> Chief Architect JavaPIM  http://sourceforge.net/projects/javapim
> QA Engineer OpenQabal    http://openqabal.dev.java.net
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>


-- 
Dimitris Mouchritsas
Computer Services

Re: Resolving cyclical dependencies

Posted by "Scot P. Floess" <fl...@mindspring.com>.
So, the source is cyclic?  Does the source exist such that everything 
has something like this:

src/com/Foo.java (uses Bar.java)
src/com/Bar.java (uses Foo.java)

Or something different?

If so, just define you sourcepath for javac to include src

If not, can you further elaborate?

Dimitris Mouchritsas wrote:
> Hi everyone. I'm into a project that started recently. The "powers that be"
> wanted the dev team to re-use another project which supposedly is similar to
> ours. The problem is that this project is also based on a "base" project of
> the company. I forgot to mention I'm talking about a J2EE 1.3 project, using
> EJBs 2.0, XDoclet, Hibernate and Struts 1.2
> I tried to fix the build file only to discover that the "base" project has
> cyclical dependencies. Classes that are in the util package talk to DAOs,
> DAO's referring to common classes, web classes talking to DAO's. In short I
> can't compile one without the other. It's a nightmare. My manager is
> reluctant about doing some heavy refactoring to correct all this. Since we
> have a build file that works (even though it compiles classes and then
> deletes them to resolve the dependencies) he says, no let's try it by
> improving upon this; and we'll see.
> What do you suggest? Is there a way to create a proper build file for this
> project, having seperation of concerns (e.g. commom-compile, ejb-compile,
> web-compile etc)
>
>   

-- 
Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-754-4592 (Work)

Chief Architect JPlate   http://sourceforge.net/projects/jplate
Chief Architect JavaPIM  http://sourceforge.net/projects/javapim
QA Engineer OpenQabal    http://openqabal.dev.java.net


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org