What is struts resume?
Struts resume is being developed for two purposes: (1) so I can edit and publish my resume online and (2) to demonstrate developing a real-world app with appfuse. feel free to checkout the Online Demo
Http://demo.raibledesigns.com/struts-resume/schools.do
Http://raibledesigns.com/wiki/Wiki.jsp? Page = strutsresume
Http://forum.javaeye.com/viewtopic.php? T = 5167
Ant and CVS to work together
The main function is to automatically check out modules from CVS, compile the compiled class into a jar, and then commit it to the specified location of the CVS server.
Build. xml
Code: |
<? XML version = "1.0"?> <Project name = "GnT auto build" basedir = "." default = "build"><! -- The cvsroot value --> <Property name = "cvsroot" value = ": pserver: DHF: @ 192.168.0.200: D:/cvs_repository_z"/> <Property name = "cvs. Password" value = ""/>
<Property name = "ywzcpt. dir" value = "$ {basedir}/ywzcpt"/> <Property name = "ywzcpt. Module. Name" value = "ywzcpt"/>
<Property name = "zfyw. dir" value = "$ {basedir}/zfyw"/> <Property name = "zfyw. Module. Name" value = "zfyw"/> <Property name = "External. dir" value = "$ {basedir}/external"/> <Property name = "External. Module. Name" value = "external"/>
<Property name = "CVS-op" value = "CO"/> <! -- Initializing --> <Target name = "init"> <Tstamp> <Format property = "today" pattern = "yyyy-mm-dd hh: mm: SS"/> </Tstamp> <Echo message = "$ {today}"/> </Target>
<Target name = "prepare" depends = "init"> <Cvspass cvsroot = "$ {cvsroot}" Password = "$ {cvs. Password}" passfile = "ant-cvs.cvspass"/> </Target>
<Target name = "external-Check-out" depends = "prepare"> <CVS cvsroot = "$ {cvsroot}" package = "$ {external. Module. name }" Passfile = "ant-cvs.cvspass"/> </Target>
<! -- Retrieve the ywzcpt module --> <Target name = "ywzcpt-Check-out" depends = "external-Check-out"> <Delete dir = "$ {ywzcpt. Module. name}"/> <CVS cvsroot = "$ {cvsroot}" package = "$ {ywzcpt. Module. name }" Passfile = "ant-cvs.cvspass"/> </Target> <Target name = "zfyw-Check-out" depends = "external-Check-out"> <Delete dir = "$ {zfyw. Module. name}"/> <CVS cvsroot = "$ {cvsroot}" package = "$ {zfyw. Module. name }" Passfile = "ant-cvs.cvspass"/> </Target> <! -- CVS checkout -->
<Target name = "check-out"> <Antcall target = "external-Check-out"/> <Antcall target = "ywzcpt-Check-out"/> <Antcall target = "zfyw-Check-out"/> </Target>
<! -- Build xsp framework --> <Target name = "build"> <Echo message = "+ ======================================== =============+ "/> <Echo message = "| start building GnT for compilation |"/> <Echo message = "+ ======================================== =============+ "/>
<Antcall target = "ywzcpt-build"/>
<Echo message = "+ ======================================== =============+ "/> <Echo message = "| end building GnT for compilation |"/> <Echo message = "+ ======================================== =============+ "/>
</Target>
<Target name = "ywzcpt-build" depends = "ywzcpt-Check-out"> <Echo message = "+ ----------------------------------------------- +"/> <Echo message = "| start building ywzcpt for compilation |"/> <Echo message = "+ ----------------------------------------------- +"/> <Ant antfile = "build. xml" dir = "$ {ywzcpt. Module. name}" output = "ywzcpt. log"/> <Property name = "ywzcpt. Add" value = "Add./build/log/*. log./build/*. Jar./build/*. War"/> <Property name = "ywzcpt. Commit" value = "Commit-m' $ {today} './build/log/*. log./build/*. Jar ./Build/*. War "/>
<Ant antfile = "build. xml" dir = "$ {ywzcpt. Module. name}" target = "Commit-build"/>
<Echo message = "+ ----------------------------------------------- +"/> <Echo message = "+ end building ywzcpt for compilation |"/> <Echo message = "+ ----------------------------------------------- +"/> </Target>
<Target name = "zfyw-build" depends = "zfyw-Check-out, ywzcpt-build"> <Echo message = "+ ----------------------------------------------- +"/> <Echo message = "| start building ywzcpt for compilation |"/> <Echo message = "+ ----------------------------------------------- +"/> <Ant antfile = "build. xml" dir = "$ {zfyw. Module. name}" output = "zfyw. log"/> <Property name = "zfyw. Add" value = "Add./build/log/*. log./build/*. Jar./build/*. War"/> <Property name = "zfyw. Commit" value = "Commit-m' $ {today} './build/log/*. log./build/*. Jar ./Build/*. War "/>
<Ant antfile = "build. xml" dir = "$ {zfyw. Module. name}" target = "Commit-build"/>
<Echo message = "+ ----------------------------------------------- +"/> <Echo message = "+ end building ywzcpt for compilation |"/> <Echo message = "+ ----------------------------------------------- +"/> </Target> <Target name = "clean"> <Delete dir = "$ {ywzcpt. Module. name}"/> </Target>
</Project> |
Ywzcpt/build. xml:
Code: |
Mainly implement the commit Function <Target name = "Commit-build"> <CVS cvsroot = "$ {cvsroot}" passfile = "$ {root. dir}/ant-cvs.cvspass" Command = "$ {ywzcpt. Add}"/> <CVS cvsroot = "$ {cvsroot}" passfile = "$ {root. dir}/ant-cvs.cvspass" Command = "$ {ywzcpt. Commit}"/> </Target> |
Finally, you can create a scheduler task in Win2k.
_________________
The dark night gave me black eyes, and I used her to look for the light.
Quietly I walked away, just as I quietly waved my sleeves and didn't take away a piece of cloud color.
Blog:
Http://forum.javaeye.com/bloglist.php? Userid = 1354
Http://www.javamodel.com