When I try to use the oracle dependency -
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>10.2.0.4.0</version>
</dependency>
I receive a compile time build error - "Missing artifact com.oracle:ojdbc14:jar:10.2.0.4.0". This error is displayed when I hover over error marker (left of ) in attached image -
Is there an issue with this dependency or something I'm doing wrong ?
Install the required jar as follows:
add dependency pom.xml
for detail see : http://softwarecave.org/2014/06/14/adding-external-jars-into-maven-project/
To complement the other answer: It is generally advisable to check if an artifact is available in the repositories you use for your build. If this is not the case, you should consider running your own repository. This already pays off as soon as you want to use your own libraries with maven builds.
How it worked for me
1) Downloaded required jar 2) Installed Jar using mvn command 3) Make changes in pom.xml file \ use dependency FE to make changes
I had the same problem and that's how you can fix it:
Add a new repository in your pom.xml:
<repositories> <repository> <id>codelds</id> <url>https://code.lds.org/nexus/content/groups/main-repo</url> </repository> </repositories>
These steps worked for me. I have java 1.8 and maven 3.6 on my machine. The same process failed with java 1.7
Download the relevant jar files from the oracle website (Link shown below) http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
Extract the jar files to a specific folder on your machine
Ensure you have maven AND java on your path by running mvn -version command on your terminal (Im using Windows 10 btw.
C:\Windows\system32>mvn -version
You will get something like this if all is fine .
Add the downloaded jar file to your maven repository by running the command below.
C:\Windows\system32>mvn install:install-file -Dfile=C:\\Users\\Mwagiru\\Desktop\\Projects\\BPR\ojdbc-full\\OJDBC-Full\\ojdbc7.jar -DgroupId=com.oracle -DartifactId=ojdbc7 -Dversion=12.1.0 -Dpackaging=jar -
(Remember to update the command with the location where you unzipped your ojdbc jar file)
See sample out put below :
You may now add oracle depedency to your projects by adding it to your pom files. See sample below.
I had the same problem and its working now by adding below in build.gradle.