锘??xml version="1.0" encoding="utf-8" standalone="yes"?> 鍦ㄥ畨瑁呭悗錛屽嚭鐜頒笅鍒楄鍛婏細 The Maven Integration requires that Eclipse be running in a JDK, because a number of Maven core plugins are using jars from the JDK. Please make sure the -vm option in eclipse.ini is pointing to a JDK and verify that Installed JRE’s are also using JDK installs. 瑙e喅錛?/p>
錛?錛夎緗郴緇熷畨瑁呯殑JDK鐩綍set your JDK as a default Java environment in eclipse (default installed JRE) Open eclipse. Click on ‘Window’ -> ‘Preferences’ -> ‘Java’ -> ‘Installed JREs’. If you can’t find any JDK on the list -> click ‘Add’ -> ‘Standard VM’ -> set all paths and click ‘Finish’. After that – check this JDK on the list of installed JREs and click ‘OK’. 錛?錛夊鍔燡DK璺緞鍒癳clipse.ini鏂囦歡涓?strong>add path to your SDK in eclipse.ini open ‘eclipse.ini’ and add there: -vm path_to_javaw_on_your_machine錛宻o in my example it will be (jdk1.6.0_17 on Windows):-vm your ‘eclipse.ini’ looks like this: -startup 閲嶅惎eclipse銆俁estart eclipse and everything should be fine.
鍦?lt;servers>涓姞鍏?br />
2.maven鍛戒護
mvn deploy:deploy-file -Durl=浠撳簱url -DrepositoryId=internal -Dfile=test.jar -DgroupId=com.ce.test -DartifactId=test -Dversion=1.0.0 -Dpackaging=jar -DgeneratePom=true
]]>
D:\\Java\jdk1.6.0_13\jre\bin\javaw
涓嶈兘鏈夌┖鏍鹼紝鍚﹀垯瑕佺敤~1浠f浛錛屽錛?nbsp;‘Program Files’ is ‘Progra~1′. Notice 1: Do not use paths with spaces! Replace all dir names with spaces to their shortcuts. For example: ‘Program Files’ is ‘Progra~1′.
瑕佸垎涓?琛屽啓銆侼otice 2: ‘-vm’ is in the first line, path is in the second line
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vm
D:\Java\jdk1.6.0_13\jre\bin\javaw
-vmargs
-Xms40m
-Xmx256m
-vm瑕佸湪-vmargs鍓嶉潰銆侼otice : ‘-vm’ must be "-vmargs" above
]]>
http://m2eclipse.sonatype.org/sites/m2e-extras/ (http://m2eclipse.sonatype.org/update-dev/鏃у湴鍧) (maven鎻掍歡棰濆闄勪歡鍦板潃)
http://subclipse.tigris.org/update_1.6.x (svn plugin)
http://propedit.sourceforge.jp/eclipse/updates/ (properties editor plugin)
http://java.decompiler.free.fr/jd-eclipse/update (java decompiler plugin )
http://log4e.jayefem.de/update (log eclipse plugin)
]]>
鑷粠2.0.9鍚庯紝鏂板浜?縐嶏紝鐜板湪鏈変簡6縐峴cope:
闃呰鍏ㄦ枃
]]>
銆愰棶棰樻弿榪般?
鍦╩aven2涓嬌鐢╰omcat plugin鍚姩web搴旂敤錛屽湪pom.xml涓姞鍏ヤ互涓嬮厤緗俊鎭細
<project> ... <build> <!-- To define the plugin version in your parent POM --> <pluginManagement> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>tomcat-maven-plugin</artifactId> <version>1.0-beta-1</version> </plugin> ... </plugins> </pluginManagement> <!-- To use the plugin goals in your POM or parent POM --> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>tomcat-maven-plugin</artifactId> <version>1.0-beta-1</version> </plugin> ... </plugins> </build> ... </project>
榪愯mvn tomcat:run鍚庯紝tomcat鎶?br />
銆愬垎鏋愬師鍥犮?nbsp;
鐢變簬CacheFilter瀹炵幇浜唈avax.servlet.Filter鎺ュ彛錛孎ilter鏄湪servlet-api.jar閲岋紝鍥犳pom涓湁
銆愯В鍐沖姙娉曘?
servlet-api鍔犲叆<scope>provided</scope>錛屽涓嬶細
榪欐牱淇敼鍚庯紝servlet-api.jar灝變笉浼氬湪榪愯tomcat鏃惰import榪涘幓浜嗭紝涓嶄細涓巘omcat鑷甫鐨剆ervlet-api鏈夊啿紿?br />
銆愰伩鍏嶆綾婚棶棰樼殑寤鴻銆?
娉ㄦ剰pom.xml涓叧浜庡寘鐨剆cope鐨勫畾涔夛紝瑙e喅姝ょ被鍖呭啿紿佷駭鐢熺殑闂