Print at Mar 15, 2010 2:34:35 PM

Posted by groef at Aug 10, 2008 11:12:45 AM
Maven 2 - 1.2.0-beta-5
I am currently trying to setup an Maven2 POM using the latest beta 5, version 1.2.0 of JPOX. But getting errors due to missing artifacts. The issue is with the POM files for the jpox version 1.2.0-beta-5 files checked into the Maven repository. There dependencies are incorrectly defined for the eclipse osgi dependencies. Yes, I know I can solve this issue be downloading these and installing them into my local repository, but that defeats the purpose of Maven, especially when these jar files are in a repository. It looks like your builds seems to work, which I can only think you are using Maven 1 maybe or that you have these eclipse osgi jar files defined into your local repository.

Getting: 5 required artifacts are missing.
from the specified remote repositories:


errors like:
Path to dependency:
1) org.dit:jpox-test1:jar:1.0
2) jpox:jpox-core:jar:1.2.0-beta-5
3) org.eclipse:org.eclipse.equinox.common:jar:3.2.0

I did some research and found that the dependencies are not defined correctly for the eclipse osgi dependencies. This is based on my investigation, but please correct me if I have gone wrong.

Example:
In jpox-core-1.2.0-beta-5.jar located at http://mirrors.ibiblio.org/pub/mirrors/maven2/jpox/jpox-core/1.2.0-beta-5/ has a POM file that Maven 2.0.9 will look at ensure that dependencies are resolved. For instance looking at the following dependency:

<dependency>
<groupId>org.eclipse</groupId>
<artifactId>org.eclipse.equinox.registry</artifactId>
<version>3.2.0</version>
</dependency>

This dependency can not be found. I did some digging around and found that this dependency requires repository eclipse (http://repo1.maven.org/eclipse), and within this repository the following dependency definition should be used to find the correct jar

<dependency>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.registry</artifactId>
<version>3.2.0</version>
</dependency>


I have had a quick look at previous beta versions and find it strange that they all define these eclipse osgi dependencies like this. Is this a problem on my side or is it that no one is using Maven 2 or is it that people are installing these JAR files manually?

I think all the eclipse osgi dependencies should be defined as follow:

<dependency>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.registry</artifactId>
<version>3.2.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.common</artifactId>
<version>3.2.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.core</groupId>
<artifactId>org.eclipse.core.runtime</artifactId>
<version>3.2.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.osgi</groupId>
<artifactId>org.eclipse.osgi</artifactId>
<version>3.2.0</version>
</dependency>


Regards,
Francois Groenewald
----------------------------------------
-- Francois --