Developing Java components using Eclipse


xpresso.ai supports Java components, but only those of type “job” and “service”. To code these components, follow the steps below:

  1. Your solution will have a skeleton code structure already created in bitbucket. Clone your solution using “git clone”

  2. Since xpresso.ai does not have specific Java libraries for components, there is no special setup required for Eclipse, and nor are there any special settings required for unit testing

  3. Develop your code in Eclipse. You will notice that each component has its own individual pom.xml file. These must be combined into a single pom.xml file.

  4. Tip for testing file storage locally - create a folder by the same name as your mount path on your local system. Your components will read from and write files to this folder when run locally. For example, if you expect your shared drive to be mounted to “/data”, make sure you have a folder called “/data” on your development machine (on Windows, this would be “C:/data”, or “D:/data”, depending on the drive you’re running the program from). You should then use this folder in the same way that you expect the mounted drive to be used. For example, if you expect that a pipeline will pick up a source file from this folder, you can copy the data file to the appropriate local folder, and run the pipeline to test it. Similarly, files output by the pipeline should also be present on this folder

  5. When your code has been tested successfully, you can commit and push the code into the code repository using appropriate Git commands

What do you want to do next?