Hi,

I included the maven-bundle-plugin in my build and it works now. Thanks for the 
quick help and explanation!

Maybe you could provide some sort of short apacheds+maven tutorial for embedded 
servers on the project's website and include that bit of information.

Regards,
Klaus
__________________________________________

Klaus Dorninger, BA
IT-Services der Sozialversicherung GmbH
Bereich Software
Enterprise Content Management
ePortal Entwickler
Johann-Böhm-Platz 1
A-1020 Wien
T: +43 (0) 50124 844 1271
M: +43 (0) 664 88 66 1271
[email protected]
www.itsv.at | www.intranet.itsv.at

-----Ursprüngliche Nachricht-----
Von: Pierre-Arnaud Marcelot [mailto:[email protected]] Im Auftrag von 
Pierre-Arnaud Marcelot
Gesendet: Montag, 8. Juli 2013 16:06
An: [email protected]
Betreff: Re: Maven-Dependency for DS 2.0.0-M14 cannot be resolved

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 <[email protected]> wrote:

> On Mon, Jul 8, 2013 at 7:13 PM, Emmanuel Lécharny <[email protected]>wrote:
> 
>> 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.server>2.0.0-M14</version.org.apache.di
>> rectory.server>
>>>  </properties>
>>> ...
>>> 
>>> ...
>>>      <dependency>
>>>        <groupId>org.apache.directory.server</groupId>
>>>        <artifactId>apacheds-core</artifactId>
>>>        <version>${version.org.apache.directory.server}</version>
>>>      </dependency>
>>>      <dependency>
>>>        <groupId>org.apache.directory.server</groupId>
>>>        <artifactId>apacheds-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-jdbm
>> 1/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

Reply via email to