blob: a2e733f1bdc57663a4b9ac61e539957a7108e454 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<title>
Overlapping products in a common source tree
</title>
<link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
</head>
<body>
<h1>
Overlapping products in a common source tree
</h1>
<p>The Java source files for the company's products are all held in a single package directory like this:
</p>
<p><img src="../images/qs-WorkingWithExistingLayout2.gif" width=509 height=251 alt="Layout 2">
</p>
<ol>
<li>Select the menu item <strong>File &gt; New &gt; Project...</strong>. to open the <strong>New Project</strong> wizard.
</li>
<li>
On the left pane of the first wizard page, select <strong>Java</strong>, and on the right pane, select <strong>Java Project</strong>.
Click <strong>Next</strong>.
</li>
<li>On the next page, type &quot;Product1&quot; in the <strong>Project name</strong> field. Click <strong>Next</strong>.
</li>
<li>
Select &quot;Product1&quot; source folder and click <strong>Edit...</strong>.
</li>
<li>
Click <strong>Create New Folder...</strong>. Type &quot;src&quot; in the <strong>Folder name</strong> field.
</li>
<li>
Click <strong>Advanced</strong>. Check <strong>Link to folder in the file system</strong>.
Click <strong>Browse....</strong> and choose the &quot;AllJavaSourceFiles&quot; directory.
<p><img src="../images/qs-WorkingWithExistingLayout21.gif" width=416 height=248 alt="New linked folder"></p>
</li>
<li>Click <strong>OK</strong> twice to close the two dialogs.
</li>
<li>Expand the &quot;src&quot; source folder. Select <strong>Exclusion filters</strong> and click <strong>Edit...</strong>.
</li>
<li>
Click <strong>Add...</strong>. Type &quot;com/xyz/product2/&quot; in the <strong>Add Exclusion Pattern</strong> dialog.
</li>
<li>Click <strong>OK</strong> twice to close the two dialogs.
</li>
<li>
Type &quot;Product1/bin&quot; in the <strong>Default output folder</strong> field.
<p><img src="../images/qs-WorkingWithExistingLayout22.gif" width=500 height=507 alt="Source and output page after setting output"></p>
</li>
<li>Click <strong>Finish</strong>.
</li>
<li>Repeat these steps for &quot;Product2&quot;, excluding &quot;com/xyz/product1/&quot; instead.
</li>
<li>
You now have two Java projects which respectively contain the sources of &quot;product1&quot; and &quot;product2&quot;.
<p><img src="../images/qs-WorkingWithExistingLayout23.gif" width=545 height=394 alt="Java perspective"></p>
</li>
</ol>
<p>
<img border="0" src="../images/ngrelc.gif" alt="Related concepts" width="159" height="27">
</p>
<p>
<a href="../concepts/concepts-3.htm">Java projects</a><br>
<a href="../tasks/tasks-6.htm">Java views</a><br>
</p>
<p>
<img src="../images/ngrelt.gif" alt="Related tasks" border="0" height="27" width="159">
</p>
<p>
<a href="../tasks/tasks-110.htm">Working with build paths</a><br>
<a href="../tasks/tasks-12.htm">Creating a new Java project</a><br>
<a href="../tasks/tasks-14.htm">Creating a Java project with source folders</a><br>
<a href="../tasks/tasks-26.htm">Creating a new source folder</a><br>
<a href="../tasks/tasks-45.htm">Using the Package Explorer</a><br>
</p>
<p>
<img src="../images/ngrelr.gif" width=159 height=27 alt="Related reference">
</p>
<p>
<a href="../reference/ref-121.htm">New Java Project Wizard</a><br>
<a href="../reference/ref-view-package-explorer.htm">Package Explorer View</a><br>
</p>
<p>
<a href="../hglegal2003.htm"><img src="../images/ngibmcpy2003.gif" width=324 height=14 alt="Copyright (c) 2000, 2003 IBM Corporation and others. All Rights Reserved." border="0"></a>
</p>
</body>
</html>