BaSyx / Download / Java Setup
How to build the BaSyx Java SDK
The BaSyx Java SDK is using Maven to generate and control its building process.
This article will detail on how to set up the Java SDK from a new checkout.
The BaSyx Java SDK requires the following dependencies to successfully build:
- Java™ SE Development Kit 8, Update 152 (JDK 8u152 or higher)
To check out BaSyx, you also need a GIT installation. No Eclipse GIT plugin is required as we can do the checkout by using GIT only from the command line. If you want to checkout using Eclipse, you need the EGit plugin and also the Maven SCM Handler for EGit (more on that below).
- Check out BaSyx from the command line with "git clone https://git.eclipse.org/r/basyx/basyx"
- Start Eclipse and import the projects as maven projects (File -> Import -> Maven -> Existing Maven Projects -> Browse to the BaSyx directory)
- Select (at least) the following Projects and click "Finish":
The Maven projects should be automatically set up in Eclipse. You can always update the project settings using the Maven plugin (Right Click -> Maven -> Update Project).
All dependencies for maven projects are specified in the project's pom.xml. When building the project using maven, these dependencies will be automatically taken from the local maven repository (default: C:/User/username/.m2/repository) and downloaded from the remote repository if it is not available locally.
The imported projects (sdk, components and examples) depend on each other as shown below:
This means basyx.components depends on basyx.sdk and basyx.examples depends on the two other projects. So if you make changes in e.g. basyx.sdk, you need to "install" it to the local repository using Maven before building components that depend on it.
- Make sure that each project has a JDK selected as JRE System Library
- Window -> Preferences -> Java -> Installed JREs -> Enable the JDK
- -> Execution Environments -> JavaSE-1.8 -> Enable the JDK in the list of compatible JREs
- Install basyx.sdk
- Right click -> Run As -> Maven install
- Maven will download all required dependencies, run the tests and build and install the project into the local Maven repository
- You can ignore errors in the output coming from testing exceptions in unit tests
- If successful, you will see the message: [INFO] BUILD SUCCESS
- Prepare the components as described in Setting up the Components project
- Install basyx.components and basyx.examples
After installation build outputs are placed in the /target folder and installed in the local Maven repository.
The basyx.examples project is a good starting point that shows how the SDK can be included and used by another project. Also look at basyx.components to get a description about how to set up and use components that are built on the basyx.sdk. There is also an article about how to contribute to the open source code.