Not to drag us off topic, but Hardy, agreed that shell scripts and tricks are
very useful for helping with best practices. Just a couple of quick comments:
- I have frequently seen, with DSpace, that Tomcat can not entirely terminate
it's process when getting a stop or restart command the first time. Just
figured it was worth warning anyone who hadn't noticed this. It can cause a
lot of lost time in trying to figure out why code-changes aren't showing up, or
incorrect assumptions that a trouble-shooting attempt didn't work.
- There's lots of convenience and clarity in commands to be had from creating a
few environment variables in .bash_profile. It's kind of a generic UNIX tip,
but I personally do things like:
export DSPACE_HOME=/my/deploy/dir/dspace
export DSPACE_LOG=/my/deploy/dir/dspace/log/dspace.cfg
These can speed up tasks on a server, especially given that a lot of shells
will do auto-completion via tab when using e.g. cd $DSPACE_HOME/.... on the
command-line. You could also clean up those alias definitions like this.
2cents,
--
sands fish
Software Engineer
MIT Libraries
Technology Research & Development
sa...@mit.edu<mailto:sa...@mit.edu>
E25-131
On Sep 2, 2010, at 3:50 PM, Pottinger, Hardy J. wrote:
Hi, I'm mostly a lurker here, and I totally agree with Mark that testing should
be more of a default, but I also wanted to put in a plug for a habit I've
gotten into with DSpace work: I use bash aliases for all the DSpace commands I
run all the time. Here's what I have right now:
# mospace aliases
alias mospace.theme="cd
~/workspace/mospace/src/dspace-src/dspace-xmlui/dspace-xmlui-webapp/src/main/webapp/themes/mospace"
alias mospace.root="cd ~/workspace/mospace/src/dspace-src/dspace"
alias mospace.authenticate="cd
~/workspace/mospace/src/dspace-src/dspace-api/src/main/java/org/dspace/authenticate/"
alias mospace.mvn="cd ~/workspace/mospace/src/dspace-src/dspace && mvn -U
-Pmospace -Ddb.name=oracle clean package"
alias mospace.clean="cd ~/workspace/mospace/src/dspace-src/dspace && mvn
-Pmospace -Ddb.name=oracle clean"
alias mospace.target="cd
~/workspace/mospace/src/dspace-src/dspace/target/dspace-1.6.2-build.dir && ant
help"
alias mospace.stop="sudo /etc/init.d/httpd stop && sudo /etc/init.d/tomcat5
stop && sudo /etc/init.d/handle stop"
alias mospace.start="sudo /etc/init.d/tomcat5 start && sudo /etc/init.d/httpd
start && sudo /etc/init.d/handle start"
alias mospace.restart="sudo /path/to/cont_test_red.sh"
alias mospace.messages="vim
~/workspace/mospace/src/dspace-src/dspace/modules/xmlui/src/main/webapp/i18n/messages.xml"
I'd be a basket case if I had to remember all the Maven command line switches.
:-)
I'm sure I'm not breaking any new ground here, but figured I'd share anyway.
Of course, it doesn't change the fact that you have to enable testing in a
profile. But at least calling the profile doesn't have to be something you
remember to do all the time.
Back to lurking for me. :-)
--Hardy
------------------------------------------------------------------------------
This SF.net<http://SF.net> Dev2Dev email is sponsored by:
Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Dspace-devel mailing list
Dspace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-devel
------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:
Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Dspace-devel mailing list
Dspace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-devel