Maven error - Spring Surf Alfresco - spring

To construct a project Spring Surf on Alfresco, I used the command:
mvn archetype:generate -DarchetypeCatalog=https://artifacts.alfresco.com/nexus/content/groups/public-snapshots/archetype-catalog.xml
I gave groupId=surfcmistest and artifactId=surfcmistest-1.0-SNAPSHOT. Then, on the folder surfcmistest-1.0-SNAPSHOT created by the project, I try to make build and package with Maven. I run:
mvn install
and I obtain the error:
Failed to execute goal on project surfcmistest-1.0-SNAPSHOT: Could not resolve dependencies for project surfcmistest:surfcmistest-1.0-SNAPSHOT:war:1.0-SNAPSHOT: Failed to collect dependencies at org.springframework.extensions.surf:spring-surf:jar:5.1-BF-SNAPSHOT: Failed to read artifact descriptor for org.springframework.extensions.surf:spring-surf:jar:5.1-BF-SNAPSHOT: Failure to find org.alfresco:alfresco-parent:pom:5.1-BF-SNAPSHOT in https://artifacts.alfresco.com/nexus/content/groups/public-snapshots/ was cached in the local repository, resolution will not be reattempted until the update interval of Alfresco-Artifacts has elapsed or updates are forced -> [Help 1]
My pom.xml is:
<?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>surfcmistest</groupId>
<artifactId>surfcmistest-1.0-SNAPSHOT</artifactId>
<packaging>war</packaging>
<name>sample-app Maven Webapp</name>
<url>http://maven.apache.org</url>
<repositories>
<repository>
<id>Alfresco-Artifacts</id>
<name>Alfresco Artifacts SNAPSHOTS</name>
<url>https://artifacts.alfresco.com/nexus/content/groups/public-snapshots/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.extensions.surf</groupId>
<artifactId>spring-surf</artifactId>
<version>5.1-BF-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.extensions.surf</groupId>
<artifactId>spring-surf-api</artifactId>
<version>5.1-BF-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.tuckey</groupId>
<artifactId>urlrewritefilter</artifactId>
<version>4.0.4</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.2.2.v20140723</version>
<configuration>
<scanIntervalSeconds>0</scanIntervalSeconds>
<scanTargets>
<scanTarget>src/main/webapp</scanTarget>
</scanTargets>
</configuration>
</plugin>
</plugins>
</build>
<version>1.0-SNAPSHOT</version>
</project>
What is my error?

The error message you are getting is:
resolution will not be reattempted until the update interval of Alfresco-Artifacts has elapsed or updates are forced
This is a very classic error and it is resolved by running Maven with the -U option.
You should restart from scratch and follow this procedure:
Remove your whole m2 repository (the default location is ~/.m2/repository) and remove any directory created by an earlier execution of the maven-archetype-plugin.
Run the command:
mvn archetype:generate -DarchetypeCatalog=https://artifacts.alfresco.com/nexus/content/groups/public-snapshots/archetype-catalog.xml
Choose the option org.springframework.extensions.surf:spring-surf-archetype (for me, it was option 1 but it can change).
Choose the version 5.1-SNAPSHOT, which was option 4 for me (but again, this can change)
Select a groupId, an artifactId, a version, a package and confirm all those properties by pressing Y.
Go into the newly created directory (it will be named after the artifactId you chose earlier) and run the following Maven command:
mvn -U clean install

Related

I got "Could not resolve dependencies" error when I run maven install command

I added private nexus repository urls in pom.xml to install some dependencies from inhouse nexus repository.
But eclipse still shows "Missing artifact error" messages in pom.xml file
here is command line error messages when I run mvn install command
[ERROR] Failed to execute goal on project diffapi: Could not resolve dependencies for project com.my:diffapi:jar:0.0.1-SNAPSHOT: The following artifacts could not be resolved: com.aaa.bbb.poi.jar:poi:jar:5.14.4, com.aaa.bbb.poi.jar:poi-skp-search-client-util:jar:5.14.4, com.aaa.bbb.poi.jar:poi-util:jar:5.14.4, com.aaa.bbb.frame:ndds-log:jar:1.4.6, com.aaa.bbb.frame:ndds-util:jar:1.4.6, com.aaa.bbb.frame:ndds-monitor-agent:jar:1.5.0, com.aaa.bbb.frame:ndds-web-utility:jar:1.5.0, com.aaa.bbb.frame:ndds-context:jar:1.5.0: Failure to find com.aaa.bbb.poi.jar:poi:jar:5.14.4 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced
it seems maven only access maven central instead of private nexus repositores
And this is my 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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.6.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.my</groupId>
<artifactId>diffapi</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>diffapi</name>
<description>diff api server for rmi and rest result</description>
<properties>
<java.version>1.8</java.version>
<ndds.frame.version>1.5.0</ndds.frame.version>
</properties>
<dependencies>
<dependency>
<groupId>com.aaa.bbb.poi.jar</groupId>
<artifactId>poi</artifactId>
<version>5.14.4</version>
</dependency>
<dependency>
<groupId>com.aaa.bbb.poi.jar</groupId>
<artifactId>poi-skp-search-client-util</artifactId>
<version>5.14.4</version>
</dependency>
<dependency>
<groupId>com.aaa.bbb.poi.jar</groupId>
<artifactId>poi-util</artifactId>
<version>5.14.4</version>
</dependency>
<dependency>
<groupId>com.aaa.bbb.frame</groupId>
<artifactId>ndds-log</artifactId>
<version>1.4.6</version>
</dependency>
<dependency>
<groupId>com.aaa.bbb.frame</groupId>
<artifactId>ndds-util</artifactId>
<version>1.4.6</version>
</dependency>
<dependency>
<groupId>com.aaa.bbb.frame</groupId>
<artifactId>ndds-monitor-agent</artifactId>
<version>${ndds.frame.version}</version>
</dependency>
<dependency>
<groupId>com.aaa.bbb.frame</groupId>
<artifactId>ndds-web-utility</artifactId>
<version>${ndds.frame.version}</version>
</dependency>
<dependency>
<groupId>com.aaa.bbb.frame</groupId>
<artifactId>ndds-context</artifactId>
<version>${ndds.frame.version}</version>
</dependency>
<distributionManagement>
<repository>
<id>AAA-releases</id>
<name>AAA-releases</name>
<url>http://IP:PORT/nexus/content/repositories/AAA-releases/</url>
</repository>
<snapshotRepository>
<id>AAA-snapshots</id>
<name>AAA-snapshots</name>
<url>http://IP:PORT/nexus/content/repositories/AAA-snapshots</url>
</snapshotRepository>
</distributionManagement>
</project>
You seem to be confusing repositories where your project will be deployed after building with repositories which are used as sources for the dependencies in your project. You haven't actually specified a custom 3rd party repo, so Maven is giving up after failing to find the artifacts in the central repo. From the Maven documentation:
Whereas the repositories element specifies in the POM the location and manner in which Maven may download remote artifacts for use by the current project, distributionManagement specifies where (and how) this project will get to a remote repository when it is deployed. The repository elements will be used for snapshot distribution if the snapshotRepository is not defined.
So, try adding a <repositories> element which contains the extra repos which you want available for the custom JARs in your build:
<project>
...
<distributionManagement>
<repository>
<id>AAA-releases</id>
<name>AAA-releases</name>
<url>http://IP:PORT/nexus/content/repositories/AAA-releases/</url>
</repository>
<snapshotRepository>
<id>AAA-snapshots</id>
<name>AAA-snapshots</name>
<url>http://IP:PORT/nexus/content/repositories/AAA-snapshots</url>
</snapshotRepository>
</distributionManagement>
<repositories>
<!-- fill in with the actual details of your repo here -->
<repository>
<id>REPO ID</id>
<name>REPO NAME</name>
<url>YOUR URL GOES HERE</url>
</repository>
</repositories>
</project>

Maven configuration on new machine

I work in a small lab, we have 2 machines with intellij, svn and maven used to develop. I have been tasked with configuring a 3rd machine for development.
Id like some guidance as to how to do this. I have svn checkout and have all the files and the project is open in intellij:
--main:
--java:
--ca:
--virology:
--src:
pom.xml
And my pom.xml looks like:
<?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>
<parent>
<groupId>ca.virology</groupId>
<artifactId>virology-parent</artifactId>
<version>1.0</version>
</parent>
<groupId>ca.virology</groupId>
<artifactId>gatu</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>ca.virology</groupId>
<artifactId>virology-lib</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>ca.virology</groupId>
<artifactId>base-by-base</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>ca.virology</groupId>
<artifactId>vgo</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>ca.virology</groupId>
<artifactId>jdotter</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>ptolemy</groupId>
<artifactId>ptolemy2</artifactId>
<version>0</version>
</dependency>
<dependency>
<groupId>ca.virology</groupId>
<artifactId>virology-common</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.biojava</groupId>
<artifactId>core</artifactId>
<!--virology-lib used 1.4, 1.8.2 is most recent-->
<version>1.8.2</version>
</dependency>
<!-- this is only in the local repository because the only available maven versions do not contain the classes we need-->
<!-- use "mvn install:install-file -DgroupId=org.ggf.drmaa -DartifactId=drmaa -Dversion=0 -Dpackaging=jar -Dfile=/path/to/file.jar" to install the file to your local repository if necessary-->
<dependency>
<groupId>org.ggf.drmaa</groupId>
<artifactId>drmaa</artifactId>
<version>0</version>
</dependency>
<!-- this is only in the local repository because a maven version does not exist-->
<!-- use "mvn install:install-file -DgroupId=javax.jnlp -DartifactId=jnlp -Dversion=0 -Dpackaging=jar -Dfile=/path/to/file.jar" to install the file to your local repository if necessary-->
<dependency>
<groupId>javax.jnlp</groupId>
<artifactId>jnlp</artifactId>
<version>0</version>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.8.0</version>
</dependency>
<!-- this is only in the local repository because a maven version does not exist-->
<!-- use "mvn install:install-file -DgroupId=pal -DartifactId=pal -Dversion=1.5 -Dpackaging=jar -Dfile=/path/to/file.jar" to install the file to your local repository if necessary-->
<dependency>
<groupId>pal</groupId>
<artifactId>pal</artifactId>
<version>1.5</version>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-apache-oro</artifactId>
<version>1.9.2</version>
</dependency>
<!--Intellij GUI-->
<dependency>
<groupId>com.intellij</groupId>
<artifactId>forms_rt</artifactId>
<version>6.0.5</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<manifest>
<mainClass>ca.virology.gatu.GenomeAnnotator</mainClass>
</manifest>
<manifestEntries>
<Permissions>all-permissions</Permissions>
<Codebase>*</Codebase>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<minimizeJar>true</minimizeJar>
<filters>
<filter>
<artifact>xerces:xercesImpl</artifact>
<includes>
<include>**</include>
</includes>
</filter>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
intellij complains about maven "Unable to import maven project: See logs for details" (not sure where log is either :/)
when i cd into ../pom.xml and run mvn install it spits out
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for ca.virology:gatu:1.0-SNAPSHOT: Failure to find ca.virology:virology-parent:pom:1.0 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM # line 7, column 13
#
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project ca.virology:gatu:1.0-SNAPSHOT (/Users/chadsmit/Desktop/Developement/repo/gatu/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for ca.virology:gatu:1.0-SNAPSHOT: Failure to find ca.virology:virology-parent:pom:1.0 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM # line 7, column 13 -> [Help 2]
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
My guess is that there are certain .jar files missing in the .m2 folder, but how do i tell maven to look for them there if i copy them from another machine?
EDIT: The jars from the new machines have been copied and dont seem to be causing problems. The pom.xml has been changed to include :
<parent>
<groupId>ca.virology</groupId>
<artifactId>virology-parent</artifactId>
<version>1.0</version>
<relativePath>/Users/chadsmit/.m2/repository/ca/virology/virology-parent/1.0/virology-parent-1.0.pom</relativePath>
</parent>
and yet maven is still trying to download it from elsewhere:
[FATAL] Non-resolvable parent POM for ca.virology:gatu:1.0-SNAPSHOT: Failure to find ca.virology:virology-parent:pom:1.0 in https://repo.maven.apache.org>/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM # line 7, column 13
Any insights? i feel as though im missing something important
Did you do a new installation of maven on the 3rd machine or you copied the maven folder from the previous two machines. If you installed a new version than you also need to take a look at the settings.xml file in the .m2 folder on the previous machines. It may be a possibility that the repositories configured in the settings.xml file on those machines are not present on settings.xml on the third machine.
If your parent project is not on the local maven repository, then you can also add relativePath in entry for parent like this:
<parent>
<groupId>com.test</groupId>
<artifactId>test-artifact</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>{path to}/test-artifact/pom.xml</relativePath>
</parent>
Also, you need to check if intellij is pointing to the maven installation you copied from the previous machines. It is a possibility that Intellij is pointing to built in maven setup.
Run mvn clean install from the project folder.
Just check once your svn has not changed the version of the parent specified here on line number 7 virology-parent, instead try something like ${project.version} in the version for the module
In case you have the jar-files locally, you might be able to [edited]
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=ca.virology -DartifactId=virology-parent \
-Dversion=1.0 -Dpackaging=jar -Dfile=/path/to/file
(and have you tried the -offline switch to maven?)

Not able to use 1.3.0.RELEASE of spring-boot project

I am not able to use 1.3.0.RELEASE version of spring-boot in my project. Following is my pom.xml:
<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.abc</groupId>
<artifactId>xyz</artifactId>
<packaging>jar</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.3.0.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
I am getting following error:
Project build error: Non-resolvable parent POM for
com.elm:elm:[unknown-version]: Failure to find
org.springframework.boot:spring-boot-starter-parent:pom:1.3.0.RELEASE
in https://repo.maven.apache.org/maven2 was cached in the local
repository, resolution will not be reattempted until the update
interval of central has elapsed or updates are forced and
'parent.relativePath' points at wrong local POM pom.xml /elm line
8 Maven pom Loading Problem
Your local cached repository seems to be messed up.
Either you can force maven to download dependencies with
mvn clean install -U
or you can clean your cached repository by removing <USER_HOME>/.m2/repository directory.

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