blob: a545ecfe3ffd53f9c9962a8322e3e8d58c82d302 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- /*******************************************************************************
* Copyright (c) 2000, 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/ -->
<link rel="stylesheet" type="text/css" href="../org.eclipse.wst.doc.user/common.css" />
<title>Correcting cyclical dependencies after an EAR is imported</title>
</head>
<body id="tjcircleb"><a name="tjcircleb"><!-- --></a>
<h1 class="topictitle1">Correcting cyclical dependencies after an EAR is imported</h1>
<div><p>You can resolve cyclical dependencies after an EAR is imported.</p>
<div class="section">A cyclical dependency between two or more modules in an enterprise
application most commonly occurs when projects are imported from outside the
workbench. When a cycle exists between two or more modules in an enterprise
application, the Java™ builder cannot accurately compute the build order
of the projects. Full builds fail under these conditions, or require several
invocations.<p>Therefore, the best practice is to organize your projects or
modules into components. This allows your module dependencies to function
as a tree instead of a cycle diagram. This practice has the added benefit
of producing a better factored and layered application.</p>
</div>
<ol><li><span>Identify all the classes within the JAR files that have cyclical
dependencies, then move those classes into a common Java project
or JAR file.</span></li>
<li><span>Map utility JAR files to the common projects.</span></li>
<li><span>Set dependencies only to the JAR files that are truly required.</span></li>
</ol>
</div>
<div><div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="../topics/cjcircle.html">Cyclical dependencies between J2EE modules</a></div>
</div>
</div>
</body>
</html>