directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Zoerner <>
Subject Re: Embedding ApacheDS as a Web Application
Date Fri, 10 Oct 2008 19:53:23 GMT
Hi Felix,

thanks for the feedback. Sorry for the late reply, I am currently 
totally overloaded.

Felix Knecht wrote:

> I tried to run the example [1] from the page on a linux box. It didn't worked, because
there are some hardcoded
> (Windows) paths in the build.xml:

My fault. I thought about changing it to use ivy. But I did not had the 
time, to do this, and my maven skills are really lame. And I thought, 
mvn is overkill for simply compiling two classes and create a war file 
with some libs from it ...

> Following the well done documentation I created an archetype to let maven2 create a sample
project similar to the one
> mentioned in the zip file.


> I'm able to create a new project with the archetype, build it, put the generated war
into an apache-tomcat-6.0.18, run
> it and get the RootDSE page shown. I'm not sure if this is all the magic and if you can
get the RootDSE page you're sure
> that everything else is also working well?

I have also run some tests with an LDAP client against the running 
webapp, and it worked fine as well. I think it is not necessary to do 
more. It is simply an example about how to embed ApacheDS somewhere, and 
the web app approach looked charmingly easy.

> To get the archetype-plugin check it out from my sandbox [2] and build it (mvn install).

This worked fine.

Then you should be able to
> create a new project using
> mvn archetype:generate \
>   -DgroupId=org.example \
>   -DartifactId=myProject \
>   -Dversion=1.0-SNAPSHOT \
> \
>   -DarchetypeArtifactId=embed-apacheds-archetype \
>   -DarchetypeVersion=1.0-SNAPSHOT

This worked as well. Although I am a little bit confused about the two 
steps. First I checkout the archetype-plugin and build it. Then I use 
this plugin to create a new mvn project. Afterwards I build this one as 
well. Finally, I have the web app as in the example. And I am able to 
create many other webapps with the same content as a template.

It is impressive, how it works, but I question myself, whether a simple 
maven project is perhaps more appropriate for the task.

 > If you think it's ok and usefull we can move it from the sandbox to 
the matured projects.

My goal was to have a simple example for embedding the server in the 
docs for people to get inspired. You build a tool which acts as a blue 
print for comparable web apps, which may act as a starting point. 
Question: Is it a common task to embed ApacheDS in a WebApp at all?

The funny thing: The example was quite often cited in the mailing list. 
This is why I tried to update it ...

I would have favored a sub-project for samples, in which the ApacheDS 
embedded in a WebApp is one of them. What do others think?

Anyway, we need a better way to build the example, in order to make it 
easier for users to let it run. Your mvn approach is obviously better 
than putting a zip-File without dependency resolution in the wiki. Thank 
you therefore for the excellent work you did, Felix!

Greetings from Hamburg,

View raw message