You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@directory.apache.org by Ga...@gmx.de on 2012/06/08 23:38:04 UTC

[ApacheDS] How to setup a debugging environment

In order to broaden my understanding I want to connect Eclipse to a running instance of ApacheDS 2.0M7. I retrieved the sources for M7 from the svn repository but failed in combining them.
I do NOT want to build ApacheDS, my only intention is to make all the subprojects known to Eclipse to allow it to remotely debug ApacheDS. I want to connect to a running instance and use the debugger to trace what's going one in partitions.

Can you explain me how to setup a debugging or if necessary a build environment in Eclipse ?

-- 
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!                                  
Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a

Re: [ApacheDS] How to setup a debugging environment

Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 6/11/12 11:58 AM, Garbage a écrit :
>>> Is this an error on my side is something wrong with the files I downloaded ?
>> You can't run eclipse eclipse before having built the project at least once : the SNAPSHOTs aren't stored into the maven repository.
>>
>> Just run mvn clean install -DskpiTests first, then re-run mvn eclipse:eclipse
> So i obviously got the order wrong. Now I succeeded with these commands. I set maven opts to the mentioned xmx setting and had to add a maxpermsize parameter, but this might be because of the buggy jdk I had installed (updated afterwards):
>
> C:
> cd \workspaces
> md apacheds
> cd apacheds
> svn co http://svn.apache.org/repos/asf/directory/apacheds/trunk-with-dependencies
> cd trunk-with-dependencies
> mvn clean install -DskipTests
> (Results can be found in trunk-with-dependencies\apacheds\all\target and trunk-with-dependencies\apacheds\service\target)
> mvn eclipse:eclipse
> Then went to eclipse and chose "File / Import / General / Existing Projects into Workspace". For root directory I chose C:\workspaces\apacheds\trunk-with-dependencies
>
>   Now I have a snapshot M8, can I do the same for M7 ?

yes, of course. M7 is available in a tag : 
http://svn.apache.org/viewvc/directory/apacheds/tags/2.0.0-M7/

You just have to build apacheds in this case, as M7 is depending on 
released components of Shared, so just build the server with mvn 
eclipse:eclipse, it should be enough (the dependencies are all in the 
maven repository)



-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com


Re: [ApacheDS] How to setup a debugging environment

Posted by Garbage <ga...@gmx.de>.
>> Is this an error on my side is something wrong with the files I downloaded ?
> You can't run eclipse eclipse before having built the project at least once : the SNAPSHOTs aren't stored into the maven repository.
> 
> Just run mvn clean install -DskpiTests first, then re-run mvn eclipse:eclipse

So i obviously got the order wrong. Now I succeeded with these commands. I set maven opts to the mentioned xmx setting and had to add a maxpermsize parameter, but this might be because of the buggy jdk I had installed (updated afterwards):

C:
cd \workspaces
md apacheds
cd apacheds
svn co http://svn.apache.org/repos/asf/directory/apacheds/trunk-with-dependencies
cd trunk-with-dependencies
mvn clean install -DskipTests
(Results can be found in trunk-with-dependencies\apacheds\all\target and trunk-with-dependencies\apacheds\service\target)
mvn eclipse:eclipse
Then went to eclipse and chose "File / Import / General / Existing Projects into Workspace". For root directory I chose C:\workspaces\apacheds\trunk-with-dependencies
 
 Now I have a snapshot M8, can I do the same for M7 ?
 

Re: [ApacheDS] How to setup a debugging environment

Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 6/10/12 10:39 PM, Oliver Geishuettner a écrit :
>>> I have no maven infrastructure yet so I will start from scratch. Is it
>> ok to use version 3 ?
>>
>> Yes, this is the version we use (3.0.4). Be sure to setup some options
>> (MAVEN_OPTS=-Xmx512m) in your environment to be able to run all the tests.
>>
>> If you check out a version, just use
>> http://svn.apache.org/repos/asf/directory/apacheds/trunk-with-dependencies.
>> It will get all the sub-projects. Some of those sub-projects are side
>> projects, you may want to comment them in the main pom.xml :
>>
>>     <modules>
>>       <module>project</module>
>>       <module>checkstyle-configuration</module>     : You can comment this
>> project
>>       <module>junit-addons</module>
>>       <module>shared</module>
>>       <module>apacheds</module>
>>       <module>apacheds-manuals</module>             : You can comment this
>> project
>>       <!-- module>kerberos-client</module -->
>>     </modules>
>
> I did this:
> md \temp\apacheds
> svn co http://svn.apache.org/repos/asf/directory/apacheds/trunk-with-dependencies
> cd trunk-with-dependencies
> mvn eclipse:eclipse
>
>
>
> and receive this error message:
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-remote-resources-p
> lugin:1.2.1:process (default) on project shared-ldap-client-api: Failed to resol
> ve dependencies for one or more projects in the reactor. Reason: Missing:
> [ERROR] ----------
> [ERROR] 1) org.apache.directory.shared:shared-ldap-schema-data:jar:1.0.0-M13-SNA
> PSHOT
>
> Is this an error on my side is something wrong with the files I downloaded ?
You can't run eclipse eclipse before having built the project at least 
once : the SNAPSHOTs aren't stored into the maven repository.

Just run mvn clean install -DskpiTests first, then re-run mvn 
eclipse:eclipse

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com


Re: [ApacheDS] How to setup a debugging environment

Posted by Oliver Geishuettner <Ga...@gmx.de>.
> > I have no maven infrastructure yet so I will start from scratch. Is it
> ok to use version 3 ?
> 
> Yes, this is the version we use (3.0.4). Be sure to setup some options 
> (MAVEN_OPTS=-Xmx512m) in your environment to be able to run all the tests.
> 
> If you check out a version, just use 
> http://svn.apache.org/repos/asf/directory/apacheds/trunk-with-dependencies.
> It will get all the sub-projects. Some of those sub-projects are side 
> projects, you may want to comment them in the main pom.xml :
> 
>    <modules>
>      <module>project</module>
>      <module>checkstyle-configuration</module>    : You can comment this
> project
>      <module>junit-addons</module>
>      <module>shared</module>
>      <module>apacheds</module>
>      <module>apacheds-manuals</module>            : You can comment this
> project
>      <!-- module>kerberos-client</module -->
>    </modules>
 
I did this:
md \temp\apacheds
svn co http://svn.apache.org/repos/asf/directory/apacheds/trunk-with-dependencies
cd trunk-with-dependencies
mvn eclipse:eclipse



and receive this error message:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-remote-resources-p
lugin:1.2.1:process (default) on project shared-ldap-client-api: Failed to resol
ve dependencies for one or more projects in the reactor. Reason: Missing:
[ERROR] ----------
[ERROR] 1) org.apache.directory.shared:shared-ldap-schema-data:jar:1.0.0-M13-SNA
PSHOT

Is this an error on my side is something wrong with the files I downloaded ?
-- 
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!                                  
Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a

Re: [ApacheDS] How to setup a debugging environment

Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 6/10/12 2:45 PM, Garbage a écrit :
> Am 09.06.2012 um 00:03 schrieb Emmanuel Lécharny<el...@gmail.com>:
>
>> Le 6/8/12 11:38 PM, Garbage@gmx.de a écrit :
>>> In order to broaden my understanding I want to connect Eclipse to a running instance of ApacheDS 2.0M7. I retrieved the sources for M7 from the svn repository but failed in combining them.
>>> I do NOT want to build ApacheDS, my only intention is to make all the subprojects known to Eclipse to allow it to remotely debug ApacheDS. I want to connect to a running instance and use the debugger to trace what's going one in partitions.
>>>
>>> Can you explain me how to setup a debugging or if necessary a build environment in Eclipse ?
>>>
>> You can run 'mvn eclipse:eclipse' to produce all the .classpath and .projects for Ads. I'm afraid you have to first build the project itself, which takes quite some time, unless you run 'mvn clean install -DskipTests' to avoir running the tests.
> I have no maven infrastructure yet so I will start from scratch. Is it ok to use version 3 ?

Yes, this is the version we use (3.0.4). Be sure to setup some options 
(MAVEN_OPTS=-Xmx512m) in your environment to be able to run all the tests.

If you check out a version, just use 
http://svn.apache.org/repos/asf/directory/apacheds/trunk-with-dependencies. 
It will get all the sub-projects. Some of those sub-projects are side 
projects, you may want to comment them in the main pom.xml :

   <modules>
     <module>project</module>
     <module>checkstyle-configuration</module>    : You can comment this project
     <module>junit-addons</module>
     <module>shared</module>
     <module>apacheds</module>
     <module>apacheds-manuals</module>            : You can comment this project
     <!-- module>kerberos-client</module -->
   </modules>



-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com


Re: [ApacheDS] How to setup a debugging environment

Posted by Garbage <ga...@gmx.de>.
Am 09.06.2012 um 00:03 schrieb Emmanuel Lécharny <el...@gmail.com>:

> Le 6/8/12 11:38 PM, Garbage@gmx.de a écrit :
>> In order to broaden my understanding I want to connect Eclipse to a running instance of ApacheDS 2.0M7. I retrieved the sources for M7 from the svn repository but failed in combining them.
>> I do NOT want to build ApacheDS, my only intention is to make all the subprojects known to Eclipse to allow it to remotely debug ApacheDS. I want to connect to a running instance and use the debugger to trace what's going one in partitions.
>> 
>> Can you explain me how to setup a debugging or if necessary a build environment in Eclipse ?
>> 
> You can run 'mvn eclipse:eclipse' to produce all the .classpath and .projects for Ads. I'm afraid you have to first build the project itself, which takes quite some time, unless you run 'mvn clean install -DskipTests' to avoir running the tests.

I have no maven infrastructure yet so I will start from scratch. Is it ok to use version 3 ?


Re: [ApacheDS] How to setup a debugging environment

Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 6/8/12 11:38 PM, Garbage@gmx.de a écrit :
> In order to broaden my understanding I want to connect Eclipse to a running instance of ApacheDS 2.0M7. I retrieved the sources for M7 from the svn repository but failed in combining them.
> I do NOT want to build ApacheDS, my only intention is to make all the subprojects known to Eclipse to allow it to remotely debug ApacheDS. I want to connect to a running instance and use the debugger to trace what's going one in partitions.
>
> Can you explain me how to setup a debugging or if necessary a build environment in Eclipse ?
>
You can run 'mvn eclipse:eclipse' to produce all the .classpath and 
.projects for Ads. I'm afraid you have to first build the project 
itself, which takes quite some time, unless you run 'mvn clean install 
-DskipTests' to avoir running the tests.



-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com