Java EE 7 教程 第一部分 简介 第2章 使用教程示例 第2.6节 教程示例目录结构
2014-12-04 17:48
555 查看
原文:http://docs.oracle.com/javaee/7/tutorial/doc/usingexamples006.htm
翻译:石卓林 shizhuolin@hotmail.com
Each application module has the following structure:
pom.xml: Maven build file
src/main/java: Java source files for the module
src/main/resources: configuration files for the module, with the exception of web applications
src/main/webapp: web pages, style sheets, tag files, and images (web applications only)
src/main/webapp/WEB-INF: configuration files for web applications (web applications only)
When an example has multiple application modules packaged into an EAR file, its submodule directories use the following naming conventions:
example-name-app-client: application clients
example-name-ejb: enterprise bean JAR files
example-name-war: web applications
example-name-ear: enterprise applications
example-name-common: library JAR containing components, classes, and files used by other modules
The Maven build files (pom.xml) distributed with the examples contain goals to compile and assemble the application into the target directory and deploy the archive to GlassFish Server.
每个应用程序模块都拥有以下结构:
pom.xml: Maven 构建文件
src/main/java: 此模块的Java源文件
src/main/resources: 此模块的配置文件(WEB应用程序除外)
src/main/webapp: 网页, 网页风格, 标记文件和图像(仅web应用程序)
src/main/webapp/WEB-INF: WEB应用程序配置文件(仅WEB应用程序)
当某示例有多个应用程序模块被打包进一个EAR文件时, 其子模块目录使用下述命名预定:
example-name-app-client: 应用程序客户端
example-name-ejb: 企业bean JAR 文件
example-name-war: web应用程序
example-name-ear: 企业应用程序
example-name-common: JAR库包含组件, 类, 以及其他模块文件
Maven构建文件(POM.xml)作为样例开发配置,其包括目标编译,装配应用到目标目录,部署应用到glassfish服务器.
翻译:石卓林 shizhuolin@hotmail.com
2.6 Tutorial Example Directory Structure
To facilitate iterative development and keep application source files separate from compiled files, the tutorial examples use the Maven application directory structure.Each application module has the following structure:
pom.xml: Maven build file
src/main/java: Java source files for the module
src/main/resources: configuration files for the module, with the exception of web applications
src/main/webapp: web pages, style sheets, tag files, and images (web applications only)
src/main/webapp/WEB-INF: configuration files for web applications (web applications only)
When an example has multiple application modules packaged into an EAR file, its submodule directories use the following naming conventions:
example-name-app-client: application clients
example-name-ejb: enterprise bean JAR files
example-name-war: web applications
example-name-ear: enterprise applications
example-name-common: library JAR containing components, classes, and files used by other modules
The Maven build files (pom.xml) distributed with the examples contain goals to compile and assemble the application into the target directory and deploy the archive to GlassFish Server.
2.6 教学示例目录结构
为了便于重复开发和保持应用程序源文件与编译后文件的分隔, 本教程使用Maven应用程序目录结构.每个应用程序模块都拥有以下结构:
pom.xml: Maven 构建文件
src/main/java: 此模块的Java源文件
src/main/resources: 此模块的配置文件(WEB应用程序除外)
src/main/webapp: 网页, 网页风格, 标记文件和图像(仅web应用程序)
src/main/webapp/WEB-INF: WEB应用程序配置文件(仅WEB应用程序)
当某示例有多个应用程序模块被打包进一个EAR文件时, 其子模块目录使用下述命名预定:
example-name-app-client: 应用程序客户端
example-name-ejb: 企业bean JAR 文件
example-name-war: web应用程序
example-name-ear: 企业应用程序
example-name-common: JAR库包含组件, 类, 以及其他模块文件
Maven构建文件(POM.xml)作为样例开发配置,其包括目标编译,装配应用到目标目录,部署应用到glassfish服务器.
相关文章推荐
- Java EE 7 教程 第一部分 简介 第2章 使用教程示例 第2.3节 启动管理控制台
- Java EE 7 教程 第一部分 简介 第2章 使用教程示例 第2.5节 构建示例
- Java EE 7 教程 第一部分 简介 第2章 使用教程示例 第2.1节 需要的软件
- Java EE 7 教程 第一部分 简介 第2章 使用教程示例 第2.8节 获得最新教程
- Java EE 7 教程 第一部分 简介 第2章 使用教程示例 第2.2节 启动和停止GlassFish服务器
- Java EE 7 教程 第一部分 简介 第2章 使用教程示例 第2.9节 调试Java EE应用程序
- Java EE 7 教程 第一部分 简介 第2章 使用教程示例
- Java EE 7 教程 第一部分 简介 第2章 使用教程示例 第2.4节 启动和停止Java DB服务器
- Java EE 7 教程 第一部分 简介 第2章 使用教程示例 第2.7节 教程中的Java EE 7 Maven原型
- Java EE 7 教程 第一部分 简介 第1章 概述 第1.1节 Java EE 7 平台亮点
- Java EE 7 教程 第一部分 简介 第1章 概述 第1.8节 Java平台中的Java EE 7 API, 标准版7
- Java EE 7 教程 第一部分 简介
- Java EE 7 教程 第一部分 简介 第1章 概述 第1.5节 Web服务支持
- Java EE 7 教程 第一部分 简介 第1章 概述
- Java EE 7 教程 第一部分 简介 第1章 概述 第1.9节 GlassFish服务器工具
- Java EE 7 教程 第一部分 简介 第1章 概述 第1.6节 装配和部署Java EE应用
- Java EE 7 教程 第一部分 简介 第1章 概述 第1.2节 Java EE 应用模型
- end framework2使用教程【三】–模块目录结构和文件
- 【本文已迁移到“程序员文摘” http://programmerdigest.cn/category/lajp】LAJP系列教程-第一部分-简介
- 菜鸟教程之工具使用(二)——Maven打包非规范目录结构的Web项目