0

I am using below link to resolve the maven-ojdbc issue and I am unable to add ojdbc6.jar to local repo. Oracle JDBC ojdbc6 Jar as a Maven Dependency

Step 1 mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.3 -Dpackaging=jar -Dfile=/ojdbc6.jar -DgeneratePom=true

The build fails @ step 1. I have apache-maven-3.3.9 installed. It works fine when I test it with mvn -version. When I execute below it is trying to download maven-install-plugin-2.4.pom. and build fails with message https://repo.maven.apache.org:443: Permission denied: connect

I downloaded this jar from MAVEN site and dropped in the folder apache-maven-3.3.9\lib. When I run the build it fails again trying to download the below files. I downloaded and added all the below to apache-maven-3.3.9\lib folder.

maven-plugin-api-2.2.1.jar, maven-settings-2.2.1.jar maven-profile-2.2.1.jar, maven-project-2.2.1.jar, maven-plugin-registry-2.2.1.jar

Then I noticed that there are duplicates of above files but with 3.3.9 version. The mvn install still fails. I am not sure what the issue is? Can somebody guide me.

Exception in thread "main" java.lang.NoSuchMethodError: org.apache.maven.setting s.RuntimeInfo.(Ljava/io/File;)V at org.apache.maven.execution.SettingsAdapter.(SettingsAdapter.jav a:60) at org.apache.maven.execution.MavenSession.(MavenSession.java:311)

    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:187)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun cher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav a:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La uncher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java: 356)

Cœur
  • 37,241
  • 25
  • 195
  • 267
  • does maven work proper when you call `mvn clean package` for a simple demo project? – JimHawkins Oct 27 '16 at 07:22
  • does `/.m2/settings.xml` contain correct proxy settings? (if you're using one) – JimHawkins Oct 27 '16 at 07:48
  • I cd to my maven project that I build in eclipse and called the command mvn clean. It is still trying to download maven-plugin-api-2.2.1 jar and I get the error downloadinghttps://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-api/2.2.1/maven-plugin-api-2.2.1.jar https://repo.maven.apache.org:443: Permission denied: connect. There is no settings.xml under /.m2/. – rookieDeveloper Oct 27 '16 at 14:15
  • are you behind a proxy? – JimHawkins Oct 27 '16 at 14:16
  • "Use a proxy server for your LAN” option is unchecked. – rookieDeveloper Oct 27 '16 at 14:58
  • no no ... what I mean is: do you connect to the internet via proxy? – JimHawkins Oct 28 '16 at 11:06
  • No. I just found out one more thing. If I use maven inside eclipse Luna . I am able to run maven clean and maven package. The embedded version is 3.2.1. I change directory to my project in command prompt and if I run mvn clean or mvn package it fails. The version I have on my machine is 3.3.9. My classpath is set to 3.3.9/bin – rookieDeveloper Oct 28 '16 at 14:42
  • does _classpath_ contain `3.3.9/bin` or is it in _PATH_ ? – JimHawkins Oct 31 '16 at 07:15

0 Answers0