Compile Project - MartinUndDerWolf/rncbi GitHub Wiki

Table of Contents

Checkout

To check out the project see the source section of the project.

Preparation

To compile the source files of the java part, it is necessary to get some libraries and include them into the build path. This is simply done by downloading them and copying to the right destination. # First download the Axis2 libraries from Apache Axis2 site. # The *Standard Binary Distribution* is sufficient for our needs. Save it somewhere and extract it. # Inside the just created Axis2 directory exists a *lib* directory. The content of this directory needs to be copied to the _R-Source/inst/java_ directory of the svn checkout. See the [CompileProject#Optimization] for some optimization. # After that we also need the JUnit library from JUnit Home. # Save the JUnit jar file in the _junit-libs_ directory. # Be sure to have the *EFetch* jar files contained in the EFetch directory.

Compilation

For each version of the RNCBI package a separate directory inside the "trunk" directory exists. Each directory contains a _build.xml_ and a _javadoc.xml_. The _build.xml_ is a ant task file, which can be run by calling ant inside the directory of the build file.
Or call ant with the build file as argument

This creates an _RInterface.jar_ file, which is necessary for the R package.

In addition to the normal compilation, a junit test can be invoked by calling the target "withjunit" of the build file

But be careful, as this might take a while.
After the junit test has been completed successfully a report can be found in the _build_RInterface_ directory.

The last step is to copy the created jar files (NCBIStub.jar and RInterface.jar) and all jars from the EFetch directory into the _R-Source/inst/java_ directory.

Create the R Package

To create the R package the development tools are required. On unix systems these tools are included in the standard R installation, for other operating systems see your preferred web search engine. The directory structure of the svn checkout is already the one we need to create an R package. So we simply do:

The last step creates a tar.gz file which contains the package. This file can be installed with the

command.

Optimization

As not all libraries from the Apache Axis2 framework are required to communicate with the webservice,
we can remove some of them from the _R-Source/inst/java_ directory.



`*` means every character possible.

⚠️ **GitHub.com Fallback** ⚠️