Managing JAR files with Apache Maven - The Koch Family
The Koch Family The Koch Family

Latest news

جاري التحميل ...

Managing JAR files with Apache Maven

Apache Maven (Maven) is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information.

Why Maven?

Let’s learn about the Maven’s history here https://maven.apache.org/background/history-of-maven.html to understand why Maven is created.

There are a lot of useful things that we should use Maven. In my opinion, the most important thing is that Maven solves the problems with managing jar files. It centralizes these files in one place and it is easy to use by declaring dependencies in a xml file (pom.xml). 

Using Maven to manage JAR files

Firstly, I would like to give you an example about using some JAR files without Maven. 
In my project, I need some JAR files such as SNMP4J.jar, jta26.jar, jgraphx.jar, etc… so I had to search them on the Internet with visiting a lot of websites, download and add these files into my project.

My example project was created with Eclipse (Kepler version) likes that:

It might be a little hard work because of  trusted location, version, time to search, etc.

Now, we will use Maven. In Eclipse, create a maven project with “maven-archetype-quickstart”. Then, visit the maven repository website to look up my dependencies. http://mvnrepository.com.


Next, add to “pom.xml” file, like this:

If any JAR file cannot find from the Maven repository we have to add the jar file as common way. J

Okay, now we can manage the JAR files easier with Maven.



---
Reference:



Comments



If you like the content of our blog, we hope to stay in constant communication, just enter your email to subscribe to the blog's express mail to receive new blog updates, and you can send a message by clicking on the button next ...

إتصل بنا

About the site

author The Koch Family <<  Welcome! I'm so glad that you stopped by Your Modern Family blog. Together, we will talk about raising kids, organizing the home and saving money! and Tips & tricks and more…

< Learn more ←

Blog stats

Sparkline 2513183

All Copyrights Reserved

The Koch Family

2020