LayoutTitle

Hoverable Dropdown

Thursday, March 7, 2019

What is the difference between normal Java Project and Maven Project?



Here are the few points on the differences on normal Java & Maven Project

1.   Normal Project & Maven Project structure vary, see below. Observations are here you won't see the Maven Life cycle and also POM doesn't preset. Moreover you can run the java class by right clicking as shown below

      
Normal Java Project  & Its folder structure
Maven Java Project & Its folder structure

      NOTE: Maven project shows POM file and also Maven Life cycle to perform the desired action and also you can run the Java class by setting the run configuration under Maven project

2.  Maven Project only will have Project Object Model (POM) file
3.  Maven is a software project management and comprehension tool hence it will manage a project's build, reporting and documentation automatically from a central piece of information.
4.  Maven itself has life-cycle which includes clean, validate, compile, test, package, verify, install, site and deploy of your project created. These life-cycle helps you to perform relevant activities automatically unlike you do all these activities with great difficultly manually in Normal Java projects
5.  While creating Maven one should provide group id, artifact id & version for your project. These information helps you in identifying your project uniquely and helps to store your projects in version control tools
6.  In Normal Project, if you want to work on any third party / API applications then you have to associate those jar files and associate/configure those jar files to your project manually, whereas in Maven project provide the third party/API applications dependency in POM file and then click on Maven install then automatically those respective libraries automatically to your project.

Example: Selenium java dependency, should add the below one in your POM file and run Maven install to have them to your project

<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.53.1</version>
<scope>test</scope>
</dependency>


Example: Cucumber maven dependency

<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.2.5</version>
</dependency>

Steps involved in creating a Maven project

1.       Select File>>New >> Project

2.       Select Maven and click Next on New Project Window

3.       Provide inputs against
a.       Group ID
b.      Artifact ID
c.       Version and click Next

4.       Provide inputs to
a.       Project Name
b.      Project Location and click Finish

5.       Finally, a Maven project will be created with a POM file. 

Note: Here the project folder will be automatically created along with the default details related to Maven and the project in the POM file.

Now it is the phase where you add the 3rd party applications/API related Maven dependency in the POM file and just click on the install under Maven Life Cycle to have the respective libraries to your project.




10 comments:

  1. Thank you for providing detailed information.

    Thanks,
    Suresh

    ReplyDelete
    Replies

    1. IEEE Final Year projects Project Center in Chennai are consistently sought after. Final Year Students Projects take a shot at them to improve their aptitudes, while specialists like the enjoyment in interfering with innovation. For experts, it's an alternate ball game through and through. Smaller than expected IEEE Final Year project centers ground for all fragments of CSE & IT engineers hoping to assemble. <Final Year Projects for CSE It gives you tips and rules that is progressively critical to consider while choosing any final year project point.

      JavaScript Training in Chennai

      JavaScript Training in Chennai

      The Angular Training covers a wide range of topics including Components, project projects for cseAngular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training

      Delete
  2. Choose a viable business idea and critically inspect its risk to see if it is practical, implementable, and scalable. Indian business consultancies help you to choose the right business idea and fine-tune it to make it a great business idea. Ill-thought-out decisions often result in wastage of time and resources. So it’s better to plan beforehand.

    ReplyDelete
  3. This blog will help to get more ideas. This is very helpful for Software Testing learners. Thank you for sharing this wonderful site. If someone wants to know about Software QA services this is the right place for you Software QA Companies.

    ReplyDelete
  4. Cool you inscribe, the info is really salubrious further fascinating, I'll give you a connect to my scene. Project Management Services

    ReplyDelete
  5. Our the purpose is to share the reviews about the latest Jackets,Coats and Vests also share the related Movies,Gaming, Casual,Faux Leather and Leather materials available Alo’s Winter House Lucy Hale Jacket

    ReplyDelete
  6. I love to recommend you Where can crawl Exciting Products latest Jackets, Coats and Vests Click Here Mitch Buchannon Jacket

    ReplyDelete
  7. You can do very creative work in a particular field. Exceptional concept That was incredible share. bodega cat hoodie

    ReplyDelete
  8. Thanks for sharing this informative article on What is the difference between normal Java Project and Maven Project? If you want to java development company for your project. Please visit us.

    ReplyDelete