blob: 9549b93637b96e571d5b892a86479f7d1d01e1c3 [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 content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta name="copyright" content="Copyright (c) 2000, 2006 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" />
<meta name="DC.rights.owner" content="(C) Copyright 2000, 2006" />
<meta content="public" name="security" />
<meta content="index,follow" name="Robots" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta content="task" name="DC.Type" />
<meta name="DC.Title" content="Correcting cyclical dependencies after an EAR is imported" />
<meta name="abstract" content="You can resolve cyclical dependencies after an EAR is imported." />
<meta name="description" content="You can resolve cyclical dependencies after an EAR is imported." />
<meta content="cyclical dependencies, correcting, projects, correcting cyclical dependencies, J2EE modules" name="DC.subject" />
<meta content="cyclical dependencies, correcting, projects, correcting cyclical dependencies, J2EE modules" name="keywords" />
<meta scheme="URI" name="DC.Relation" content="../topics/tjimpear.html" />
<meta scheme="URI" name="DC.Relation" content="../topics/cjcircle.html" />
<meta content="XHTML" name="DC.Format" />
<meta content="tjcircleb" name="DC.Identifier" />
<meta content="en-us" name="DC.Language" />
<link href="../../org.eclipse.wst.doc.user/common.css" type="text/css" rel="stylesheet" />
<title>Correcting cyclical dependencies after an EAR
is imported</title>
</head>
<body id="tjcircleb"><a name="tjcircleb"><!-- --></a>
<h1 class="id_title">Correcting cyclical dependencies after an EAR
is imported</h1>
<div class="id_taskbody"><p class="id_shortdesc">You can resolve cyclical dependencies
after an EAR is imported.</p>
<div class="id_context"><p class="anchor_topictop">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>
<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 class="id_steps">
<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>Use the enterprise application editor to map utility JAR files
to the common projects.</span></li>
<li><span>Use the JAR dependency editor or properties page, for each module
of the JAR in the application, to set dependencies only to the JAR files that
are truly required.</span></li>
</ol>
<div class="id_postreq"><p class="anchor_topicbottom" />
</div>
</div>
<div><div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="../topics/cjcircle.html" title="">Cyclical dependencies between J2EE modules</a></div>
</div>
<div class="reltasks"><strong>Related tasks</strong><br />
<div><a href="../topics/tjimpear.html" title="Enterprise application projects are deployed into EAR files. You can import an enterprise application project by importing it from a deployed EAR file.">Importing an enterprise application EAR file</a></div>
</div>
</div>
</body>
</html>