濡備綍浣跨敤eclipse浣跨敤Maven

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了濡備綍浣跨敤eclipse浣跨敤Maven相关的知识,希望对你有一定的参考价值。

鏍囩锛?a href='http://www.mamicode.com/so/1/cts' title='cts'>cts   pre   pat   compiler   tco   world   nta   瀹夎   win   

鐩綍
  • 濡備綍浣跨敤eclipse浣跨敤Maven
    • Maven Eclipse
      • 濡備綍浣跨敤eclipse浣跨敤Maven

        Maven Eclipse

        Eclipse 鎻愪緵浜嗕竴涓緢濂界殑鎻掍欢 m2eclipse 锛岃鎻掍欢鑳藉皢 Maven 鍜?Eclipse 闆嗘垚鍦ㄤ竴璧枫€?/p>

        鍦ㄦ渶鏂扮殑 Eclipse 涓嚜甯︿簡 Maven锛屾垜浠墦寮€锛學indows->Preferences锛屽鏋滀細鍑虹幇涓嬮潰鐨勭敾闈細

        鎶€鏈浘鐗? src=

        涓嬮潰鍒楀嚭 m2eclipse 鐨勪竴浜涚壒鐐癸細

        • 鍙互鍦?Eclipse 鐜涓婅繍琛?Maven 鐨勭洰鏍囨枃浠躲€?/li>
        • 鍙互浣跨敤鍏惰嚜甯︾殑鎺у埗鍙板湪 Eclipse 涓洿鎺ユ煡鐪?Maven 鍛戒护鐨勮緭鍑恒€?/li>
        • 鍙互鍦?IDE 涓嬫洿鏂?Maven 鐨勪緷璧栧叧绯汇€?/li>
        • 鍙互浣跨敤 Eclipse 寮€灞?Maven 椤圭洰鐨勬瀯寤恒€?/li>
        • Eclipse 鍩轰簬 Maven 鐨?pom.xml 鏉ュ疄鐜拌嚜鍔ㄥ寲绠$悊渚濊禆鍏崇郴銆?/li>
        • 瀹冭В鍐充簡 Maven 涓?Eclipse 鐨勫伐浣滅┖闂翠箣闂寸殑渚濊禆锛岃€屼笉闇€瑕佸畨瑁呭埌鏈湴 Maven 鐨勫瓨鍌ㄥ簱锛堥渶瑕佷緷璧栭」鐩湪鍚屼竴涓伐浣滃尯锛夈€?/li>
        • 瀹冨彲浠ヨ嚜鍔ㄥ湴浠庤繙绔殑 Maven 搴撲腑涓嬭浇鎵€闇€瑕佺殑渚濊禆浠ュ強婧愮爜銆?/li>
        • 瀹冩彁渚涗簡鍚戝锛屼负寤虹珛鏂?Maven 椤圭洰锛宲om.xml 浠ュ強鍦ㄥ凡鏈夌殑椤圭洰涓婂紑鍚?Maven 鏀寔銆?/li>
        • 瀹冩彁渚涗簡杩滅鐨?Maven 瀛樺偍搴撶殑渚濊禆鐨勫揩閫熸悳绱€?/li>

      • 閫夋嫨椤圭洰鐨勮矾寰勶紝鍗充娇鐢?Maven 鍒涘缓涓€涓」鐩椂鐨勫瓨鍌ㄨ矾寰勩€傚亣璁炬垜浠垱寤轰簡涓€涓」鐩細 consumerBanking. 閫氳繃 Maven 鏋勫缓 Java 椤圭洰 鏌ョ湅濡備綍浣跨敤 Maven 鍒涘缓涓€涓」鐩€?/p>

      • 鐐瑰嚮 Finish 鎸夐挳銆?/p>

        鎶€鏈浘鐗? src=

      鐜板湪锛屼綘鍙互鍦?Eclipse 涓湅鍒?Maven 椤圭洰銆?/p>

      鎶€鏈浘鐗? src=

      鐪嬩竴涓?consumerBanking 椤圭洰鐨勫睘鎬э紝浣犲彲浠ュ彂鐜?Eclipse 宸茬粡灏?Maven 鎵€渚濊禆鐨勯兘娣诲姞鍒颁簡瀹冪殑鏋勫缓璺緞閲屼簡銆?/p>

      鎶€鏈浘鐗? src=

      濂戒簡锛屾垜浠潵浣跨敤 Eclipse 鐨勭紪璇戝姛鑳芥潵鏋勫缓杩欎釜 Maven 椤圭洰銆?/p>

      • 鍙抽敭鎵撳紑 consumerBanking 椤圭洰鐨勪笂涓嬫枃鑿滃崟
      • 閫夋嫨 Run 閫夐」
      • 鐒跺悗閫夋嫨 maven package 閫夐」

      Maven 寮€濮嬫瀯寤洪」鐩紝浣犲彲浠ュ湪 Eclipse 鐨勬帶鍒跺彴鐪嬪埌杈撳嚭鏃ュ織銆?/p>

      [INFO] Scanning for projects...
      [INFO] -------------------------------------------------------------------
      [INFO] Building consumerBanking
      [INFO] 
      [INFO] Id: com.companyname.bank:consumerBanking:jar:1.0-SNAPSHOT
      [INFO] task-segment: [package]
      [INFO] -------------------------------------------------------------------
      [INFO] [resources:resources]
      [INFO] Using default encoding to copy filtered resources.
      [INFO] [compiler:compile]
      [INFO] Nothing to compile - all classes are up to date
      [INFO] [resources:testResources]
      [INFO] Using default encoding to copy filtered resources.
      [INFO] [compiler:testCompile]
      [INFO] Nothing to compile - all classes are up to date
      [INFO] [surefire:test]
      [INFO] Surefire report directory: 
      C:MVNconsumerBanking	argetsurefire-reports
      
      -------------------------------------------------------
       T E S T S
      -------------------------------------------------------
      Running com.companyname.bank.AppTest
      Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.047 sec
      
      Results :
      
      Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
      
      [INFO] [jar:jar]
      [INFO] -------------------------------------------------------------------
      [INFO] BUILD SUCCESSFUL
      [INFO] -------------------------------------------------------------------
      [INFO] Total time: 1 second
      [INFO] Finished at: Thu Jul 12 18:18:24 IST 2012
      [INFO] Final Memory: 2M/15M
      [INFO] -------------------------------------------------------------------
      

      鎶€鏈浘鐗? src=

      鐜板湪锛屽彸閿偣鍑?App.java锛?閫夋嫨 Run As 閫夐」銆傞€夋嫨 As Java App

      浣犲皢鐪嬪埌濡備笅缁撴灉锛?/p>

      Hello World!
      

      杞浇浜?https://www.runoob.com/maven/maven-eclipse.html

以上是关于濡備綍浣跨敤eclipse浣跨敤Maven的主要内容,如果未能解决你的问题,请参考以下文章

濡備綍浣跨敤 lftp 鏉ュ姞閫?ftp/https 涓嬭浇閫熷害 | Linux 涓浗

濡備綍浣跨敤Nmap杩涜绔彛鎵弿锛堜簲锛夊浣曡繘琛屾壂鎻忔妧鏈殑閫夋嫨

Linux浣跨敤java -jar鍚姩浼氳嚜鍔ㄥ仠姝㈤棶棰?濡備綍浣縥ar鍦╨inux涓婁竴鐩磋繍琛?

涓嶇啛缁?Git 琚紭鍖栦簡锛佽吘璁槸濡備綍浣跨敤 Git 鐨?锛?/h1>

濡備綍鎻愰珮绋嬪簭鍛樼殑閿洏浣跨敤鐜囷紵