Thursday, June 26, 2008

call second from first

Invoke other one command(shell) file from first.

./ $@

--- first.bat ---
@echo off
call second.bat %1 %2 %3 %4 %5

Friday, June 20, 2008

Remote debugging Tomcat with Eclipse

1. Конфа для старта сервака

Для Linux

Для Tomkat'a изменяем скрипт запуска (для других сервакох делается аналогично)

Закомментируем ненужное:

#REMOTE_DEBUG="-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"

Главное прописать вот эту строчку:

JPDA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y"

Добавляем эти опции в конец джава параметров запуска:


exec "$@"

Для Windows

Для Tomkat'a изменяем скрипт запуска eXo.bat (для других сервакох делается аналогично)

Главное прописать вот это:
set JPDA_TRANSPORT=dt_socket
set JPDA_OPTS=-Xdebug -Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=%JPDA_SUSPEND%

call catalina.bat %*

2. Старт сервака

Для Linux:
./ run

Для Windows:
./eXo.bat jpda run

Если все ок, то увидете приглашение для старта дебага:
"Listening for transport dt_socket at address: 8000"

3. Запуск дебага в Eclipse

Monday, June 16, 2008

Bike in Paris

В центре Парижа под Эйфелевой башней!Много людей ездят на велосипедах по-делам.

Их можно брать на прокат. Для жителей абонемент стоит 20 евро в год. При этом можно брать его на пол часа, потом поставить и взять другой. Иначе прийдется заплатить 1 евро. Если не поставишь через сутки то прийдется заплатить 150 евро.


Thursday, June 12, 2008

Maven war plugin classpath and play around manifest

Maven 2 build Lifecycle Phases

There are options for dependencies

1. The "optional" tag is "true"
goes in manifest classpath, but not included in WEB-INF/lib

2. The "scope" tag is "provided"
excluded from manifest classpath, and excluded from WEB-INF/lib

For plugin maven-war-plugin we can add options to exclude all dependencies in manifest.

addClasspath false /addClasspath

How can we exclude a list of dependencies from MANIFEST file with some option for plugin configuration?

junit, jmock, bcel, ehcache, xercesImpl

Ubuntu on usb stick with jdk

Installation 7.10 close to:
1. ubuntu-804-usb-hard-drive-install
(instructions more close to this one, but this version doesn't work - desktop doesn't appears)
2. ubuntu-704-to-a-usb-hard-drive
(pure documented instructions, and I didn't try this one due to old release date)

Than edit grub (without this step usb stick doesn't boot ubuntu, just grub menu appears on athescreen)
"sudo gedit /boot/grub/menu.lst"
remove all added at bottom from hard disk grub
and rename "hd1" for flash grub with "hd0"
You can edit this on fly in a loaded grub menu with "e" and boot edited with "b".

Run boot from USB storage.

After, you can comment swap space within /etc/fstab or exclude it while installation with manual prepare disk space. It makes faster your system.
"sudo gedit /etc/fstab"

Add network settings, sources of packages.
Install mc, jdk.

Copy tomcat.

I used CD burned ubuntu 7.10 for i386 on my USB 4Gb OCZ ATV flash drive with Dell AMD 2x1.8 Ghz and 2Gb memory laptop.

sudo grub
grub> find /boot/grub/stage1
(hdx,y) The given out values substitute below
grub> root (hdx,y)
grub> setup (hdx)
You can create live usb stick (it is more faster than full process installation on USB), but there are error with install jdk.

Link: - webOS-Ubuntu-PressRelease.pdf

Tuesday, June 3, 2008

SVN in command line helps you

Are there conflicted?
svn st * | grep "C "

Are there unversioned?
svn st * | grep "? "

Are there modified?
svn st * | grep "M "

Are there unversioned but not mine generated?
svn st * | grep "? " | grep -v "target" | grep -v ".classpath" | grep -v ".settings" | grep -v ".project"

How to remove that files which are results of search?
| xargs rm -rf

Monday, June 2, 2008



Sunday, June 1, 2008

Bike - picture in details