Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 47746 invoked from network); 16 Nov 2010 15:40:32 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 16 Nov 2010 15:40:32 -0000 Received: (qmail 42432 invoked by uid 500); 16 Nov 2010 15:41:04 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 42237 invoked by uid 500); 16 Nov 2010 15:41:03 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 42230 invoked by uid 99); 16 Nov 2010 15:41:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Nov 2010 15:41:03 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of pajbam@gmail.com designates 74.125.82.42 as permitted sender) Received: from [74.125.82.42] (HELO mail-ww0-f42.google.com) (74.125.82.42) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Nov 2010 15:40:56 +0000 Received: by wwf26 with SMTP id 26so91810wwf.1 for ; Tue, 16 Nov 2010 07:40:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:content-type :mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=NeL951mNAvy4FGDHD05GYnqM/KuMn+yCNsXKptrEXIs=; b=sr+Dz6cS/86HeuKAvuBV847zDxZGWGtWJOH7yVYTB2fgAz0nagf5azc3LZ4NtzwieW cGqj4EsJbdeYaOue68vBeGiTil+ch0lK8lAwmzM+O8RwfU0BiaEEEnIU/yixxlcqGXsp UUTbo3AuiAqJ28bOJ2gvtV+0bKvFLh+ZEhpoM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=fR+b+nvYgqKyYr/mVeAd34mLurPwfCQsmNKsBCOdTQkv6Eo8CWy6aaA1Tw3BqA6MQb McNGJ0PZtT/HZSmzslN5eyOh6b/ID5DZSJ9oKuWZ2uZYYkbLBGmXm/WPHDxEOwE5DvIY YgZ2sUKJweZ+FUYeOiIw0Gh3gXfALzx2854gc= Received: by 10.227.155.83 with SMTP id r19mr7747159wbw.166.1289922035035; Tue, 16 Nov 2010 07:40:35 -0800 (PST) Received: from [192.168.0.52] (lon92-10-78-226-4-211.fbx.proxad.net [78.226.4.211]) by mx.google.com with ESMTPS id a17sm857162wbe.12.2010.11.16.07.40.33 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 16 Nov 2010 07:40:34 -0800 (PST) Sender: Pierre-Arnaud Marcelot Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1081) Subject: Re: Use classloader with index to extract schema From: Pierre-Arnaud Marcelot In-Reply-To: Date: Tue, 16 Nov 2010 16:40:32 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <10C967C0-5019-4874-BDD7-F2BEBBE2F4DA@marcelot.net> References: To: "Apache Directory Developers List" X-Mailer: Apple Mail (2.1081) X-Virus-Checked: Checked by ClamAV on apache.org On 16 nov. 2010, at 14:18, Kiran Ayyagari wrote: > On Tue, Nov 16, 2010 at 6:28 PM, Alex Karasulu = wrote: >>=20 >>=20 >> On Tue, Nov 16, 2010 at 2:08 PM, Stefan Seelmann = >> wrote: >>>=20 >>> Hi guys, >>>=20 >>> I'm trying to get Studio's UI tests working again. I updated = ApacheDS >>> and Shared dependencies to current trunk. I had problems when using >>> the FrameworkRunner (which starts an embedded ApacheDS). The schema >>> extractor uses the java.class.path to scan the JARs for schema LDIF >>> files. However in the Eclipse RCP (OSGi) environment the >>> java.class.path only contains the bootstrap JAR. Similar issues were >>> already reported in [1] and [2]. >>>=20 >>> Owen Jacobson proposed in [2] to use an index file that lists all >>> schema LDIF files. I think that's a great idea. I tested the = solution >>> in a branch [3] and it works fine for the UI tests. I think it = should >>> also work for other cases. Unfortunately I can't run the full = ApacheDS >>> test suite atm. >>>=20 >>> I created the index file with >>> find src/main/resources/schema -name "*.ldif" | sed >>> 's:src/main/resources/::' >>> and added it to SVN >>> (src/main/resources/META-INF/apacheds-schema.index). A better = solution >>> would be to generate the index file during the build, and to avoid = its >>> addition to version control. One way would be to execute that (or a >>> similar) command using the exec-maven-plugin, but it only works on >>> Unix. A better way would be to create a new Maven plugin (I searched >>> but didn't find an existsing Maven plugin that scan the file system >>> and creates a file list). >>>=20 >>=20 >> This schema file will need to be updated I guess when users create a = new >> schema in ApacheDS correct? > users have two options: > 1. if a user wants his schema to be loaded by the server then bundling > the schema within the > standard apacheds-ldap-schema jar and updating this file is the > only way to go >=20 > 2. load their custom schema using a LDAP client or through their > application code >=20 > we should suggest users to use the 2nd method so that we can find the > default schema files using > the index file which will solve all the classpath related issues we > are facing to load schema. +1 We would also need to implement option #2 in our LDAP Unit Test = Framework where the user would be able to specify either a custom schema = index file or the list of custom schema files. >> So I guess there would be more we would need to do with this. Also = this >> reminds me sort of by the index file we used to have in the past for >> partition index files for the schema partition. I remember running = into >> several build problems when we were using it. But this does not mean = we will >> have the same problem here. >>=20 >>>=20 >>> @Owen >>> You volunteered to create a Maven Plugin :-) Do you still want to = give >>> it a try and contribute it to the Directory project? >>>=20 >>> Kind Regards, >>> Stefan >>>=20 >>>=20 >>> [1] https://issues.apache.org/jira/browse/DIRSERVER-1504 >>> [2] >>> = http://mail-archives.apache.org/mod_mbox/directory-users/201009.mbox/%3CAA= NLkTi=3D-QYedzbfWpsE850NTuqq9vvoJJ0Z5rnLzgbf_@mail.gmail.com%3E >>> [3] >>> = https://svn.apache.org/repos/asf/directory/shared/branches/ldap-schema-ind= ex >>=20 >>=20 >>=20 >> -- >> Alex Karasulu >> My Blog :: http://www.jroller.com/akarasulu/ >> Apache Directory Server :: http://directory.apache.org >> Apache MINA :: http://mina.apache.org >> To set up a meeting with me: http://tungle.me/AlexKarasulu >>=20 >=20 >=20 >=20 > --=20 > Kiran Ayyagari