| |||||||||
日 | 一 | 二 | 三 | 四 | 五 | 六 | |||
---|---|---|---|---|---|---|---|---|---|
25 | 26 | 27 | 28 | 29 | 30 | 31 | |||
1 | 2 | 3 | 4 | 5 | 6 | 7 | |||
8 | 9 | 10 | 11 | 12 | 13 | 14 | |||
15 | 16 | 17 | 18 | 19 | 20 | 21 | |||
22 | 23 | 24 | 25 | 26 | 27 | 28 | |||
29 | 30 | 1 | 2 | 3 | 4 | 5 |
起因:
CruiseControl 與 JBoss 進程啟動在固定的端口上,分別為 1099 和 8080 ,每次殺掉這兩個進程的時候,就手動的執行 netstat -anp | grep 1099 和 netstat -anp | grep 8080 ,看到進程號,把他們殺掉,然后重啟。
郁悶:
???但這樣實在是太麻煩了,每天調試程序,重啟 n 遍,看得我眼睛都花了。想辦法自動殺死。
解決部分:
???想起了當初使用 awk 命令得到進程號,有了進程號,不就可以 kill -9 干掉他了!快樂,開始找 awk 命令用法,google 了一下,可以使用 netstat -anp | grep 1099 | gawk '{print substr($7,0,index($7,"/java")-1)}' 命令得到我想要的進程號,但說什么都不能對這個進程號運行 kill -9 ,再找!
解決問題:
???google 了一下,可以使用
???kill -9 `netstat -anp | grep 1099 | gawk '{print substr($7,0,index($7,"/java")-1)}'`
???果然好用!
???想起了使用過的 cd = `pwd` 原來 ` 號包圍起來的命令可以執行,并放在相應位置上。
遺留問題:
???解決問題時,還 google 到,可以使用 netstat -anp | grep 1099 | gawk '{print substr($7,0,index($7,"/java")-1)}' | xargs?-t?-i?kill?-9?{} 來完成,需要了解管道符號的作用了。
在 CruiseControl 中需要監測 ClearCase 中的變化,以便在變化時進行構建動作。
配置如下:
<modificationset quietperiod="5">
??????<clearcase branch="dev_ct2.0" viewpath="D:\temp\cruisecontrol-bin-2.5 view\hello\group_ct\temp\test_project\hello" />
<modificationset>
CruiseControl 會每次調用
cleartool lshistory -branch dev_ct2.0 -r -nco -since 10-一月-2007.09:59:23 -fmt %u#~#%Nd#"~#%En#~#%Vn#~#%o#~#!%l#~#!%a#~#%Nc@#@#@#@#@#@#@#@#@#@#@#@
這個命令去監測 ClearCase 的變化
其中?dev_ct2.0 與配置的 branch?一致 -since 后面的時間保存在 listeners 中,默認一般為 status.txt 中
ps:有個問題就是這個命令不會監測沒有在 View 中的文件的變化,也就是說,只在 ClearCase 根目錄(因為其它目錄中增加ClearCase認為目錄變化,會監測到)中增加文件而沒有更改文件,這個命令認為沒有變化!
如果是 jar 包,在 Plugin 中配置
<build>
? <plugins>
??? <plugin>
????? <groupId>org.apache.maven.plugins</groupId>
????? <artifactId>maven-jar-plugin</artifactId>
????? <configuration>
??????? <archive>
????????? <addMavenDescriptor>false</addMavenDescriptor>
??????? </archive>
????? </configuration>
??? </plugin>
? </plugins>
</build>
如果是 war 包,在 Plugin 中配置
<build>
? <plugins>
??? <plugin>
????? <groupId>org.apache.maven.plugins</groupId>
????? <artifactId>maven-war-plugin</artifactId>
????? <configuration>
??????? <archive>
????????? <addMavenDescriptor>false</addMavenDescriptor>
??????? </archive>
????? </configuration>
??? </plugin>
? </plugins>
</build>
這個是在 maven-archiver 中設置的,可以查看代碼。
?
?public static String getSystemEnv(String name) {
??final String perfix = "env";
??Project project = new Project();
??Property property = new Property();
??property.setProject(project);
??property.setEnvironment(perfix);
??property.execute();
??return project.getProperty(perfix + "." + name);
?}
同樣可以利用這個方法處理 properties 文件中 ${} 引用。
摘要: 閱讀全文 規格說明是必不可少的,我理解 Scrum 中的 UserStory 就是規格的一部分,但規格還包含了更多的東西,比如部分的需求,在華為的時候,需求是在規格之前的,分成不同的文檔寫成,不知道在 Scrum 中,是如何來描述需求的,是否是在 UserStory 中一并完成了?