-
Notifications
You must be signed in to change notification settings - Fork 35
Setting up your dev environment
The easiest way to work with the new Mavenized ODA is to install Maven. I resisted for as long as possible, but it's really the easiest way to initially build everything rather than using Eclipse's shims. The following steps are for Windows (hopefully someone can add any amendments for other operating systems!)
- Download Maven from http://maven.apache.org/download.cgi.
- Extract to e.g. C:\maven and read the README file!!. The installation guide is also online.
- Maven requires at least Java 1.7 JDK to run. To check the version of Java, open a command prompt and issue the command "java -version".
- If you do not already have the Java 1.7 JDK installed:
- Download from Oracle download site.
- Install to e.g. C:\Java (some programs have problems accessing the JDK if there are spaces in the filepath, so this is probably best.)
- In a new command prompt (not the same one you used earlier), test with "java -version" again.
- Then in the command prompt, check the JAVA_HOME variable with "echo %JAVA_HOME%". If the JAVA_HOME environment variable needs setting, click on the Start menu and type "env" and the programs will filter to allow you to go to the environment variables. Add it as a user environment variable, mapping to the JDK folder, e.g. C:\Java\jdk1.7.0_67.
- Domino will be compiling against 1.6, so you will probably also need to download and install Java 1.6 JDK from Oracle archived download site. Install to C:\Java again.
- Access the environment variables (click on Start menu and type "env" and the programs will filter to allow you to go to the environment variables) and amend the PATH user variable. Add the path to the bin folder of the extracted Maven files, e.g. C:\Maven\apache-maven-3.3.3\bin.
- Open a new command prompt (not a previously opened one) and test with "mvn --version".
You're now ready to install and build ODA. Download the git repository. Note: you will not have the full structure required for Eclipse, hence the use of Maven from command line.
In a command line prompt, navigate to the top level of the repository (containing folders domino, thirdparty, demoDb etc). Issue the command "mvn clean install". This will download all required code, clean out any target content, and run a build. For future builds you can use "mvn package" instead. For more help, see Maven in 5 minutes - it won't help you code pom.xml files really, but will give you enough to feel comfortable from the command line.
Now you're ready to get the projects into Eclipse. Right-click and choose Import..., then select Existing Maven Projects. Navigate to the top-level folder. Choose all the projects. Because of inter-relationships, you cannot choose a name template in the Advanced area, so best to use a separate working set.
Note, at the moment there will be build errors - it cannot find anything to handle "Execution prepare" in ci plugins and cannot find anything to handle e.g. "Execution com.ibm.commons" etc. in thirdparty.
Also, you will see errors in various plugins for "Conflicting lifecycle mapping metadata (project packaging type=bundle)". But the plugins will still be selected for your OSGi Framework Configuration - if you're using that remember to go to it and remember to click Debug to launch the new configuration.
Eclipse is not picking up org.openntf.formula for the OSGi Configuration for some reason. Still trying to track down why.