MyEclipse使用总结——在MyEclipse中新建Maven框架的web项目[转]
前面的文章我们已经在本机安装好了maven,同时在myeclipse中配置好了maven的插件。
链接如下:
现在我们就开始在myeclipse中新建一个maven框架的web项目
新建项目
填写项目名称,一定记得勾选Add Maven support (java EE如果选取5.0报错,则选6.0)
我们的maven项目就新建好了,相关基本的依赖已经在pom.xml中.项目机构如下:
可能出现的错误及解决方案:
遇到的问题----新建maven项目ArtifactTransferException 和Execution default-testResources of goal
pom.xml的内容如下:
- <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>ipFilterM</groupId>
- <artifactId>ipFilterM</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <packaging>war</packaging>
- <name/>
- <description/>
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- </properties>
- <dependencies>
- <dependency>
- <groupId>org.glassfish</groupId>
- <artifactId>bean-validator</artifactId>
- <version>3.0-JBoss-4.0.2</version>
- </dependency>
- <dependency>
- <groupId>org.glassfish</groupId>
- <artifactId>javax.annotation</artifactId>
- <version>3.0.1</version>
- </dependency>
- <dependency>
- <groupId>org.glassfish</groupId>
- <artifactId>javax.ejb</artifactId>
- <version>3.0.1</version>
- </dependency>
- <dependency>
- <groupId>org.glassfish</groupId>
- <artifactId>javax.enterprise.deploy</artifactId>
- <version>3.0.1</version>
- </dependency>
- <dependency>
- <groupId>org.glassfish</groupId>
- <artifactId>javax.jms</artifactId>
- <version>3.0.1</version>
- </dependency>
- <dependency>
- <groupId>org.glassfish</groupId>
- <artifactId>javax.management.j2ee</artifactId>
- <version>3.0.1</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.persistence</groupId>
- <artifactId>javax.persistence</artifactId>
- <version>2.0.0</version>
- </dependency>
- <dependency>
- <groupId>org.glassfish</groupId>
- <artifactId>javax.resource</artifactId>
- <version>3.0.1</version>
- </dependency>
- <dependency>
- <groupId>org.glassfish</groupId>
- <artifactId>javax.security.auth.message</artifactId>
- <version>3.0.1</version>
- </dependency>
- <dependency>
- <groupId>org.glassfish</groupId>
- <artifactId>javax.security.jacc</artifactId>
- <version>3.0.1</version>
- </dependency>
- <dependency>
- <groupId>org.glassfish</groupId>
- <artifactId>javax.servlet</artifactId>
- <version>3.0.1</version>
- </dependency>
- <dependency>
- <groupId>org.glassfish</groupId>
- <artifactId>javax.servlet.jsp</artifactId>
- <version>3.0.1</version>
- </dependency>
- <dependency>
- <groupId>org.glassfish</groupId>
- <artifactId>javax.servlet.jsp.jstl</artifactId>
- <version>3.0.1</version>
- </dependency>
- <dependency>
- <groupId>org.glassfish</groupId>
- <artifactId>javax.transaction</artifactId>
- <version>3.0.1</version>
- </dependency>
- <dependency>
- <groupId>javax.xml.bind</groupId>
- <artifactId>jaxb-api-osgi</artifactId>
- <version>2.2.1</version>
- </dependency>
- <dependency>
- <groupId>javax.ws.rs</groupId>
- <artifactId>jsr311-api</artifactId>
- <version>1.1.1</version>
- </dependency>
- <dependency>
- <groupId>org.glassfish.web</groupId>
- <artifactId>jstl-impl</artifactId>
- <version>1.2</version>
- </dependency>
- <dependency>
- <groupId>javax.mail</groupId>
- <artifactId>mail</artifactId>
- <version>1.4.3</version>
- </dependency>
- <dependency>
- <groupId>javax.xml</groupId>
- <artifactId>webservices-api-osgi</artifactId>
- <version>2.0.1</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.weld</groupId>
- <artifactId>weld-osgi-bundle</artifactId>
- <version>1.0.1-SP3</version>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-war-plugin</artifactId>
- </plugin>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </project>
到这一步我们的web项目就建好了, 不过还有一步重要的步骤,就是把相关依赖的包下载到本地仓库。
对着项目右键: run as ----> maven install
在控制台就可以看到 依赖包开始自动从 maven的中央仓库开始下载
下载完后我们可以看到build success
到此为止,我们的maven框架的web项目就新建好了。
MyEclipse使用总结——在MyEclipse中新建Maven框架的web项目[转]的更多相关文章
- Eclipse中发布Maven管理的Web项目时找不到类的问题根源和解决办法(转)
转自:http://blog.csdn.net/lvguanming/article/details/37812579?locationNum=12 写在前面的话 现在是越来越太原讨厌Eclipse这 ...
- idea 中利用maven创建java web 项目
转自:http://www.linuxidc.com/Linux/2014-04/99687.htm 本文主要使用图解介绍了使用IntelliJ IDEA 12创建Maven管理的Java Web项目 ...
- eclipse中基于maven构建的web项目pom.xml中指定的jar包无法发布到tomcat中
eclipse运行maven web项目报错: 信息: Starting Servlet Engine: Apache Tomcat/7.0.57 一月 07, 2015 11:50:44 下午 or ...
- Maven入门1-在Eclipse中新建Maven Web项目
在eclipse中新建Maven Web项目 很多时候开发效率低下,大部分原因是IDE环境不熟悉.配置不会配置:因此在学习一项技能之前,有必要对基本的环境配置有所了解,正所谓磨刀不误砍柴工.这篇文章主 ...
- eclipse中使用Maven新建Servlet2.5的Web项目
前言 我们用Eclipse创建Maven结构的web项目的时候选择了Artifact Id为maven-artchetype-webapp,由于这个catalog比较老,用的servlet还是2.3的 ...
- Java web项目搭建系列之一 Eclipse中新建Maven项目
前提条件: 已经安装好JDK 已经安装好Maven 已经安装好Eclipse 已经安装好Maven插件 在Eclipse中新建Maven项目 [File]→[New]→[Other...] [Mave ...
- 在IntelliJ IDEA中新建Maven项目
在IntelliJ IDEA中新建Maven项目,选择“File->New->Project”,创建一个简单项目,不选择模板,如下图所示: 2 选择“Maven”,不需要使用内置结构(模板 ...
- Java归去来第4集:java实战之Eclipse中创建Maven类型的SSM项目
一.前言 如果还不了解剧情,请返回第3集的剧情 Java归去来第3集:Eclipse中给动态模块升级 二.在Eclipse中创建Maven类型的SSM项目 2.1:SSM简介 SSM ...
- 在eclipse中,用maven创建一个web项目工程
1.在eclipse中用maven创建项目,右键new>>Maven Project 2.点击next继续 3.点击next继续,选择maven-archetype-webapp, 4.点 ...
随机推荐
- grep 的一些常用用法
打印匹配到的上下5行 grep -C 5 'root' /etc/passwd 上下5行 grep -A 5 'root' /etc/passwd afte ...
- kettle 中 java.lang.ClassCastException: [B cannot be cast to java.lang.String报错的解决方法
问题描述:从数据库中查询出的某字段是json类型数据,然后在json输入步骤报错java.lang.ClassCastException: [B cannot be cast to java.lang ...
- uoj33 【UR #2】树上GCD
题目 大致是长剖+\(\rm dsu\ on\ tree\)的思想 先做一个转化,改为对于\(i\in[1,n-1]\)求出有多少个\(f(u,v)\)满足\(i|f(u,v)\),这样我们最后再做一 ...
- mysql UDF提权 sys_bineval
介绍: 执行shellcode – sys_bineval sqmapl自带udf.dll中存在函数’sys_bineval,执行shellcode – sys_bineval 利用: MSF生成sh ...
- TwainCapabilities
Twain Capabilities 2013年10月15日 ⁄ 综合 ⁄ 共 6098字 ⁄ 字号 小 中 大 ⁄ 评论关闭 转自:http://blog.163.com/lvan100@yeah/ ...
- PL SQL 12.0.7的安装及注册码,汉化包,连接Oracle远程数据库,中文乱码问题处理
首先,在官网下载PL SQL 的对应版本,本机是64位的就下载64位的,网址:https://www.allroundautomations.com/downloads.html#PLS 点击应用程序 ...
- 双十一HostGator独立服务器方案
一年一度的“双十一”购物狂欢节到来,各大电商平台线上消费的各种“吸金”开启了“双十一”模式,一年一度的“双十一”网购狂欢又开始以“巨大的价格优势”来勾起消费者的购买欲望. 此次双十一期间,HostGa ...
- Mysql ---Sqlserver数据迁移到Mysql(Mysql建表迁移数据)
1 试用了MysqlWorkBench的数据迁移功能 以为能实现:建立跟Sqlserver一样的表结构和视图的功能,sqlserver的数据迁移到mysql 实际上发现:即使勾选了表和视图,实际上却只 ...
- 校园商铺-4店铺注册功能模块-8店铺注册之Controller层的改造
不合理的地方: 1. 并不需要将InputStream转换成File类型,直接将InputStream传进入交给CommonsMultipartfile去处理就可以了 如果做这样的转换,每次都需要生成 ...
- CSS——溢出文字隐藏
溢出的文字隐藏 word-break:自动换行 normal 使用浏览器默认的换行规则. break-all 允许在单词内换行. keep-all 只能在半角空格或连字符处换行. 主要处理英文单词 w ...