Java EE 7 教程 第一部分 简介 第2章 使用教程示例 第2.7节 教程中的Java EE 7 Maven原型

原文:http://docs.oracle.com/javaee/7/tutorial/doc/usingexamples007.htm

翻译:石卓林 shizhuolin@hotmail.com

2.7 Java EE 7 Maven Archetypes in the Tutorial

Some of the chapters have instructions on how to build an example application using Maven archetypes. Archetypes are templates for generating a particular Maven project. The Tutorial includes several Maven archetypes for generating Java EE 7 projects.

2.7.1 Installing the Tutorial Archetypes

You must install the included Maven archetypes into your local Maven repository before you can create new projects based on the archetypes. You can install the archetypes using NetBeans IDE or Maven.

2.7.1.1 Installing the Tutorial Archetypes Using NetBeans IDE
  • From the File menu, choose Open Project.
  • In the Open Project dialog box, navigate to: tut-install/examples
  • Select the archetypes folder.
  • Click Open Project.
  • In the Projects tab, right-click the archetypes project and select Build.
2.7.1.2 Installing the Tutorial Archetypes Using Maven
  • In a terminal window, go to: tut-install/examples/archetypes/
  • Enter the following command:
    mvn install

2.7 教程中的Java EE 7 Maven原型

部分章节介绍了如何使用Maven原型构建范例应用程序. 原型是用于创建特定Maven项目的模版. 本教程包含若干用于生成Java EE 7项目的Maven原型.

2.7.1 安装教程原型

你必须先安装本教程的Maven原型到本地的Maven仓库,然后才能创建基于对应原型的新项目. 可以使用NetBaens IDE或Maven安装这些原型.

2.7.1.1 使用NetBeans IDE安装教程原型
  • 文件 菜单中, 选择 打开项目.
  • 在打开项目对话框中, 浏览: tut-install/examples
  • 选中原型文件夹.
  • 单点 打开项目.
  • 项目 选项卡中, 右击原型项目并选中Build.
2.7.1.2 使用Maven安装教程原型
  • 在终端窗口中, 跳转到: tut-install/examples/archetypes/
  • 输入以下命令:
    mvn install
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值