Re: Maven-Dependency for DS 2.0.0-M14 cannot be resolved

2013-07-08 Thread Emmanuel Lécharny
Le 7/8/13 3:29 PM, Dorninger Klaus a écrit :
 Hi,

 I'm trying to get ApacheDS 2.0.0-M14 working in a maven project using the 
 following configuration in my pom file:

 ...
   properties
 
 version.org.apache.directory.server2.0.0-M14/version.org.apache.directory.server
   /properties
 ...

 ...
   dependency
 groupIdorg.apache.directory.server/groupId
 artifactIdapacheds-core/artifactId
 version${version.org.apache.directory.server}/version
   /dependency
   dependency
 groupIdorg.apache.directory.server/groupId
 artifactIdapacheds-protocol-ldap/artifactId
 version${version.org.apache.directory.server}/version
   /dependency
 ...

 This however results in the following error:
 Failed to execute goal on project xxx: Could not resolve dependencies for 
 project xxx:yyy:jar:1.0.0-SNAPSHOT: The following artifacts could not be 
 resolved: org.apache.directory.jdbm:apacheds-jdbm1:bundle:2.0.0-M2

 Our local maven nexus cannot find the artifact 
 org.apache.directory.jdbm:apacheds-jdbm1:bundle:2.0.0-M2. I tried to find it 
 on maven central but it's not there either. 
 http://repo1.maven.org/maven2/org/apache/directory/jdbm/apacheds-jdbm1/2.0.0-M2/apacheds-jdbm1-2.0.0-M2.bundle
  results in 404.

http://repo1.maven.org/maven2/org/apache/directory/jdbm/apacheds-jdbm1/2.0.0-M2/apacheds-jdbm1-2.0.0-M2.jar
exists.

Why is Maven trying to fetch a bundle ?

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com 



Re: Maven-Dependency for DS 2.0.0-M14 cannot be resolved

2013-07-08 Thread Pierre-Arnaud Marcelot
Here's a bit of information.

Most our projects (except a few ones) are built as a bundle type.
That's part of a long and on-going effort to provide ApacheDS as a full 
OSGI-compliant server.
We still have a few issues to deal with but we're not that far.

Bundles don't differ much than traditional jars. Actually, a bundle is like an 
augmented-jar with a few extra directives in the MANIFEST.MF file and 
eventually extra classes to deal with OSGI functionalities like activators 
for example.

To build bundles we use the maven-bundle-plugin from the Felix project which 
helps us to generate the proper Manifest.

A bundle type is applied to the project as packaging and as it's not a 
default Maven type, the maven-bundle-plugin is required to do the proper 
mapping with the filenames.
Maven traditionally uses the packaging type to define the extension of the file 
on disk (and in the repository), hence the .bundle it was looking for.
But a bundle is a simple jar file with the .jar file, that's why the file 
was not found.
Adding the maven-bundle-plugin to the build helps with that relationship.

Hope this helps,
Pierre-Arnaud


On 8 juil. 2013, at 15:51, Kiran Ayyagari kayyag...@apache.org wrote:

 On Mon, Jul 8, 2013 at 7:13 PM, Emmanuel Lécharny elecha...@gmail.comwrote:
 
 Le 7/8/13 3:29 PM, Dorninger Klaus a écrit :
 Hi,
 
 I'm trying to get ApacheDS 2.0.0-M14 working in a maven project using
 the following configuration in my pom file:
 
 ...
  properties
 
 version.org.apache.directory.server2.0.0-M14/version.org.apache.directory.server
  /properties
 ...
 
 ...
  dependency
groupIdorg.apache.directory.server/groupId
artifactIdapacheds-core/artifactId
version${version.org.apache.directory.server}/version
  /dependency
  dependency
groupIdorg.apache.directory.server/groupId
artifactIdapacheds-protocol-ldap/artifactId
version${version.org.apache.directory.server}/version
  /dependency
 ...
 
 This however results in the following error:
 Failed to execute goal on project xxx: Could not resolve dependencies
 for project xxx:yyy:jar:1.0.0-SNAPSHOT: The following artifacts could not
 be resolved: org.apache.directory.jdbm:apacheds-jdbm1:bundle:2.0.0-M2
 
 Our local maven nexus cannot find the artifact
 org.apache.directory.jdbm:apacheds-jdbm1:bundle:2.0.0-M2. I tried to find
 it on maven central but it's not there either.
 http://repo1.maven.org/maven2/org/apache/directory/jdbm/apacheds-jdbm1/2.0.0-M2/apacheds-jdbm1-2.0.0-M2.bundleresults
  in 404.
 
 
 http://repo1.maven.org/maven2/org/apache/directory/jdbm/apacheds-jdbm1/2.0.0-M2/apacheds-jdbm1-2.0.0-M2.jar
 exists.
 
 Why is Maven trying to fetch a bundle ?
 
 no clue, but I burned quite a bit of time trying to  fix this, later
 Pierre-Arnaud helped me solve this issue
 
 --
 Regards,
 Cordialement,
 Emmanuel Lécharny
 www.iktek.com
 
 
 
 
 -- 
 Kiran Ayyagari
 http://keydap.com