Using Maven with the IBM App Connect Enterprise Toolkit
Use Maven to extend the capability of an integration project by enabling the inclusion of dependencies.
Before you begin
- Install and configure Maven. For more information, see https://maven.apache.org/.
- Create an application, for example, myMavenApp. For more information, see Creating an application.
- Create a message flow that includes a Compute node and add the message flow to your application. For more information, see Creating a message flow and Compute node.
About this task
You can use Maven with a Test project or a Java project. JavaCompute node projects are not supported by Maven.
Procedure
Activate Maven support by completing the following steps:
Results
Your integration project is enabled for Maven support.
What to do next
- Right-click your integration
project and select . If you configured Maven
correctly, the test passes and information about the gson
xstream objects is displayed on the console:
mqsicreateworkdir: Copying sample server.config.yaml to work directory 1 file(s) copied. Successful command completion. BIP8071I: Successful command completion. 2021-03-22 11:15:03.845585: BIP1990I: Integration server 'eclipse-work' starting initialization; version '12.0.0.0' (64-bit) 2021-03-22 11:15:03.868357: BIP9905I: Initializing resource managers. 2021-03-22 11:15:10.820028: BIP9906I: Reading deployed resources. 2021-03-22 11:15:10.838867: BIP9907I: Initializing deployed resources. 2021-03-22 11:15:10.842195: BIP2155I: About to 'Initialize' the deployed resource 'myMavenApp' of type 'Application'. 2021-03-22 11:15:11.067367: BIP2155I: About to 'Start' the deployed resource 'myMavenApp' of type 'Application'. 2021-03-22 11:15:12.355600: BIP2866I: IBM App Connect Enterprise administration security is inactive. 2021-03-22 11:15:12.372063: BIP3132I: The HTTP Listener has started listening on port '7600' for 'RestAdmin http' connections. 2021-03-22 11:15:12.395 1 this class com.ibm.broker.plugin.MbNonDelegatingJavaResourceClassLoader@3fd9ed70 2021-03-22 11:15:12.395 1 Attempting Eclipse junit run with args |none -version 3 -port 51241 -testLoaderClass org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader -loaderpluginname org.eclipse.jdt.junit5.runtime -packageNameFile C:\Users\PAULLacy\AppData\Local\Temp\packageNames4957729711074078084.txt | 2021-03-22 11:15:12.596 1 runnerClass class org.eclipse.jdt.internal.junit.runner.RemoteTestRunner 2021-03-22 11:15:12.596 1 runnerMainMethod public static void org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(Java.lang.String[]) 2021-03-22 11:15:13.322 1 My Gson object is {serializeNulls:false,factories:[Factory[typeHierarchy=com.google.gson.JsonElement,adapter=com.google.gson.internal.bind.TypeAdapters$29@44d58599], com.google.gson.internal.bind.ObjectTypeAdapter$1@2d8bc790, com.google.gson.internal.Excluder@265a59b8, .......... 2021-03-22 11:15:13.674 1 xtream object is com.thoughtworks.xstream.XStream@8a4bee3b
- Open the generated bar file called myMavenApp_Testproject.generated.bar in the BAR file editor where you can see the two dependencies that you added plus three dependencies that are needed by xstream. For more information, see BAR file editor.