Wednesday, November 28, 2012

git and eclipse

Git ref 
to import a project into git from say CVS
cd ~/projects/camscapa-project/
mkdir CAMS2
cp -R ../cams2-project/CAMS2/* CAMS2
cd CAMS2

mvn clean

for d in `find -type d -name 'CVS'`; do rm -rf $d; done
for d in `find -type d -name '.settings'`; do rm -rf $d; done
for d in `find -type f -name '.project'`; do rm -rf $d; done

git init
git add .
git commit -a -m 'all commit first time'
cd ..
git clone --bare ./CAMS2 ~/z-git-repos/CAMS2.git
mv CAMS2 CAMS2_after_init
git clone git://rpradeshik/CAMS2.git
cd CAMS2
pwd

# add gitigone with target classes etc.,

git add .
git commit -m 'ingone file' .
git push

To import in eclipse

  1. Open "Git Perspective", do "Add existing local repo"  and choose "~/projects/camscapa-project/CAMS2" 
  2. RClick on CAMS2 node and select "Import Projects"
  3. in 3 radio options choose "Import as general Project", then "CAMS2", finish
  4. This should bring CAMS2 as project into workspace, goto java perspective
  5. to import single modules inside CAMS2 say "cams-dri" RClick and do maven import
  6. Make sure maven 304 is in eclipse installation


Wednesday, October 24, 2012

Maven and Linux Tips

java and C++ interface easily http://code.google.com/p/javacpp/
benchmark ref http://benchmarksgame.alioth.debian.org/
Standard Deviation http://www.mathsisfun.com/data/standard-deviation.html

Oracle trace settings ====

SQL> ALTER system SET EVENTS ’1652 TRACE NAME ERRORSTACK LEVEL 3′;
It will write to the alert.log
Tue Jul 21 11:04:45 2009
Errors in file /u01/admin/TESTDB/udump/testdb_ora_17682588.trc:
ORA-1652: unable to extend temp segment by 128 in tablespace TEMP

jar classifier and Profile usage, nice one

http://www.linuxtutorialblog.com/post/tutorial-conditions-in-bash-scripting-if-statements


To update version of maven for portal project
Manually update express/portal/pom.xml

mvn versions:update-child-modules -DgenerateBackupPoms=false
OR
mvn versions:set -DnewVersion=1.3-SNAPSHOT
mvn versions:commit

Wednesday, September 12, 2012

JBoss 7 re-deployment


The reason using these manual steps is war:inplace makes a mess if there are war overlays
In Jboss standalone.xml make sure you disable scanning for exploded deploys

Make sure you install inotify-tools (in ubuntu) test for exec as inotifywait
in war maven pom.xml have for exploded as
To deploy un-zipped run command as "mvn war:exploded"
To force reload of app in jboss make a touch as "touch $JBOSS_HOME/standalone/deployments/test-ui.war.dodeploy"
To Make a inotify cron rsync do as follows, have a shell script as

Sunday, July 29, 2012

sbt, g8 getting started


giter8 is ~= maven archetypes
https://github.com/n8han/giter8/

to install conscript do this
>>curl https://raw.github.com/n8han/conscript/master/setup.sh
it pus cs in ~/bin

some help:
http://scala.micronauticsresearch.com/sbt/useful-sbt-commands
scala example https://github.com/padcom/spring-example

append with EMPTY new line another sbt plugin common for user machine as
~/.sbt/plugins/plugins.sbt
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.1.0-RC1")


run as follows to create a sample project
g8 chrislewis/basic-project
(say you create testApp)

to create eclipse files
cd testApp
sbt eclipse (this create eclipse files, use Indigo to open project) !





Tuesday, June 26, 2012

Some linux utils

for i in `find -iname '*.jar'` ; do jar tvf $i | grep javax/xml/bind/util/JAXBResult.class && echo $i ; done;


java com.sun.org.apache.xalan.internal.xslt.EnvironmentCheck


To find files modified within 2 time range

touch -t 201112220000 start
touch -t 201112240000 stop
find . -newer start \! -newer stop
#to exclude with grep
find . -type f -newer start \! -newer stop | grep -v -e 'CVS' -e '.settings' -e 'target' -e '.classpath' -e '.project'
http://unix.stackexchange.com/questions/29245/how-to-list-files-that-were-changed-in-a-certain-range-of-time
To Remove extra spaces in file :)
for f in `find $dd -type f -iname *.jsp`; do sed -i 's/[ \t]*$/ /' $f; done