Archive for October, 2010

Passing parameters for BASH alias

I find it annoying to type routine long commands at shell, specially during my development work. But some of the commands requires custom parameters to be entered according to the software I am building. So I wanted to find a way to pass parameters to aliases that I will be defining. Here is what I found by searching through Google which worked for me.

m () { command $1; }

alias a= m

So at BASH when I enter

$ a test

“command test” will be executed.

Here is one such maven build command I have defined.

fb () { mvn clean install -Dproduct=$1; }

alias bp=fb

$ bp bam

will get executed as

$ mvn clean install -Dproduct=bam


Read Full Post »

Removing cached SVN credentials

This post describes how cached SVN credentials can be removed. Credentials are stored in SVN auth disk area. They have to be removed in order to remove cached SVN credentials.

$ ls ~/.subversion/auth/svn.simple/

These files hold the credentials for a certain domain. If you take a look inside a file the domain is listed under svn:realmstring key. Delete the corresponding cache file  to remove the credential for the relevant domain.

K 8
V 3
K 8
V 4
K 15
V 45

Read Full Post »

SVN Tree Conflicts

Have you ever encountered this during a SVN update?

Summary of conflicts:
  Tree conflicts: 1

If so what you have at your hand is a conflict which has occurred due to conflicting file structure changes like file moves and deletions. You can force the removal of unwanted file with this command,

svn remove --force file-to-be-removed

Then conflict can be resolved using,

svn resolve --accept=working file-to-be-removed

Read Full Post »

A Maven Bug

If you encounter following during a Maven build,


java.lang.ArrayIndexOutOfBoundsException: 0 at      org.apache.felix.scrplugin.tags.JavaClassDescriptorManager.getSourceDescriptions(JavaClassDescriptorManager.java:344) at  org.apache.felix.scrplugin.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:110) at  org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) at  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) at  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) at  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at  org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at  org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at  org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)


check whether if there are any empty classes (totally commented out classes) lying around inside the sources. If so remove them and it would most probably build fine.


Read Full Post »