Monday, 30 October 2017

Manually install maven dependency

Error messages from Maven are often useless. The root cause is mostly never captured. Debugging issues might require manually installing a dependency. The way to do it is as follows:

mvn install:install-file -DgroupId=jnuit -DartifactId=junit -Dversion=3.8.1 -Dpackaging=jar -Dfile=/path/to/file

Sunday, 15 October 2017

Correct do...while in Ruby

Rubyists use the .each or .map way of looping frequently. However, when there is a need of a while loop, the following is the correct way.
loop do
    # statements
    break if condition
end