锘??xml version="1.0" encoding="utf-8" standalone="yes"?>国产精品一区=区,国产一区二区三区日韩欧美,国产专区一区http://m.shnenglu.com/keigoliye/archive/2010/09/13/126511.html鏆楀鏁欑埗鏆楀鏁欑埗Mon, 13 Sep 2010 08:45:00 GMThttp://m.shnenglu.com/keigoliye/archive/2010/09/13/126511.htmlhttp://m.shnenglu.com/keigoliye/comments/126511.htmlhttp://m.shnenglu.com/keigoliye/archive/2010/09/13/126511.html#Feedback0http://m.shnenglu.com/keigoliye/comments/commentRss/126511.htmlhttp://m.shnenglu.com/keigoliye/services/trackbacks/126511.html

鍦ˋX3+SP3涓湁涓涓伐鍏稢ode Profiler錛岃繎鏉ュ彂鐜版槸闈炲父濂界敤鐨勫伐鍏鳳紝鍙互媯(gè)鏌ヤ唬鐮佽繍琛岀殑杞ㄨ抗錛屼互鍙?qiáng)浠g爜杩愯鐨勬棄櫁村Q屽浜庤窡韙唬鐮佹槸闈炲父鏈夋晥鐨勩?/p>


C++浠g爜搴﹂噺宸ュ叿-cccc
杞歡搴﹂噺澶氫釜鎸囨爣渚濊禆浜庝唬鐮佽緇熻錛屽姣忓崈琛屼唬鐮佸彂鐜?/span>bug絳夛紝鎵浠ヤ唬鐮佽鏄竴涓熀紜鏁版嵁銆侰CCC搴﹂噺鏁版嵁鍙粨鍚堟祴璇曢闄╁畬鍠勬祴璇曡鍒掋?br>

CodeStatistics
涓涓皬鐨勫懡浠よ宸ュ叿銆傛垜涓昏鐢ㄥ畠鏉ュ仛涓や歡浜嬫儏錛屼竴鑰呮槸浠g爜緇熻鍔熻兘錛涘彟涓鑰呮槸鍒犻櫎絀虹櫧琛屽姛鑳姐傚湪鏌愭鏃跺欙紝鎴戣寰楀浜庢暣鐞嗕唬鐮佸拰浜嗚В浠g爜鎯呭喌榪樻槸鏈変竴瀹氱殑甯姪浣滅敤鐨勩傛槑澶╂垜浼?xì)灏嗕唬鐮佺殑琛尵l撴潫絎︽牸寮忓姞涓婄殑錛屽綋鐒?dòng)灱寴q樻湁鍒嗘瀽浠g爜鍏冪礌錛屽鏈夊灝戜釜鍑芥暟錛屽灝戜釜綾伙紝涔熷湪鎴戠‘瀹氳娣誨姞鐨勫姛鑳戒箣鍐呫傚綋鐒?dòng)灱岃兘鏁寸悊浠g爜灏辨洿妫掍簡銆?br>

闈欐佷唬鐮佸垎鏋愬伐鍏稢ppcheck
Cppcheck鏄竴嬈懼紑婧?/span>c++闈欐佷唬鐮佸垎鏋愬伐鍏?/span>,鍦ㄦ嫻嬫簮鐮佹椂鍙牴鎹鍒欏氨鑳芥寲鎺樺嚭鐤戜技緙洪櫡,銆甯紑婧愰」鐩彂鐜扮殑bug鏈?/span>:

http://sourceforge.net/apps/mediawiki/cppcheck/index.php?title=Found_bugs

鍔熻兘姣旇緝寮哄ぇ,浣跨敤寰堢畝鍗?br>



 



鏆楀鏁欑埗 2010-09-13 16:45 鍙戣〃璇勮
]]>
HTML5灝濋矞(璁ヽanvas鍍廸lash涓鏍峰伐浣?浠庤屽埗浣滃鏉傜殑鍔ㄧ敾)http://m.shnenglu.com/keigoliye/archive/2010/05/20/115870.html鏆楀鏁欑埗鏆楀鏁欑埗Thu, 20 May 2010 01:41:00 GMThttp://m.shnenglu.com/keigoliye/archive/2010/05/20/115870.htmlhttp://m.shnenglu.com/keigoliye/comments/115870.htmlhttp://m.shnenglu.com/keigoliye/archive/2010/05/20/115870.html#Feedback0http://m.shnenglu.com/keigoliye/comments/commentRss/115870.htmlhttp://m.shnenglu.com/keigoliye/services/trackbacks/115870.html闃呰鍏ㄦ枃

鏆楀鏁欑埗 2010-05-20 09:41 鍙戣〃璇勮
]]>
紼嬪簭鍫嗘爤http://m.shnenglu.com/keigoliye/archive/2010/05/17/115585.html鏆楀鏁欑埗鏆楀鏁欑埗Mon, 17 May 2010 06:53:00 GMThttp://m.shnenglu.com/keigoliye/archive/2010/05/17/115585.htmlhttp://m.shnenglu.com/keigoliye/comments/115585.htmlhttp://m.shnenglu.com/keigoliye/archive/2010/05/17/115585.html#Feedback0http://m.shnenglu.com/keigoliye/comments/commentRss/115585.htmlhttp://m.shnenglu.com/keigoliye/services/trackbacks/115585.html
鍦ㄨ綆楁満棰嗗煙錛屽爢鏍堟槸涓涓笉瀹瑰拷瑙嗙殑姒傚康錛屼絾鏄緢澶氫漢鐢氳嚦鏄綆楁満涓撲笟鐨勪漢涔熸病鏈夋槑紜爢鏍堝叾瀹炴槸涓ょ鏁版嵁緇撴瀯銆?nbsp;
鍫嗘爤閮芥槸涓縐嶆暟鎹」鎸夊簭鎺掑垪鐨勬暟鎹粨鏋勶紝鍙兘鍦ㄤ竴绔?縐頒負(fù)鏍堥《(top))瀵規(guī)暟鎹」榪涜鎻掑叆鍜屽垹闄ゃ?nbsp;
瑕佺偣錛?nbsp;
鍫嗭細(xì)欏哄簭闅忔剰 
鏍堬細(xì)鍚庤繘鍏堝嚭(Last-In/First-Out) 
緙栬緫鏈鍫嗗拰鏍堢殑鍖哄埆 
涓銆侀澶囩煡璇嗏旂▼搴忕殑鍐呭瓨鍒嗛厤 
涓涓敱c/C++緙栬瘧鐨勭▼搴忓崰鐢ㄧ殑鍐呭瓨鍒嗕負(fù)浠ヤ笅鍑犱釜閮ㄥ垎 
1銆佹爤鍖猴紙stack錛夆?鐢辯紪璇戝櫒鑷姩鍒嗛厤閲婃斁 錛屽瓨鏀懼嚱鏁扮殑鍙傛暟鍊鹼紝灞閮ㄥ彉閲忕殑鍊肩瓑銆傚叾鎿嶄綔鏂瑰紡綾諱技浜庢暟鎹粨鏋勪腑鐨勬爤銆?nbsp;
2銆佸爢鍖猴紙heap錛?鈥?涓鑸敱紼嬪簭鍛樺垎閰嶉噴鏀撅紝 鑻ョ▼搴忓憳涓嶉噴鏀撅紝紼嬪簭緇撴潫鏃跺彲鑳界敱O(jiān)S鍥炴敹 銆傛敞鎰忓畠涓庢暟鎹粨鏋勪腑鐨勫爢鏄袱鍥炰簨錛屽垎閰嶆柟寮忓掓槸綾諱技浜庨摼琛ㄣ?nbsp;
3銆佸叏灞鍖猴紙闈欐佸尯錛夛紙static錛夆旓紝鍏ㄥ眬鍙橀噺鍜岄潤鎬佸彉閲忕殑瀛樺偍鏄斁鍦ㄤ竴鍧楃殑錛屽垵濮嬪寲鐨勫叏灞鍙橀噺鍜岄潤鎬佸彉閲忓湪涓鍧楀尯鍩燂紝 鏈垵濮嬪寲鐨勫叏灞鍙橀噺鍜屾湭鍒濆鍖栫殑闈欐佸彉閲忓湪鐩擱偦鐨勫彟涓鍧楀尯鍩熴?- 紼嬪簭緇撴潫鍚庣敱緋葷粺閲婃斁銆?nbsp;
4銆佹枃瀛楀父閲忓尯 鈥斿父閲忓瓧絎︿覆灝辨槸鏀懼湪榪欓噷鐨勩?紼嬪簭緇撴潫鍚庣敱緋葷粺閲婃斁 銆?nbsp;
5銆佺▼搴忎唬鐮佸尯鈥斿瓨鏀懼嚱鏁頒綋鐨勪簩榪涘埗浠g爜銆?nbsp;
浜屻佷緥瀛愮▼搴?nbsp;
榪欐槸涓涓墠杈堝啓鐨勶紝闈炲父璇︾粏 
//main.cpp 
int a = 0; 鍏ㄥ眬鍒濆鍖栧尯 
char *p1; 鍏ㄥ眬鏈垵濮嬪寲鍖?nbsp;
main() 

int b; 鏍?nbsp;
char s[] = "abc"; 鏍?nbsp;
char *p2; 鏍?nbsp;
char *p3 = "123456"; 123456\0鍦ㄥ父閲忓尯錛宲3鍦ㄦ爤涓娿?nbsp;
static int c =0錛?鍏ㄥ眬錛堥潤鎬侊級鍒濆鍖栧尯 
p1 = (char *)malloc(10); 
p2 = (char *)malloc(20); 

鍒嗛厤寰楁潵寰?0鍜?0瀛楄妭鐨勫尯鍩熷氨鍦ㄥ爢鍖恒?nbsp;
strcpy(p1, "123456"); 123456\0鏀懼湪甯擱噺鍖猴紝緙栬瘧鍣ㄥ彲鑳戒細(xì)灝嗗畠涓巔3鎵鎸囧悜鐨?123456"浼樺寲鎴愪竴涓湴鏂廣?nbsp;
緙栬緫鏈鍫嗗拰鏍堢殑鐞嗚鐭ヨ瘑 
1.鐢寵鏂瑰紡
stack: 
鐢辯郴緇熻嚜鍔ㄥ垎閰嶃?渚嬪錛屽0鏄庡湪鍑芥暟涓竴涓眬閮ㄥ彉閲?int b; 緋葷粺鑷姩鍦ㄦ爤涓負(fù)b寮杈熺┖闂?nbsp;
heap: 
闇瑕佺▼搴忓憳鑷繁鐢寵錛屽茍鎸囨槑澶у皬錛屽湪c涓璵alloc鍑芥暟 
濡俻1 = (char *)malloc(10); 
鍦–++涓敤new榪愮畻絎?nbsp;
濡俻2 = new char[20];//(char *)malloc(10); 
浣嗘槸娉ㄦ剰p1銆乸2鏈韓鏄湪鏍堜腑鐨勩?nbsp;
2.鐢寵鍚庣郴緇熺殑鍝嶅簲 
鏍堬細(xì)鍙鏍堢殑鍓╀綑絀洪棿澶т簬鎵鐢寵絀洪棿錛岀郴緇熷皢涓虹▼搴忔彁渚涘唴瀛橈紝鍚﹀垯灝嗘姤寮傚父鎻愮ず鏍堟孩鍑恒?nbsp;
鍫嗭細(xì)棣栧厛搴旇鐭ラ亾鎿嶄綔緋葷粺鏈変竴涓褰曠┖闂插唴瀛樺湴鍧鐨勯摼琛紝褰撶郴緇熸敹鍒扮▼搴忕殑鐢寵鏃訛紝浼?xì)閬嶅巻璇ラ摼琛ㄥQ屽鎵劇涓涓┖闂村ぇ浜庢墍鐢寵絀洪棿鐨勫爢緇撶偣錛岀劧鍚庡皢璇ョ粨鐐逛粠絀洪棽緇撶偣閾捐〃涓垹闄わ紝騫跺皢璇ョ粨鐐圭殑絀洪棿鍒嗛厤緇欑▼搴忥紝鍙﹀錛屽浜庡ぇ澶氭暟緋葷粺錛屼細(xì)鍦ㄨ繖鍧楀唴瀛樼┖闂翠腑鐨勯鍦板潃澶勮褰曟湰嬈″垎閰嶇殑澶у皬錛岃繖鏍鳳紝浠g爜涓殑delete璇彞鎵嶈兘姝g‘鐨勯噴鏀炬湰鍐呭瓨絀洪棿銆傚彟澶栵紝鐢變簬鎵懼埌鐨勫爢緇撶偣鐨勫ぇ灝忎笉涓瀹氭濂界瓑浜庣敵璇風(fēng)殑澶у皬錛岀郴緇熶細(xì)鑷姩鐨勫皢澶氫綑鐨勯偅閮ㄥ垎閲嶆柊鏀懼叆絀洪棽閾捐〃涓?nbsp;
3.鐢寵澶у皬鐨勯檺鍒?nbsp;
鏍堬細(xì)鍦╓indows涓?鏍堟槸鍚戜綆鍦板潃鎵╁睍鐨勬暟鎹粨鏋勶紝鏄竴鍧楄繛緇殑鍐呭瓨鐨勫尯鍩熴傝繖鍙ヨ瘽鐨勬剰鎬濇槸鏍堥《鐨勫湴鍧鍜屾爤鐨勬渶澶у閲忔槸緋葷粺棰勫厛瑙勫畾濂界殑錛屽湪 WINDOWS涓嬶紝鏍堢殑澶у皬鏄?M錛堜篃鏈夌殑璇存槸1M錛屾諱箣鏄竴涓紪璇戞椂灝辯‘瀹氱殑甯告暟錛夛紝濡傛灉鐢寵鐨勭┖闂磋秴榪囨爤鐨勫墿浣欑┖闂存椂錛屽皢鎻愮ずoverflow銆傚洜姝わ紝鑳戒粠鏍堣幏寰楃殑絀洪棿杈冨皬銆?nbsp;
鍫嗭細(xì)鍫嗘槸鍚戦珮鍦板潃鎵╁睍鐨勬暟鎹粨鏋勶紝鏄笉榪炵畫鐨勫唴瀛樺尯鍩熴傝繖鏄敱浜庣郴緇熸槸鐢ㄩ摼琛ㄦ潵瀛樺偍鐨勭┖闂插唴瀛樺湴鍧鐨勶紝鑷劧鏄笉榪炵畫鐨勶紝鑰岄摼琛ㄧ殑閬嶅巻鏂瑰悜鏄敱浣庡湴鍧鍚戦珮鍦板潃銆傚爢鐨勫ぇ灝忓彈闄愪簬璁$畻鏈虹郴緇熶腑鏈夋晥鐨勮櫄鎷熷唴瀛樸傜敱姝ゅ彲瑙侊紝鍫嗚幏寰楃殑絀洪棿姣旇緝鐏墊椿錛屼篃姣旇緝澶с?nbsp;
4.鐢寵鏁堢巼鐨勬瘮杈?nbsp;
鏍堢敱緋葷粺鑷姩鍒嗛厤錛岄熷害杈冨揩銆備絾紼嬪簭鍛樻槸鏃犳硶鎺у埗鐨勩?nbsp;
鍫嗘槸鐢眓ew鍒嗛厤鐨勫唴瀛橈紝涓鑸熷害姣旇緝鎱紝鑰屼笖瀹規(guī)槗浜х敓鍐呭瓨紕庣墖,涓嶈繃鐢ㄨ搗鏉ユ渶鏂逛究. 
鍙﹀錛屽湪WINDOWS涓嬶紝鏈濂界殑鏂瑰紡鏄敤VirtualAlloc鍒嗛厤鍐呭瓨錛屼粬涓嶆槸鍦ㄥ爢錛屼篃涓嶆槸鍦ㄦ爤,鑰屾槸鐩存帴鍦ㄨ繘紼嬬殑鍦板潃絀洪棿涓繚鐣欎竴蹇唴瀛橈紝铏界劧鐢ㄨ搗鏉ユ渶涓嶆柟渚褲備絾鏄熷害蹇紝涔熸渶鐏墊椿 
5.鍫嗗拰鏍堜腑鐨勫瓨鍌ㄥ唴瀹?nbsp;
鏍堬細(xì) 鍦ㄥ嚱鏁拌皟鐢ㄦ椂錛岀涓涓繘鏍堢殑鏄富鍑芥暟涓嚱鏁拌皟鐢ㄥ悗鐨勪笅涓鏉℃寚浠わ紙鍑芥暟璋冪敤璇彞鐨勪笅涓鏉″彲鎵ц璇彞錛夌殑鍦板潃錛岀劧鍚庢槸鍑芥暟鐨勫悇涓弬鏁幫紝鍦ㄥぇ澶氭暟鐨凜緙栬瘧鍣ㄤ腑錛屽弬鏁版槸鐢卞彸寰宸﹀叆鏍堢殑錛岀劧鍚庢槸鍑芥暟涓殑灞閮ㄥ彉閲忋傛敞鎰忛潤鎬佸彉閲忔槸涓嶅叆鏍堢殑銆?nbsp;
褰撴湰嬈″嚱鏁拌皟鐢ㄧ粨鏉熷悗錛屽眬閮ㄥ彉閲忓厛鍑烘爤錛岀劧鍚庢槸鍙傛暟錛屾渶鍚庢爤欏舵寚閽堟寚鍚戞渶寮濮嬪瓨鐨勫湴鍧錛屼篃灝辨槸涓誨嚱鏁頒腑鐨勪笅涓鏉℃寚浠わ紝紼嬪簭鐢辮鐐圭戶緇繍琛屻?nbsp;
鍫嗭細(xì)涓鑸槸鍦ㄥ爢鐨勫ご閮ㄧ敤涓涓瓧鑺傚瓨鏀懼爢鐨勫ぇ灝忋傚爢涓殑鍏蜂綋鍐呭鏈夌▼搴忓憳瀹夋帓銆?nbsp;
6.瀛樺彇鏁堢巼鐨勬瘮杈?/div>
char s1[] = "aaaaaaaaaaaaaaa"; 
char *s2 = "bbbbbbbbbbbbbbbbb"; 
aaaaaaaaaaa鏄湪榪愯鏃跺埢璧嬪肩殑錛?nbsp;
鑰宐bbbbbbbbbb鏄湪緙栬瘧鏃跺氨紜畾鐨勶紱 
浣嗘槸錛屽湪浠ュ悗鐨勫瓨鍙栦腑錛屽湪鏍堜笂鐨勬暟緇勬瘮鎸囬拡鎵鎸囧悜鐨勫瓧絎︿覆(渚嬪鍫?蹇?nbsp;
姣斿錛?nbsp;
#include 
void main() 

char a = 1; 
char c[] = "1234567890"; 
char *p ="1234567890"; 
a = c[1]; 
a = p[1]; 
return; 

瀵瑰簲鐨勬眹緙栦唬鐮?nbsp;
10: a = c[1]; 
00401067 8A 4D F1 mov cl,byte ptr [ebp-0Fh] 
0040106A 88 4D FC mov byte ptr [ebp-4],cl 
11: a = p[1]; 
0040106D 8B 55 EC mov edx,dword ptr [ebp-14h] 
00401070 8A 42 01 mov al,byte ptr [edx+1] 
00401073 88 45 FC mov byte ptr [ebp-4],al 
絎竴縐嶅湪璇誨彇鏃剁洿鎺ュ氨鎶婂瓧絎︿覆涓殑鍏冪礌璇誨埌瀵勫瓨鍣╟l涓紝鑰岀浜岀鍒欒鍏堟妸鎸囬拡鍊艱鍒癳dx涓紝鍦ㄦ牴鎹甧dx璇誨彇瀛楃錛屾樉鐒舵參浜嗐?nbsp;
7.灝忕粨錛?nbsp;
鍫嗗拰鏍堢殑鍖哄埆鍙互鐢ㄥ涓嬬殑姣斿柣鏉ョ湅鍑猴細(xì) 
浣跨敤鏍堝氨璞℃垜浠幓楗閲屽悆楗紝鍙鐐硅彍錛堝彂鍑虹敵璇鳳級銆佷粯閽便佸拰鍚冿紙浣跨敤錛夛紝鍚冮ケ浜嗗氨璧幫紝涓嶅繀鐞嗕細(xì)鍒囪彍銆佹礂鑿滅瓑鍑嗗宸ヤ綔鍜屾礂紕椼佸埛閿呯瓑鎵熬宸ヤ綔錛屼粬鐨勫ソ澶勬槸蹇嵎錛屼絾鏄嚜鐢卞害灝忋?nbsp;
浣跨敤鍫嗗氨璞℃槸鑷繁鍔ㄦ墜鍋氬枩嬈㈠悆鐨勮彍鑲達(dá)紝姣旇緝楹葷儲(chǔ)錛屼絾鏄瘮杈冪鍚堣嚜宸辯殑鍙e懗錛岃屼笖鑷敱搴﹀ぇ銆?nbsp;
緙栬緫鏈鍫嗗拰鏍堢殑鍖哄埆涓昏鍒嗭細(xì) 
鎿嶄綔緋葷粺鏂歸潰鐨勫爢鍜屾爤錛屽涓婇潰璇寸殑閭d簺錛屼笉澶氳浜嗐?nbsp;
榪樻湁灝辨槸鏁版嵁緇撴瀯鏂歸潰鐨勫爢鍜屾爤錛岃繖浜涢兘鏄笉鍚岀殑姒傚康銆傝繖閲岀殑鍫嗗疄闄呬笂鎸囩殑灝辨槸錛堟弧瓚沖爢鎬ц川鐨勶級浼樺厛闃熷垪鐨勪竴縐嶆暟鎹粨鏋勶紝絎?涓厓绱犳湁鏈楂樼殑浼樺厛鏉冿紱鏍堝疄闄呬笂灝辨槸婊¤凍鍏堣繘鍚庡嚭鐨勬ц川鐨勬暟瀛︽垨鏁版嵁緇撴瀯銆?nbsp;
铏界劧鍫嗘爤錛屽爢鏍堢殑璇存硶鏄繛璧鋒潵鍙紝浣嗘槸浠栦滑榪樻槸鏈夊緢澶у尯鍒殑錛岃繛鐫鍙彧鏄敱浜庡巻鍙茬殑鍘熷洜銆?/div>
 
×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
鎺ヤ笅鏉ヤ富瑕佽 symbian 涓殑搴旂敤
銆涓嶇鏄湪鍫嗘爤榪樻槸鍫嗭紝瀵硅薄閮芥湁鑷繁鐨勭敓鍛芥湡錛屽叿浣撳涓嬶細(xì) 
銆銆1銆佺粰瀵硅薄鍒嗛厤鍐呭瓨錛誨爢鏍堟垨鑰呭爢錛?nbsp;
銆銆2銆佸垵濮嬪寲錛氫篃灝辨槸緇欏璞℃墍鍦ㄧ殑鍐呭瓨璧嬪?nbsp;
銆銆3銆佷嬌鐢ㄥ璞?nbsp;
    4銆佹竻闄わ細(xì)閲婃斁瀵硅薄浣跨敤鐨勫悇縐嶈祫婧?nbsp;
銆銆5銆侀噴鏀懼璞℃墍鍗犵殑鍐呭瓨錛諱粠鍫嗘爤鎴栬呭爢錛?nbsp;
銆銆瀵硅薄鐨勭敓瀛樻湡鏄竴涓熀紜姒傚康銆傚湪鏌愪簺鎿嶄綔緋葷粺錛屽畠鏄彲浠ュ拷鐣ョ殑錛屽洜涓虹▼搴忎腑姝㈢殑鏃跺欙紝鍫嗘爤鍜屽爢閮戒細(xì)琚攢姣併備絾鏄湪Symbian騫沖彴錛岀▼搴忓線寰闇瑕佽兘榪愯鏁頒釜鏈堛傝繖灝辨槸涓轟粈涔堝璞″湪鐢熷懡鏈熺粨鏉熺殑鏃跺欏氨蹇呴』椹笂娓呴櫎鎵鏈夊唴瀛樻槸閭d箞閲嶈鐨勫師鍥狅紝涓嶇瀹冧滑鍒嗛厤鍦ㄥ爢鏍堣繕鏄爢錛屼笉綆″畠浠敓鍛芥湡鐨勭粨鏉熸槸鍥犱負(fù)姝e父澶勭悊榪樻槸鍥犱負(fù)閿欒銆?nbsp;
Lifetimes in C 鐣?nbsp;
Lifetimes in C++ 鐣?nbsp;
Lifetimes in the Symbian platform


]]>PHPUnit琚栫弽鎸囧崡-絎竴绔?綆浠?/title><link>http://m.shnenglu.com/keigoliye/archive/2010/04/13/112486.html</link><dc:creator>鏆楀鏁欑埗</dc:creator><author>鏆楀鏁欑埗</author><pubDate>Tue, 13 Apr 2010 11:30:00 GMT</pubDate><guid>http://m.shnenglu.com/keigoliye/archive/2010/04/13/112486.html</guid><wfw:comment>http://m.shnenglu.com/keigoliye/comments/112486.html</wfw:comment><comments>http://m.shnenglu.com/keigoliye/archive/2010/04/13/112486.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/keigoliye/comments/commentRss/112486.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/keigoliye/services/trackbacks/112486.html</trackback:ping><description><![CDATA[     鎽樿: 杞嚜http://blog.csdn.net/summerfang/archive/2006/05/20/746219.aspx寰堥暱鏃墮棿閲岋紝鎴戝“浣犱粈涔堟椂鍊欎細(xì)涓篜HPUnit鍐欎竴涓枃妗?#8221;榪欎釜闂鐨勫洖絳旀槸錛?#8220;浣犱笉闇瑕丳HPUnit鏂囨。錛屽幓璇昏JUnit鏂囨。鎴栦拱涓鏈琂unit鐨勪功錛岃瘯涓璇曠敤PHP鍜孭HPUnit鏉ラ噸鍐橨ava鍜孞unit鐨勪緥瀛?#8221;銆傚綋鎴戝拰O...  <a href='http://m.shnenglu.com/keigoliye/archive/2010/04/13/112486.html'>闃呰鍏ㄦ枃</a><img src ="http://m.shnenglu.com/keigoliye/aggbug/112486.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/keigoliye/" target="_blank">鏆楀鏁欑埗</a> 2010-04-13 19:30 <a href="http://m.shnenglu.com/keigoliye/archive/2010/04/13/112486.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>PHPUnit琚栫弽鎸囧崡-姒傝堪http://m.shnenglu.com/keigoliye/archive/2010/04/13/112485.html鏆楀鏁欑埗鏆楀鏁欑埗Tue, 13 Apr 2010 11:27:00 GMThttp://m.shnenglu.com/keigoliye/archive/2010/04/13/112485.htmlhttp://m.shnenglu.com/keigoliye/comments/112485.htmlhttp://m.shnenglu.com/keigoliye/archive/2010/04/13/112485.html#Feedback0http://m.shnenglu.com/keigoliye/comments/commentRss/112485.htmlhttp://m.shnenglu.com/keigoliye/services/trackbacks/112485.html

杞嚜http://blog.csdn.net/summerfang/archive/2006/05/20/746216.aspx

鑱槑鐨?/span>Web寮鍙戜漢鍛樹細(xì)鍛婅瘔浣狅紝瓚婂揩鎵懼埌浠g爜鐨勯敊璇紝浣犲氨鑳借秺蹇慨姝e畠錛岄暱鏈熻岃█錛岄」鐩垚鏈秺浣庛傚ソ浜嗭紝鑳芥渶鏈夋晥鐨勬嫻?/span>PHP浠g爜涓殑閿欒鐨勫伐鍏鋒槸PHPUnit錛屼竴涓紑鍙戞簮浠g爜鐨勬鏋訛紝瀹冨湪浣犱笉鍦ㄧ殑鏃跺欙紝鑷姩榪涜鎴愬鐨勫崟鍏冩祴璇曘備嬌鐢?/span>PHPUnit鐨勫ソ澶勬槸鏄捐屾槗瑙佺殑錛?/span>

l         鍑忓皯鐢ㄤ簬嫻嬭瘯浠g爜鐨勫伐浣滈噺

l         鍑忓皯鎬諱綋杞歡緙洪櫡

l         澧炲姞瀵逛唬鐮佺殑淇″績

l         鏀瑰杽浣犲拰寮鍙戞簮浠g爜鐨勫洟闃熶紮浼寸殑鍏崇郴

鐩村埌鐜板湪錛岃繖涓祦琛屽伐鍏峰敮涓鐨勯棶棰樻槸緙轟箯鏂囨。銆備負(fù)浜嗚В鍐寵繖涓棶棰橈紝O’Reilly鐩存帴鎵懼埌浜嗘簮澶達(dá)紝PHPUnit鍙h涔︽寚鍗楃殑浣滆咃紝涔熸槸PHPUnit鐨勫垱閫犺咃紝Sebastian Bergmann錛屾潵瑙e喅榪欎釜闂銆傝繖鏈功鎶婂緢澶氶毦浠ヨ蹇嗙殑淇℃伅錛岃娉曪紝PHPUnit宸ヤ綔鐨勫師鍒欙紝緇熶竴鍒頒竴璧楓傚畠涔熷甫鏉ヤ簡鍙湁鎶鏈垱閫犺呮墠鑳芥彁渚涚殑媧炲療鍔涘拰鐫挎櫤蹇犲憡銆傝屼笖錛屾湰涔︿篃璋堝埌浜嗘晱鎹鋒柟娉曞拰鏋侀檺緙栫▼涓叧浜庢祴璇曠殑鍐呭銆?/span>

鍦?/span>O’Reilly鍙h涔︽寚鍗楁渶榪戠殑緋誨垪涓紝榪欐湰蹇熷弬鑰冧功鎶婃墍鏈夌殑絳旀閮藉甫鍒頒簡浣犵殑鎸囧皷銆傞偅浜涘嫻嬭瘯PHP浠g爜鎰熷叴瓚g殑Web搴旂敤紼嬪簭寮鍙戣咃紝浼?xì)瑙夊緱鏈功鏄竴涓棤浠風(fēng)殑浼翠荊銆?/span>

 

--------------------------------------------------------------------------------------------------------------

鍘熸枃錛?/span>

Overview

Smart web developers will tell you that the sooner you detect your code mistakes, the quicker you can fix them, and the less the project will cost in the long run. Well, the most efficient way to detect your mistakes in PHP is with PHPUnit, an open source framework that automates unit testing by running a battery of tests as you go. The benefits of PHPUnit are significant:

 

a reduction in the effort required to frequently test code

fewer overall defects

added confidence in your code

improved relations with your open source teammates

 

 

 

The only problem with this popular testing tool was its lack of documentation-until now, that is. For this, O'Reilly went right to the source, as Sebastian Bergmann, the author of PHPUnit Pocket Guide, also happens to be PHPUnit's creator. This little book brings together hard-to-remember information, syntax, and rules for working with PHPUnit. It also delivers the insight and sage advice that can only come from the technology's creator. Coverage of testing under agile methodologies and Extreme Programming (XP) is also included.

 

The latest in O'Reilly's series of handy Pocket Guides, this quick-reference book puts all the answers are right at your fingertips. It's an invaluable companion for anyone interested in testing the PHP code they write for web applications.



]]>
浣跨敤Flex Ant Tasks緙栬瘧宸ョ▼鏂囦歡http://m.shnenglu.com/keigoliye/archive/2010/04/12/112325.html鏆楀鏁欑埗鏆楀鏁欑埗Mon, 12 Apr 2010 07:08:00 GMThttp://m.shnenglu.com/keigoliye/archive/2010/04/12/112325.htmlhttp://m.shnenglu.com/keigoliye/comments/112325.htmlhttp://m.shnenglu.com/keigoliye/archive/2010/04/12/112325.html#Feedback0http://m.shnenglu.com/keigoliye/comments/commentRss/112325.htmlhttp://m.shnenglu.com/keigoliye/services/trackbacks/112325.html闃呰鍏ㄦ枃

]]>
涓緇熷ぉ涓嬶紝浣跨敤ANT鏋勫緩VS.NET宸ョ▼http://m.shnenglu.com/keigoliye/archive/2010/04/09/112079.html鏆楀鏁欑埗鏆楀鏁欑埗Fri, 09 Apr 2010 08:39:00 GMThttp://m.shnenglu.com/keigoliye/archive/2010/04/09/112079.htmlhttp://m.shnenglu.com/keigoliye/comments/112079.htmlhttp://m.shnenglu.com/keigoliye/archive/2010/04/09/112079.html#Feedback0http://m.shnenglu.com/keigoliye/comments/commentRss/112079.htmlhttp://m.shnenglu.com/keigoliye/services/trackbacks/112079.html
瀵筕S.NET宸ョ▼榪涜鑷姩鏋勫緩宸ヤ綔浣跨敤浠涔堬紵涔熻澶у浼?xì)寮傚彛鍚屽0鐨勮鏄疦ANT銆傚棷錛孨ANT鏃犵枒鏄嚜鍔ㄦ瀯寤篤S.NET宸ョ▼鏈蹇嵎鐨勫伐鍏鳳紝浣嗗浜庝竴涓嫢鏈夊涓紪紼嬭璦鐜鐨勯」鐩紝浣跨敤涓撶敤鐗堢殑ANT宸ュ叿鍗村茍涓嶆槸涓涓ソ鐨勮В鍐蟲柟妗堬紝璇曟兂錛屽鏋滀綘鐨勯」鐩嫢鏈夊涓敱涓嶅悓璇█寮鍙戠殑妯″潡錛岄偅涔堜綘鍙兘浼?xì)鍚屾椂鋴社敤ANT銆乄ANT銆丯ANT鏉ュ垎鍒鐞嗙壒瀹氱殑妯″潡銆?/div>
褰撶劧錛岃繖涓嶆槸鎴戜滑鎯崇湅鍒扮殑錛屽悓鏃剁淮鎶や笁涓瀯寤哄伐鍏峰疄鍦ㄤ笉鏄粈涔堟槑鏅轟箣涓撅紙褰撶劧錛屽鏋滀綘鍠滄錛岄偅灝辨棤鍙帤闈炰簡錛夛紝鍏跺疄ANT宸茬粡涓烘垜浠氬悆鎵鏈夎璦鐜鍑嗗濂戒簡綺懼叺鑹┕銆?/div>
ANT鐨別xec鏍囩鏄敤鏉ユ墽琛屼竴涓郴緇熷懡浠わ紝榪欐牱鎴戜滑灝卞彲浠ヤ嬌鐢ㄥ紑鍙戝伐鍏風(fēng)殑鍛戒護(hù)琛岀紪璇戞柟娉曟潵瀹屾垚鐩稿簲欏圭洰鐨勮嚜鍔ㄦ瀯寤哄伐浣溿備笅闈㈡垜浠彧浠嬬粛VS.NET宸ョ▼鐨勫懡浠よ緙栬瘧鏂規(guī)硶錛?/div>
VS.NET寮鍙戝伐鍏風(fēng)殑鍛戒護(hù)琛岀紪璇戝懡浠ゆ槸devenv錛屽綋鐒跺墠鎻愭槸灝哣S.NET鐨処DE鐩綍璺緞鏀劇疆鍒癙ATH鍙橀噺涓傝緗ソPATH鍙橀噺錛屽湪鎺у埗鍙頒腑閿叆devenv /?錛屾垜浠彲浠ョ湅鍒癡S.NET鐨勫悇涓弬鏁拌鏄庯紝濡備笅錛?/div>

Microsoft (R) 寮鍙戠幆澧?/span> 7.10.3077 鐗堛?/span>
鐗堟潈鎵鏈?/span>(C) Microsoft Corp 1984-2001銆備繚鐣欐墍鏈夋潈鍒┿?/span>
 
鐢ㄦ硶:
devenv [solutionfile | projectfile | anyfile.ext] [switches]
 
鍙互璋冪敤 devenv錛岀敤絎竴涓弬鏁版寚瀹氳В鍐蟲柟妗堟枃浠舵垨欏圭洰鏂囦歡銆?/span>
涔熷彲浠ヨ皟鐢?/span> devenv錛屼嬌絎竴涓弬鏁頒綔涓鴻鍦ㄧ紪杈戝櫒涓墦寮鐨勪換浣?/span>
鍏朵粬綾誨瀷鐨勬枃浠躲傚鏋滄彁渚涢」鐩枃浠訛紝IDE 灝嗛氳繃鍦ㄤ笌欏圭洰鏂囦歡
鐩稿悓鐨勭洰褰曚腑鏌ユ壘涓庨」鐩枃浠跺叿鏈夌浉鍚屽熀鍚嶇О鐨?/span> .sln 鏂囦歡錛屽湪
瑙e喅鏂規(guī)鐨勪笂涓嬫枃涓墦寮璇ラ」鐩枃浠躲傚鏋滃瓨鍦?/span> .sln 鏂囦歡錛屽垯
IDE 灝嗘煡鎵懼紩鐢ㄨ欏圭洰鐨勫崟涓?/span> .sln 鏂囦歡銆傚鏋滀笉瀛樺湪榪欐牱鐨勫崟
涓?/span> .sln 鏂囦歡錛屽垯 IDE 灝嗗垱寤轟竴涓叿鏈夐粯璁?/span> .sln 鏂囦歡鍚嶇殑鏈繚
瀛樼殑瑙e喅鏂規(guī)錛岃岃榛樿鏂囦歡鍚嶄笌欏圭洰鏂囦歡鍏鋒湁鐩稿悓鐨勫熀鍚嶇О銆?/span>
 
鍛戒護(hù)琛岀敓鎴?/span>:
devenv solutionfile.sln /build solutionconfig [ /project projectnameorfile [ /p
rojectconfig name ] ]
 
鍙敤鐨勫懡浠よ寮鍏?/span>:
 
/build          鐢熸垚鎸囧畾鐨勮В鍐蟲柟妗堥厤緗?/span>
/project        鎸囧畾鐢熸垚欏圭洰鑰屼笉鏄В鍐蟲柟妗?/span>
                蹇呴』鎸囧畾 /build 鎵嶈兘浣跨敤 /project
/projectconfig 鎸囧畾瑕佺敓鎴愮殑欏圭洰閰嶇疆
                蹇呴』鎸囧畾 /project 鎵嶈兘浣跨敤 /projectconfig
/out            灝嗙敓鎴愮粨鏋滃啓鍏ユ寚瀹氱殑鏂囦歡
/rebuild        涓?/span> /build 綾諱技錛屼絾鍏堟墽琛屽己鍒舵竻鐞?/span>
/clean          娓呯悊鐢熸垚緇撴灉
/deploy         鐢熸垚鎸囧畾鐨勮В鍐蟲柟妗堥厤緗劧鍚庨儴緗插畠
/run            榪愯鎸囧畾鐨勮В鍐蟲柟妗堥厤緗?/span>
/runexit        榪愯鎸囧畾鐨勮В鍐蟲柟妗堥厤緗劧鍚庣粓姝?/span>
/command        鍚姩鍚庢墽琛屾寚瀹氱殑鍐呴儴鍛戒護(hù)琛?/span>
/mditabs        浣跨敤閫夐」鍗″紡鏂囨。鐣岄潰
/mdi            浣跨敤 MDI 鐣岄潰
/fn             浣跨敤鎸囧畾鐨勫瓧浣撳悕縐?/span>
/fs             浣跨敤鎸囧畾鐨勫瓧浣撳ぇ灝?/span>
/LCID           浣跨敤鎸囧畾鐨勮璦 ID
/noVSIP         紱佺敤鐢ㄤ簬 VSIP 嫻嬭瘯鐨?/span>VSIP 寮鍙戜漢鍛樿鍙瘉瀵嗛挜
/safemode       鍑轟簬紼沖畾鎬т粎鍔犺澆榛樿鐨勭幆澧冨拰鏈嶅姟
/resetskippkgs 鍏佽鏇捐鏍囪涓哄姞杞藉け璐ョ殑 VsPackages
                鍐嶆鍔犺澆
/migratesettings 榪佺Щ鍙︿竴涓増鏈腑鐨勬煇浜涚敤鎴瘋緗?/span>
 
浜у搧鐗瑰畾鐨勫紑鍏?/span>:
 
/debugexe       鎵撳紑瑕佽皟璇曠殑鎸囧畾鍙墽琛屾枃浠躲?/span>
                鍛戒護(hù)琛岀殑鍏朵綑閮ㄥ垎浣滀負(fù)瀹冪殑鍙傛暟
                浼犻掑埌姝ゆ墽琛屾枃浠躲?/span>
/useenv         浣跨敤 PATH銆?/span>INCLUDE銆?/span>LIBPATH 鍜?/span> LIB 鐜鍙橀噺
                鑰屼笉鏄嬌鐢?/span> VC++ 鐢熸垚鐨?/span> IDE 璺緞銆?/span>
 
鑻ヨ浠庡懡浠よ闄勫姞璋冭瘯鍣紝璇蜂嬌鐢?/span>:
        vs7jit.exe -p <pid>

鍙VS.NET宸ュ叿涓烘垜浠彁渚涗簡璇稿鏀寔鍛戒護(hù)琛岀紪璇戠殑鍙傛暟錛岄偅鎺ヤ笅鏉ユ垜浠氨寮濮嬪姩鎵嬮厤緗瓸uild.xml鏂囦歡鍚э紝涓轟簡鑺傜渷綃囧箙錛屾垜榪欓噷鍙粰鍑篶ompile浠誨姟鐨勪唬鐮侊細(xì)

1    <target name="compile" depends="init">
2        <mkdir dir="${pdcu}"/>
3        <echo message="Compiling application main source..."/>
4                 <delete file="${infofile}"/>        
5        <exec dir="${pdir}\" executable="devenv" os="${build.os}" >
6             <arg line=" ${pname}.sln
7                                   /rebuild
8                                   release     
9                                   /useenv
10                                 /out ${infofile}
11                                 "/>
12       </exec>
13     <echo message="Compiling application main source complete."/>
14 <loadfile property="compiled-info"
15            srcFile="${infofile}"/>
16        <echo message="${compiled-info}"/>       
17 <condition property="compile-success">
18      <and>
19       <contains string="${compiled-info}" substring="0 宸插け璐?/span>"/>
20      </and>
21    </condition>
22 <fail unless="compile-success"
23        message="${compiled-info}"/>
24    </target>

鎴戜滑鏉ヨ緇嗗垎鏋愪竴涓嬩笂闈㈢殑浠g爜銆?/div>
絎?琛屾槸浠誨姟瀹氫箟錛屽湪姝や笉榪囧瑙i噴銆?/div>
2錛?琛屾槸浠誨姟瀹氫箟鍜屽噯澶囧伐浣滐紝涓昏鏄緩绔嬬紪璇戠敓鎴愮洰褰曞拰娓呯悊鏃х殑杈撳嚭鏂囦歡銆?/div>
5錛?2琛屼究鏄懡浠よ緙栬瘧鐨勪富瑕佷唬鐮侊紝鎴戜滑鏉ラ愪釜瑙i噴銆?/div>
絎?琛屽畾涔変簡涓涓猠xec鏍囩錛岀敤鏉ヨ皟鐢╠evenv鍛戒護(hù)錛屽茍鎸囧畾浜嗙紪璇戞墍鍦ㄥ綋鍓嶇洰褰昫ir灞炴э紝鍜屾搷浣滅郴緇熶俊鎭痮s灞炴с?/div>
浠庣6琛屽紑濮嬪垯涓篸evenv鍛戒護(hù)鐨勫弬鏁伴儴鍒嗐?/div>
鍏朵腑絎?琛屾寚瀹氫簡瑕佺紪璇戠殑瑙e喅鏂規(guī)銆?/div>
絎?琛屾爣鏄庤瑙e喅鏂規(guī)瑕佽繘琛岄噸鏂扮紪璇戙?/div>
絎?琛屾寚瀹氫簡緙栬瘧綾誨瀷涓簉elease妯″紡銆?/div>
絎?琛屾寚瀹氱紪璇戝櫒浣跨敤 PATH銆両NCLUDE銆丩IBPATH 鍜?LIB 鐜鍙橀噺銆?/div>
絎?0琛屾寚瀹氫簡緙栬瘧淇℃伅杈撳嚭鐨勬枃浠朵綅緗傜敱浜巇evenv鍛戒護(hù)鎵ц瀹屾瘯鍚庯紝ANT鏃犳硶浠庡懡浠よ鑾峰彇緙栬瘧淇℃伅錛屾墍浠ヤ笉鑳戒嬌鐢╡xec鐨刼utput灞炴ф潵鎸囧畾杈撳嚭浣嶇疆錛堝湪璋冪敤Delphi緙栬瘧鍣ㄧ殑鏃跺欙紝ANT鍙互姝e父鑾峰彇緙栬瘧淇℃伅錛屽洜姝utput灞炴ф湁鏁堬級錛屽彧鑳戒嬌鐢ㄧ紪璇戝櫒鎵鍏鋒湁鐨勫弬鏁板姛鑳藉皢淇℃伅杈撳嚭錛岃淇℃伅涓哄垽鏂紪璇戞垚鍔熶笌鍚︾殑鍏抽敭銆?/div>
14錛?5琛岃鍙栦簡涓婅堪鐨勭紪璇戜俊鎭枃浠剁殑鍐呭錛屼互渚夸箣鍚庡垽鏂紪璇戞槸鍚︽垚鍔熴?/div>
17錛?1琛屽垯瀹氫箟浜嗕竴涓紪璇戠粨鏋滐紝鐢ㄤ簬鍒ゆ柇緙栬瘧鏄惁鎴愬姛銆傜粨鏋滀嬌鐢ㄤ簡contains灞炴ф潵鍒ゆ柇錛屽鏋滆緭鍑烘枃浠朵腑鍖呭惈瀛楃涓?#8220;0 宸插け璐?#8221;錛屽垯璇存槑緙栬瘧鎴愬姛瀹屾垚銆?/div>
22錛?3琛屽垯鏄寚紺轟簡ANT錛屼竴鏃︾紪璇戝け璐ワ紝鍒欐墦鍗板嚭緙栬瘧淇℃伅銆?/div>
褰撶劧錛岃繖閲屽彧浠嬬粛浜嗙紪璇慥S.NET宸ョ▼鐨勫叾涓竴縐嶆柟娉曪紝鍦ㄦ鎶涚爾寮曠帀銆傛棦鐒禔NT涓烘垜浠彁渚涗簡濡傛寮哄ぇ鐨勭郴緇熷懡浠ゆ墽琛屽姛鑳斤紝閭d箞鎴戜滑渚垮彲浠ュ湪鍚勭緙栫▼璇█鐜涓父鍒冩湁浣欎簡銆?/div>

]]>浣跨敤Ant榪涜ssh鍜宻cp鎿嶄綔http://m.shnenglu.com/keigoliye/archive/2010/04/09/112076.html鏆楀鏁欑埗鏆楀鏁欑埗Fri, 09 Apr 2010 08:29:00 GMThttp://m.shnenglu.com/keigoliye/archive/2010/04/09/112076.htmlhttp://m.shnenglu.com/keigoliye/comments/112076.htmlhttp://m.shnenglu.com/keigoliye/archive/2010/04/09/112076.html#Feedback0http://m.shnenglu.com/keigoliye/comments/commentRss/112076.htmlhttp://m.shnenglu.com/keigoliye/services/trackbacks/112076.html

涓銆佺畝浠嬶細(xì)
銆銆鐜板湪鎴戜滑瀹夎Linux鐨勬椂鍊欓氬父鑰冭檻鍒板畨鍏ㄥ洜绱狅紙榛樿鎯呭喌涓嬶級鏄笉鎵撳紑telnet鏈嶅姟鐨勶紝鑰宻sh鏈嶅姟鏄湁鐨勶紝ant寰堟棭灝辨敮鎸乼elnet錛屼絾瑕佹眰鎴戜滑鍦↙inux涓嬭瀹夎telnet-server,騫惰鍚敤璇ユ湇鍔°?/p>

榪樺ソ鑷狝nt1.60寮濮嬫敮鎸佷簡SSH 鍙?qiáng)SCP 鎿嶄綔浜嗭紝鏃╁湪Ant涔嬪墠鑻ヨ鏀寔SSH銆丼CP銆丼FTP絳変換鍔″氨蹇呴』涓嬭澆j2ssh鐨刯2ssh-ant.jar鍜宩2ssh-core.jar錛堝湪http://www.sourceforge.net鐨刯2ssh涓嬫湁涓嬭澆錛夈傜幇鍦ㄥ彲浠ヤ嬌鐢ˋnt鎻愪緵鐨凷shexec鍜宻cp浠誨姟錛岀敱$ANT_HOME/lib/ant-jsch.jar鎻愪緵鏀寔錛屼絾鏄悓鏍蜂綘涔熻鍦?a style="text-decoration: underline; color: rgb(0, 68, 182); ">http://www.jcraft.com/jsch/index.html涓嬭澆涓涓緷璧栧寘jsch-0.1.24.jar(鏂囦歡鍚嶅洜鐗堟湰鑰屼笉鍚?錛宩sch鍚屾牱涔熸槸http://www.sourceforge.net涓嬬殑涓涓」鐩?/p>

浣犻渶瑕佹妸涓嬭澆鐨刯sch-0.1.24鎷瘋礉鍒?ANT_HOME/lib涓嬶紝濡傛灉鏄疎clipse涓嬬殑Ant鐜蹇呴』鍦╓indow->Preferences->Ant->Runtime->Classpath涓姞鍏sch-0.1.24銆?/p>

JSch鏄竴涓猄SH2鐨勭函Java瀹炵幇
JSch鍏佽浣犺繛鎺ュ埌sshd server騫墮噰鐢ㄧ鍙f槧灝勶紝 X11 鏄犲皠; Scp鏂囦歡浼犺緭絳夛紝浣犲彲浠ユ妸闆嗘垚JSch鎻愪緵鐨勫姛鑳藉埌浣犺嚜宸辯殑Java欏圭洰涓紝JSch 鐨勬巿鏉冩柟寮忎負(fù) BSD褰㈠紡銆?/p>

浜屻佺畝鍗曚緥瀛愶細(xì)
銆銆涓嬮潰鏄敤JSch瀹屾垚Sshexec鍜宻cp涓や釜浠誨姟鐨勬渶綆鍗曚緥瀛愶紝濡傛灉闇瑕佹洿璇︾粏鐨勫唴瀹癸紝璇峰弬鑰傾nt鐢ㄦ埛鎵嬪唽

[Sshexec浠誨姟]
<BR><target name="sshexec">
      <sshexec host="192.168.122.180" username="root"  password="123456"
         trust="true" command="cd /;ls"/>
</target>

娉ㄦ剰涓婇潰鐨則rust灞炴т竴鑸緗負(fù)true,銆濡傛灉涓洪粯璁ゅ糵alse鏃?閭d箞灝辮姹備綘鎵榪炴帴鐨刪ost蹇呴』瀛樺湪浜庝綘鐨刱nownhosts鏂囦歡涓紝騫朵笖榪欎釜鏂囦歡涔熷繀欏繪槸瀛樺湪鐨勶紝鍚﹀垯浼?xì)鍑虹?com.jcraft.jsch.JSchException: reject HostKey: 192.168.122.180寮傚父銆傛墽琛孡inux涓嬬殑鍛戒護(hù)鏃跺彲浠ョ敤鍒嗗彿";"鎶婂涓懡浠ら殧寮錛屽畠浠皢浼?xì)渚潒啤鎵ц锛岃屼笉闇瑕佸啓澶氫釜sshexec榪涜澶氭榪炴帴錛屾瘡嬈¤繛鎺ュ彧鎵ц涓涓懡浠ゃ?/p>

璇ヤ換鍔$殑鎵ц鍚庤緭鍑虹粨鏋滃涓嬶細(xì)

sshexec:
  [sshexec] Connecting to 192.168.122.180:22
  [
sshexec] backup
  [
sshexec] bin
  [
sshexec] boot
  [
sshexec] dev
  [
sshexecetc
  ...................

[scp浠誨姟]

1.鎷瘋礉鍗曚釜鏂囦歡鍒拌繙绔湇鍔″櫒
<scp file="c:/cmd.txt" todir="root:123456@192.168.122.180:/tmp" trust="true"/>
鎴?/font>
<scp file="c:/cmd.txt" todir="root@192.168.122.180:/tmp" password="123456" trust="true"/>

2.鎷瘋礉榪滅鏂囦歡鏈湴
<scp file="root:123456@192.168.122.180:/tmp/cmd.txt" todir="D:/my-app"  trust="true"/>

3.鎷瘋礉榪滅鐩綍鍒版湰鍦幫紝灝嗕互閫掑綊褰㈠紡鎿嶄綔
<scp file="root:123456@192.168.122.180:/tmp/*" todir="d:/my-app" trust="true"/>

4.鎷瘋礉鏈湴鐩綍涓殑鍐呭鍒拌繙绔紝閫掑綊褰㈠紡錛屼絾涓嶅湪鏈嶅姟鍣ㄤ笂寤虹珛my-app鐩綍
<scp todir="root:123456@192.168.122.180:/tmp/" trust="true">
   
<fileset dir="d:/my-app"/>
</scp>

5.鎷瘋礉涓緋誨垪鐨勬枃浠跺埌榪滅錛屼細(xì)寤虹珛鐩稿簲鐨勫眰嬈$洰褰曪紝涓嶅緩绔媘y-app鐩綍
<scp todir="root:123456@192.168.122.180:/tmp" trust="true">
   
<fileset dir="d:/my-app">
      
<include name="**/*.java" />
   
</fileset>
</scp>
鎴?br style="font: normal normal normal 12px/normal song, Verdana; "><scp todir="root:123456@192.168.122.180:/tmp" trust="true">
   
<fileset dir="d:/my-app" excludes="**/*.java"/>
</scp>

鏈鍚庝竴涓換鍔$殑鎵ц杈撳嚭緇撴灉濡備笅錛堝叾浠栫暐錛夛細(xì)

scp:
      [scp]Connecting to 192.168.122.180:22
      [
scp] Sending: cmd.txt : 0
      [
scp] File transfer time: 0.0 Average Rate: ? B/s
      [
scp] Sending: pom.xml : 852
      [
scp] File transfer time: 0.0 Average Rate: ∞ B/s
      [
scp] Sending: application.properties : 142
      [
scp] File transfer time: 0.0 Average Rate: ∞ B/s
      [
scp] Sending: application.properties : 45
      [
scp] File transfer time: 0.0 Average Rate: ∞ B/s
      [
scp] Sending: test.properties : 0
      [
scp] File transfer time: 0.02 Average Rate: 0.0 B/s
      [
scp] Sending: application.properties : 153
      [
scp] File transfer time: 0.0 Average Rate: ∞ B/s
      [
scp] Sending: application.properties : 45
      [
scp] File transfer time: 0.0 Average Rate: ∞ B/s
      [
scp] done.

涓夈佸叾浠栦緥瀛愶細(xì)

渚嬪瓙1錛?/strong>
<?xml   version= "1.0 "?> 
<project   name= "buildssh "   default= "DEFAULT "   basedir= ". "> 
<target   name= "init "> 
<!--   set   properties,   mkdir,   etc.   --> 
<property   file= "build.properties "   /> 
<property   name= "this.project "   value= "buildssh "   /> 
<echo   message= "init   in   ${this.project} "   /> 
<tstamp   /> 
</target> 

<target   name= "DEFAULT "   depends= "init "> 
<echo   message= "connecting   to   ${build.server} "   /> 
<sshexec   host= "Linux   server   IP   address "   username= "Linux   server     username "   password= "Linux   server   password "   trust= "true "   command= "Command   you   want   to   run   on   the   server "   /> 
</target> 
</project>

渚嬪瓙2錛?/strong>
import   com.jcraft.jsch.Channel;       
import   com.jcraft.jsch.ChannelSftp;       
import   com.jcraft.jsch.JSch;       
import   com.jcraft.jsch.Session;       
import   com.jcraft.jsch.UserInfo;       
    
public   class   ExecSCP   {       
        public   static   final   UserInfo   defaultUserInfo   =   new   UserInfo(){       
                public   String   getPassphrase()   {       
                        return   null;       
                }       
    
                public   String   getPassword()   {       
                        return   null;       
                }       
    
                public   boolean   promptPassword(String   arg0)   {       
                        return   false;       
                }       
    
                public   boolean   promptPassphrase(String   arg0)   {       
                        return   false;       
                }       
    
                public   boolean   promptYesNo(String   arg0)   {       
                        return   true;       
                }       
    
                public   void   showMessage(String   arg0)   {       
                }       
        };       
    
        /**     
          *   @param   args     
          */     
public   static   void   main(String[]   args)   throws   Exception{ 
String   hostname   =   "www.mozat.com "; 
String   username   =   "wiimii "; 
String   password   =   "jtev000 "; 
String   remoteFile   =   "Setup.ini "; 
String   localFile   =   "C:\\ "; 

                JSch   jsch=new   JSch(); 

                Session   session=jsch.getSession(username,   hostname,   990); 
                session.setPassword(password); 
                session.setUserInfo(defaultUserInfo); 
                session.connect(); 

                Channel   channel=session.openChannel( "sftp ");       
                channel.connect();       
                ChannelSftp   c=(ChannelSftp)channel;       
                      
                c.get(remoteFile,   localFile);   
                
                session.disconnect(); 
              } 



]]>
linux鏈嶅姟鍣ㄤ笅鐢╝nt瀹炵幇SVN浠g爜鏇存柊錛岄儴緗?/title><link>http://m.shnenglu.com/keigoliye/archive/2010/04/09/112045.html</link><dc:creator>鏆楀鏁欑埗</dc:creator><author>鏆楀鏁欑埗</author><pubDate>Fri, 09 Apr 2010 03:23:00 GMT</pubDate><guid>http://m.shnenglu.com/keigoliye/archive/2010/04/09/112045.html</guid><wfw:comment>http://m.shnenglu.com/keigoliye/comments/112045.html</wfw:comment><comments>http://m.shnenglu.com/keigoliye/archive/2010/04/09/112045.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/keigoliye/comments/commentRss/112045.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/keigoliye/services/trackbacks/112045.html</trackback:ping><description><![CDATA[<span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">榪欐<span id="hvzpftn" class="hilite1" style="background-color: rgb(255, 255, 0); ">ant</span>鑴氭湰涓昏浣滅敤灝辨槸:鑷姩浠嶴VN搴撴媺鏈鏂扮殑浠g爜錛岀紪璇戙佸茍鑷姩閮ㄧ講鍒版祴璇曟湇鍔″櫒銆?/p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "> </p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">鍏朵腑鐢ㄥ埌浜?#8220;antsvn” 錛屾湁3涓猨ar鍖呴渶瑕侀厤緗繘鍘?/p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-family: monospace; line-height: normal; font-size: 13px; white-space: pre; "><span style="color: rgb(0, 0, 255); "><?</span><span style="color: rgb(255, 0, 255); ">xml version="1.0" encoding="UTF-8"</span><span style="color: rgb(0, 0, 255); ">?></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 128, 0); "><!--</span><span style="color: rgb(0, 128, 0); "> wei.songw 2008.3.19 </span><span style="color: rgb(0, 128, 0); ">--></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">project </span><span style="color: rgb(255, 0, 0); ">basedir</span><span style="color: rgb(0, 0, 255); ">="."</span><span style="color: rgb(255, 0, 0); "> name</span><span style="color: rgb(0, 0, 255); ">="smmail"</span><span style="color: rgb(255, 0, 0); "> default</span><span style="color: rgb(0, 0, 255); ">="auto"</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 128, 0); "><!--</span><span style="color: rgb(0, 128, 0); "> all properties are in build.properties </span><span style="color: rgb(0, 128, 0); ">--></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">property </span><span style="color: rgb(255, 0, 0); ">file</span><span style="color: rgb(0, 0, 255); ">="build.properties"</span><span style="color: rgb(255, 0, 0); "> </span><span style="color: rgb(0, 0, 255); ">/></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 128, 0); "><!--</span><span style="color: rgb(0, 128, 0); ">svn鏈韓闇瑕佺殑榪愯搴?</span><span style="color: rgb(0, 128, 0); ">--></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">path </span><span style="color: rgb(255, 0, 0); ">id</span><span style="color: rgb(0, 0, 255); ">="svnant.lib"</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">pathelement </span><span style="color: rgb(255, 0, 0); ">location</span><span style="color: rgb(0, 0, 255); ">="${svnjavahl.jar}"</span><span style="color: rgb(255, 0, 0); "> </span><span style="color: rgb(0, 0, 255); ">/></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">pathelement </span><span style="color: rgb(255, 0, 0); ">location</span><span style="color: rgb(0, 0, 255); ">="${svnant.jar}"</span><span style="color: rgb(255, 0, 0); "> </span><span style="color: rgb(0, 0, 255); ">/></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">pathelement </span><span style="color: rgb(255, 0, 0); ">location</span><span style="color: rgb(0, 0, 255); ">="${svnClientAdapter.jar}"</span><span style="color: rgb(255, 0, 0); "> </span><span style="color: rgb(0, 0, 255); ">/></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "></</span><span style="color: rgb(128, 0, 0); ">path</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 128, 0); "><!--</span><span style="color: rgb(0, 128, 0); ">java EE 1.4 搴?</span><span style="color: rgb(0, 128, 0); ">--></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">path </span><span style="color: rgb(255, 0, 0); ">id</span><span style="color: rgb(0, 0, 255); ">="javaEE1.4"</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">fileset </span><span style="color: rgb(255, 0, 0); ">dir</span><span style="color: rgb(0, 0, 255); ">="${javaEE1.4.lib}"</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">include </span><span style="color: rgb(255, 0, 0); ">name</span><span style="color: rgb(0, 0, 255); ">="**/*.jar"</span><span style="color: rgb(255, 0, 0); "> </span><span style="color: rgb(0, 0, 255); ">/></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "></</span><span style="color: rgb(128, 0, 0); ">fileset</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "></</span><span style="color: rgb(128, 0, 0); ">path</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 128, 0); "><!--</span><span style="color: rgb(0, 128, 0); ">欏圭洰鐨刢lasspath搴?</span><span style="color: rgb(0, 128, 0); ">--></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">path </span><span style="color: rgb(255, 0, 0); ">id</span><span style="color: rgb(0, 0, 255); ">="project.classpath"</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">pathelement </span><span style="color: rgb(255, 0, 0); ">location</span><span style="color: rgb(0, 0, 255); ">="${build.dir}"</span><span style="color: rgb(255, 0, 0); "> </span><span style="color: rgb(0, 0, 255); ">/></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">fileset </span><span style="color: rgb(255, 0, 0); ">dir</span><span style="color: rgb(0, 0, 255); ">="${lib.dir}"</span><span style="color: rgb(255, 0, 0); "> </span><span style="color: rgb(0, 0, 255); ">/></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "></</span><span style="color: rgb(128, 0, 0); ">path</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 128, 0); "><!--</span><span style="color: rgb(0, 128, 0); ">娓呯悊欏圭洰浠誨姟(騫叉帀涓嬭澆鐩綍錛宼omcat鍘熸潵鐨勯儴緗叉枃浠? </span><span style="color: rgb(0, 128, 0); ">--></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">target </span><span style="color: rgb(255, 0, 0); ">name</span><span style="color: rgb(0, 0, 255); ">="clear"</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">delete </span><span style="color: rgb(255, 0, 0); ">dir</span><span style="color: rgb(0, 0, 255); ">="${work.space}"</span><span style="color: rgb(255, 0, 0); "> </span><span style="color: rgb(0, 0, 255); ">/></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">delete </span><span style="color: rgb(255, 0, 0); ">dir</span><span style="color: rgb(0, 0, 255); ">="${tomcat.home}/work/Catalina/localhost/${ant.project.name}"</span><span style="color: rgb(255, 0, 0); "> </span><span style="color: rgb(0, 0, 255); ">/></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">delete </span><span style="color: rgb(255, 0, 0); ">dir</span><span style="color: rgb(0, 0, 255); ">="${tomcat.home}/webapps/${ant.project.name}"</span><span style="color: rgb(255, 0, 0); "> </span><span style="color: rgb(0, 0, 255); ">/></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">delete </span><span style="color: rgb(255, 0, 0); ">dir</span><span style="color: rgb(0, 0, 255); ">="${tomcat.home}/webapps/${ant.project.name}.war"</span><span style="color: rgb(255, 0, 0); "> </span><span style="color: rgb(0, 0, 255); ">/></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "></</span><span style="color: rgb(128, 0, 0); ">target</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 128, 0); "><!--</span><span style="color: rgb(0, 128, 0); "> load the svn task </span><span style="color: rgb(0, 128, 0); ">--></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">taskdef </span><span style="color: rgb(255, 0, 0); ">name</span><span style="color: rgb(0, 0, 255); ">="svn"</span><span style="color: rgb(255, 0, 0); "> classname</span><span style="color: rgb(0, 0, 255); ">="org.tigris.subversion.svnant.SvnTask"</span><span style="color: rgb(255, 0, 0); "> classpathref</span><span style="color: rgb(0, 0, 255); ">="svnant.lib"</span><span style="color: rgb(255, 0, 0); "> </span><span style="color: rgb(0, 0, 255); ">/></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 128, 0); "><!--</span><span style="color: rgb(0, 128, 0); ">svn鍚屾浠誨姟</span><span style="color: rgb(0, 128, 0); ">--></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">target </span><span style="color: rgb(255, 0, 0); ">name</span><span style="color: rgb(0, 0, 255); ">="svn"</span><span style="color: rgb(255, 0, 0); "> depends</span><span style="color: rgb(0, 0, 255); ">="clear"</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">mkdir </span><span style="color: rgb(255, 0, 0); ">dir</span><span style="color: rgb(0, 0, 255); ">="${work.space}"</span><span style="color: rgb(0, 0, 255); ">/></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">svn </span><span style="color: rgb(255, 0, 0); ">username</span><span style="color: rgb(0, 0, 255); ">="SongWei"</span><span style="color: rgb(255, 0, 0); "> password</span><span style="color: rgb(0, 0, 255); ">="Song"</span><span style="color: rgb(255, 0, 0); "> javahl</span><span style="color: rgb(0, 0, 255); ">="false"</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">checkout </span><span style="color: rgb(255, 0, 0); ">url</span><span style="color: rgb(0, 0, 255); ">="${urlRepos}"</span><span style="color: rgb(255, 0, 0); "> destPath</span><span style="color: rgb(0, 0, 255); ">="${work.space}"</span><span style="color: rgb(255, 0, 0); "> </span><span style="color: rgb(0, 0, 255); ">/></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "></</span><span style="color: rgb(128, 0, 0); ">svn</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "></</span><span style="color: rgb(128, 0, 0); ">target</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 128, 0); "><!--</span><span style="color: rgb(0, 128, 0); ">緙栬瘧</span><span style="color: rgb(0, 128, 0); ">--></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">target </span><span style="color: rgb(255, 0, 0); ">name</span><span style="color: rgb(0, 0, 255); ">="compile"</span><span style="color: rgb(255, 0, 0); "> depends</span><span style="color: rgb(0, 0, 255); ">="svn"</span><span style="color: rgb(255, 0, 0); "> description</span><span style="color: rgb(0, 0, 255); ">="======compile project======"</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">echo </span><span style="color: rgb(255, 0, 0); ">message</span><span style="color: rgb(0, 0, 255); ">="compile==========>${ant.project.name}: ${ant.file}"</span><span style="color: rgb(255, 0, 0); "> </span><span style="color: rgb(0, 0, 255); ">/></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">mkdir </span><span style="color: rgb(255, 0, 0); ">dir</span><span style="color: rgb(0, 0, 255); ">="${build.dir}"</span><span style="color: rgb(255, 0, 0); "> </span><span style="color: rgb(0, 0, 255); ">/></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">copy </span><span style="color: rgb(255, 0, 0); ">includeemptydirs</span><span style="color: rgb(0, 0, 255); ">="false"</span><span style="color: rgb(255, 0, 0); "> todir</span><span style="color: rgb(0, 0, 255); ">="${build.dir}"</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">fileset </span><span style="color: rgb(255, 0, 0); ">dir</span><span style="color: rgb(0, 0, 255); ">="${java.source}"</span><span style="color: rgb(255, 0, 0); "> excludes</span><span style="color: rgb(0, 0, 255); ">="**/*.launch, **/*.java, config/*.*"</span><span style="color: rgb(0, 0, 255); ">/></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "></</span><span style="color: rgb(128, 0, 0); ">copy</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">copy </span><span style="color: rgb(255, 0, 0); ">includeemptydirs</span><span style="color: rgb(0, 0, 255); ">="false"</span><span style="color: rgb(255, 0, 0); "> todir</span><span style="color: rgb(0, 0, 255); ">="${build.dir}"</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">fileset </span><span style="color: rgb(255, 0, 0); ">dir</span><span style="color: rgb(0, 0, 255); ">="${java.config}"</span><span style="color: rgb(255, 0, 0); "> excludes</span><span style="color: rgb(0, 0, 255); ">="**/*.launch, **/*.java"</span><span style="color: rgb(0, 0, 255); ">/></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "></</span><span style="color: rgb(128, 0, 0); ">copy</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">javac </span><span style="color: rgb(255, 0, 0); ">includejavaruntime</span><span style="color: rgb(0, 0, 255); ">="true"</span><span style="color: rgb(255, 0, 0); "> debug</span><span style="color: rgb(0, 0, 255); ">="true"</span><span style="color: rgb(255, 0, 0); "> debuglevel</span><span style="color: rgb(0, 0, 255); ">="${debuglevel}"</span><span style="color: rgb(255, 0, 0); "> destdir</span><span style="color: rgb(0, 0, 255); ">="${build.dir}"</span><span style="color: rgb(255, 0, 0); "> source</span><span style="color: rgb(0, 0, 255); ">="${source}"</span><span style="color: rgb(255, 0, 0); "> target</span><span style="color: rgb(0, 0, 255); ">="${target}"</span><span style="color: rgb(255, 0, 0); "> encoding</span><span style="color: rgb(0, 0, 255); ">="utf-8"</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">src </span><span style="color: rgb(255, 0, 0); ">path</span><span style="color: rgb(0, 0, 255); ">="${java.source}"</span><span style="color: rgb(255, 0, 0); "> </span><span style="color: rgb(0, 0, 255); ">/></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">exclude </span><span style="color: rgb(255, 0, 0); ">name</span><span style="color: rgb(0, 0, 255); ">="config/"</span><span style="color: rgb(0, 0, 255); ">/></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">classpath</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">path </span><span style="color: rgb(255, 0, 0); ">refid</span><span style="color: rgb(0, 0, 255); ">="project.classpath"</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "></</span><span style="color: rgb(128, 0, 0); ">path</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">path </span><span style="color: rgb(255, 0, 0); ">refid</span><span style="color: rgb(0, 0, 255); ">="javaEE1.4"</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "></</span><span style="color: rgb(128, 0, 0); ">path</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "></</span><span style="color: rgb(128, 0, 0); ">classpath</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "></</span><span style="color: rgb(128, 0, 0); ">javac</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">javac </span><span style="color: rgb(255, 0, 0); ">debug</span><span style="color: rgb(0, 0, 255); ">="true"</span><span style="color: rgb(255, 0, 0); "> debuglevel</span><span style="color: rgb(0, 0, 255); ">="${debuglevel}"</span><span style="color: rgb(255, 0, 0); "> destdir</span><span style="color: rgb(0, 0, 255); ">="${build.dir}"</span><span style="color: rgb(255, 0, 0); "> source</span><span style="color: rgb(0, 0, 255); ">="${source}"</span><span style="color: rgb(255, 0, 0); "> target</span><span style="color: rgb(0, 0, 255); ">="${target}"</span><span style="color: rgb(255, 0, 0); "> encoding</span><span style="color: rgb(0, 0, 255); ">="utf-8"</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">src </span><span style="color: rgb(255, 0, 0); ">path</span><span style="color: rgb(0, 0, 255); ">="${java.config}"</span><span style="color: rgb(255, 0, 0); "> </span><span style="color: rgb(0, 0, 255); ">/></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "></</span><span style="color: rgb(128, 0, 0); ">javac</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "></</span><span style="color: rgb(128, 0, 0); ">target</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 128, 0); "><!--</span><span style="color: rgb(0, 128, 0); ">鍘嬬緝錛屾墦鍖?/span><span style="color: rgb(0, 128, 0); ">--></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">target </span><span style="color: rgb(255, 0, 0); ">name</span><span style="color: rgb(0, 0, 255); ">="war"</span><span style="color: rgb(255, 0, 0); "> depends</span><span style="color: rgb(0, 0, 255); ">="compile"</span><span style="color: rgb(255, 0, 0); "> description</span><span style="color: rgb(0, 0, 255); ">="======compress j2ee war file======"</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">mkdir </span><span style="color: rgb(255, 0, 0); ">dir</span><span style="color: rgb(0, 0, 255); ">="${dist.dir}"</span><span style="color: rgb(255, 0, 0); "> </span><span style="color: rgb(0, 0, 255); ">/></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 128, 0); "><!--</span><span style="color: rgb(0, 128, 0); ">compress j2ee war file</span><span style="color: rgb(0, 128, 0); ">--></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">war </span><span style="color: rgb(255, 0, 0); ">destfile</span><span style="color: rgb(0, 0, 255); ">="${war.file}"</span><span style="color: rgb(255, 0, 0); "> webxml</span><span style="color: rgb(0, 0, 255); ">="${web.dir}/WEB-INF/web.xml"</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">fileset </span><span style="color: rgb(255, 0, 0); ">dir</span><span style="color: rgb(0, 0, 255); ">="${web.dir}"</span><span style="color: rgb(255, 0, 0); "> </span><span style="color: rgb(0, 0, 255); ">/></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">classes </span><span style="color: rgb(255, 0, 0); ">dir</span><span style="color: rgb(0, 0, 255); ">="${build.dir}"</span><span style="color: rgb(255, 0, 0); "> </span><span style="color: rgb(0, 0, 255); ">/></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">lib </span><span style="color: rgb(255, 0, 0); ">dir</span><span style="color: rgb(0, 0, 255); ">="${lib.dir}"</span><span style="color: rgb(255, 0, 0); "> </span><span style="color: rgb(0, 0, 255); ">/></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "></</span><span style="color: rgb(128, 0, 0); ">war</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "></</span><span style="color: rgb(128, 0, 0); ">target</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 128, 0); "><!--</span><span style="color: rgb(0, 128, 0); ">shutdowntomcat</span><span style="color: rgb(0, 128, 0); ">--></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">target </span><span style="color: rgb(255, 0, 0); ">name</span><span style="color: rgb(0, 0, 255); ">="shutdowntomcat"</span><span style="color: rgb(255, 0, 0); "> description</span><span style="color: rgb(0, 0, 255); ">="========shutdowntomcat==========="</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">exec </span><span style="color: rgb(255, 0, 0); ">executable</span><span style="color: rgb(0, 0, 255); ">="${tomcat.home}/bin/shutdown.sh"</span><span style="color: rgb(255, 0, 0); "> failonerror</span><span style="color: rgb(0, 0, 255); ">="false"</span><span style="color: rgb(0, 0, 255); ">></</span><span style="color: rgb(128, 0, 0); ">exec</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">sleep </span><span style="color: rgb(255, 0, 0); ">seconds</span><span style="color: rgb(0, 0, 255); ">="10"</span><span style="color: rgb(0, 0, 255); ">/></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "></</span><span style="color: rgb(128, 0, 0); ">target</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 128, 0); "><!--</span><span style="color: rgb(0, 128, 0); ">startuptomcat</span><span style="color: rgb(0, 128, 0); ">--></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">target </span><span style="color: rgb(255, 0, 0); ">name</span><span style="color: rgb(0, 0, 255); ">="startuptomcat"</span><span style="color: rgb(255, 0, 0); "> description</span><span style="color: rgb(0, 0, 255); ">="========startuptomcat==========="</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">sleep </span><span style="color: rgb(255, 0, 0); ">seconds</span><span style="color: rgb(0, 0, 255); ">="5"</span><span style="color: rgb(0, 0, 255); ">/></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">exec </span><span style="color: rgb(255, 0, 0); ">executable</span><span style="color: rgb(0, 0, 255); ">="${tomcat.home}/bin/startup.sh"</span><span style="color: rgb(255, 0, 0); "> failonerror</span><span style="color: rgb(0, 0, 255); ">="false"</span><span style="color: rgb(0, 0, 255); ">></</span><span style="color: rgb(128, 0, 0); ">exec</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "></</span><span style="color: rgb(128, 0, 0); ">target</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 128, 0); "><!--</span><span style="color: rgb(0, 128, 0); ">閮ㄧ講鍒皌omcat涓嬮潰鍏?/span><span style="color: rgb(0, 128, 0); ">--></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">target </span><span style="color: rgb(255, 0, 0); ">name</span><span style="color: rgb(0, 0, 255); ">="deploy"</span><span style="color: rgb(255, 0, 0); "> depends</span><span style="color: rgb(0, 0, 255); ">="war"</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">copy </span><span style="color: rgb(255, 0, 0); ">file</span><span style="color: rgb(0, 0, 255); ">="${war.file}"</span><span style="color: rgb(255, 0, 0); "> todir</span><span style="color: rgb(0, 0, 255); ">="${tomcat.home}/webapps"</span><span style="color: rgb(255, 0, 0); "> </span><span style="color: rgb(0, 0, 255); ">/></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "></</span><span style="color: rgb(128, 0, 0); ">target</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 128, 0); "><!--</span><span style="color: rgb(0, 128, 0); ">鍏ㄨ嚜鍔ㄦ棤鏁岄儴緗詫紝鍚姩鍏抽棴tomcat</span><span style="color: rgb(0, 128, 0); ">--></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">target </span><span style="color: rgb(255, 0, 0); ">name</span><span style="color: rgb(0, 0, 255); ">="auto"</span><span style="color: rgb(255, 0, 0); "> depends</span><span style="color: rgb(0, 0, 255); ">="shutdowntomcat,deploy,startuptomcat"</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "><</span><span style="color: rgb(128, 0, 0); ">echo </span><span style="color: rgb(255, 0, 0); ">message</span><span style="color: rgb(0, 0, 255); ">="DONE!!!!"</span><span style="color: rgb(255, 0, 0); "> </span><span style="color: rgb(0, 0, 255); ">/></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "></</span><span style="color: rgb(128, 0, 0); ">target</span><span style="color: rgb(0, 0, 255); ">></span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); "></</span><span style="color: rgb(128, 0, 0); ">project</span><span style="color: rgb(0, 0, 255); ">></span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-family: monospace; line-height: normal; font-size: 13px; white-space: pre; "><span style="color: rgb(0, 0, 255); "><br></span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-family: monospace; line-height: normal; font-size: 13px; white-space: pre; "><span style="color: rgb(0, 0, 255); "><span style="color: rgb(0, 0, 0); font-family: Arial, sans-serif, Helvetica, Tahoma; white-space: normal; font-size: 12px; line-height: 18px; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">涓嬮潰鏄痓uild.xml鎸囧畾鐨刾roperties鏂囦歡錛岄渶瑕佸拰build.xml鏀懼湪鍚屼竴涓洰褰曚笅闈?/p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">闇瑕佹寚瀹?font color="#ff0000">work.space</font>錛坰vn鎷変笅鏉ヤ唬鐮佺殑瀛樻斁錛屽凡緇忕紪璇戯紝鎵撳寘鐢ㄧ殑涓存椂鐩綍錛?/p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><font color="#ff0000">tomcat.home</font><font size="3" color="#000000">錛?font size="1">tomcat鏈嶅姟鍣ㄧ殑鏍圭洰褰?濡傛灉鏄叾浠栨湇鍔″櫒錛岄渶瑕佷慨鏀瑰搴旈」</font>錛?/font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><font size="3">===============================================</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><font color="#ff0000">build.version=1.0.0</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><font color="#ff0000">svnant.jar=/usr/java/svn/svnant.jar<br>svnClientAdapter.jar=/usr/java/svn/svnClientAdapter.jar<br>svnjavahl.jar=/usr/java/svn/svnjavahl.jar<br>javaEE1.4.lib=/usr/javaEE-1.4</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><font color="#ff0000">debuglevel=source,lines<br>target=1.6<br>source=1.6</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><font color="#ff0000">work.space=/home/gmail/workspace<br>dist.dir=${work.space}</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><font color="#ff0000">build.dir=${work.space}/WebRoot/WEB-INF/classes<br>lib.dir=${work.space}/WebRoot/WEB-INF/lib</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><font color="#ff0000">java.source=${work.space}/src<br>java.config=${work.space}/src/config</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><font color="#ff0000">web.dir=${work.space}/WebRoot<br>resource.dir=${work.space}/resources</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><font color="#ff0000">tomcat.home=/home/gmail/tomcat6<br>war.file=${dist.dir}/${<span id="hvzpftn" class="hilite1" style="background-color: rgb(255, 255, 0); ">ant</span>.project.name}.war</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><font color="#ff0000">urlRepos=svn://192.168.1.100/product/SMMAIL/Develop</font></p></span></span></span></p></span> <img src ="http://m.shnenglu.com/keigoliye/aggbug/112045.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/keigoliye/" target="_blank">鏆楀鏁欑埗</a> 2010-04-09 11:23 <a href="http://m.shnenglu.com/keigoliye/archive/2010/04/09/112045.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Using SVN With Anthttp://m.shnenglu.com/keigoliye/archive/2010/04/09/112044.html鏆楀鏁欑埗鏆楀鏁欑埗Fri, 09 Apr 2010 03:20:00 GMThttp://m.shnenglu.com/keigoliye/archive/2010/04/09/112044.htmlhttp://m.shnenglu.com/keigoliye/comments/112044.htmlhttp://m.shnenglu.com/keigoliye/archive/2010/04/09/112044.html#Feedback0http://m.shnenglu.com/keigoliye/comments/commentRss/112044.htmlhttp://m.shnenglu.com/keigoliye/services/trackbacks/112044.html鎽樿錛?br>銆銆Subversion鏄秺鏉ヨ秺琚箍娉涗嬌鐢ㄧ殑鐗堟湰綆$悊宸ュ叿錛屼嬌鐢ˋnt鑴氭湰浠嶴ubversion鑾峰彇浠g爜錛屽疄鐜癉aily Build銆?br>銆銆1錛嶴ubversion姒傝堪
銆銆鍏堝紩鐢?a rel="nofollow" class="bbs" target="_blank" style="color: rgb(0, 102, 204); text-decoration: none; font: normal normal normal 12px/normal 瀹嬩綋; font-size: 14px; ">Version Control with Subversion 涓紑澶寸殑璇濓細(xì)
銆銆“If C gives you enough rope to hang yourself, think of Subversion as a sort of rope storage facility.” 
銆銆 鈥擝rian W. Fitzpatrick
銆銆鐒跺悗鍛婅瘔澶уCVS鏄棫鐖憋紝Subversion鏄柊嬈€傚垪涓捐嫢騫睸ubversion鐨勭壒鎬у拰浼樺娍涓鴻瘉錛屾噿寰楀啓浜嗭紝鐩存帴鐪嬭繖閲岋細(xì)Subversion鐨勮佸銆?br>銆銆鍏充簬濡備綍浣跨敤Subversion浠ュ強(qiáng)鐩稿叧瀹㈡埛绔蔣浠訛紝緗戜笂鎱㈡參鐪嬪惂錛?a rel="nofollow" class="bbs" target="_blank" style="color: rgb(0, 102, 204); text-decoration: none; font: normal normal normal 12px/normal 瀹嬩綋; font-size: 14px; ">瀹樻柟鑷敱鍥句功涓嶉敊銆?br>銆銆2錛庤殏铓佸嚭鍦?br>銆銆鍥㈤槦鏈榪戠殑欏圭洰涓嵆浣跨敤Subversion浣滀負(fù)鐗堟湰鎺у埗宸ュ叿銆侱aily Build榪囦袱澶╁氨寰楁惌寤鴻搗鏉ヤ簡錛屼笂铓傝殎錛?br>銆銆Tigris.org鎻愪緵浜哠ubclipse錛孲vnClientAdapter鍜孲vnAnt銆?瑙?a rel="nofollow" class="bbs" target="_blank" style="color: rgb(0, 102, 204); text-decoration: none; font: normal normal normal 12px/normal 瀹嬩綋; font-size: 14px; ">榪欓噷)
銆銆Subclipse鏄竴涓狤clipse鐨勬彃浠訛紝瀹炵幇浜咺DE涓嶴ubversion寰楅泦鎴愶紱
銆銆SvnClientAdapter鏄疭ubversion鐨勪竴濂桱ava API錛屽皝瑁呬簡瀹㈡埛绔Subversion鐨勪竴浜涜闂搷浣滐紱
銆銆SvnAnt鏄敤浜庤闂甋ubversion鐨凙nt浠誨姟錛屽叾渚濊禆浜嶴vnClientAdapter銆?br>銆銆鎴戣鐢ㄧ殑灝辨槸SvnAnt錛岀敤SVN Check Out涓浠絊vnAnt鐨勪唬鐮侊細(xì)
銆銆 
銆銆 
銆銆 
銆銆 
銆銆 svn co http://subclipse.tigris.org/svn/subclipse/trunk/svnant/ svnant
銆銆 
銆銆 
銆銆 
銆銆 
銆銆鍦ㄨ繖涓伐紼嬮噷闈㈣繕鍖呮嫭svnant鐨凙nt Task浣跨敤璇存槑鏂囨。錛屼篃鍙互鍦?a rel="nofollow" class="bbs" target="_blank" style="color: rgb(0, 102, 204); text-decoration: none; font: normal normal normal 12px/normal 瀹嬩綋; font-size: 14px; ">榪欓噷鐩存帴鏌ョ湅銆?br>銆銆浣跨敤鍏朵腑鐨刡uild.xml緙栬瘧SvnAnt鍚庯紝鍦ㄦ柊鐢熸垚鐨刡uild瀛愮洰褰曚笅浼?xì)鐢熸垚svnant.jar銆傛寜鐓у畼鏂規(guī)枃妗g殑璇存硶錛屾妸榪欎釜svnant.jar鍜孲vnAnt宸ョ▼鐨刲ib鐩綍涓嬬殑svnClientAdapter.jar鍜宻vnjavahl.jar鎷瘋礉鍒癆nt鐨勭洰褰曚笅鍗沖彲銆傜劧鍚庣紪鍐欏涓嬬殑Ant鑴氭湰榪涜嫻嬭瘯錛?br>銆銆 
銆銆 
銆銆 
銆銆 
銆銆 <?xml version="1.0"?>
銆銆 <project name="SVN Ant Test" default="checkout" basedir=".">
銆銆 <!-- 1 -->
銆銆 <property name="remote.url"
銆銆 value="svn://16.157.xxx.xxx/trunk/LNPORTAL/src/P3UIPAdapter/" />
銆銆 <property name="local.dir" value="local" /> 
銆銆 <!-- 2 -->
銆銆 <taskdef name="svn" classname="org.tigris.subversion.svnant.SvnTask" />
銆銆 <target name="prepare"
銆銆 description="Prepare the dirs for other tasks">
銆銆 <delete dir="${local.dir}" />
銆銆 <mkdir dir="${local.dir}" />
銆銆 </target>
銆銆 <!-- 3-->
銆銆 <target name="checkout" depends="prepare">
銆銆 <svn javahl="true" username="lihq" password="password" >
銆銆 <checkout url="${remote.url}" destPath="${local.dir}" />
銆銆 </svn>
銆銆 </target>
銆銆 </project>
銆銆 
銆銆 
銆銆 
銆銆 
銆銆嫻嬭瘯緇撴灉鏆傛椂涓嶉噸瑕併?br>銆銆3錛嶫avaSVN鍑哄満
銆銆SvnAnt鐨勬墽琛屼緷璧朣vnClientAdapter錛岃屾墽琛岃闂甋VN鏃跺張鏈変袱縐嶅艦寮忥細(xì)鍏朵竴鏄氳繃SVN 鍛戒護(hù)琛岀▼搴忕殑褰㈠紡榪涜鐨勶紙鎴戝湪鎯籌細(xì)濡傛灉鏄繖鏍鳳紝榪樹笉濡備嬌鐢ˋnt鐨別xec浠誨姟鍛級錛涘叾浜屾槸閫氳繃Javahl鏉ユ墽琛岀殑銆?br>銆銆Javahl鏄竴涓敤浜庤闂甋ubversion鐨凧ava鎺ュ彛錛堜及璁℃槸JNI錛夛紝榪欓渶瑕乄indows鏈轟笂鏈塻vnjavahl.dll鎵嶈銆傚洟闃熺殑Daily Build鐨勫茍涓嶆槸Windows錛屼簬鏄眰鍔㎎avaSVN錛岃繖鏄竴涓函Java鐨凷VN瑙e喅鏂規(guī)銆?br>銆銆璇瘋闂繖涓狦uide錛?a rel="nofollow" class="bbs" target="_blank" style="color: rgb(0, 102, 204); text-decoration: none; font: normal normal normal 12px/normal 瀹嬩綋; font-size: 14px; ">Making SvnAnt use JavaSVN
銆銆鎴戠殑瀹為檯姝ラ濡備笅錛?br>銆銆Step 1錛氫粠Ant鐨刲ib鐩綍涓嬬Щ闄vnClientAdapter.jar錛屾垜娌℃湁鍙戠幇javahl.jar錛屼簬鏄究縐婚櫎浜唖vnjavahl.jar錛屽叾瀹炵Щ涓嶇Щ鍚庤呮棤鎵璋擄紱
銆銆Step 2錛氬湪鍒氭墠閭d釜欏甸潰涓嬭澆javasvn.jar鍜宩avasvn-javahl.jar錛屼互鍙?qiáng)JavaSVN鐨剆vnClientAdapter-0.9.32.jar銆傚茍鎶婅繖涓変釜jar閮芥嫹璐濆埌Ant鐨刲ib鐩綍涓嬶紱
銆銆鐒跺悗榪愯涓婇潰鍐欑殑SVN Ant嫻嬭瘯鑴氭湰錛岀粨鏋滃涓嬶細(xì)
銆銆 
銆銆 
銆銆 
銆銆 …
銆銆 BUILD FAILED
銆銆 java.lang.AbstractMethodError: org.tigris.subversion.svnant.Feedback.logRevision(J)V
銆銆 
銆銆 Total time: 7 seconds
銆銆 
銆銆 
銆銆 
銆銆铏界劧SVN鐨勪唬鐮侀兘鍙栦笅鏉ヤ簡錛屼絾鏈鍚嶢nt浼?xì)鎶涘囖Z竴涓涓婄殑閿欙紝榪欎細(xì)浣垮緱Ant鑴氭湰鏃犳硶榪愯鍚庨潰鐨勪換鍔°?br>銆銆4錛嶵hanks Open Source
銆銆鐪嬫潵錛屽ぇ姒傛槸JavaSVN鐢ㄨ嚜宸辯殑svnClientAdapter-0.9.32.jar鏀瑰彉浜哠VNAnt鏈潵瀵硅皟鐢ㄣ係VNAnt錛坆y Tigris.org錛夊師鍏堟槸璋冪敤svnjavahl.jar鏉ヨ繍琛孲VN鍛戒護(hù)鐨勩傛浛鎹vnClientAdapter-0.9.32.jar鍚庯紝SVNAnt錛坧lus JavaSVN錛夋槸璋冪敤javasvn-javahl.jar鍜宩avasvn.jar鏉ヨ繍琛孲VN鍛戒護(hù)鐨勩備笂闈㈤偅涓敊璇ぇ姒傚氨鏄袱濂梥vnClientAdapter瀵規(guī)煇涓娊璞℃柟娉曠殑瀹氫箟涓嶅畬鍏ㄤ竴鑷撮犳垚鐨勶紝浼拌鏄疉PI鐗堟湰瀵瑰簲鐨勯棶棰樸傝В鍐沖涓嬶細(xì)
銆銆棣栧厛鏌ョ湅svnant.jar鐨勬簮浠g爜錛屽彂鐜皁rg.tigris.subversion.svnant.Feedback鏄疄鐜皊vnClientAdapter.jar涓殑涓涓悕涓篒SVNNotifyListener鐨勬帴鍙c傝繖涓帴鍙d腑瀵規(guī)姤閿欑殑logRevision鏂規(guī)硶鐨勫畾涔夋槸錛?br>銆銆 
銆銆 
銆銆 
銆銆 
銆銆 public abstract void logRevision(long revision, String path)
銆銆 
銆銆 
銆銆 
銆銆 
銆銆鑰屾煡鐪媠vnClientAdapter-0.9.32.jar涓殑ISVNNotifyListener鐨勬帴鍙d腑鐨勫畾涔夋槸錛?br>銆銆 
銆銆 
銆銆 
銆銆 
銆銆 public abstract void logRevision(long revision)
銆銆 
銆銆 
銆銆 
銆銆 
銆銆鏄庢樉涓嶅尮閰嶏紝浜庢槸淇敼svnant.jar鐨勬簮浠g爜錛屼慨鏀筼rg.tigris.subversion.svnant.Feedback錛岃薄鍏朵腑娣誨姞涓涓柟娉曞涓嬶細(xì)
銆銆 
銆銆 
銆銆 
銆銆 
銆銆 //This method is added by Beegee
銆銆 public void logRevision(long revision) {
銆銆 }
銆銆 
銆銆 //This method is the original one by SVNANT
銆銆 public void logRevision(long revision, String path) {
銆銆 }
銆銆 
銆銆 
銆銆 
銆銆 
銆銆鐒跺悗閲嶆柊緙栬瘧SVNAnt錛岀敓鎴恠vnant.jar錛屾嫹璐濇浛鎹nt 鐨刲ib鐩綍涓嬬殑鍚屽悕jar錛岄噸鏂拌繍琛屼互涓奡VN Ant嫻嬭瘯鑴氭湰錛岀粨鏋滃涓嬶細(xì)
銆銆

銆銆OK錛?br>銆銆錛峞nd錛?/span>

]]>
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
      <noscript id="pjuwb"></noscript>
            <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
              <dd id="pjuwb"></dd>
              <abbr id="pjuwb"></abbr>
              日韩亚洲欧美精品| 欧美日产一区二区三区在线观看 | 在线精品视频一区二区三四| 欧美日韩一区二区国产| 欧美区亚洲区| 欧美日韩国产综合网 | 午夜精品久久久久久久蜜桃app | 欧美在线黄色| 免播放器亚洲| 欧美日韩国产不卡| 国产精品露脸自拍| 红桃视频成人| 妖精视频成人观看www| 亚洲欧美区自拍先锋| 久久久久www| 亚洲欧洲一区二区三区在线观看| 亚洲国产综合91精品麻豆| 一本高清dvd不卡在线观看| 亚洲免费在线观看视频| 老司机一区二区三区| 欧美网站在线观看| 极品尤物av久久免费看| 在线亚洲观看| 麻豆成人91精品二区三区| 亚洲日本一区二区三区| 午夜视频久久久久久| 欧美高清视频一区二区三区在线观看| 国产精品日本欧美一区二区三区| 在线观看久久av| 亚洲一区二区三区影院| 麻豆成人综合网| 亚洲一区二区精品在线观看| 欧美凹凸一区二区三区视频| 国产一区二区久久| 亚洲在线网站| 91久久夜色精品国产网站| 久久国产精品黑丝| 国产精品久久久久久久免费软件| 亚洲国产欧美一区二区三区丁香婷| 午夜精品av| 日韩一级大片在线| 欧美精品一区二区三区很污很色的 | 男人天堂欧美日韩| 国产亚洲福利| 午夜精品久久久久久久99热浪潮| 欧美国产日韩在线| 久久九九国产精品| 国产亚洲永久域名| 欧美在线免费视频| 亚洲欧美另类中文字幕| 国产精品爱啪在线线免费观看| 日韩午夜精品| 亚洲激情国产精品| 欧美激情中文不卡| 亚洲午夜精品国产| 亚洲国产激情| 午夜久久tv| 国产精品欧美在线| 亚洲自拍偷拍福利| 中文国产成人精品| 欧美涩涩视频| 亚洲免费在线看| 中文一区在线| aⅴ色国产欧美| 国产一区二区日韩精品| 亚洲视频第一页| 亚洲黄色毛片| 欧美成人中文字幕在线| 亚洲欧洲一区二区三区| 亚洲大胆人体视频| 欧美成人性生活| 亚洲精品三级| 亚洲看片免费| 欧美网站大全在线观看| 亚洲欧美成人在线| 亚洲在线免费视频| 国产一区白浆| 欧美xx视频| 欧美日韩不卡在线| 亚洲专区免费| 久久精品国产亚洲精品| 亚洲激情在线观看视频免费| 亚洲精品国产精品乱码不99按摩 | 9久草视频在线视频精品| 欧美日韩一区国产| 久久国产一二区| 久久综合激情| 亚洲午夜三级在线| 欧美综合激情网| 亚洲免费黄色| 午夜精品福利电影| 亚洲日本电影在线| 亚洲男人影院| 亚洲人成在线观看| 亚洲中字黄色| 亚洲精品美女在线观看| 亚洲欧美999| 亚洲精品五月天| 欧美一区视频在线| 一区二区av| 久久精品国产免费看久久精品| 亚洲精品视频在线| 欧美一区二区三区四区在线| 亚洲乱码国产乱码精品精可以看 | 亚洲精品综合久久中文字幕| 国产精品播放| 欧美va亚洲va日韩∨a综合色| 欧美日本视频在线| 久久久噜噜噜久久人人看| 欧美日韩国产欧美日美国产精品| 久久久精品久久久久| 欧美偷拍一区二区| 亚洲精品国产精品乱码不99| 激情伊人五月天久久综合| 中文av字幕一区| 一区二区三区高清在线| 麻豆精品在线观看| 玖玖玖国产精品| 国产免费成人| 亚洲一区二区三区四区视频| 一本一本久久a久久精品综合麻豆| 久久精品首页| 久久久视频精品| 国产日产欧产精品推荐色 | 久久福利精品| 欧美在线视频免费播放| 国产精品第十页| 宅男噜噜噜66国产日韩在线观看| 亚洲免费av网站| 欧美成人免费大片| 欧美大胆人体视频| 精品粉嫩aⅴ一区二区三区四区| 亚洲欧美国产另类| 欧美一区国产二区| 国产欧美韩日| 欧美一区二区视频在线| 久久精品欧美日韩精品| 国产视频一区二区在线观看| 香蕉久久夜色精品国产| 久久精品综合| 影音先锋久久久| 久久综合中文字幕| 欧美高清日韩| 日韩亚洲精品电影| 欧美日韩视频在线| 亚洲一区二区在线观看视频| 欧美一级电影久久| 国产一区二区三区精品欧美日韩一区二区三区 | 91久久久在线| 欧美日韩xxxxx| 亚洲一区二区三区国产| 久久gogo国模啪啪人体图| 国产有码在线一区二区视频| 欧美激情一二三区| 日韩视频免费在线观看| 亚洲小视频在线观看| 国产美女一区二区| 久久久www| 亚洲精品1区| 亚洲伊人一本大道中文字幕| 国产欧美丝祙| 玖玖在线精品| 一本色道久久综合亚洲精品不| 先锋a资源在线看亚洲| 国产一区二区三区精品久久久| 久久久亚洲午夜电影| 亚洲精品免费在线播放| 欧美在线观看视频一区二区三区 | 另类尿喷潮videofree| 亚洲精品永久免费精品| 国产精品国产一区二区| 久久视频在线视频| 99国产精品视频免费观看| 久久国产精品黑丝| 亚洲人成在线观看| 国产欧美日韩一区| 欧美精品色网| 久久久久九九九| 99国产精品久久久| 男男成人高潮片免费网站| 亚洲深夜av| 亚洲激情小视频| 国外成人免费视频| 国产精品成人播放| 欧美国产日韩二区| 欧美专区福利在线| 中文精品在线| 亚洲人在线视频| 美女视频一区免费观看| 欧美一级在线视频| 9久re热视频在线精品| 亚洲大片精品永久免费| 国产精品自拍一区| 欧美日韩亚洲一区在线观看| 蜜桃av一区二区| 久久国产精品网站| 欧美亚洲在线| 亚洲专区一区二区三区| 亚洲精品你懂的| 老司机aⅴ在线精品导航|