Posts

Showing posts from February, 2022

How to create a Maven web project using archetype selection

Image
In my earlier article, we learned how to create a Java web project in Eclipse and how to add Maven support to it.  In this article, we will learn how to create a Maven web project using archetype selection. Create Maven Web Project In Eclipse Step 1 – In Eclipse, Click on File > New > Other . Click on Maven Project . Click Next : Step 2 – The following screen is displayed. Click Next : Step 3 – In the Filter text box, type “ maven-archetype-webapp “.  Select “ org.apache.maven.archetypes “. Click Next : Step 4 – Enter Group Id and Artifact Id . Click Finish : This creates a web project with the required directory structure: Now you can add the necessary dependencies to your pom file as explained in this post. So for example, if you are creating a Spring application, you can add Spring dependencies. You can also use this as a template to create any web application with Maven support. Further Learning Apache Maven Beginner to Guru Maven Crash Course Java Programming in Eclips

Git Branch and Fork Differences explained

In this article, we will learn about the differences between git fork and branch. To learn about some Git terms you can refer to this blog post. What is a Git branch? A branch represents a line of development. Often, developers use different branches for production releases, bug fixes, etc. Having code in different branches enables developers to make changes to code without messing up the main line of development. What is a Git fork? Forking is the process of copying someone else’s repository into your own account. So, when you fork a repository, a copy of the entire repository is available in your own account. Forking is typically used when developers want to make changes to someone else’s repository for their own purpose. Forking does not in any way affect the original repository. Developers can however submit their changes to the project owner by creating a pull request. Differences between a branch and a fork The following table lists the differences between a branch and a fork: E