Managing Custom Code Solutions

Within a Custom Code Solution there is no possibility of modeling. In order to get started with the implementation you have to make sure that the prerequisites are meet and proceed the following steps.

Prerequisits

Java SDK

A java 8 SDK is needed to develop Custom Implementation Java based solutions.

Please download either the Oracle 8 JDK from https://www.oracle.com/technetwork/java/javaee/downloads/index.html or the Open JDK from https://openjdk.java.net/ and follow the installation instructions of the JDK.

Maven

Maven Version >=3.6.1 is required to develop Custom Implementation Java based solutions.

Please download and install maven from https://maven.apache.org

Eclipse

You can develop Custom Implementation Java based solutions in the IDE of your choice.

We recommend using eclipse in the latest version which can be downloaded from: https://www.eclipse.org/downloads/

Eclipse Plugins

We recommend installing the following Eclipse Plugins and utilities

Download dependencies for development of java solutions

In order to build and run custom java solutions, some Solution Envoy dependencies are required that come with many already configured tools

Open the Solution Envoy dashboard (example). Navigate to Infrastructure tab, click and download all the dependencies listed under
Maven Dependencies

Running/building custom java solutions using the dependencies

Create custom implementation solution

Open Solution Designer and create new solution via clicking on Create button, fill the solution specific details but from Type drop-down make sure to select Custom Implementation Solution and Implementation Language as Java

Clone git project to the system

In order to build and run the solution, the git project should be cloned to user's workspace. In order to checkout a Custom Code Solution open the Solution after the creation and navigate to GIT tab and copy the Git Source Repository URI.

Alter the URL and add the git user so it looks like the following:

Before:

https://auto-devops-url/managed-solutions/SOLJAVA.git

After:

https://git@auto-devops-url/managed-solutions/SOLJAVA.git

Open a Terminal and clone the solution. You will be prompted for a password. Please use your personal access token as password:

git clone https://git@auto-devops-url/managed-solutions/SOLJAVA.git

Remember: In order to be able to interact with the git repository you have to create an access token for your user first. To create a new access token for you perform the following steps:
  • Open Gitlab Navigate to your user profile
  • Select “access tokens” in the navigation bar
  • Give it a name (e.g. dev-token)
  • Select “api” and “read_registry”
  • Klick “create personal access token”
  • Store the generated token on a secure place

Remove URM configuration (if exists)

If there is any nexus configuration in-place for the workspace, where the solution has been cloned then that must be removed, because maven try to find the dependencies mentioned in the solution from the nexus configured. As custom implementation solutions are independent of any such configurations.

For Eclipse IDE, navigate to tab Window -> Preferences -> Maven -> User Settings. Remove the settings.xml file from user Settings and also remove the local repository directory (via deleting or renaming the directory).

Install dependencies

Dependencies downloaded earlier are required to install in the workspace, here is an example how they can be installed via maven.

mvn install:install-file -Dfile=cp-framework-sdk-autoconfiguration-1.0.53065.jar -DpomFile=cp-framework-sdk-autoconfiguration-1.0.53065.pom