Error maven install - maven

Help me find the reason.
Content POM.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>biz.justtrust</groupId>
<artifactId>smssender</artifactId>
<version>1.0-SNAPSHOT</version>
<name>smssender AMP project</name>
<packaging>amp</packaging>
<description>Manages the lifecycle of the smssender AMP (Alfresco Module Package)</description>
<parent>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-sdk-parent</artifactId>
<version>1.1.1</version>
</parent>
<!--
| SDK properties have sensible defaults in the SDK parent,
| but you can override the properties below to use another version.
| For more available properties see the alfresco-sdk-parent POM.
-->
<properties>
<!-- Defines the alfresco edition to compile against. Allowed values are [org.alfresco|org.alfresco.enterprise]-->
<alfresco.groupId>org.alfresco</alfresco.groupId>
<!-- Defines the alfresco version to compile against -->
<alfresco.version>4.2.f</alfresco.version>
<app.log.root.level>WARN</app.log.root.level>
<alfresco.data.location>alf_data_dev</alfresco.data.location>
<!-- Defines the target WAR artifactId to run this amp, only used with the -Pamp-to-war switch
. | Allowed values: alfresco | share. Defaults to a repository AMP, but could point to your foundation WAR -->
<alfresco.client.war>alfresco</alfresco.client.war>
<!-- Defines the target WAR groupId to run this amp, only used with the -Pamp-to-war switch
. | Could be org.alfresco | org.alfresco.enterprise or your corporate groupId -->
<alfresco.client.war.groupId>org.alfresco</alfresco.client.war.groupId>
<!-- Defines the target WAR version to run this amp, only used with the -Pamp-to-war switch -->
<alfresco.client.war.version>4.2.f</alfresco.client.war.version>
<!-- This controls which properties will be picked in src/test/properties for embedded run -->
<env>local</env>
</properties>
<!-- Here we realize the connection with the Alfresco selected platform
(e.g.version and edition) -->
<dependencyManagement>
<dependencies>
<!-- This will import the dependencyManagement for all artifacts in the selected Alfresco version/edition
(see http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Importing_Dependencies)
NOTE: You still need to define dependencies in your POM, but you can omit version as it's enforced by this dependencyManagement. NOTE: It defaults
to the latest version this SDK pom has been tested with, but alfresco version can/should be overridden in your project's pom -->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-platform-distribution</artifactId>
<version>${alfresco.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<!-- Following dependencies are needed for compiling Java code in src/main/java;
<scope>provided</scope> is inherited for each of the following;
for more info, please refer to alfresco-platform-distribution POM -->
<dependencies>
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-repository</artifactId>
</dependency>
<!-- Test dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.smslib</groupId>
<artifactId>smslib</artifactId>
<version>3.5.4</version>
</dependency>
<dependency>
<groupId>org.rxtx</groupId>
<artifactId>rxtxcomm</artifactId>
<version>2.2pre2</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/RXTXcomm.jar</systemPath>
</dependency>
<!-- https://mvnrepository.com/artifact/org.scream3r/jssc -->
<dependency>
<groupId>org.scream3r</groupId>
<artifactId>jssc</artifactId>
<version>2.8.0</version>
</dependency>
</dependencies>
<!-- This repository is only needed to retrieve Alfresco parent POM.
NOTE: This can be removed when/if Alfresco will be on Maven Central
NOTE: The repository to be used for Alfresco Enterprise artifacts is
https://artifacts.alfresco.com/nexus/content/groups/private/. Please check
with Alfresco Support to get credentials to add to your ~/.m2/settings.xml
if you are a Enterprise customer or Partner
-->
<repositories>
<repository>
<id>alfresco-public</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
</repository>
<repository>
<id>smslib</id>
<url>http://smslib.org/maven2/v3</url>
</repository>
<repository>
<id>alfresco-public-snapshots</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/public-snapshots</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
</snapshots>
</repository>
</repositories>
<build>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
org.alfresco.maven.plugin
</groupId>
<artifactId>
alfresco-maven-plugin
</artifactId>
<versionRange>
[1.1.1,)
</versionRange>
<goals>
<goal>set-version</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
Output console
[INFO] Building smssender AMP project 1.0-SNAPSHOT
[INFO] ---------------------------------------------
[INFO] Downloading: http://smslib.org/maven2/v3/org/jvnet/staxex/stax-ex/maven-metadata.xml
[WARNING] Could not transfer metadata org.jvnet.staxex:stax-ex/maven-metadata.xml from/to smslib (http://smslib.org/maven2/v3): smslib.org: С именем узла не связано ни одного адреса
[WARNING] Failure to transfer org.jvnet.staxex:stax-ex/maven-metadata.xml from http://smslib.org/maven2/v3 was cached in the local repository, resolution will not be reattempted until the update interval of smslib has elapsed or updates are forced. Original error: Could not transfer metadata org.jvnet.staxex:stax-ex/maven-metadata.xml from/to smslib (http://smslib.org/maven2/v3): smslib.org: С именем узла не связано ни одного адреса
[INFO] Downloading: http://smslib.org/maven2/v3/org/smslib/smslib/3.5.4/smslib-3.5.4.pom
[INFO] BUILD FAILURE
[ERROR] Failed to execute goal on project smssender: Could not resolve dependencies for project biz.justtrust:smssender:amp:1.0-SNAPSHOT: Failed to collect dependencies at org.smslib:smslib:jar:3.5.4: Failed to read artifact descriptor for org.smslib:smslib:jar:3.5.4: Could not transfer artifact org.smslib:smslib:pom:3.5.4 from/to smslib (http://smslib.org/maven2/v3): smslib.org: Unknown host smslib.org

You error shows "Unknown host smslib.org". And you also defined your repository as
<repository>
<id>smslib</id>
<url>http://smslib.org/maven2/v3</url>
</repository>
Please check if you could reach smslib.org.

Related

maven: does not download extension written by myself

I am not so deep into maven but had to write an extension.
I successfully deployed and it is present.
https://www.simuline.eu/RepositoryMaven/eu/simuline/qMngmnt/0.0.3/
Also the version fits.
But nevertheless, when trying to use,
Unresolvable build extension: Plugin eu.simuline:qMngmnt:0.0.3 or one of its dependencies could not be resolved:
eu.simuline:qMngmnt:jar:0.0.3 was not found in https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced
In my pom i have:
<repositories>
<repository>
<id>publicRepoAtSimuline</id>
<name>repo at simuline</name>
<url>https://www.simuline.eu/RepositoryMaven</url>
</repository>
</repositories>
and I use it at the following places:
<build>
<extensions>
<extension>
<groupId>eu.simuline</groupId>
<artifactId>qMngmnt</artifactId>
<version>0.0.3</version>
</extension>
...
<plugins>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.1.2</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<!-- 8.15 has security issue ans seemingly line lengths are wrong -->
<version>10.1</version><!-- TBD: make 8.30, 9.1, 10.1 work -->
</dependency>
<dependency>
<groupId>eu.simuline</groupId>
<artifactId>qMngmnt</artifactId>
<version>0.0.3</version>
</dependency>
</dependencies>
...
<dependencies>
<dependency><!-- TBD: clarify: for spotbugs: necessary? -->
<groupId>eu.simuline</groupId>
<artifactId>qMngmnt</artifactId>
<version>0.0.3</version>
<!--scope>provided</scope-->
</dependency>
Interesting: if i build a new version, qMngmnt-0.0.4-SNAPSHOT
then of course it is locally installed, and all works fine.
So I have the impression, download never worked but i did not realize so far.
What is wrong?
By the way: I use another artifact as an artifact item
but neither as a dependency nor as an extension and it works just fine.

Plugin org.apache.maven.plugins: dependencies could not be resolved

I am trying to build a simple web API using dynamic web maven project.
When I run my project as maven project with the goals of clean install. I get this error:
Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (https://repo.maven.apache.org/maven2): Cannot access https://repo.maven.apache.org/maven2 with type default using the available connector factories: BasicRepositoryConnectorFactory: Cannot access https://repo.maven.apache.org/maven2 using the registered transporter factories: WagonTransporterFactory: java.util.NoSuchElementException
role: org.apache.maven.wagon.Wagon
Here is my POM file, it might be useful as it is where the dependencies are stated:
POM File
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>group5</groupId>
<artifactId>studentService</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
<maven.compiler.source>7</maven.compiler.source>
<maven.compiler.target>7</maven.compiler.target>
</properties>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.apache.axis/axis -->
<dependency>
<groupId>org.apache.axis</groupId>
<artifactId>axis</artifactId>
<version>1.4</version>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.xml.rpc/javax.xml.rpc-api -->
<dependency>
<groupId>javax.xml.rpc</groupId>
<artifactId>javax.xml.rpc-api</artifactId>
<version>1.1.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.sun.xml.ws/jaxws-rt -->
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<version>2.2.6</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.3</version>
<configuration>
<warSourceDirectory>WebContent</warSourceDirectory>
</configuration>
</plugin>
</plugins>
</build>
</project>
I am aware of this question: Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved
However the proxy solution did not work for me. (I have never made a proxy before).
Any help appreciated.

Unable to start jira - Unable to execute mojo exception

I am running JIRA 7.0.2 in my system and Atlassian SDK 6.1.2.
OS-Windows 7
I have my own plugins and when ever I try to run jira by atlas-debug I get this exception.
--- maven-jira-plugin:6.1.2:generate-manifest (default-generate-manifest) # jira-menu-items ---
Generating a manifest for this plugin
using maven-bundle-plugin v2.5.3
Manifest com.atlassian.plugins.tutorial:jira-menu-items:atlassian-plugin:1.1 : The default package '.' is not permitted by the Import-Package syntax.
This can be caused by compile errors in Eclipse because Eclipse creates
valid class files regardless of compile errors.
The following package(s) import from the default package null
Error(s) found in manifest configuration
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 2:32.854s
Finished at: Tue Nov 24 22:24:04 IST 2015
Final Memory: 66M/682M
------------------------------------------------------------------------
Failed to execute goal com.atlassian.maven.plugins:maven-jira-plugin:6.1.2:generate-manifest (default-generate-manifest) on project jira-menu-items: Unable to execute mojo: Error(s) found in manifest configuration -> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.
For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
POM.XML
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.atlassian.plugins.tutorial</groupId>
<artifactId>jira-menu-items</artifactId>
<version>1.1</version>
<organization>
<name>Milind Company</name>
<url>http://www.milind.com/</url>
</organization>
<name>jira-menu-items</name>
<description>This is the com.atlassian.plugins.tutorial:jira-menu-items plugin for Atlassian JIRA.</description>
<packaging>atlassian-plugin</packaging>
<dependencies>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-api</artifactId>
<version>${jira.version}</version>
<scope>provided</scope>
</dependency>
<!-- Add dependency on jira-core if you want access to JIRA implementation classes as well as the sanctioned API. -->
<!-- This is not normally recommended, but may be required eg when migrating a plugin originally developed against JIRA 4.x -->
<!--
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-core</artifactId>
<version>${jira.version}</version>
<scope>provided</scope>
</dependency>
-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.2.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-annotation</artifactId>
<version>${atlassian.spring.scanner.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-runtime</artifactId>
<version>${atlassian.spring.scanner.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-amps-dispatcher-plugin</artifactId>
<version>5.0.18</version>
</dependency>
<dependency>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-maven-plugin</artifactId>
<version>1.2.6</version>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
<scope>provided</scope>
</dependency>
<!-- WIRED TEST RUNNER DEPENDENCIES -->
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.1.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.2-atlassian-1</version>
</dependency>
<!-- Uncomment to use TestKit in your project. Details at https://bitbucket.org/atlassian/jira-testkit -->
<!-- You can read more about TestKit at https://developer.atlassian.com/display/JIRADEV/Plugin+Tutorial+-+Smarter+integration+testing+with+TestKit -->
<!--
<dependency>
<groupId>com.atlassian.jira.tests</groupId>
<artifactId>jira-testkit-client</artifactId>
<version>${testkit.version}</version>
<scope>test</scope>
</dependency>
-->
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-jira-plugin</artifactId>
<version>${amps.version}</version>
<extensions>true</extensions>
<configuration>
<productVersion>${jira.version}</productVersion>
<productDataVersion>${jira.version}</productDataVersion>
<enableQuickReload>true</enableQuickReload>
<enableFastdev>false</enableFastdev>
<instructions>
<Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>
<Export-Package>net.gisnas.jira.mailqueue.api,</Export-Package>
<Import-Package>org.springframework.osgi.*;resolution:="optional",
org.eclipse.gemini.blueprint.*;resolution:="optional", *</Import-Package>
<Spring-Context>*</Spring-Context>
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-maven-plugin</artifactId>
<version>1.2.6</version>
<executions>
<execution>
<goals>
<goal>atlassian-spring-scanner</goal>
</goals>
<phase>process-classes</phase>
</execution>
</executions>
<configuration>
<scannedDependencies>
<dependency>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-external-jar</artifactId>
</dependency>
</scannedDependencies>
<verbose>false</verbose>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<jira.version>7.0.2</jira.version>
<amps.version>6.1.2</amps.version>
<plugin.testrunner.version>1.2.3</plugin.testrunner.version>
<atlassian.spring.scanner.version>1.2.6</atlassian.spring.scanner.version>
<!-- This key is used to keep the consistency between the key in atlassian-plugin.xml and the key to generate bundle. -->
<atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
<!-- TestKit version 6.x for JIRA 6.x -->
<testkit.version>6.3.11</testkit.version>
</properties>
</project>
Settings.xml
<settings>
<localRepository>C:\Users\Milind\.m2\repository</localRepository>
<profiles>
<profile>
<id>atlassian-repositories</id>
<repositories>
<repository>
<id>atlassian-proxy</id>
<name>Atlassian Maven 2 Proxy</name>
<url>https://m2proxy.atlassian.com/repository/public</url>
</repository>
<repository>
<id>atlassian-contrib</id>
<name>Atlassian Contrib Repository</name>
<url>https://m2proxy.atlassian.com/contrib</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>atlassian-proxy</id>
<name>Atlassian Maven 2 Proxy</name>
<url>https://m2proxy.atlassian.com/repository/public</url>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>atlassian-repositories</activeProfile>
</activeProfiles>
</settings>
Try to clean up the target directory within your plugin directory or simply use command atlas-clean from plugin directory and run your plugin.
If you've made some changes in pom.xml then before running plugin, you should execute this command first atlas-mvn eclipse:eclipse. Every time you made changes in pom you should execute this command.
Please, check once that your JDK version is 8 because JIRA 7.x will only works with JDK 8.
You've set incompatible version for amps in dependency. Use 6.1.2 instead of 5.x
com.atlassian.maven.plugins
maven-amps-dispatcher-plugin
5.0.18
And if you are trying to debug the code in Eclipse after running JIRA from command then you should specify the port number to attach debugger. Your command will be like this atlas-debug --jvm -debug -port 5005.
Hope this will help you to resolve your problem.

Spring boot Cannot load driver class: oracle.jdbc.OracleDrive

I have driver class in class-path in my jar:
2015-06-18 12:21:40.290 INFO 9453 --- [ main] .b.l.ClasspathLoggingApplicationListener : Application failed to start with classpath:
.....
jar:file:/{projecthome}/rest-test/target/rest-test-0.1.0.jar!/lib/ojdbc6-11.2.0.3.0.jar!/]
I got exception:
Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: oracle.jdbc.OracleDrive
My pom:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework</groupId>
<artifactId>rest-test</artifactId>
<version>0.1.0</version>
<packaging>jar</packaging>
<properties>
<start-class>hello.Application</start-class>
<java.version>1.8</java.version>
</properties>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.4.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-dbcp</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.3.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-releases</id>
<url>https://repo.spring.io/libs-release</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-releases</id>
<url>https://repo.spring.io/libs-release</url>
</pluginRepository>
</pluginRepositories>
<name>rest-test</name>
</project>
Download ojdbc6.jar from Oracle website or if you install oracle11g in your local system you can find ojdbc in jdbc/lib folder.
Add that ojdbc.jar right click --> build path--> configure build path--> Add external jars--> your local machine ojdbc path -->ok.
It worked in my case.
step 1:You POM.xml file should be
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0</version>
</dependency>
Step 2:Download the ojdbc6 driver from oracle website and keep it in your local machine.
step 3:Run maven below command.Dfile is the location where i kept my jar file downloaded from oracle website
mvn install:install-file
-Dfile=C:\Users\santosh\.m2\repository\com\oracle\ojdbc6\11.2.0\ojdbc6.jar
-DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0 -Dpackaging=jar
After running maven command it should create ojdbc6-11.2.0 in your maven repository.After that your problem should be fixed.
Make sure that in your IDE you click maven reimport if it is not reimporting automatically (i.e. IntelliJ: right click project, Maven, Reimport), as it will compile fine without being on the classpath, but fail at runtime
In pom.xml add dependency as told by Santosh.
In Eclipse IDE Right click upon your Project and select -- Run As -- Maven build... -- in Goals provide below line and Run. I have just removed mvn and pointed ojdbc6.jar location in my local machine.
install:install-file -Dfile=D:\oracle11gXE\app\oracle\product\11.2.0\server\jdbc\lib\ojdbc6.jar -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0 -Dpackaging=jar
Again in Eclipse IDE Right click upon your Project and select -- Maven -- Update Project... -- select Force Update of Snapshots/Releases along with other default options and click OK.
ojdbc6-11.2.0.jar should reflect under Maven Dependencies.

How should I configure pom.xml to keep A and B in my private local Maven repo cache while using Maven Central and java.net's Maven repositories?

How should I configure pom.xml to keep A and B in my private local Maven repo cache while using Maven Central and java.net's Maven repositories?
I've got two local private projects, call them A and B, but both depend on a few bug fixes in org.javolution:javolution-core-java:6.1.0-SNAPSHOT, which isn't in Maven Central. Both A and B depend on other artifacts which are in Maven Central. Project B depends on project A.
I'm used to using Maven with the local repository (cache) in ~/.m2 and Central, but it seems like I'm not configuring the project correctly for the java.net repository.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.redacted</groupId>
<artifactId>B</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>B</name>
<url>http://maven.apache.org</url>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.opera.link.api</groupId>
<artifactId>opera-link-client</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.javolution</groupId>
<artifactId>javolution-core-java</artifactId>
<version>6.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.2.5</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>A</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>Java.net Maven Repository</id>
<url>https://maven.java.net/content/repositories/snapshots/</url>
</repository>
</repositories>
</project>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.redacted</groupId>
<artifactId>A</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>A</name>
<url>http://maven.apache.org</url>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.javolution</groupId>
<artifactId>javolution-core-java</artifactId>
<version>6.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.2.5</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>Java.net Maven Repository</id>
<url>https://maven.java.net/content/repositories/snapshots/</url>
</repository>
</repositories>
</project>
Removing the <repositories> element from B produces the obvious result:
------------------------------------------------------------------------
Building B 1.0-SNAPSHOT
------------------------------------------------------------------------
The POM for org.javolution:javolution-core-java:jar:6.1.0-SNAPSHOT is missing, no dependency information available
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 0.547s
Finished at: Wed Jan 29 17:19:48 EST 2014
Final Memory: 3M/15M
------------------------------------------------------------------------
Adding the <repositories> element back in to B gives this on running:
------------------------------------------------------------------------
Building B 1.0-SNAPSHOT
------------------------------------------------------------------------
--- exec-maven-plugin:1.2.1:exec (default-cli) # B ---
java.lang.ExceptionInInitializerError
Caused by: java.lang.RuntimeException: Uncompilable source code - package com.redacted.A.posts does not exist
at com.redacted.B.App.<clinit>(App.java:30)
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 1.219s
Finished at: Wed Jan 29 17:50:45 EST 2014
Final Memory: 4M/15M
------------------------------------------------------------------------
As I'm typing this, I'm realizing perhaps this might not be a Maven problem as much as a NetBeans problem. I clicked the "Re-Run Goals" button expecting a clean-and-build (as that's what I last executed), but doing a real clean-and-build seems to compile correctly, while "Re-Run Goals" just makes mvn run the exec goal. Is my pom.xml configured correctly?
Edit: I'm using NetBeans 7.4.
Your first error message means that the javolution-SNAPSHOT couldn't be found. You have to provide a jar with pom in your local repository or buy using the java.net-repository.
The second error message results from running project B by the Exec-Maven-Plugin. The strange message seems a little bit missleading.
I would recommend you:
First put your custom javolution-SNAPSHOT.jar into your local maven repository by using the maven install-goal
If in doubt, which libraries you need from java.net, put the repository location into Project A as well as Project B.
Next install Project A into your local maven repository by using the maven install-goal.
Next install Project B into your local maven repository.

Resources