Thursday, January 1, 2015

Install Oracle TopLink in Maven local repository

Oracle TopLink is not available in any online repository. In order to use it in a maven project you have to install these libraries in a local maven repository. Here is the procedure to download and install them.




Download and install TopLink Libraries into a directory


Download TopLink from here:

http://www.oracle.com/technetwork/middleware/toplink/downloads/index.html

Remember the download directory, i.e. C:\downloads, so the downloaded file could be something like: C:\downloads\toplink_quick_121200.jar

Create an empty directory (i.e. C:\toplink) in which we will put oracle toplink libraries, and go into this directory from command line, then execute the command:

C:\toplink>java -jar c:\downloads\toplink_quick_121200.jar

Please note that java has to be in your path to be reacheable, or specify the full path of the java executable.

This command will install in the current directory all toplink libraries, in this case we are installing libraries in C:\toplink.

Install libraries into Maven local repository


Now that we have libraries we have to install them into Maven local repository in order to be known from our applications. There is an utility that helps to do this

Download this utility, the Maven TopLink plugin install:
http://www.oracle.com/technetwork/middleware/toplink/documentation/toplink-maven-install-1983778.zip

Unzip the downloaded file into a directory, and go into this directory from command prompt, i.e.:
C:\downloads\toplink-maven-install-1983778>

From command prompt type this command:
C:\downloads\toplink-maven-install-1983778> install.bat C:\toplink

For Linux users there is an install.sh available.

This command installs libraries from the path specified, in this case C:\toplink, to the local maven repository.

Please note that maven has to be available in path, i.e. typing "mvn" from command line has to work successfully.

You have done!

These informations are taken from this PDF and semplified, have a look here if you have problems

http://www.oracle.com/technetwork/middleware/toplink/documentation/usingmavenwithoracletoplink-1971073.pdf

No comments:

Post a Comment

(c) Copyright 2020 - MyTroubleshooting.com