SSH笔记一 用maven构建项目
2009-09-23 00:00:00 来源:WEB开发网2.4 在命令行下回到项目ssim目录下,运行
1mvn eclipse:eclipse
2.5 在myeclipse中导入生成的ssim项目,修改.mymetadata文件为
1<?xml version="1.0" encoding="UTF-8"?>
2<project-module
3 type="WEB"
4 name="ssim"
5 id="myeclipse.1234059775961"
6 context-root="/ssim"
7 j2ee-spec="1.4"
8 archive="ssim.war">
9 <attributes>
10 <attribute name="webrootdir" value="src/main/webapp" />
11 </attributes>
12</project-module>
2.6修改.project文件为
1 <?xml version="1.0" encoding="UTF-8"?>
2 <projectDescription>
3 <name>ssim</name>
4 <comment>Web application</comment>
5 <projects>
6 </projects>
7 <buildSpec>
8 <buildCommand>
9 <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
10 <arguments>
11 </arguments>
12 </buildCommand>
13 <buildCommand>
14 <name>com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder</name>
15 <arguments>
16 </arguments>
17 </buildCommand>
18 <buildCommand>
19 <name>org.eclipse.jdt.core.javabuilder</name>
20 <arguments>
21 </arguments>
22 </buildCommand>
23 <buildCommand>
24 <name>com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator</name>
25 <arguments>
26 </arguments>
27 </buildCommand>
28 <buildCommand>
29 <name>com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator</name>
30 <arguments>
31 </arguments>
32 </buildCommand>
33 <buildCommand>
34 <name>org.eclipse.wst.validation.validationbuilder</name>
35 <arguments>
36 </arguments>
37 </buildCommand>
38 </buildSpec>
39 <natures>
40 <nature>org.maven.ide.eclipse.maven2Nature</nature>
41 <nature>com.genuitec.eclipse.j2eedt.core.webnature</nature>
42 <nature>org.eclipse.jdt.core.javanature</nature>
43 <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
44 </natures>
45 </projectDescription>
46
好了,用maven2构建的一个标准开发目录就建好了,将项目导入myeclipse,开发、调试、发布一举多得。今天到此为止,明天继续
更多精彩
赞助商链接