directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Karasulu <aok...@bellsouth.net>
Subject Re: ApacheDS and LDIF schema files
Date Thu, 19 Jan 2006 04:21:10 GMT
Alex Karasulu wrote:

> Alex Karasulu wrote:
>
>> Davy De Waele wrote:
>>
>>> Hi Alex,
>>>
>>> Thanks for the swift responses.
>>>
>>> Concerning the question below, I was referring to a way to generate 
>>> such
>>> a schema JAR (based on the openldap schema file). Or do I need to pass
>>> through maven in order to do that? 
>>
>>
>> Yeah take a look at the archives here:
>>
>> http://mail-archives.apache.org/mod_mbox/directory-dev/200601.mbox/browser 
>>
>
>
>
> Sorry try this link instead:
>
> http://mail-archives.apache.org/mod_mbox/directory-dev/200601.mbox/ajax/%3c43C7E62B.1070409@bellsouth.net%3e

>


Ok this sh^&#$t does not work ... here's the contents of the message:
-----------------

Ok I see what you're trying to do.  I recommend you create a new m2 
module for your schema.  This module can generate the jar file 
containing your extension schema (let's call it the vincent schema).  
Your other projects can just depend on this subproject.

(1) setup the regular m2 layout for the project
(2) place the file named vincent.schema in ${basedir}/src/main/schema 
with your new objectClass which extends inetOrgPerson
(3) setup pom to generate schema classes from vincent.schema using this 
build section (change pkg setting to suite your needs)

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.ldap.server</groupId>
        <artifactId>org.apache.ldap.server.plugin</artifactId>
        <configuration>
          <schemaSourcesDir>src/main/schema</schemaSourcesDir>
          <schemas>
            <schema>
              <name>vincent</name>
              <pkg>org.vincent.schema</pkg>
              <dependencies>
                <dependency>system</dependency>
                <dependency>core</dependency>
                <dependency>cosine</dependency>
                <dependency>inetorgperson</dependency>
              </dependencies>
            </schema>
          </schemas>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>generate</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
 
(4) write a test case to use your new schema org.vincent.VincentSchema 
which is generated into target/schemas. 

NOTE: both the idea:idea and the eclipse:eclipse goal will include the 
target/schemas path in the classpath so you're project should be good to 
go. 

Hope this helps,
Alex
-----------------



Mime
View raw message