Problems detecting cycles

3 views
Skip to first unread message

Axel Böttcher

unread,
Dec 4, 2007, 4:56:17 AM12/4/07
to architecture...@googlegroups.com
Hi,
I just introduced a dependency cycle to the packet structure of a
project, but the cycle is not detected by the tool when I use
<cyclicaldependency test="true">. Are there any known issues?
Axel

Mike Nereson

unread,
Dec 4, 2007, 9:22:09 AM12/4/07
to architecture...@googlegroups.com
Axel, no one has reported any issues with detecting dependencies. You
are the first.

--
~ Mike Nereson

Axel Böttcher

unread,
Dec 4, 2007, 10:57:27 AM12/4/07
to architecture...@googlegroups.com
so here is my minimalistic example (I fear that I made an embarassing
mistake). Test should fail

package a;
import b.*;
public class A {
public int fooA(){
B b = new B();
return b.bar() + 5;
}
public int bla() {
return 0;
}
}
/////////////// 8<
package b;
import a.*;
public class B {
public int bar() {
A a = new A();
return a.bla();
}
}
//// 8<
<architecture>
<configuration>
<sources no-packages="exception">
<source not-found="exception">bin/a</source>
<source not-found="exception">bin/b</source>
</sources>
<cyclicaldependency test="true"></cyclicaldependency>
</configuration>
<rules>
<rule id="base">
<comment>nothing that could be violated so far</comment>
<packages>
<package>a</package>
<package>b</package>
</packages>
<violations>
<!--<violation>b</violation>-->
</violations>
</rule>
</rules>
</architecture>


//// 8<
test class (part of it; w/o boilerplate code):
public String getConfigurationFileName() {
return "architecture-rules.xml";
}

public void testArchitecture() {
assertTrue(doTests());
}


Mike Nereson schrieb:

--
Prof. Dr. Axel Böttcher
Fakultät für Informatik und Mathematik
Hochschule für Angewandte Wissenschaften - FH MünchenLothstr. 34, 80335 München
Tel. +49(0)89 1265-3725 Fax: +49(0)89 1265-3780
URL: http://www.cs.fhm.edu/~boettcha/
------------------------------------------------------------------------------

Reply all
Reply to author
Forward
0 new messages