We can set the default main class in the META-INF/MANIFEST.MF . This could be configured in the maven-jar-plugin in pom.xml . Let’s use the previous example.
1. Edit the pom.xml as follow.
Continue reading Maven – Specify the default main class in the built jar using Manifest →
I would like to setup the TestNG in Maven so i take this chance to revise the Maven basics.
1. The project should have the following folder structure .
- testng-example (project root folder)
- src
- main
- java
- info/ykyuen/eureka <folders for package name>
- Addition.java
- resources
- <any resource files like .properties>
- pom.xml
Continue reading Maven – A simple Maven project →
世界上所有的民變和革命,本來都可以避免。終於發生了,是因為當權者的延誤。
法國大革命本來不必發生的,如果那年六月國王召開的「三級會議」,國王願意勸說貴族加一點稅。如果貴族階級肯多負擔點稅收,也不會有後來的革命。
不肯自動加稅,也不要緊,只要國王肯應代表的要求,兩千多名代表,一人一票,而不是沿用二百年前的舊制:貴族、教士、平民,一個階級一票。
如果國王讓了步,不會有後來的斷頭台。但是不,國王阻撓改革,不是他故意與平民作對,而是他認為拖得一天是一天,法國的平民會像過去二百年一樣,默默忍下去。
有人以為,法國大革命的原因是國王路易十六想政治改革。不對。國王根本不想改革。到進攻巴士的監獄、暴民佔領梵爾賽宮、把國王夫婦押回巴黎之後,路易十六才開始同意改革。這時他才想到英國的君主立憲,把實權讓出來,但一切已經太遲。
Continue reading 陶傑 – 大智慧 →
Whatever career you may choose for yourself – doctor, lawyer, teacher – let me propose an avocation to be pursued along with it. Become a dedicated fighter for civil rights. Make it a central part of your life. It will make you a better doctor, a better lawyer, a better teacher. It will enrich your spirit as nothing else possibly can. It will give you that rare sense of nobility that can only spring from love and selflessly helping your fellow man. Make a career of humanity. Commit yourself to the noble struggle for human rights. You will make a greater person of yourself, a greater nation of your country and a finer world to live in.
Martin Luther King
In the Ant build.xml , i need to make sure the JBoss server is started before running the test cases. There are 2 possible approaches.
Using twiddle.sh to check the status
Monitoring server.log until “Started in” is written on it
I took the 2nd approach . Here is an example output log when the JBoss server is started successfully.
Continue reading Linux – Wait until a specific pattern is written on log using tail and sed →
I try to checkout a project on Subversion through the SVN+SSH protocol in Jenkins . It prompts for the credentials as follow.
Continue reading Jenkins – NullPointerException when setting up the SVN+SSH Authentication →
如果二○一七年沒有公正的普選,據說香港就會墮下懸崖。
二○一七年普選這一關,中國遲遲不敢硬闖,但沒有辦法,自從收回香港主權,普選即是「港人治港」的目標。
然而拖到現在,許多親中派人士反問:「如果普選出了個『長毛』當特首,怎麼辦?」
答案是:即使第一屆普選,選出了梁國雄先生做特首,中國、香港財團、工商界,也要承受這個後果。
因為,即使視「長毛」為社會的腫瘤,也要認識,腫瘤是如何形成的。
英國管治香港的時候,長毛和他的「革馬盟」,崇尚托洛斯基,是一群無政府主義者。英國人對左翼思潮十分了解,工黨也有這一翼,譬如貴族出身的理想主義者彭東尼(Tony Benn),要求廢除皇室,行徹底的民粹。
Continue reading 陶傑 – 腫瘤如何形成 →
We can define custom task in Apache Ant using the <macrodef> which makes use of the <sequential> nested task as a template .
Try the following build.xml and run ant to get a rough idea on how it works.
build.xml
Continue reading Apache Ant – Define your custom Ant Task using MacroDef →
唔係因為我鍾意睇電視,亦都唔係我支持王維基 ,我支持 HKTV 最大原因是一個有立場、有抱負的人與一班對自己工作有夢想、有熱誠的員工居然比一個政府所出賣,而死因卻是因為一籃子又不能透露給大眾的因素。 我真係唔知佢地點解對自己的理據咁有信心,可以理直氣壯地對記者說牌照的審批過程是公平公正。
支持 HKTV 的 Facebook 群組 只需一天就聯合了超過四十萬的成員,對比以往的社會議題,今次的回響可以話係最快最大。過去香港經歷過高鐵、菜園村、水貨客、國民教育以致最近的廉政公署及發展局局長的醜聞,當中沒有一個可以係咁短時間內組織到如此龐大的一群香港人,足以證明電視絕對可以代表香港的核心價值 ,但同時這亦是香港可悲的地方。
我預計以梁振英這種打著強勢政府姿態的人不會輕易推番自己的決定,到最後可能都係話「發牌同唔發牌存在一個好大的討論空間」,然後不了了知。若果低不住各方面的壓大,一定會推一個人出黎引咎辭職做替死鬼。
另一個可笑的現象就是一個剛上了小小位的藝員批評王生將自己失敗了的商業決定歸咎於社會公義,並應該對事件負全責。哈哈,當大家都因為政府一方沒有實則的理據說明不發牌的原因而質疑審批過程存在不公義的時候,卻有這種可能患有斯德哥爾摩症候群的人不知基於什麼理由而認為審批過程係公平公正,更本末倒置地將責任推到受害者的一方,這個地方的人真係病得很嚴重… 可惜的是這位病人的行為對他的人氣都好像沒有什麼幫助,上唔到位鳥。
香港人,係時候承受番自己的業啦。
1. Install the grunt-contrib-yuidoc as one of your your project dev dependency .
npm install grunt-contrib-yuidoc –save-dev
2. To illustrate the example, i created /app/scriptes/human.js as follow.
Continue reading Grunt – Setup YUIDoc →
Posts navigation
Dream BIG and go for it =)