How to create simple java project using maven in eclipse

In this post, we will see how to create a simple java project using maven in eclipse. We have already seen before how to create dynamic web project using maven in eclipse.

I am using following tools for this post.

  • eclipse-jee-mars-R-macosx-cocoa-x86_64
  • Apache tomcat 8
  • m2eclipse plugin
  • jdk 1.7

Steps for creating dynamic web project using maven in eclipse.

1) Install m2eclipse for maven plugin in eclipse. Please follow this link for installing m2eclipse plugin in eclipse.

2) goto new -> project-> Maven Project and click on next

3) You will see below screen , again click on next


4) We need to put group id and artifact id here.

Let me tell you more about group id and artifact id.

Group id : It uniquely identifies your project among all. So it may be something like com.companyname

Artifact id : It is name of jar or war without version. it may be something like project, so here we have put artifact id as SimpleJavaProjectUsingMaven

Version : Version is used for version control for artifact id. If you distribute this project, you may incrementally create different version of it.

If we have any dependency on any parent project, we can declare it in Parent project.

New Maven Java Project

5) Click on finish , you will see  project structure as below

Bingo !! we are done with simple java project using maven in eclipse.

Please comment if you are facing any issue with this.

Related Posts

  • 17 May

    How to Initialize an Array with 0 in Java

    Table of ContentsArraysInitializing Newly Created ArrayUsing Default Initialization of Arrays in JavaUsing Initialization After DeclarationUsing Simultaneous Initializing and Declaration of ArrayUsing Reflection in JavaInitializing Existing ArrayUsing the Arrays.fill() Function of JavaUsing the for LoopUsing Reassignment From Another ArrayUsing Collections.nCopies() Function of JavaInitializing User-Defined Object ArrayConclusion This article discusses the arrays and different ways to initialize […]

  • 17 May

    Add Month to datetime in Python

    Table of ContentsWays to add month to datetime in PythonUsing the datetime.datetime constructor to add month to datetime in Python.Using the dateutil.relativedelta object to add month to datetime in PythonUsing the pandas.DateOffset() function to add month to datetime in PythonUsing the arrow.shift() function to add month to datetime in PythonConclusion In Python, we can represent […]

  • 12 May

    Extract Integer from String in Python

    Table of ContentsHow to extract integer from string in Python?Using the isdigit() function to extract integer from string in Python.Using the filter() function to extract integer from string in PythonUsing the re.search() function to extract integer from string in PythonConclusion How to extract integer from string in Python? A string can store a sequence of […]

  • Convert CSV to dictionary in Python
    09 May

    Convert CSV to Dictionary in Python

    Table of ContentsCSV and Dictionaries in PythonConvert CSV to Dictionary in PythonUsing the pandas.to_dict() function to convert CSV to dictionary in PythonUsing the csv module to convert CSV to dictionary in PythonUsing the filter() function to convert CSV to dictionary in PythonUsing the numpy.loadtxt() function to convert CSV to dictionary in PythonConvert CSV to List […]

  • Make requirements.txt in Python
    03 May

    Make requirements.txt in python

    Table of ContentsWhat is the requirements.txt file in Python?Ways to make requirements.txt file in PythonUsing the pip to make requirements.txt in PythonUsing the conda command to make requirements.txt file in PythonUsing the pipreqs package to make requirements.txt file in PythonConclusion What is the requirements.txt file in Python? Every package is also updated regularly and features […]

  • Create an array of 1 to 10 in Python
    03 May

    Create an Array of 1 to 10 in Python

    Table of ContentsIntroductionHow to create an array of 1 to 10 in Python?Using the range() function to create an array of 1 to 10 in Python.Using list comprehension along with the range() function to create an array of 1 to 10 in Python.Using a user-defined function to create an array of 1 to 10 in […]

Comments

Leave a Reply

Your email address will not be published.

Subscribe to our newletter

Get quality tutorials to your inbox. Subscribe now.