Access the Oracle Maven Repository
The Oracle Maven Repository contains artifacts, such as ADF libraries, provided by Oracle. You may require these artifacts to compile, test, package, perform integration testing, or deploy your applications. For more information about the Oracle Maven repository, see https://maven.oracle.com/doc.html
.
To build your applications and access the Oracle Maven Repository, you configure the job and provide your credentials to access the repository:
-
Open
https://www.oracle.com/webapps/maven/register/license.html
in your web browser, sign in with your Oracle Account credentials, and accept the license agreement. -
Configure the POM file and add the Oracle Maven Repository details:
-
Add a
<repository>
element that refers tohttps://maven.oracle.com
:<repositories> <repository> <name>OracleMaven</name> <id>maven.oracle.com</id> <url>https://maven.oracle.com</url> </repository> </repositories>
-
Depending on your application, you may also want to add the
<pluginRepository>
element and make it refer tohttps://maven.oracle.com
:<pluginRepositories> <pluginRepository> <name>OracleMaven</name> <id>maven.oracle.com</id> <url>https://maven.oracle.com</url> </pluginRepository> </pluginRepositories>
-
If you are going to use token-based authentication in your project, follow the steps in Set Up Token-Based Authentication to create a token with expiration and permission settings appropriate for your Maven project. (Don't forget to copy the token and paste it in a text file so you can access later.)
Then add the
<server>
element and replace{token}
with the token you created.<server> <id>internalRepo</id> <configuration> <httpConfiguration> <all> <headers> <property> <name>Authorization</name> <value>Bearer {token}</value> </property> </headers> </all> </httpConfiguration> </configuration> </server>
-
-
Commit the POM file to the project's Git repository.
-
If you’re the project owner, set up Oracle Maven Repository connections for your project’s team members.
-
Create and configure a job to access Oracle Maven Repository.
See Configure a Job to Connect to the Oracle Maven Repository.
Create and Manage Oracle Maven Repository Connections
If your project users access the Oracle Maven Repository frequently, you can create a pre-defined connection for them. Project users can then configure a job and use the connection to access the artifacts of the Oracle Maven Repository while running builds.
You must be a project owner to add and manage Oracle Maven Repository connections.
To create, edit, and delete a connection, you’ll need the Oracle Technology Network (OTN) Single Sign-On (SSO) credentials of a user who has accepted the Oracle Maven Repository license agreement:
Action | How To |
---|---|
Add an Oracle Maven Repository connection |
|
Edit a connection and change the connection’s user credentials or provide another server ID |
|
Delete the connection |
|
Configure a Job to Connect to the Oracle Maven Repository
Here's how you can set up a job using a predefined connection to connect to the Oracle Maven Repository:
- Open the job’s configuration page.
- Click the Before Build tab.
- Click Add Before Build Action and select Oracle Maven Repository Connection.
- From Use Existing Connection, select a pre-defined connection. Your project owner has created a connection so that you don't have to worry about setting it up.
If there’s no pre-defined connection available or you want set up your own connection, click the toggle button. In OTN Username and OTN Password, enter the credentials of a user who has accepted the Oracle Maven Repository license agreement.
- In Server Id, if required, enter the ID to use for the
<server>
element of the Mavensettings.xml
file, or use the defaultmaven.oracle.com
ID. - If you’re using a custom
settings.xml
file, in Custom settings.xml, enter the file’s path. - Click Save.