简体   繁体   中英

Missing artifact oracle:ojdbc6:jar:11.2.0.3

I am facing "Missing artifact oracle:ojdbc6:jar:11.2.0.3" issue. I went through a lot of blogs but was not successfull.

I tried with ojdbc14, ojdbc7 as well and I am not able to proceed further.

POM file dependency:

<!-- https://mvnrepository.com/artifact/oracle/ojdbc6 -->
        <dependency>
            <groupId>oracle</groupId>
            <artifactId>ojdbc6</artifactId>
            <version>11.2.0.3</version>
        </dependency>

MAVEN error: Maven-error

I tried to install the oracle jar file onto local repository,but receiving the below error.

mvn install:install-file -Dfile={C:\\Users\\Riya.m2\\repository\\com\\oracle\\ojdbc6\\11.2.0.3} -DgroupId=oracle -DartifactId=ojdbc6 -Dversion=11.2.0.3 -Dpackaging=jar -DlocalRepositoryPath=C:\\Users\\Riya.m2\\repository

C:\Preeti_WORK\WorkSpace\SPRING-BATCH\SpringWriteToDB>mvn install:install-file -Dfile={C:\Users\Riya\.m2\repository\com\oracle\ojdbc6\11.2.0.3} -DgroupId=oracle -DartifactId=ojdbc6 -Dversion=11.2.0.3 -Dpackaging=jar -DloaclRepositoryPath=C:\Users\Riya\.m2\repository
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------< com.spring:SpringWriteToDB >---------------------
[INFO] Building SpringBatchDemo 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.4:install-file (default-cli) @ SpringWriteToDB ---
**[ERROR] The specified file 'C:\Preeti_WORK\WorkSpace\SPRING-BATCH\SpringWriteToDB\{C:\Users\Riya\.m2\repository\com\oracle\ojdbc6\11.2.0.3}' not exists
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install-file (default-cli) on project SpringWriteToDB: The specified file 'C:\Preeti_WORK\WorkSpace\SPRING-BATCH\SpringWriteToDB\{C:\Users\Riya\.m2\repository\com\oracle\ojdbc6\11.2.0.3}' not exists -> [Help 1]**
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

I followed the steps in the below link but couldn't progres. Missing artifact com.oracle:ojdbc6:jar:11.2.0.3,

I am using on my personal Laptop, is there something to do with the setting.xml file? I dint face issue with company laptop, as it has local repository settings.

The output is clear:

The specified file 'C:\\Preeti_WORK\\WorkSpace\\SPRING-BATCH\\SpringWriteToDB{C:\\Users\\Riya.m2\\repository\\com\\oracle\\ojdbc6\\11.2.0.3}' not exists

I assume you ran the command from this directory

'C:\Preeti_WORK\WorkSpace\SPRING-BATCH\SpringWriteToDB\'. 

Just put your jar in that directory and run:

mvn install:install-file -Dfile=myfile.jar -DgroupId=oracle -DartifactId=ojdbc6 -Dversion=11.2.0.3 -Dpackaging=jar -DlocalRepositoryPath=C:\\Users\\Riya.m2\\repository

Maven will expect jar file here 'C:\\Preeti_WORK\\WorkSpace\\SPRING-BATCH\\SpringWriteToDB\\myfile.jar' and it will install you artifact.

Important Note: It's safer to use full path to the file. Previous command will use relative path to the file.

mvn install:install-file -Dfile=C:\Preeti_WORK\WorkSpace\SPRING-BATCH\SpringWriteToDB\ojdbc6.jar -DgroupId=oracle -DartifactId=ojdbc6 -Dversion=11.2.0.3 -Dpackaging=jar -DlocalRepositoryPath=C:\Users\Riya.m2\repository

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM