⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jbx-j2eebuild.html

📁 java bian xie de cheng xu, henhao de a
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
  <meta http-equiv="Content-Type"
 content="text/html; charset=iso-8859-1">
  <meta name="GENERATOR"
 content="Mozilla/4.77 [en] (Windows NT 5.0; U) [Netscape]">
  <meta name="Author" content="Lata">
  <title>Building J2EE Modules</title>
  <link type="text/css" href="../jbdocs.css" rel="stylesheet">
</head>
<body>
<h1>Building J2EE Modules</h1>
<!--BNDX="iPlanet 6.0:hints and tips"-->
<p>This document provides specific information about packaging J2EE
modules in JBuilder X, including the use of custom filters and file
types.
<br>
</p>
<h2>Overview of J2EE Modules</h2>
<!--BNDX="iPlanet 6.0:editing deployment descriptors"--><!--BNDX="iPlanet 6.0:Properties panel"--><!--BNDX="guid property"--><b>J2EE
Modules</b><br>
J2EE modules in JBuilder can be created either from scratch or from an
existing directory containing appropriate descriptors using wizards
available in the object gallery (File|New). The following modules are
defined as J2EE modules in JBuilder X :<br>
<ul>
  <li>EJB (.jar) created using the EJB Module wizard on the
Enterprise|EJB page of the object gallery.<br>
  </li>
  <li>Web Application (.war) created using the Web Module wizard on the
Web page of the object gallery.</li>
  <li>Application Client (.jar) created using the Application Client
Module wizard on the Enterprise page of the object gallery.</li>
  <li>Connector (.rar) created using the Connector Module wizard on the
Enterprise page of the object gallery.</li>
  <li>Enterprise Archive (.ear) created using the Application Module
wizard on the Enterprise page of the object gallery.</li>
  <li>JBoss Service Archive (.sar) created using the JBoss Service
Module wizard on the Enterprise page of the object gallery.</li>
</ul>
<b>Module Build Properties</b><br>
Archive content is controlled by a combination of node level properties
(file types, filters and dependencies). Please note that the archive
content matches the contents of the module directory. Node level
properties are accessed by right clicking on a module and selecting
Properties. <br>
<span style="font-weight: bold; font-style: italic;">File Types</span><br>
The Module node contains a list of file types which controls the type
of files that are copied over from the project's output path to the
module directory before the archive is created.<br>
The file types listed in the module properties match the global file
types recognized by JBuilder (Tools|Preferences - Browser|File Types).
Each module has a list of preselected file types depending on the type
of module, for e.g. the EAR module has only the Archive and XML file
type selected by default. The web module has a larger list of file
types selected by default.<br>
Checking a file type in the list will automatically add a recursive
include filter for that file type (**/*.&lt;file type&gt;). This filter
will not be visible in the node properties. The file types thus work in
combination with the include/exclude filters. For example, adding a
recursive exclude filter for a certain file type will override the file
type selection. It is always easier (and preferable) to uncheck a file
type to exclude a file type from an archive rather than adding an
exclude filter.<br>
<span style="font-weight: bold; font-style: italic;">Filters (Classes
and Resources)<br>
</span>Archive content can be customized with the use of custom
filters. Filters can be added in the Content|Classes page of the
properties dialog box. The following default rules are applied for the
different module types :<br>
<ul>
  <li>&nbsp;
EJB JAR content is by default controlled by the classes defined in
the module descriptors and dependent classes. Any other classes have to
be added using custom filters. The Java Class file type is turned on by
default.</li>
  <li>&nbsp;
WAR by default includes all classes in the project's output path and
generated classes (IDL stubs etc.). The Java Class file type is turned
on by default.</li>
  <li>&nbsp;
Application Client by default includes all classes in the project's
output path and generated classes (IDL stubs etc.). The Java Class file
type is turned on by default.</li>
  <li>&nbsp;
RAR by default contains only descriptors i.e. classes in the
project's output are NOT included. The Java Class file type is turned
off by default.</li>
  <li>&nbsp;
EAR by default contains descriptors and archive files defined in the
descriptor. The Java Class file type is turned off by default.</li>
</ul>
<span style="font-style: italic;">Note : To add custom classes to a
module,
ensure that you turn off the Java class file type (if turned on by
default for the module) before adding a custom Java class include
filter. Turning on the Java class file type adds a filter to include
all classes in the project which will override any custom include class
filters.<br>
Please ensure that filters referencing files/directories with reference
to the root of the archive do not include a leading '/' <br
 style="font-style: italic;">
</span><span style="font-weight: bold; font-style: italic;"><span
 style="font-style: italic;"><span style="font-weight: bold;">Clean
Filters<br>
</span></span></span>Clean filters can be added in the Clean page of
the properties dialog box. These filters control the files that get
deleted
in the module directory before the module is rebuilt when you choose
either the Rebuild Project or the Rebuild Module context menu command.
A number
of clean filters (exclude filters) are added to prevent the deletion of
mandatory files e.g. descriptors, CVS content etc. Please ensure that
you add the appropriate exclude clean filters to prevent the deletion
of any custom content added manually to the module directory (e.g.
custom descriptors that JBuilder does not recognize). <br>
Note : Clean filters should start with a leading '/' when referencing
files/directories from the root of the archive.<br>
<span style="font-weight: bold; font-style: italic;"><span
 style="font-style: italic;"><span style="font-weight: bold;">Dependencies<br>
</span></span></span>The dependencies page is used to add libraries
to a module. Dependencies can be set in the Build|Dependencies page of
the properties dialog box. The list box in this viewer lists all
libraries
in a project including dependent libraries. The following defaults are
applied to the J2EE modules :<br>
<ul>
  <li>&nbsp;
EJB :&nbsp; All libraries are excluded by default. Including a
library will include the JAR inside the EJB JAR (at the root level).</li>
  <li>&nbsp;
WAR : All libraries except the server libraries (Client and Servlet)
are included in the WAR. Including a library will include the JAR in
the WAR's WEB-INF/lib directory.</li>
  <li>&nbsp;
Application Client : All libraries are excluded by default. Including
a library will expand the library inside the application client JAR.</li>
  <li>&nbsp;
RAR : All libraries are excluded by default. Including a library will
include the JAR inside the RAR (at the root level).</li>
  <li>&nbsp;
EAR : All libraries are excluded by default. Including a library will
include the JAR inside the EAR (at the root level). Use the
Application|Other page to include files in a specific directory
structure inside a EAR.</li>
</ul>
<span style="font-weight: bold;">Adding Custom File Types<br>
</span>Custom file types can be added to the file types that JBuilder
recognizes in the following manner :<br>
- Tools|Preferences. Click the Browser|File Types page.<br>
- Select Generic Resource File in the Recognized File Types list box.<br>
- Click Add to add custom extension.<br>
<span style="font-style: italic;">Note : Create all resource files in
the
project's source path to ensure that a resource file is copied over to
the project's output path and to the module directory.</span><br>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -