How to run apacheds as a windows service from source code checked out in eclipse

StackOverflow https://stackoverflow.com/questions/11108569

  •  15-06-2021
  •  | 
  •  

Question

I need help with apacheds server. I was trying to build apache ds and run it as a windows service from the code checked-out in my workspace. (I want to debug n see how the apacheds works). Following is the link - http://svn.apache.org/repos/asf/directory/apacheds/trunk-with-dependencies. After checkout, I used following commands before importing the project as an existing maven project into workspace, cd apacheds 1. mvn clean install -DskipTests 2. mvn eclipse:eclipse 3. mvn clean install -DskipTests

Now the problem is the documentation is a 'work in progress' on apacheds website and the directory structure differs a lot from the documented directory structure (e.g. under apacheds directory there are no such directories as 'bootstrap-extract', 'bootstrap-partition', 'bootstrap-plugin' etc. as the documentation suggests)

Following is the link to ApacheDS advanced user guide - http://svn.apache.org/repos/asf/directory/apacheds/trunk-with-dependencies

Under apacheds\service\src\main\java\org\apache\directory\server, there is a class UserjarMain. I tried running this class as 'Java Application' with path to target directory as an argument. It starts successfully but I cannot see any service running in windows services.

Please let me know what is the correct way to build it.

Thanks in advance.

Was it helpful?

Solution

I could figure out how to build apache ds from source code and run it. After importing the project as an 'existing maven project' into workspace, I ran the apacheds.bat file under apacheds\service folder with minor changes to the .bat file e.g. changing the name of the jar file to the one in target directory, changing command from cp to copy and enclosing %cd%\target\instance in quotes.

Alternatively, one could run the UberjarMain.java class with argument .\target\instance and the service should start running.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top