Getting Oracle artifacts into a Maven environment

If you want to build an application to run on the Fusion Middleware platform, you may find that you want to use some Oracle provided JAR files in your build process.  These may be things like API’s (interfaces) that are needed to compile, or client libraries that need to be bundled into the deployable application, or perhaps tools that are needed during build time, e.g. WLST or appc.

If you are using Maven to manage your build, it would be ideal to be able to use Maven coordinates to reference these Oracle artifacts, just like you do for any other kind of dependency.  But Oracle does not provide POM files for these artifacts – so what can we do?

Maven provides the ability to load any artifact into a Maven repository and to give it a set of coordinates.  This means that you can easily add the Oracle provided artifacts to your own Maven repository, or to a shared repository in your environment (e.g. a Maven Repository Manager) so that they can be used by yourself and other developers.

Maven will even generate the POM file for you, so all you need to do is create the coordinates.  Normally coordinates follow the same reverse URL scheme that Java packages uses, but it might be a good idea not to use in this case – as it is possible that Oracle might one day release their own POMs, and then you could have some name clashes.  So it is probably better to use a different name, you might add ‘custom’ for example.

Suppose you want to add the wlthint3client.jar into your Maven environment, and give it the following coordinates:

  • groupId:
  • artifactId: wlthint3client
  • versionId: 10.3.6

You could use a command like this (which would be entered all on one line):

mvn install:install-file 

This will install the JAR into your local Maven repository.  You can use a different goal to install into a remote repository (like a Maven Repository Manager for example).  In this command you either need to give the repository URL in the url property, or specify the repositoryId the matches the repository definition in your Maven settings.xml.

mvn deploy:deploy-file

After running these commands, you will have this artifact in your Maven repository and you will be able to use it like any other artifact.  For example, to include it in a project as a dependency, you can just refer to it using its coordinates:


Armed with this knowledge you could go and create POMs for any Oracle (or other) artifacts that you want to use in your build.  You could also create dependency hierarchies between them if you wanted or needed to.

About Mark Nelson

Mark Nelson is a Developer Evangelist at Oracle, focusing on microservices and messaging. Before this role, Mark was an Architect in the Enterprise Cloud-Native Java Team, the Verrazzano Enterprise Container Platform project, worked on Wercker, WebLogic and was a senior member of the A-Team since 2010, and worked in Sales Consulting at Oracle since 2006 and various roles at IBM since 1994.
This entry was posted in Uncategorized and tagged . Bookmark the permalink.

1 Response to Getting Oracle artifacts into a Maven environment

  1. jvzoggel says:

    Reblogged this on Jan van Zoggel and commented:
    Nice explanation and necessary command examples from Mark Nelson on his blog RedStack how to get Oracle artifacts into a Maven repository and refer to these artifacts as a dependency during your builds.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s