Would it bother you to have a test dependency to mymodules-test.jar (assuming that is a jar built in its own project with its own POM. With a test dependency it won't be in your deployable but will be used during the test phase of the build.
-- Lee On Wed, Sep 9, 2009 at 1:55 PM, <[email protected]> wrote: > Hi, > > for one of my modules I´ve written a "JDependCycleTest" that checks the > internal packages from not having cyclic dependencies. > > ... > JDepend jdepend = new JDepend(); > jdepend.addDirectory(...); > > Collection col = jdepend.analyze(); > for (Iterator iter = col.iterator(); iter.hasNext();) > { > JavaPackage p = (JavaPackage) iter.next(); > > List<JavaPackage> cycles = new ArrayList<JavaPackage>(); > p.collectCycle(cycles); > > Assert.assertNotNull(p); > if( cycles.size() > 0) > { > Assert.fail("Cycle exists at package " + p.getName() + ": > " + toString(cycles)); > } > } > .. > > I want to check this in other modules too, without > - copying the Junit Test to other modules > - introducing a dependency to mymodules-test.jar > > Is there any plugin, that has this (JDepend) feature? > Or any other idea, to check in general for cyclic dependencies in all > modules? > > Thanx, Torsten > -- -- Lee Meador Sent from gmail. My real email address is lee AT leemeador.com
