Oracle linux install maven

Oracle linux install maven

This chapter describes how to install and configure Maven.

  • Setting Up the Maven Distribution
    A distribution of Maven 3.2.5 is included with Oracle Fusion Middleware.
  • Customizing Maven Settings
    You can create a Maven settings file to specify proxy servers, servers, and mirrors.
  • JDBC Drivers, UCP and Companion Jars
    The Oracle JDBC drivers and the Universal Connection Pool (UCP) are now available on the Oracle Maven Repository.
  • Populating the Maven Repository Manager
    After you have configured your Maven Repository Manager, for example, you set up Archiva, you populate it with Oracle artifacts.

Setting Up the Maven Distribution

A distribution of Maven 3.2.5 is included with Oracle Fusion Middleware.

After you install Oracle WebLogic Server, you can find Maven in your Oracle home in the following location:

This is a copy of the standard Maven 3.2.5 release, without any modifications.

Alternatively, you can download and install your own copy of Maven from the Maven website:

Oracle Fusion Middleware supports Maven 3.0.5 or higher.

After installation, add Maven to your operating system’s PATH environment variable:

You must update your shell startup script, your .profile or .bash_profile , to update the path.

For example, if you have installed Oracle WebLogic Server in /u01/fmwhome and you are using the bash shell, then you must add the following to the PATH environment variable:

You also need to set the JAVA_HOME environment variable to point to your JDK installation. For example:

Edit your PATH environment variable and add the correct path to Maven at the beginning of the PATH environment variable.

For example, if you have installed WebLogic Server in c:\fmwhome , then you must add the following:

You also need to set the JAVA_HOME environment variable to point to your JDK installation.

Customizing Maven Settings

You can create a Maven settings file to specify proxy servers, servers, and mirrors.

You must create a Maven settings file if:

You are working behind a firewall or proxy server.

Your organization has its own internal Maven Repository Manager.

You plan to access the Oracle Maven Repository.

If you have installed Maven for the first time, either as part of the Oracle WebLogic Server installation, or by downloading it from the Maven website, you will not have a settings file yet. You must create it, naming it settings.xml

The following is an example of a Maven settings file:

This example shows three common configuration settings that you may need to use:

Proxy: Enables you to communicate with Maven about the HTTP proxy server that is required to access Maven repositories on the Internet.

Servers: Enables you to communicate with Maven about your credentials for the Maven repository, so that you do not have to enter them every time you want to access the repository.

Mirrors: Informs Maven that instead of trying to access the Maven central repository directly, it should use your internal Maven repository manager as a mirror (cache) of Maven’s central repository.

Читайте также:  Лучший гипервизор для windows

If you are not familiar with these terms, review the introduction in Introduction to Continuous Integration. For more information about available Maven settings, see the Maven documentation at:

The Maven settings file, settings.xml , is usually kept in the .m2 directory inside your home directory. However, if you want to point Maven to a different location, see the Maven documentation.

If your user name is bob , then the directory path should look similar to the following:

JDBC Drivers, UCP and Companion Jars

The Oracle JDBC drivers and the Universal Connection Pool (UCP) are now available on the Oracle Maven Repository.

The following versions are available on the Oracle Maven Repository: 12.2.0.2, 12.1.0.2, 12.1.0.1, and 11.2.0.4.

In addition, the companion jars, including ons.jar , orai18n.jar , xmlparserv2.jar , simplefan.jar and others required for specific features, are also available on Oracle maven repository. See JDBC and UCP Landing page on OTN for more information.

Table 5-1 shows the Oracle JDBC, UCP, and companion jars from the Oracle Database 12c Release 2 (12.2.0.1).

Table 5-1 JDBC Drivers, UCP, and Companion Jars for 12.2.0.1

Oracle JDBC driver for use with JDK8

Debug version of ojdbc8.jar for tracing

ojdbc8.jar with instrumentation to support DMS calls

ojdbc8_g.jar with instrumentation to support DMS.

Universal Connection Pool for use with JDK 8

Java APIs for subscribing to RAC events via ONS

Oracle Notification Services (ONS) daemon

Required for DMS enabled jar (ojdbc8dms.jar and ojdbc8dms_g.jar)

Required to access Oracle Wallets from Java

Required to access Oracle Wallets from Java

Required to access Oracle Wallets from Java

Classes to support standard java.sql.SQLXML interface (Java SE 8).

To support standard java.sql.SQLXML interface

Classes for NLS or Internationalization support

Populating the Maven Repository Manager

After you have configured your Maven Repository Manager, for example, you set up Archiva, you populate it with Oracle artifacts.

A Maven Synhronization plug-in allows you to populate a local or shared Maven repository from an Oracle home. When you install a Fusion Middleware 12 c product, the Maven archetypes, plug-ins, and POMs are installed with the product so that the Synchronization plug-in can find them.

This section contains the following topics:

Introduction to the Maven Synchronization Plug-In

Oracle Fusion Middleware 12 c provides a Maven Synchronization plug-in that simplifies the process of setting up repositories and completely eliminates the need to know what patches are installed in a particular environment. This plug-in enables you to populate a Maven repository from a given Oracle home. After you patch your Oracle home, run this plug-in to ensure that your Maven repository matches Oracle home. This ensures that your builds use correct versions of all artifacts in that particular environment.

The Oracle Maven Synchronization plug-in is included in the Oracle WebLogic Server, Oracle Coherence and Oracle JDeveloper installations. To use the plug-in, you must specify the location of the Oracle home and the location of the Maven repository. The Maven repository can be specified using either a file system path or a URL. The plug-in checks for all Maven artifacts in the Oracle home, ensures that all artifacts are installed in the specified Maven repository, and that the versions match exactly. This means that the version numbers and the files are exactly same at the binary level, ensuring that all patched files reflect accurately in the Maven repository.

Oracle homes in 12 c contain maven directories which contain Maven Project Object Models (POMs) for artifacts provided by Oracle, archetypes for creating projects, and Maven plug-ins provided by Oracle, for executing various build operations.

Installing the Oracle Maven Synchronization Plug-In

Before you start using the Oracle Maven Synchronization plug-in, you must install it into your Maven repository. You can install it into your local repository on your computer, or you can deploy it into your shared internal repository, if you have one.

The plug-in is located in your Oracle WebLogic Server 12 c home and consists of two files:

The Maven Project Object Model (POM) file, which describes the plug-in. It is located at:

The JAR file, which contains the plug-in. It is located at:

To install and deploy the plug-in:

  1. To install the plug-in into your local Maven repository, run the following command from the ORACLE_HOME /oracle_common/plugins/maven/com/oracle/maven/oracle-maven-sync/12.2.1 directory:

The simplest way deploy the plug-in into a shared internal repository is to use the web user interface provided by your Maven Repository Manager to upload the JAR file into the repository.

An alternative method is to use the deploy plug-in, which you can do by using a command like the following from the ORACLE_HOME/oracle_common/plugins/maven/com/oracle/maven/oracle-maven-sync/12.2.1 directory:

For information about this command, refer to the Maven documentation at:

If you would like to use the shorter name for the Oracle Maven Synchronization plug-in, so that you do not have to provide the full coordinates when using it, add an entry to your Maven settings.xml as follows:

This allows you to refer to the plug-in using the name oracle-sync .

Источник

Install Apache Maven on Linux

  • Install Oracle JDK 8 on Linux
  • Install Oracle JDK 11 on Linux

Step 1:
Download apache-maven-$maven_version-bin.tar.gz binary archive from the official link. This article uses the Maven version $maven_version. You need to replace the version number by whatever the version you are downloading.

Step 2:
Open the Terminal and change the directory to /opt folder.

Step 3:
Extract the apache-maven archive into the opt directory.

Step 4:
Edit the /etc/environment file and add the following environment variable:
also, append the bin directory to the PATH variable:

WARNING: Do not replace your environment file with the following content because you may already have different environment variables which are required by other applications to function properly. Notice the end of PATH variable and the M2_HOME variable.
After the modification, press Ctrl + O to save the changes and Ctrl + X to exit nano.

Step 5:
Update the mvn command:

Step 6:
Add Bash completion to mvn so that you can complete complex Maven commands by hitting Tab multiple times.
Credits to Juven Xu: maven-bash-completion

Step 7:
Logout and login to the computer and check the Maven version using the following command.
If it works, hooray! you have successfully installed the latest Apache Maven on your computer.

Источник

linux-notes.org

И так, что же такое Apache Maven? Apache Maven — фреймворк, который позволяет собирать проекты (Java, C#, Ruby, Scala, и другие языки) в автоматическом режиме на основе описания их структуры в файлах на языке POM (англ. Project Object Model), являющемся подмножеством XML. Само maven слово, переводиться с языка Идиш как «собиратель знания».

Maven обеспечивает декларативную, а не императивную (в отличие от средства автоматизации сборки Apache Ant) сборку проекта. В файлах описания проекта содержится его спецификация, а не отдельные команды выполнения. Все задачи по обработке файлов, описанные в спецификации, Maven выполняет посредством их обработки последовательностью встроенных и внешних плагинов.

Установка Maven в Unix/Linux

Сейчас я расскажу как можно установить данный инструмент на различные Unix/Linux ОС. Для работы Maven потребуется установить JDK, вот некоторые полезные статьи в помощь:

И так, джаву установили. Идем далее….

Установка Maven в CentOS/RedHat/Fedora

-===Использование готового пакета==-

После установки java, загружаем Apache maven с официального сайта или используйте следующую команду для загрузки Apache Maven 3.3.9 (на момент написания статьи — самая последняя и стабильная версия):

Теперь извлекаем скаченный архив, используя следующую команду:

И создаем симлинк:

PS: Более подробно о симлинках, можно узнать тут:

Далее, настроим путь Maven:

Для того чтобы настройки вступили в силу, выполняем:

Так же, можно обойтись без создания данного файла, для этого — открываем:

-===Использование репозитория и пакетного менеджера==-

И выполняем установку:

И так, проверяем версию maven:

При желании, если вы используете Maven за прокси-сервером, вы должны сделать следующее. Открываем файл:

Заменяем некоторые параметры и наслаждаемся работой.

Установка Maven в Debian/Ubuntu

-===Использование пакетного менеджера==-

Первое что нужно сделать, — проверить имеется ли пакет в репозитории:

Устанавливаем сам Maven:

И так, проверяем версию maven:

-===Использование готового пакета==-

Данное действие, я описывал в примере выше ( для centOS).

Установка Maven на Mac OS X

Для начала, устанавливаем HomeBrew:

После чего, выполняем команду:

Данная команда покажет какие пакеты имеются.

Чтобы установить, выполняем команду:

Установка Maven на другие Unix/Linux ОС

Для других Unix/Linux ОС — установка такая же — скачиваем архив, распаковываем его. Прописываем путь к мавену и можно использовать.

На этом, у меня все. Статья «Установка Maven в Unix/Linux» завершена.

Добавить комментарий Отменить ответ

Этот сайт использует Akismet для борьбы со спамом. Узнайте, как обрабатываются ваши данные комментариев.

Источник

How to Install Latest Apache Maven on Oracle Linux 6.X Easy Guide

Quick-Start with Maven 3.X on Oracle Linux 6.X

You are Welcome! The Tutorial Shows You Step-by-Step How to Install and Getting-Started with Apache Maven 3.x on Oracle Linux 6.X i686/x8664 Desktop/Server.

Sure that the Apache Maven is also in the Oracle Linux Yum Repositories, but if You want to be Certain of Getting-Installed Right the Latest Maven Release then Follow this Tutorial…

The Apache Maven 3 SetUp Require a Working Java JDK 8+ Installation, so You will Find Link to Installing Oracle Java JDK on Oracle Linux.

Maven calls its build scripts Project Object Model (POM) files. These POM files are in XML, and each Maven project or module will have an accompanying pom.xml file.

A Project Management Tool such as Maven provides a Superset of features found in a Build Tool.

But in Addition to providing Build capabilities, Maven can also Run Reports, Generate a Website, and Managig Communication among members of a Working Team

Download Apache Maven 3.x Binaries

Open Terminal Window
(Press “Enter” to Execute Commands)

Double-Click on Archive and Extract into /tmp.


Or from Shell:

Verify that JDK 8+ is Installed on System

How to Install Oracle JDK 8+ on Oracle Linux

Relocate Maven Binaries

If Got “User is Not in Sudoers file” then see: How to Enable sudo

Add Maven Binaries to User Path

Ctrl+X to Save and Exit from “nano” 🙂

Test Maven Installation

Quick-Start with Maven Projects Management

Quick-Start with Eclipse Java Developers on Oracle Linux

Источник

Читайте также:  Не удалось загрузить модуль regsvr32 проверьте что двоичный файл windows 10
Оцените статью
Name of Jar groupID, artifactID, and version Details Description