a converstion i’ll never have..

- why shohag?
> Apu, I didn’t know this would be something so big. I couldn’t bear how I was living, I counted on you to solve my problem but you left.
- I didn’t leave, I was angry at you. You didn’t pay attention to what I said, you valued the wrong thing more than the right thing.

> Why didn’t you patch up like you used to, when we were kids?
- Shohag, things change, at some point you have to grow up and try to solve your own problems. I already had way too much on my plate. You don’t know what I have gone through. But you were with parents and you have misused that advantage. Did you really love her that much to have done those things? things of that vicious magnitude that I hear of?

> I didn’t know the right from wrong. What is the point asking me about it? What good would do to you having this conversation anyway?
- I want answers! why did you leave us like this? Were we so insignificant in your life? I haven’t come across a single instance where the dying man doesn’t say good bye to their family member in any way.. you never even bothered to even send me a message?

then silence..
its kind of hard to argue with someone who is not here.

Comments (2)

Mono – take1

So I had to write a client/listener for an MQ server, I planned to use an existing web service that was left out from being used during one of the site makeover.

Since one of the app in java is already doing that using Spring and jms template, I made a point in trying to do the same in .NET. Problem is simple, the MQ server is in Java platform and I needed to run a C# tool/deamon on Linux distribution 5.x.

Mono is a wrapper for C#/.NET to enable user to convert a *.dll/*.exe to run in any environment that does/not support .NET framework.

I’m still testing it, I’ll update you guys when something good comes out of it.

Leave a Comment

How to link the svn revision with maven pom.xml project version

For a while now we are using tortoise svn to maintain our code repository, no question asked it is an excellent tool.
Now we also have nexus to store our generated artifacts/jar, but I can’t seem to find a way to identify from which svn revision this particular jar file was generated.

Also all of us are quite lazy to go up to the version node in the pom.xml and change it, and for months and months we are usually generating the same version, which is 1.0-SNAPSHOT.

I did a bit of digging around and tried something very simple..
STEP 1: Added a placeholder in pom.xml and property field in settings.xml
STEP 2: Made sure the mvn.bat performs a svn update at mvn build and supplies the property value to it.

STEP 1 goes something like this : pom.xml with variable ${svn.version}

<project>
 <modelVersion>4.0.0</modelVersion>
 <groupId>com.somedomain</groupId>
 <artifactId>mysuperproject</artifactId>
 <packaging>war</packaging>
 <version>1.0.${svn.version}</version>
...
</project>

Just to make sure the editor(netbeans) build doesn’t complain, I added a placeholder in settings.xml

<profiles>
 <profile>
  <id>my-usual-profile</id>
  <properties>
   <svn.version></svn.version>
  </properties>
...
 </profile>
....
</profiles>

STEP 2 was a bit trickier, keep a backup in case you break it, it is updating the mvn/mvn.bat
The dirty fix is to edit mvn.bat and at the top just add this bit above the Apache license declaration.


@REM ----------------------------------------------------------------------------
@REM Farlin : Adding a bit of logic to update project version number with svn revision
@REM ----------------------------------------------------------------------------
@ECHO OFF
:; Turn echo off (above) to keep it clean
:; Clear any previous variables set, and set your desired property name
SET PropertiesName=svn.version
SET SvnCurrentRev=
:; Get the output from the "svn up" and trim to revision number
SET temp=
FOR /F "tokens=*" %%i in ('svn up') do SET temp=%%i
FOR /F "tokens=3 delims= " %%A IN ("%temp%" ) DO (
SET temp=%%A
)
FOR /F "tokens=1 delims=." %%A IN ("%temp%" ) DO (
SET SvnCurrentRev=%%A
)
:;ECHO %SvnCurrentRev%
:; create a mvn commandline switch with svn revision number
SET MAVEN_CMD_LINE_BUILD_VERSION=-D%PropertiesName%=%SvnCurrentRev%
:;ECHO %MAVEN_CMD_LINE_BUILD_VERSION%
@REM ----------------------------------------------------------------------------
@REM Licensed to the Apache Software Foundation (ASF) under one
....

and also locate the place where Start MAVEN2 is configured in the mvn.bat file

....
@REM Start MAVEN2
:runm2
%MAVEN_JAVA_EXE% %MAVEN_OPTS% -classpath %CLASSWORLDS_JAR% "-Dclassworlds.conf=%M2_HOME%\bin\m2.conf" "-Dmaven.home=%M2_HOME%" org.codehaus.classworlds.Launcher %MAVEN_CMD_LINE_ARGS% %MAVEN_CMD_LINE_BUILD_VERSION%
if ERRORLEVEL 1 goto error
goto end
...

This should do the trick and append the revision number when you do a mvn build.
To check, go to your checked out version and do :

mvn clean install

Want to check if this worked? Just browse inside your *.jar/*.war and inspect the file called pom.properties
mysuperproject.war\META-INF\maven\com.somedomain\mysuperproject\pom.properties
you will see :

#Generated by Maven
#Fri Jul 09 15:05:59 EST 2010
version=1.0.1326
groupId=com.somedomain
artifactId=mysuperproject

And when you deploy your artifact to nexus, it will automatically create a folder for your jar with respective build number. Hope this helps!

Leave a Comment

Trouble relocating nexus folder?

I got a bit adventurous and decided to install the Nexus in our Dev server. We already have a working version in a virtual environment, but I’ve got my hands on a clean Linux machine and I thought to make best use of it.

I have found this blog post very helpful for a non-Linux native person.
It was very simple to get it started (after I have sorted out some environmental and user right issues).

Once I got it started at port 8081, I wanted to move the folders around. But I didn’t want to set the environment variables, just to make sure my folder structure works..

In order to do this the main file you want to edit is located here,

/[your system folder structure]/nexus-webapp-[version]/conf/wrapper.conf

the wrapper.conf looks like this – just out of the box..

#********************************************************************
# Wrapper Properties
#********************************************************************
# Java Application
wrapper.java.command=java

# Wait a bit longer than default before assuming jvm hasn’t started properly
wrapper.startup.timeout=90

#wrapper.debug=true
#This should be set to the base of your system, which is one folder below the container and nexus folders
#wrapper.working.dir=../../../../

# Java Main class.  This class must implement the WrapperListener interface
#  or guarantee that the WrapperManager class is initialized.  Helper
#  classes are provided to do this for you.  See the Integration section
#  of the documentation for details.
wrapper.java.mainclass=org.codehaus.plexus.classworlds.launcher.Launcher

# Java Classpath (include wrapper.jar)  Add class path elements as
#  needed starting from 1
#wrapper.java.classpath.1=../lib/wrapper.jar
#wrapper.java.classpath.2=../lib/my-app-1.0-SNAPSHOT.jar
wrapper.java.classpath.1=../../../lib/*.jar
wrapper.java.classpath.2=../../../conf/

# Java Library Path (location of Wrapper.DLL or libwrapper.so)
wrapper.java.library.path.1=./lib

# Java Additional Parameters
#wrapper.java.additional.1=-d64
#wrapper.java.additional.2=-Dcom.sun.management.jmxremote
#wrapper.java.additional.3=-Dorg.tanukisoftware.wrapper.WrapperManager.mbean=true
wrapper.java.additional.1=-Dbasedir=../../..
wrapper.java.additional.2=-Djava.io.tmpdir=../../../runtime/tmp
wrapper.java.additional.3=-Dsun.net.inetaddr.ttl=3600
#wrapper.java.additional.4=-Xdebug
#wrapper.java.additional.5=-Xnoagent
#wrapper.java.additional.6=-Djava.compiler=NONE
#wrapper.java.additional.7=-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
#wrapper.java.additional.8=-XX:+HeapDumpOnOutOfMemoryError

# Initial Java Heap Size (in MB)
#wrapper.java.initmemory=3
#

# Maximum Java Heap Size (in MB)
#wrapper.java.maxmemory=64
#

# Application parameters.  Add parameters as needed starting from 1
#wrapper.app.parameter.1=com.mycompany.app.App
#

# Make wrapper reload configuration between app restarts (NEXUS-3032)
wrapper.restart.reload_configuration=TRUE
wrapper.on_exit.12=RESTART

#********************************************************************
# Wrapper Logging Properties
#********************************************************************
# Format of output for the console.  (See docs for formats)
wrapper.console.format=PM

# Log Level for console output.  (See docs for log levels)
wrapper.console.loglevel=INFO

# Log file to use for wrapper output logging.
wrapper.logfile=../../../logs/wrapper.log

# Format of output for the log file.  (See docs for formats)
wrapper.logfile.format=LPTM

…..

I didn’t like the idea of having relative paths and leaving all the standard stuff aside, I only wanted to make sure it has got the correct base directory to work with.

So all I did is introduce couple of variable like this at the top :

set.REPO.HOME=/usr/local/your-base-directory-for-nexus/
set.NEXUS.HOME=/usr/local/your-base-directory-for-nexus/nexus
set.NEXUS.PLATFORM=linux-x86-xx

and for all the relative path-ed variable, just update them like this:

….

wrapper.java.additional.1=-Dbasedir=%NEXUS.HOME%
wrapper.java.additional.2=-Djava.io.tmpdir=%NEXUS.HOME%/runtime/tmp

# Log file to use for wrapper output logging.
wrapper.logfile=%NEXUS.HOME%/logs/wrapper.log

If you want to change the folder location, all you need to do is just update your HOME variable to the new path and all will be well. Hope this helpful !

Leave a Comment

Step 1 : Maven pom.xml

Read a lot and read a bit more.. until you think you will never understand what this thing is supposed to help you with..

Then you discover the dependency management, discover how you can get minions aka. plug-ins to do your dirty work, how you can control the properties values from settings.xml and how you can change your profile to suit building artifact/war/jar for different environment.

Then you want more.. mm..what is up with this repository management??

Leave a Comment

stop poking us, I beg you..

It is an interesting thing, this Death.

Unless it touches you somehow, you are behind the glass, you can see the people tormented by it,
like you watch those bats in the dark, glass-enclosed confinement. You feel empathetic towards them.
you ponder, ‘..such sad things happen to people’.
Only when Death reaches you somehow, snatches someone beloved from you,
you break in to one of those silent scream that you often hear the bats do.

What is the best thing to do? Hide yourself and hung upside down?
I count my blessings, Merciful God can be quite brutal sometime,
I am told – He knows everything and there must be a reason for what he is doing..
It is His way of testing.

I had a parrot once, quite rebellious one at that.
It never liked staying inside the wire-cage it came with.
It would rub and wriggle its head through the small opening between the wires to find a way out.
I was quite fond of poking it. I never understood how painful it must have been for that parrot.

Knowing all He knows, I should think He would stop poking us, isn’t it?

Leave a Comment

Phases of Me

I go through this on and off phases of self-confidence.

There are times when I am pretty satisfied with what I am and how things are going around me. But all on a sudden I would suffer from tremendous self-consciousness, and I would go in the snail-shell phase, where I don’t feel my self anymore. I get easily intimidated and acts out to be overly sensitive. I hate being that sentimental.

Leave a Comment

scar in my hand

Few weeks ago I had a minor kitchen accident, which resulted in some (quite) hot oil being spilled in on my hand. Now that I look at my peeling burnt skin, I can’t recall how painful it was to have hot oil on my skin. I am more worried about this albino skin tattoo that I would have to bear on my hand for rest of my life.

It is sad why I am like this, more worried about less important things. I think I am obsessed with making sure people are pleased with me over the actual problem at hand.

Comments (1)

Sea Fruit

I was amazed how little you can get when you Google the term ‘sea fruit’. The most of the search result was dedicated to a Band ‘Dead Sea Fruit’, which was not exactly what I had in mind.

I had a sea food dish in Seoul and only the best way I could come up with explaining that was – it was a sea fruit soup. When the fishermen draws the nets out of water, along with the fish comes up smaller creatures of the sea, instead of throwing them all back to the water, they are later sold in bulk and are called ‘sea fruit’. It is quite good source of protein, and when cooked properly tastes good.

The closest results I found were a recipe for sea fruit and a forum post.
So here goes nothing ;)
Forum Post
Recipe with a picture that tells what sea fruit generally consists of.

Leave a Comment

Its like.. its like they have a master plan!

Have you noticed how the super power nations are now intimidated by China? No one dares to speak against them and more importantly no one dares to say anything against the wrong they commit to !
If you pick a fight with someone one tenth of your size and who does not believe in violence, and when others notices the oppression you try to mute them with brute force, what can that be termed as?
Isn’t there a rule against this oppression?

Why does China hate the Dalai lama?
China mutes Bangladeshi Exhibition
USA says I rather not speak with you Dalai Lama because I have sold my soul to China

Its like they have a master plan to invade the whole world, they have started it with their own country, moved to removing a religion head from his rightful position, muted anyone who might have had a say against it. Shouldn’t some one speak against it before the virus infects all?

Leave a Comment

Older Posts »
Follow

Get every new post delivered to your Inbox.