eclipse安装Maven插件M2E

首先安装tomcat插件:

 Tomcat插件下载地址:
http://etc.ecjtu.jx.cn/download/tomcatPluginV32beta3.zip

将插件拷到Eclipse的plugins目录下,解压缩。
在eclipse主目录下新建links目录,
在links目录新建tomcat.link,记事本打开,写入
path=D:/eclipse/plugins/com.sysdeo.eclipse.tomcat_3.2.0.beta3(目录为刚才解压的路径)


重新启动Eclipse,Window-Customize-选中Tomcat,Window-Preferences-设置Tomcat路径,
好了,按小猫按钮启动Tomcat吧

 

 

地址:

  

Nightly builds are available at: http://download.eclipse.org/technology/m2e/updates/N

Milestones builds: http://download.eclipse.org/technology/m2e/updates/M

 

1:定义Maven为单个用户而不是全局用户。

   只需将安装目录下的config/settings.xml复制到.m2目录下即可。

2:如果你想修改settings.xml文件,你可以在项目中创建对该文件的一个link。点击项目-创建文件-选择高级选项-创建该文件的link。

3:设置本地maven仓库的地址:

     | The path to the local repository maven will use to store artifacts.
   |
   | Default: ~/.m2/repository
  <localRepository>/path/to/local/repo</localRepository>
  -->

   比如。现在我希望我本地仓库为c:/dev/m2repo,那么可以改为

<localRepository>/dev/m2repo</localRepository>

然后运行mvn clean。

 

4:创建一个简单的maven项目

   执行 mvn archetype:create -DgroupId=com.test -DartifactId=mytest

   该语句创建一个叫mytest的项目。该项目包括一个com.test的group。

5:从eclipse创建一个maven项目

   使用eclipse的External tools。

   

I created an external tool configuration with the following settings:

 

Name:mvn archetype~create
Location:C:/dev/apache-maven-2.0.8/bin/mvn.bat
Working Directory:${workspace_loc}
Arguments:archetype:create -DgroupId=${string_prompt:groupId} -DartifactId=${string_prompt:artifactId}

 

 

5: (1)手工使用maven创建web项目

   mvn archetype:create
-DarchetypeGroupId=org.apache.maven.archetypes
-DarchetypeArtifactId=maven-archetype-webapp
-DarchetypeVersion=1.0
-DgroupId=com.maventest
-DartifactId=mywebtest
-Dversion=1.0-SNAPSHOT
或者(2) 从eclipse创建

 

Name:mvn archetype~create webapp
Location:C:/dev/apache-maven-2.0.8/bin/mvn.bat
Working Directory:${workspace_loc}
Arguments:archetype:create -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-webapp -DarchetypeVersion=1.0 -DgroupId=${string_prompt:groupId} -DartifactId=${string_prompt:artifactId}

 

 

对于有父子关系的项目,必须先install父项目,子项目才能运行

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

帆软爱好者

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值