Maven3 项目创建设置
来源:互联网 发布:论文表格数据来源 编辑:程序博客网 时间:2024/06/06 03:42
New Project
For this example I will be using Eclipse for my IDE.
- Download Eclipse IDE for Java EE Developers from http://www.eclipse.org/downloads/
- Unzip the contents in your root Eclipse folder. In my case I unzipped it in c:/java/eclipse
- Run the ‘eclipse.exe’ in [eclipse root]/eclipse
- Select a workspace location for Eclipse to store your projects. In my case I used the default location
- Click on the ‘Workbench’ icon
- Select Help -> Install New Software
- Click the ‘Add…’ button
- Name: m2eclipse
- Location: http://m2eclipse.sonatype.org/sites/m2e
- Click ‘OK’
- Check the ‘Maven Integration for Eclipse’ option
- Click ‘Next’
- Click ‘Next >’
- Select ‘I accept the terms of the license agreements’
- Click ‘Finish’
- Click ‘Restart Now’
- Select Window -> Preferences
- Add the Maven 3 location the you installed earlier
- Create a new Maven project by selecting File -> New -> Other…
- Select Maven -> Maven Project
- Check ‘Create a simple project (skip archetype selection)’
- Click ‘Next >’
- Enter Project Information
- Enter Group Id. This is the domain where the project is hosted. For example if the ‘Awesome’ project was hosted at GitHub then the Group Id would be ‘com.github.awesome’.
- Enter Artifact Id. This is the name of the resulting artifact. For example if Artifact Id is ‘awesome’ and the packaging is JAR the artifact will be named ‘awesome.jar’.
- The version can remain 0.0.1-SNAPSHOT
- Select the packaging that you desire
- Enter a Name. This name will show up in the console when you run Maven. This will also show up in the documentation that Maven generates
- Enter a Description. This is used in the documentation
- Click ‘Next >’
- Add a dependency on JUnit. One of the best features of m2eclipse plugin is the ability to search for available dependencies. (This feature does not work if you configure ‘M3_HOME’ instead of ‘M2_HOME’)
- Click ‘Finish’
- src – source and resource files
- target – compiled files, reports and generated artifacts
- main – application/library files
- test – test files
- java – java files
- resources – non java files like XML
Maven’s default package structure: - Open the pom.xml file.
- Add the compiler plugin so you can configure your JDK version. Search for the maven-compiler-plugin.
- For this example set the JDK version to 1.6
- Run ‘Maven install’ to verify that the project and environment is setup correctly
- The build was successful
maven需要的jar下载
0 0
- Maven3 项目创建设置
- Maven3创建web项目
- maven3创建项目
- myeclipse 创建 maven3 项目
- Maven3创建JavaWeb项目
- maven3命令创建 java项目,web项目。
- Eclipse集成Maven3后创建Java项目
- Maven3 用Maven创建一个web项目
- eclipse集成maven3后,创建java项目详细图解
- eclipse maven3 创建 maven 项目 之 HelloWorld 入门
- Maven3路程(六)用Maven创建Spring3 MVC项目
- eclipse集成maven3后,创建java项目详细图解
- Maven3路程(三)用Maven创建一个web项目
- eclipse集成maven3后,创建java项目详细图解
- Maven3路程(四)用Maven创建Struts2项目
- eclipse集成maven3后,创建java项目详细图解
- Maven3路程(四)用Maven创建Struts2项目
- Maven3路程(五)用Maven创建Hibernate项目
- 【跟我学spring 4.0 】之第六节-spring中scope作用域
- ListView的复用->购物车,listView的布局复用->聊天窗口
- Java toString() method
- android中的category(调用系统工具等)
- 一种我喜欢的vim的配置
- Maven3 项目创建设置
- CheckedTextView
- android应用安装成功之后删除apk文件
- 在hibernate启动的时候报了个错: 对实体 "characterEncoding" 的引用必须以 ';' 分隔符结尾
- 生命是一个长期而持续的积累过程
- 一些话语
- iOS 多线程的几种方法
- ubuntu sublime 等宽字体设置
- 通过Mybatis拦截器实现分页