OPENENGSB-1981 - run Apache DS in Karaf

16 views
Skip to first unread message

c

unread,
Sep 14, 2011, 3:27:59 PM9/14/11
to openen...@googlegroups.com
Hi,

This is how far I've come in trying to run Apache Directory Server in Karaf.

First of all, I've built apacheds-1.5.7 because building
apacheds-parent-2.0.0-M2 results in the following error:

[ERROR] Failed to execute goal
org.apache.rat:apache-rat-plugin:0.7:check (default) on project
apacheds-parent: Too many unapproved licenses: 1 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
execute goal org.apache.rat:apache-rat-plugin:0.7:check (default) on
project apacheds-parent: Too many unapproved licenses: 1
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.rat.mp.RatCheckException: Too many unapproved
licenses: 1
at org.apache.rat.mp.RatCheckMojo.check(RatCheckMojo.java:167)
at org.apache.rat.mp.RatCheckMojo.execute(RatCheckMojo.java:159)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more

So, when trying to run apacheds-1.5.7 in karaf, I get the following
(There's some work to do before, see [1] below):

karaf@root> features:install apache-directory
Error executing command: Could not start bundle
mvn:org.apache.xbean/xbean-spring/3.5 in feature(s)
apache-directory-1.5.7: Unresolved constraint in bundle
org.apache.xbean.xbean-spring [77]: Unable to resolve 77.0: missing
requirement [77.0] package; (package=org.springframework.beans)

[1]
In top pom uncomment <module>osgi</module>
In /osgi/pom.xml set parent <version>1.5.7</version> (instead of
<version>1.5.7-SNAPSHOT</version>)
In /osgi/src/main/filtered-resources/features.xml set
<bundle>mvn:org.apache.mina/mina-core/2.0.0-RC1</bundle> (instead of
<bundle>mvn:org.apache.mina/mina-core/2.0.0-RC1-SNAPSHOT</bundle>)

That's how far I've come. Then I can add the URL in karaf and get the
above error when trying to install the feature.
Where would I add the missing dependencies? There's no provision/pom.xml...

Regards,
Christoph

Andreas Pieber

unread,
Sep 14, 2011, 11:28:10 PM9/14/11
to openen...@googlegroups.com
Can you please try if it's enough to do a "features:install spring" in karaf first?

BTW, in addition you might like to use directly their trunk instead of the packaged source releases?

Kind regards,
Andreas

c

unread,
Sep 15, 2011, 6:48:21 AM9/15/11
to openen...@googlegroups.com
Ok, I finally installed apache ds in karaf. I had to add some bundles to the features.xml. Here's a list of all bundles:

<feature>
      <bundle>mvn:http://repository.springsource.com/maven/bundles/external!org.bouncycastle/com.springsource.org.bouncycastle.jce/1.39.0</bundle>
      <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-lang/2.4_2-SNAPSHOT</bundle>
      <bundle>mvn:commons-collections/commons-collections/${commons-collections.version}</bundle>
      <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.antlr/3.0.1_1</bundle> <!--here was a wrong version!-->
      <bundle>mvn:org.apache.mina/mina-core/2.0.0-RC1</bundle> <!--here was a wrong version! (I think it had -SNAPSHOT at the end)-->
      <bundle>mvn:org.apache.xbean/xbean-spring/${xbean.version}</bundle>
      <bundle>mvn:org.apache.directory.server/apacheds-osgi/${apache.directory.version}</bundle>

      <!--the following bundles had to be added to resolve deps in karaf-->
      <bundle>mvn:commons-lang/commons-lang/2.6</bundle>
      <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j/1.6.1_4</bundle>
      <bundle>mvn:org.glassfish/javax.xml.stream/10.0-b28</bundle>
      <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xmlpull/1.1.3.1_2</bundle>
</feature>



On 09/15/2011 05:28 AM, Andreas Pieber wrote:
Can you please try if it's enough to do a "features:install spring" in karaf first?

Yes, that helped!



BTW, in addition you might like to use directly their trunk instead of the packaged source releases?

You mean for running the server outside of karaf? Yes, I did that and it worked. But in order to deploy the server in karaf I need the sources, no? Or how would I add the features url and then install it?

BTW, today a new version of Apache DS was released: ApacheDS 2.0.0-M3

Regards,
Christoph

Andreas Pieber

unread,
Sep 17, 2011, 9:38:23 AM9/17/11
to openen...@googlegroups.com
Hey Christoph,

Great to hear that it works. Can you check if the new version (2.0.0-M3) contains all those fixes already? If not please create a patch and issue for the apache ds project.

Thanks and kind regards,
Andreas
Reply all
Reply to author
Forward
0 new messages