Re: [文件] xdoclet簡介 - 使用XDcolet

看板java作者 (null)時間17年前 (2008/06/09 21:23), 編輯推噓2(200)
留言2則, 2人參與, 最新討論串2/2 (看更多)
: <target name="compile" depends="ejbdoclet"> : <!-- Compile EJBs --> : <javac : srcdir="${java.dir}:${generated.java.dir}" : destdir="${build.dir}/ejb" : includes="test/ejb/*.java, test/interfaces/*.java" : > : </target> : ──────────────────────────────── : Here the compile target depends on the ejbdoclet target. This means that : before compiling anything all home/local/remote interfaces, primary key, : data-objects and deployment descriptors are generated. The first thing you : have to do is define the ejbdoclet task for Ant. : (Tony按:不懂again) : 編譯 target 依賴著 ejbdoclet target , : 這代表著在編譯前任何 home/local/remote 介面,p k,資料物件, : 以及開發敘述已經被產生。 : 第一件你必需要做的事情就是定義ant的 ejbdoclet task. [語法與結構] <target name="rz" depends="囧"> ... </target> ant 裡的 depends 是說,現在這個 target 是相依於 囧 target 如果 囧 target 沒有滿足,那就會自動先執行 囧 target 所以會先 囧 了才有 rz =========================================================== [語意] 上面的 code 是說,你使用了 xdoclet 幫你生 EJB 相關的檔案 所以有一些檔案是你要先生好,才能去 compile 專案的 如果你沒有先生好這些 EJB 相關的檔案,就先 compile 那可能因缺少檔案而出錯,或是完全看不出使用 xdoclet 的效果 因為產生檔案的工作要發生在 compile 所有相關的檔案之前 <target name="compile" depends="ejbdoclet"> </target> 所以當你 ant compile 其實也就是執行了 ejbdoclet target 與 compile target 如果你不寫 depends 那你要自己打二個 ant ejbdoclet compile 如果少打了可能因缺少檔案而 compile 不過的可能性存在 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.133.80.216

06/09 21:37, , 1F
冏rz
06/09 21:37, 1F

06/09 21:37, , 2F
原來如此 感恩o(_ _)o
06/09 21:37, 2F
文章代碼(AID): #18JIxcYw (java)
文章代碼(AID): #18JIxcYw (java)