Skip to content

Setting up your dev environment

Roland Praml edited this page May 14, 2015 · 4 revisions

Installing Maven

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!)

  1. Download Maven from http://maven.apache.org/download.cgi.
  2. Extract to e.g. C:\maven and read the README file!!. The installation guide is also online.
  3. 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 .
  4. If you do not already have the Java 1.7 JDK installed (1.8 JDK should work also):
  • 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.
  1. 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. (Roland: I'm not sure if this is neccessary)
  2. 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.
  3. Open a new command prompt (not a previously opened one) and test with mvn --version

Before you continue:

Ensure in a NEW command prompt that the following commands are working

  • java -version should report version 1.7.x or 1.8.x
  • echo %JAVA_HOME% must point to the JDK reported above (not JRE!)
  • mvn -version should report version 3.3.x

It is also a good idea to have a working GIT command:

  • git --version should report version 1.9.x

Installing ODA

You're now ready to install and build ODA. Download the git repository.

TODO: Write detailed download instructions (last openntf/master branch is not the correct one!)

You can download a working branch either by GIT:

  • git clone https://github.com/OpenNTF/org.openntf.domino.git
  • cd org.openntf.domino
  • git checkout paul_new

OR by download the following URL:

https://github.com/OpenNTF/org.openntf.domino/archive/paul_new.zip

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, ci-setup etc). Issue the command mvn clean install -Dskip.tests=true. This will download all required code, clean out any target content, and run a build. It will skip all unitTests, as these tests needs the server-binaries, which are licensed by IBM and will not be distibuted. You will find more details here: Configuring-JUnit

After some minutes, you should see a BUILD SUCCESS message on your screen. The resulting updatesite is located now in domino/updatesite/target/repository.

  • Point to this directory if you want to import this in your Domino-Designer.
  • Use the Import Feature in the UpdateSite.nsf to import the built feature. (If you get an LS2J error, you have to install the latest JVM Patch)

For future builds you can change into the domino/ folder and use the "core" or "xsp" profile by running mvn install -Pcore or mvn install -Pxsp instead. This will not build all modules, which will shorten the build time. 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.

Coding in Eclipse

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. You should also select [GroupId].[ArtifactId] as Name-template in the advanced section. (This will only work if there are no name clashes in your workspace, so you might have to remove all org.openntf.* projects before)

Important: When you import the project the first time, eclipse prompts up to install additional plugins.

Wait until wokspace build is completed. You see the progress in the lower right corner. Do not confirm this dialog while the workspace build is running. (you may stick in an endless loop) After confirming, follow the install instructions.

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.

(Recommended Eclipse version: http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/lunasr2)

Outstanding issues

org.openntf.domino.xsp still has dependency issues for graph, and on from there. Struggling to solve that at the moment