+5 votes
241 views
How to install Apache Maven on Ubuntu

in Linux / Unix by (552k points)
reopened | 241 views

1 Answer

+3 votes
Best answer

1. Install Java on Ubuntu

Project management is one of the most mentioned issues at the corporate level today thanks to its scope, benefits and possibility of coordinating the best tasks for a specific group within the company..

When working on Linux Operating Systems, we have the opportunity to use various tools focused on this type of activities and one of the most striking is Apache Maven which we will analyze in this tutorial in full and complete in Ubuntu 17 Server.

What is Apache Maven?
Apache Maven has been developed as a management and understanding tool for software projects.

Apache Maven is based on the concept of the project object model (POM), and thanks to Maven, you can manage the compilation, reports and documentation of a project from a central piece of information thus allowing full control..

Apache Maven is a compilation automation tool which is used and implemented mainly for Java-based projects but it is also possible to use it to create and manage projects written in C #, Ruby, Scala and other languages.

The objectives with which Apache Maven was created are:

  • Allow the construction process to be as easy as possible.
  • Provide a uniform construction system
  • Offer project quality information
  • Provide guidelines for the development of best practices
  • Allow a transparent migration to new functions

Some of its most outstanding features are:

  • Simple project configuration that follows best practices which allows us to obtain a new project or module started in a few seconds.
  • Consistent use in all projects, this does not imply an acceleration time for new developers entering a new project.
  • Superior dependency management that includes automatic update, dependency closures (also known as transitive dependencies).
  • Apache Maven has the ability to easily work with multiple projects at the same time without affecting any of them.
  • It has a large and growing repository of libraries and metadata to use immediately, and additionally, with agreements with the largest Open Source projects for real-time availability of their latest releases.
  • Maven is extensible, as it has the ability to easily write plugins in Java or scripting languages.
  • Instant access to new functions with little or no additional configuration.
  • It makes use of Ant tasks for dependency management and Maven deployment.
  • Use models based on models, that is, Apache Maven can build any number of projects in predefined output types such as JAR, WAR or distribution based on metadata about the project, without the need to do scripts in most cases .
  • It is a site consistent with the information of the project since it uses the same metadata as for the compilation process, Maven can generate a website or PDF that includes all the documentation that we want to add, and adds to those standard reports on the state of development of the project.
  • It offers distribution publication and version management and this does not require much additional configuration, since Maven will be integrated with the source control system (such as Subversion or Git) and is responsible for managing the launch of a project based on a certain label . We may also publish this in a distribution location for other projects to use. Maven can publish individual outputs as a JAR, a file that includes other dependencies and documentation, or as a source distribution.
  • Dependency management, since, when using Apache Maven, the use of a central JAR warehouse and other dependencies is encouraged. Maven has a mechanism in which project clients can access to download any JAR required to build their project from a central JAR repository very similar to the Perl CPAN.

1. Install Java on Ubuntu

Step 1

The first step to take is to install the 'python-software-properties' package using the following command:
 sudo apt install -y python-software-properties 
image
Step 2

Now we are going to add the Java PPA repository with the following command:
 sudo add-apt-repository ppa: webupd8team / java 
image
Step 3

Once this repository has been added, we proceed to update its packages:
 sudo apt update 
Step 4

Apache Maven requires JDK 1.7 or higher and in this case we will install JDK 1.8, for this, we will install Java from the PPA using the apt command as follows:
 sudo apt install -y oracle-java8-installer 
image
Step 5

Once this process is finished we can visualize the Java version by executing the following:
 java -version 
image
image

Login Join up!


by (3.5m points)
edited

Related questions

+3 votes
1 answer
+4 votes
1 answer
asked Nov 6, 2020 in Linux / Unix by backtothefuture (552k points) | 616 views
+5 votes
1 answer
asked Oct 15, 2019 in Linux / Unix by backtothefuture (552k points) | 236 views
+4 votes
1 answer
asked Oct 10, 2019 in Linux / Unix by backtothefuture (552k points) | 300 views
+5 votes
1 answer
Sponsored articles cost $40 per post. You can contact us via Feedback

Most popular questions within the last 30 days

10,659 questions
10,791 answers
510 comments
3 users