还在为jar下载而烦恼吗?还在为jar依赖关系而烦恼吗?还在为jar冲突而烦恼吗?强大的maven项目管理工具来拯救你们呢?自动下载jar,自动下载jar依赖包。你什么都不用做,只需要在中央仓库中copy相关代码即可。

中央仓库:http://mvnrepository.com/ 目前重在讲解maven的使用,具体教程后续补上。

更多干货等你来拿 http://www.itit123.cn/


以下内容是转载一米阳光做测试的 Eclipse+Maven创建webapp项目<一> 博客

博客原网址:http://www.cnblogs.com/candle806/p/3439469.html

Eclipse+Maven创建webapp项目<一>

1、开启eclipse,右键new——》other,如下图找到maven project

2、选择maven project,显示创建maven项目的窗口,勾选如图所示,Create a simple project

3、输入maven项目的基本信息,如下图所示:

4、完成maven项目的创建,生成相应的maven项目结果,如下所示,此处有部分结构是项目不需要的,我们需要去掉:

5、选择项目,右键选择Properties,进入属性页面,选择到Maven菜单下,如下图所示:

6、选择java版本为1.7,并去掉其他两项,如下图:

7、点击ok之后,再次回到项目结构,此时项目结构比较清晰,符合我们想要创建的maven项目

8、此时webapp下的结果还没有显示出来,因为此时我们还没有配置此的项目为web项目,再次进去Properties配置,如下图所示:

9、点击Further configuration available...,如下:

10、配置src/main/webapp,并勾选生成web.xml的选项,如下:

11、确定之后,返回到maven菜单下去掉Dynamic Web Module的勾选,点击ok,如下所示,webapp目录结构显示出来了:

12、此时还需要配置,src/main/webapp为“/”项目的根目录,如下所示:

13、完成如上配置后,最后完成maven webapp项目结构如下图所示:


知道怎么创建maven web项目了么?知道了我们就开始如何使用sitemesh框架

GitHub 加速计划 / ma / maven
36
0
下载
Maven: Apache Maven是一个开源的项目管理和构建工具,主要用于Java项目。适合需要自动化项目构建和依赖管理的开发者。特点包括约定优于配置、易于使用和社区驱动。
最近提交(Master分支:9 天前 )
6b7c9f2b Highlights - All services are injectable into mojos - Add InternalSession#getAllServices() to expose all DI service suppliers for the session (Map<Class<? extends Service>, Supplier<? extends Service>>) - Add Injector#bindSupplier(Class<T>, Supplier<T>) to bind a type directly to a Supplier - Adjust DI bootstrap/bindings (Injector/Binding/InjectorImpl, SisuDiBridgeModule) and touch minor call sites to respect the wiring - Mojos can be easily tested with a real session - @MojoTest(realSession=true) supported by MojoExtension; creates a real InternalSession via ApiRunner, otherwise uses SessionMock - New MojoRealSessionTest covers default/custom mock vs real-session paths Details - SessionScope alignment: when @Typed is empty, include only the class’s direct interfaces (not super-interfaces) - Testing support: SecDispatcherProvider for encrypted password handling without Sonatype dispatcher; expanded MojoTest for evaluator coverage - IT: add gh-11055-di-service-injection verifying DI service injection end-to-end with pre-populated resources under its/core-it-suite; integrated into TestSuiteOrdering 8 小时前
224874fe (cherry picked from commit 3fc29ffefe8e07fbe8e6b3e6107a388246b9511a) Co-authored-by: Arturo Bernal <abernal@apache.org> 12 小时前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐