directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@gmail.com>
Subject Re: Adding an objectClass to ApacheDS
Date Wed, 23 Aug 2006 18:56:51 GMT
Craig L. Ching a écrit :

> That's great, thanks a lot for that!  Some comments, I see you're on 
> Windows as well, I was having some problems with Maven, it seems to 
> need a bit of a kick in the ass, I had to reissue the mvn install 
> command a number of times to get it all built. 

Be sure tu use maven 2.0.4. And be sure to do a mvn clean before 
launching a mvn install. Then if you still have pbs with maven, there is 
a kind of church where we kill chicken and drink their blood, while 
burning some blue candles in hope those problems vanish...  You are 
welcome ;)

> Once I got it built, the installers seemed to be missing for Windows, 
> how do I invoke the server without the binary executable (my 
> preference while developing anyway)?

If you want to embed ADS, I don't think you need to build the 
installers. Here is a conference links about how to embed ADS in an 
application : http://docs.safehaus.org/display/APACHEDS/Embedding+ApacheDS

> I've since changed to building this on Linux, but I'd prefer to stay 
> on Windows since my laptop runs Windows and that's where I do a lot of 
> dev work.

Cygwin rules :) But it should build on windows. Beware that you may 
encounter some problems if you use special encoding like ISO-8859-1. If 
this is the case, and if you have pbs, submit them to the list.

Last thing, don't be afraid to get the latest version from svn :
either from
http://svn.apache.org/repos/asf/directory/branches/apacheds/1.0-trunks/,
from which we will create 1.0-RC4 really soon (next week ?), or from :
http://svn.apache.org/repos/asf/directory/trunks/

Emmanuel

>  
> Cheers,
> Craig
>
>     ------------------------------------------------------------------------
>     *From:* Ajay Upadhyaya [mailto:ajayup@gmail.com]
>     *Sent:* Wednesday, August 23, 2006 1:25 PM
>     *To:* Apache Directory Developers List
>     *Cc:* elecharny@apache.org
>     *Subject:* Re: Adding an objectClass to ApacheDS
>
>     Here is an example, I did it with RC3 here are the steps (as far
>     as I could recollect)
>
>     - Download apacheds1.0-RC3
>     - create a custom schema file myschema.schema
>     #================= begin myschema.schema
>     =============================
>     # define myschemaOrgPerson -- extends InetOrgPerson
>     # define myschemaOrganizationalUnit -- extends organizationalUnit
>     #================================================================
>     # myschema 94555
>     # AttributeTypes 94555.2.1
>     # Object Classes 94555.2.2
>     #
>
>     attributetype ( 94555.2.1.1
>         NAME 'dateCreated'
>         DESC 'dateCreated'
>         EQUALITY caseIgnoreMatch
>         SUBSTR caseIgnoreSubstringsMatch
>         SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
>
>     attributetype ( 94555.2.1.2
>         NAME 'dateModified'
>         DESC 'dateModified'
>         EQUALITY caseIgnoreMatch
>         SUBSTR caseIgnoreSubstringsMatch
>         SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
>
>     attributetype ( 94555.2.1.3
>         NAME 'dateCodeGenerated'
>         DESC 'dateCodeGenerated'
>         EQUALITY caseIgnoreMatch
>         SUBSTR caseIgnoreSubstringsMatch
>         SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
>
>     attributetype ( 94555.2.1.4
>         NAME 'dateActivated'
>         DESC 'dateActivated'
>         EQUALITY caseIgnoreMatch
>         SUBSTR caseIgnoreSubstringsMatch
>         SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
>
>     attributetype ( 94555.2.1.5
>         NAME 'codeFlag'
>         DESC 'codeFlag'
>         EQUALITY caseIgnoreMatch
>         SUBSTR caseIgnoreSubstringsMatch
>         SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
>
>     attributetype ( 94555.2.1.6
>         NAME 'activeFlag'
>         DESC 'activeFlag'
>         EQUALITY caseIgnoreMatch
>         SUBSTR caseIgnoreSubstringsMatch
>         SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
>
>     attributetype ( 94555.2.1.7
>         NAME 'employeeType'
>         DESC 'employeeType'
>         EQUALITY caseIgnoreMatch
>         SUBSTR caseIgnoreSubstringsMatch
>         SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
>
>     attributetype ( 94555.2.1.8
>         NAME 'companyURL'
>         DESC 'companyURL'
>         EQUALITY caseIgnoreMatch
>         SUBSTR caseIgnoreSubstringsMatch
>         SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
>
>     attributetype ( 94555.2.1.9
>         NAME 'selfRegAllowed'
>         DESC 'selfRegAllowed'
>         EQUALITY caseIgnoreMatch
>         SUBSTR caseIgnoreSubstringsMatch
>         SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
>
>     attributetype ( 94555.2.1.10
>         NAME 'protected'
>         DESC 'protected'
>         EQUALITY caseIgnoreMatch
>         SUBSTR caseIgnoreSubstringsMatch
>         SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
>
>     attributetype ( 94555.2.1.11
>         NAME 'serviceType'
>         DESC 'serviceType'
>         EQUALITY caseIgnoreMatch
>         SUBSTR caseIgnoreSubstringsMatch
>         SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
>
>     attributetype ( 94555.2.1.12
>         NAME 'domainKey'
>         DESC 'domainKey'
>         EQUALITY caseIgnoreMatch
>         SUBSTR caseIgnoreSubstringsMatch
>         SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
>
>     attributetype ( 94555.2.1.13
>         NAME 'autoActivationAllowed'
>         DESC 'autoActivationAllowed'
>         EQUALITY caseIgnoreMatch
>         SUBSTR caseIgnoreSubstringsMatch
>         SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
>
>     attributetype ( 94555.2.1.14
>         NAME 'companyName'
>         DESC 'companyName'
>         EQUALITY caseIgnoreMatch
>         SUBSTR caseIgnoreSubstringsMatch
>         SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
>
>     attributetype ( 94555.2.1.15
>         NAME 'city'
>         DESC 'city'
>         EQUALITY caseIgnoreMatch
>         SUBSTR caseIgnoreSubstringsMatch
>         SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
>
>     attributetype ( 94555.2.1.16
>         NAME 'state'
>         DESC 'state'
>         EQUALITY caseIgnoreMatch
>         SUBSTR caseIgnoreSubstringsMatch
>         SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
>
>     attributetype ( 94555.2.1.17
>         NAME 'countryname'
>         DESC 'countryname'
>         EQUALITY caseIgnoreMatch
>         SUBSTR caseIgnoreSubstringsMatch
>         SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
>
>
>     # myschemaOrgPerson
>     # The inetOrgPerson represents people who are associated with an
>     # organization in some way.  It is a structural class and is derived
>     # from the organizationalPerson which is defined in X.521 [X521].
>     objectclass    ( 94555.2.2.1
>         NAME 'myschemaOrgPerson'
>         DESC 'myschema Organizational Person'
>         SUP inetOrgPerson
>         STRUCTURAL
>         MAY (
>             dateCreated $ dateCodeGenerated $ employeeType $
>     dateModified $ activeFlag $ codeFlag )
>         )
>
>
>     objectclass ( 94555.2.2.2 NAME 'myschemaOrganizationalUnit'
>         DESC 'myschemaOrganizationalUnit'
>         SUP organizationalUnit STRUCTURAL
>         MAY (  dateCreated $ dateModified $ dateActivated $
>     dateCodeGenerated $ activeFlag $ codeFlag $
>             selfRegAllowed $  protected $ serviceType $ domainKey $
>     autoActivationAllowed $
>             companyName $ companyURL $ state $ city $ countryname )
>         )
>
>
>     #================= end myschema.schema =============================
>
>
>
>     - put this file in E:\Program
>     Files\apacheds-1.0-RC3\src\core\src\main\schema folder
>     - install maven 2
>     - open command shell and cd to E:\Program
>     Files\apacheds-1.0-RC3\src\core
>     - run "mvn process-resources" to generate the myschema schema sources
>     - generated source files will be found in E:\Program
>     Files\apacheds-1.0-RC3\src\core\target\generated-sources\org\apache\directory\server\core\schema\bootstrap
>     - create a patch dir somewhere
>     - copy the generated Myschema* files into patch dir
>     - build the patch myschema.jar by placing apacheds libraries in
>     classath... a simple javac inside ant will work
>     - this myschema.jar has to be placed in E:\Program
>     Files\apacheds-1.0-RC3\lib\ext folder
>     - configure the E:\Program Files\apacheds- 1.0-RC3\conf\server.xml
>     #=============== add this to server.xml =============================
>     <bean id="myschemaPartitionConfiguration"
>     class="org.apache.directory.server.core.configuration.MutableDirectoryPartitionConfiguration
>     ">
>         <property name="name"><value>myschema</value></property>
>         <property
>     name="suffix"><value>dc=myschema,dc=com</value></property>
>         <property name="indexedAttributes">
>           <set>
>             <value>dc</value>
>             <value>ou</value>
>             <value>objectClass</value>
>             <value>krb5PrincipalName</value>
>             <value>uid</value>
>           </set>
>         </property>
>         <property name="contextEntry">
>           <value>
>             objectClass: top
>             objectClass: domain
>             objectClass: extensibleObject
>             dc: myschema
>           </value>
>         </property>
>       </bean>
>
>
>
>     On 8/23/06, *Craig L. Ching *<cching@mqsoftware.com
>     <mailto:cching@mqsoftware.com>> wrote:
>
>         Great, thanks for the info!  BTW, I'm going to be using an
>         embedded server, once this is built, will it include my new
>         schema in the embeddable server?
>          
>         As for the project, it's a commercial product called Q Pasa! 
>         We monitor and manage middleware software (e.g. IBM WebSphere
>         MQ, IBM WebSphere App Server, and tons of other stuff).  We
>         are planning on using ApacheDS to do our default
>         authentication/authorization to begin with (replacing a
>         legacy, home-grown solution), but we're going to be adding in
>         the capability to find other installations of our software so
>         that disparate installations can be integrated (sort of hard
>         to explain the latter use).  I'm sure if this is successful
>         we'll find lots of other uses for it.  I am evaluating ADS
>         because it is 100% pure java and it is embeddable, not to
>         mention that it's the Apache organization ;-)
>          
>         Again, thanks for the help, I'll let you all know how I progress.
>
>         Cheers,
>         Craig
>
>             ------------------------------------------------------------------------
>             *From:* Emmanuel Lecharny [mailto:elecharny@gmail.com
>             <mailto:elecharny@gmail.com>]
>             *Sent:* Wednesday, August 23, 2006 10:24 AM
>             *To:* Apache Directory Developers List
>             *Subject:* Re: Adding an objectClass to ApacheDS
>
>         Great !
>
>         Don't worry to much about the mailing list, we don't use
>         user@directory.apache.org <mailto:user@directory.apache.org>
>         atm. So this is the right place to post.
>
>         Extending the schema is a little bit complicated in this
>         version, but it does not mean it's complicated.
>
>         Here are the steps :
>         1) create your schema using OpenLdap syntax (which is RFC
>         syntax, btw)
>         2) put it in apacheds/core/src/main/schema, beside the other
>         schemas
>         3) go into apacheds/core and modify the pom.xml file :
>         ...
>                 <configuration>
>                   <schemaSourcesDir>src/main/schema</schemaSourcesDir>
>                   <schemas>
>                     <schema>
>                       <name>apache</name>
>                       <dependencies>
>                         <dependency>system</dependency>
>                       </dependencies>
>                     </schema>
>                     <schema>
>                       <name>apachedns</name>
>                       <dependencies>
>                         <dependency>system</dependency>
>                         <dependency>core</dependency>
>                       </dependencies>
>                     </schema>
>         ...
>         here, you just add your schema, with its dependencies.
>         4) now, go back to the root project and compile the project :
>         mvn install
>         (it will take around 3 minutes)
>         5) build the binaries :
>         cd apacheds/server-installers
>         mvn install
>
>         now, you can install the server with the installer that has
>         been generated.
>
>         If you are lost, here is a link to a page which explains the
>         build process :
>         http://docs.safehaus.org/display/APACHEDS/Building
>         <http://docs.safehaus.org/display/APACHEDS/Building>
>
>         I think there is something sompler, but I don't know it.
>         Anybody on the list ?
>
>         However, if you have any pb, just push a mail. We will help
>         you as fast as we can.
>
>         btw, which kind of project are you working on, if it's not
>         secret ?
>
>         Emmanuel lécharny
>
>         On 8/23/06, *Craig L. Ching* < cching@mqsoftware.com
>         <mailto:cching@mqsoftware.com>> wrote:
>
>             Hi!
>
>             I realize this is the developer's list and that it's a bit
>             early for
>             ApacheDS, but I'm evaluating it for use in our
>             products.  I'm trying to
>             figure out how to extend the schema (I need to add a new
>             objectClass),
>             can anyone point me in the right direction?  I'm fine with
>             reading some
>             code to understand it.
>
>             Cheers,
>             Craig
>
>
>
>
>         -- 
>         Cordialement,
>         Emmanuel Lécharny
>
>


Mime
View raw message