During our java based microservice development, we extensively use build tools like Maven or Gradle. Usually, IDEs do a lot on our behalf or we just run some predefined commands without checking what's happening inside. Here in this series of 6 posts, I tried to explain Maven. Before I start talking about what Maven is, and its different components, let’s discuss the “why”. Why do we even need Maven? For this, I’ve to first explain the nature of a Java-based project and also need to take you back in history. The “Build” Step. Java is a compilable language, Unlike Python or Javascript, which are interpreted. ie, the code we write in java, can not as-is run on a Java virtual machine (JVM). JVM understands only the bytecode. Therefore, in the Java world, there is always a need for an intermediary step. A step that compiles the java code files into bytecode. That's why after writing the java code, we “somehow” create some deployable (jar, war, ear) to run on ma...
There are scenarios when we want to apply the changes of an earlier commit in a repo, on top of the current repo tree of some branch in the same repo. Or In some scenarios, we just want all the changes from an earlier commit of this repo into the current staging area and make some more changes before finally committing all the changes to the repo tree. For both scenarios, the git cherry-pick command comes in handy. Git documentation describes cherry-pick as git-cherry-pick — Apply the changes introduced by some existing commits. Given one or more existing commits, apply the change each one introduces, recording a new commit for each Let’s explain this with an example Step 1- Create a git repo mkdir git-example-cherry-pick && \ cd git-example-cherry-pick && \ git init Step 2- Add a few commits echo "First change" >> first.file && \ git add first.file && \ git commit -m "first commit" echo "Second change" ...