The Middleware API is a library that is used to provide access to Integrated Breeding Program Databases. It consists of managers corresponding to different systems including Genealogy Management System, Data Management System, Genotypic Data Management System, Germplasm List Management and Seed Inventory Management System.
The library is used by different projects such as the IB Workflow System, List Manager, Fieldbook, GDMS, etc.
To build the Middleware API, run the following command in the IBPMiddleware directory:
mvn clean install
To build using a specific configuration, run the following:
mvn clean install -DenvConfig=dev-config-dir
The directory with specific configuration properties must be placed in /pipeline/config/dev-config-dir. Copy the files from an existing config directory (e.g. /pipeline/config/ci) and modify to match your local environment.
To build using Eclipse, right-click on the IBPMiddleware project, select Run As --> Maven build..., then input any of the following:
clean install
clean install -DenvConfig=dev-config-dir
To run JUnit tests using the command line, issue the following commands in the IBPMiddleware directory:
- To run all tests:
mvn clean test
- To run a specific test class:
mvn clean test -Dtest=TestClassName
- To run a specific test function:
mvn clean test -Dtest=TestClassName#testFunctionName
You need to specify the IBDB database to connect to in the test.properties file.
All JUnit test suites require the rice database, except for GenotypicDataManager that uses the groundnut crop in testing.
Similar to building the Middleware, add the -DenvConfig parameter to use a specific configuration.
To run JUnit tests using Eclipse, right-click on the specific JUnit test suite in the IBPMiddleware project, select Run As --> JUnit test.
To add Middleware as a dependency to your project using Apache Maven, add the following to the list of dependencies in your POM file:
For the released version, add the following to your list of dependencies in your POM file:
<dependency> <groupId>org.generationcp</groupId> <artifactId>middleware</artifactId> <version>2.1.0-RELEASE</version> </dependency>
Take note of the version. Use of the latest version is recommended.
The Middleware is deployed at the Maven Repository hosted on gcp.efficio.us.com. To use the repository, add the following to your POM file:
<repositories>
<repository>
<id>gcp-efficio-repo</id>
<url>http://gcp.efficio.us.com:8081/nexus/content/repositories/releases/</url>
</repository>
</repositories>
For the development version, add the following to your POM:
<dependency> <groupId>org.generationcp</groupId> <artifactId>middleware</artifactId> <version>2.1.0-SNAPSHOT</version> </dependency>
<repositories>
<repository>
<id>gcp-efficio-repo</id>
<url>http://gcp.efficio.us.com:8081/nexus/content/repositories/snapshots/</url>
</repository>
</repositories>
If you prefer to download the jar file instead, you may get it from http://gcp.efficio.us.com:8081/nexus/content/repositories/snapshots/org/generationcp/middleware/2.1.0-SNAPSHOT/
The Java API documentation of Middleware can be found here:
http://gcp.efficio.us.com:8080/gcpdocs/
The project is stored in the GIT repository hosted at github.com. The URL for the repository is:
https://github.com/digitalabs/IBPMiddleware
An anonymous account may be used to checkout the project.
No username and password is required. You can also browse the content of the repository using the same URL.