Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

IIB (v9 & v10) Continuous Integration-Maven-Jenkins

Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

IIB (v9 & v10) Continuous Integration-Maven-Jenkins

29
Anand.Awasthi
Published on December 3, 2018 / Updated on November 18, 2019

In this article I will explain how to build an IIB (IBM Integration Bus v9 & v10) project and deploy the bar file to target Integration Server
using Maven and Jenkins. Here I will take a basic scenario and will explain all the steps. You should be able to use this information to build
the CI infrastructure for IIB in your enterprise.

Scenario
Build IIB (v9 & v10) projects
Create BAR file with all referenced libraries/projects/jars
Overwrite BAR file Node properties and User Defined Properties using Properties file
Deploy this BAR file on target Integration Server

Environment
IIB v9, v10
Maven 3.3.3
Jenkins 1.632
IIB-Maven-Plugin (from GitHub)
Maven Eclipse Plugin (m2e) v1.4.1
TFS (Team Foundation Server) 2012

Operating System
Windows 7

Step 1: Install IIB v9 or v10 runtime and Toolkit.


Make sure that IIB v9 or v10 runtime and Toolkit are installed on your Build server. I assume this is already in place.

Step 2: Install Maven 3.3.3 or latest version.


I have used version 3.3.3 here. If you are new to Maven, don’t worry. It’s a very simple installation. Below are the steps to do it:

Download Maven 3.3.3 Binary Zip archive from https://maven.apache.org/download.cgi

Extract distribution archive in any directory

Ensure JAVA_HOME environment variable is set and points to your JDK installation

Add the bin directory of the created directory apache-maven-3.3.3 to the PATH environment variable
Confirm with mvn -v in a new shell. The result should look similar to;

Optionally you can change the local repository location in maven settings.xml . You can find settings.xml in ‘conf’ directory inside your
maven installation directory.

Step 3: Install IIB-Maven-Plugin.


Below is v9 plugin source code:

v9 plugin

Below is v10 plugin source code:


v10 plugin

After you download this plugin, unzip the file in any directory. You can install this plugin in the central repository of your enterprise. Here we
will install it locally.
Open command prompt and go to the directory where you extracted it. Navigate to the directory where POM file is present and run the
command “mvn clean install”

This will install the iib-maven-plugin in your local repository. If installed successfully, you will see the ‘BUILD SUCCESS’ message as below:

Step 4: Convert IIB Project to Maven Project.


IIB projects are nothing but Eclipse projects. You can convert them to maven project using command line or you can use m2e plugin to use
IIB toolkit for project conversion. We will use here m2e plugin. Follow below steps to install m2e plugin on your IIB toolkit:

Go to Help –> Install New Software

If not already there, add the site http://download.eclipse.org/technology/m2e/releases

Make sure you uncheck the check-box ‘Show only the latest versions of software available’. Install m2e-Maven Integration for Eclipse
1.4.1 and m2e-slf4j over logback logging v1.4.1
Complete the installation and restart IIB toolkit.

Now change settings in your toolkit to refer to custom maven installation instead of Embedded installation. Go to Window–
>Preferences–>Maven–>Installations. Add the maven installation directory.

Now checkout the IIB project into your IIB toolkit. Right click on the project –> Configure –> Convert to Maven project.
Provide the groupId, artifcatId and Version and select packaging as ‘pom’.
Click on Finish.

Now we need to make configurations in POM file. Here I have put central repository info in POM; ideally we should put it in settings.xml.
Below is a complete sample POM for the project I created:
Sample POM (also added as an attachment)

Note that I have changed packaging to ‘iib-bar’.

<groupId>com.endur.esb.dummy</groupId>
<artifactId>GeniusStatus_Dummy_App</artifactId>
<version>1.0</version>
<packaging>iib-bar</packaging>

You can update the central repository info or remove it. By default it will go to internet.

Now look at the Configuration block.


toolkitInstallDir: Path of the IIB toolkit installation directory
barName: Absolute path for bar file
workspace: Absolute path for workspace
versionString: Will be appended to Application name in bar file
cleanBuild: default value is ‘true’
deployAsSource: default value is ‘true’
esql21: default value is false. If you are compiling mqsi2.1 esql file then it should be set to true.
applicationName: Name of applications to be included in bar file separated by space
configPropFileDirectory: Absolute path for properties file to override bar file (UDPs and Node properties)
defaultPropertiesFile: Absolute path for properties file where the plugin dumps all the properties for internal use
debugWorkspace: Make this ‘true’

Keep the other settings the same as that of in the sample POM.
Now your IIB Maven project is ready to compile. Make sure that the referenced projects are present in ‘workspace’.

Step 5: Setup Jenkins.


Now let us setup Jenkins and trigger IIB Build from Jenkins.
You can just download the Jenkins WAR and use it with Tomcat or any other server. Here I will use Windows installer and setup Jenkins as
Windows service.
Download the Windows installer from below url:

http://jenkins-ci.org/content/thank-you-downloading-windows-installer

The installation is straightforward. Once installation is complete, you can access Jenkins using below url:
http://localhost:8080
You can do access configuration in Jenkins using LDAP or AD server or local access setup. This part is not in scope of this article. We can
continue without doing this access setup.

Go to ‘Manage Jenkins’ –> Configure System

Set the Maven Configuration.


Give the path to settings.xml

Save it and exit.

Step 6: Setup Jenkins job to build and deploy IIB bar.

Click on ‘New Item’ and give name to item. Select the check-box ‘maven-project’ and click ‘Ok’

Now the Configuration page is open. We need to provide the configuration here. Please note that here I am setting to check-out only
main project from TFS assuming that previous jobs will do a ‘checkout only’ of referenced projects in workspace. Provide the project
paths and credential to checkout from TFS:
Select the appropriate Build Trigger.

Provide the absolute path for ROOT POM of the project.

Set the Goals and Options

Set the deployment command or batch file having deployment command.


Save the configuration.

You can do all other additional configurations as per your requirement.


Now you are all set to trigger your build.

I triggered the jenkins job and it built the bar file, overridden a node property using properties file and deployed this new bar file to target
integration server. Attached is the sample properties files:
Sample Properties File (also added as an attachment)

The output of the build.


Getting version ‘C89878’ to ‘C:\Anand\jenkins\workspace\GeniusStatus_Dummy_App’…
Finished getting version ‘C89878’.
Parsing POMs
Established TCP socket on 52558
[GeniusStatus_Dummy_App] $ “C:\Program Files\Java\jdk1.7.0_79/bin/java” -Xms1024m -Xmx4096m -XX:PermSize=1024m -cp
“C:\Program Files (x86)\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven32-agent-1.7.jar;C:\Anand\DevOps\apache-maven-
3.3.3\boot\plexus-classworlds-2.5.2.jar;C:\Anand\DevOps\apache-maven-3.3.3/conf/logging” jenkins.maven3.agent.Maven32Main
C:\Anand\DevOps\apache-maven-3.3.3 “C:\Program Files (x86)\Jenkins\war\WEB-INF\lib\remoting-2.52.jar” “C:\Program Files
(x86)\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven32-interceptor-1.7.jar” “C:\Program Files (x86)\Jenkins\plugins\maven-
plugin\WEB-INF\lib\maven3-interceptor-commons-1.7.jar” 52558
<===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven: -B -f C:\Anand\SourceCode\EA.Integration\ClaimsFeedService\GeniusStatus_Dummy_App\pom.xml -s
C:\Anand\DevOps\apache-maven-3.3.3\conf\settings.xml -gs C:\Anand\DevOps\apache-maven-3.3.3\conf\settings.xml clean package
[INFO] Scanning for projects…
[INFO]
[INFO] ————————————————————————
[INFO] Building GeniusStatusDummy 1.0
[INFO] ————————————————————————
[INFO]
[INFO] — maven-clean-plugin:2.5:clean (default-clean) @ GeniusStatus_Dummy_App —
[INFO] Deleting C:\Anand\SourceCode\EA.Integration\ClaimsFeedService\GeniusStatus_Dummy_App\target
[INFO]
[INFO] — iib-maven-plugin:2.1-SNAPSHOT:prepare-bar-build-workspace (default-prepare-bar-build-workspace) @
GeniusStatus_Dummy_App —
[INFO]
[INFO] — iib-maven-plugin:2.1-SNAPSHOT:validate-bar-build-workspace (default-validate-bar-build-workspace) @
GeniusStatus_Dummy_App —
[INFO]
[INFO] — iib-maven-plugin:2.1-SNAPSHOT:create-bar (default-create-bar) @ GeniusStatus_Dummy_App —
[INFO] Creating bar file: C:\Anand\SourceCode\EA.Integration\ClaimsFeedService\GeniusStatus_Dummy_App\target\iib\GeniusDummy.bar
[INFO] executeMqsiCreateBar command: “C:\Program Files (x86)\IBM\IntegrationToolkit90\mqsicreatebar” -data
C:\Anand\jenkins\workspace -b
C:\Anand\SourceCode\EA.Integration\ClaimsFeedService\GeniusStatus_Dummy_App\target\iib\GeniusDummy.bar -cleanBuild -version
1.0 -a GeniusStatus_Dummy_App -deployAsSource -trace -v
C:\Anand\SourceCode\EA.Integration\ClaimsFeedService\GeniusStatus_Dummy_App\target\createbartrace.txt
[INFO]
[INFO] C:\Anand\jenkins\workspace>”C:\Program Files (x86)\IBM\IntegrationToolkit90\mqsicreatebar” -data C:\Anand\jenkins\workspace
-b C:\Anand\SourceCode\EA.Integration\ClaimsFeedService\GeniusStatus_Dummy_App\target\iib\GeniusDummy.bar -cleanBuild -version
1.0 -a GeniusStatus_Dummy_App -deployAsSource -trace -v
C:\Anand\SourceCode\EA.Integration\ClaimsFeedService\GeniusStatus_Dummy_App\target\createbartrace.txt
[INFO] Command log file is set to:
C:\Anand\SourceCode\EA.Integration\ClaimsFeedService\GeniusStatus_Dummy_App\target\createbartrace.txt
[INFO] BIP0986I Command completed successfully.
[INFO]
[INFO]
[INFO]
[INFO]
[INFO] Classloaders are not in use. The following jars will be removed from the bar file: **/javacompute_**.jar,**/jplugin2_**.jar
[INFO]
[INFO] — iib-maven-plugin:2.1-SNAPSHOT:validate-configurable-properties (default-validate-configurable-properties) @
GeniusStatus_Dummy_App —

[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!

[INFO] skip non existing resourceDirectory


C:\Anand\SourceCode\EA.Integration\ClaimsFeedService\GeniusStatus_Dummy_App\src\main\resources
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!

[INFO] skip non existing resourceDirectory


C:\Anand\SourceCode\EA.Integration\ClaimsFeedService\GeniusStatus_Dummy_App\src\test\resources
[INFO] Reading bar file: C:\Anand\SourceCode\EA.Integration\ClaimsFeedService\GeniusStatus_Dummy_App\target\iib\GeniusDummy.bar
[INFO] mqsireadbar complete
[INFO] Writing configurable properties to:
C:\Anand\SourceCode\EA.Integration\ClaimsFeedService\GeniusStatus_Dummy_App\target\iib\default.properties
[INFO] Validating properties files
[INFO] C:\Anand\SourceCode\EA.Integration\ClaimsFeedService\GeniusStatus_Dummy_App\Genius.properties
[INFO] Applying properties files as bar file overrides
[INFO] C:\Anand\SourceCode\EA.Integration\ClaimsFeedService\GeniusStatus_Dummy_App\Genius.properties
[INFO]
[INFO] C:\Anand\SourceCode\EA.Integration\ClaimsFeedService\GeniusStatus_Dummy_App>”C:\Program Files
(x86)\IBM\IntegrationToolkit90\mqsiapplybaroverride” -b
C:\Anand\SourceCode\EA.Integration\ClaimsFeedService\GeniusStatus_Dummy_App\target\iib\GeniusDummy.bar -o
C:\Anand\SourceCode\EA.Integration\ClaimsFeedService\GeniusStatus_Dummy_App\Genius.bar -p
C:\Anand\SourceCode\EA.Integration\ClaimsFeedService\GeniusStatus_Dummy_App\Genius.properties -k
GeniusStatus_Dummy_App_1.0 -r -v
C:\Anand\SourceCode\EA.Integration\ClaimsFeedService\GeniusStatus_Dummy_App\target\applybaroverridetrace-Genius.txt
[INFO] BIP1137I: Applying overrides using toolkit mqsiapplybaroverride…
[INFO] BIP1140I: Overriding property GeniusStatus_DummyService_Flow#HTTP Input.URLSpecifier with ‘/Anand/DataArea/StatusService’
in ‘GeniusStatus_Dummy_App_1.0.appzip/META-INF/broker.xml’ …
[INFO] BIP1143I: Saving Bar file C:\Anand\SourceCode\EA.Integration\ClaimsFeedService\GeniusStatus_Dummy_App\Genius.bar…
[INFO]
[INFO] BIP8071I: Successful command completion.
[INFO]
[INFO] — iib-maven-plugin:2.1-SNAPSHOT:clean-bar-build-workspace (default-clean-bar-build-workspace) @ GeniusStatus_Dummy_App

[INFO] debugWorkspace enabled – workspace will not be cleaned
[INFO]
[INFO] — iib-maven-plugin:2.1-SNAPSHOT:validate-classloader-approach (default-validate-classloader-approach) @
GeniusStatus_Dummy_App —
[INFO] Reading configurable properties from:
C:\Anand\SourceCode\EA.Integration\ClaimsFeedService\GeniusStatus_Dummy_App\target\iib\default.properties
[INFO]
[INFO] — iib-maven-plugin:2.1-SNAPSHOT:package-iib-bar (default-package-iib-bar) @ GeniusStatus_Dummy_App —
[INFO] Building zip:
C:\Anand\SourceCode\EA.Integration\ClaimsFeedService\GeniusStatus_Dummy_App\target\GeniusStatus_Dummy_App-1.0.zip
[INFO] ————————————————————————
[INFO] BUILD SUCCESS
[INFO] ————————————————————————
[INFO] Total time: 01:31 min
[INFO] Finished at: 2015-10-08T08:52:11-04:00
[INFO] Final Memory: 25M/982M
[INFO] ————————————————————————
[JENKINS] Archiving C:\Anand\SourceCode\EA.Integration\ClaimsFeedService\GeniusStatus_Dummy_App\pom.xml to
com.endur.esb.dummy/GeniusStatus_Dummy_App/1.0/GeniusStatus_Dummy_App-1.0.pom
[JENKINS] Archiving
C:\Anand\SourceCode\EA.Integration\ClaimsFeedService\GeniusStatus_Dummy_App\target\GeniusStatus_Dummy_App-1.0.zip to
com.endur.esb.dummy/GeniusStatus_Dummy_App/1.0/GeniusStatus_Dummy_App-1.0.zip
channel stopped
[GeniusStatus_Dummy_App] $ cmd /c call C:\WINDOWS\TEMP\hudson9075319975353138395.bat
C:\Anand\jenkins\workspace\GeniusStatus_Dummy_App>C:\”Program Files”\IBM\MQSI\9.0.0.3\bin\mqsiprofile && mqsideploy -i
hostname -p port -q QMHM1DEV3 -e ClaimsServices -a
C:\Anand\SourceCode\EA.Integration\ClaimsFeedService\GeniusStatus_Dummy_App\Genius.bar -w 180

MQSI 9.0.0.3
C:\Program Files\IBM\MQSI\9.0.0.3

BIP1044I: Connecting to the queue manager…


BIP1060I: Connecting to the broker…
BIP1115I: Connected to the broker ‘IBHM1DEV3’.
BIP1039I: Deploying BAR file ‘C:\Anand\SourceCode\EA.Integration\ClaimsFeedService\GeniusStatus_Dummy_App\Genius.bar’ to broker
‘IBHM1DEV3’ (execution group ‘ClaimsServices’) …
BIP1092I: The broker successfully processed the deployment request.
Finished: SUCCESS

This article was originally published on Blogger.com and has been updated on 08/24/2018 to support build of IIB 10 projects. Wherever is
mentioned v9 only, read it as v9 & v10.
V10 plugin allows you to make Shared libraries as maven projects & build them independently. Note that the plugin code has been updated
to make sure that shared libraries are not included in the bar files of referring projects to avoid unplanned changes in shared library going
into runtime. You may wish to refer to the original article to review comments and replies.
Note- The v9 IIB-Maven-Plugin source code was originally taken from GitHub and was modified to fix the issues. Also the plugin code was
modified for v10 to support shared libraries. The updated copies of v9 and v10 plugin codes can be downloaded from links provided in this
article.

TAGS IIB,  CONTINUOUS-INTEGRATION,  JENKINS,  MAVEN,  DEVOPS

Anand.Awasthi

29 comments on"IIB (v9 & v10) Continuous Integration-Maven-Jenkins"

Vrishab February 26, 2020


Hi Anand,

Few suggestions based on my experience


1. You can add a point asking users “to set environment variables of IIB setup”. Because commands such as ‘mqsireadbar’ in the java class files will
not work unless the path is set.
2. Strangely my IIB-Maven plugin was not detected by pom.xml when my repository was default “${user.home}/.m2/repository”. I had to change it to
some other path. I’m not sure if this is because of access/permission issue. I was stuck for 2 to 3 days because of this.

Reply (Edit)

Vrishab February 26, 2020


Hi Anand,

Great job & many thanks for this article, I did execute a job using your instructions. However there is one step I need to do “manually” in order to
make this work.
In the goal/step “default-package-iib-bar”, after assembly (iib-bar-project.xml) is interpolated, it forms like below

.
target/iib

If you see above, it expects a directory “target/iib” inside my work-space. So whenever I start my build I have to create this directory “iib” manually
inside my folder ‘target’. This is not a one time folder creation, because the ‘target’ folder regenerates each time for new build. So do you know how
should I fix this ? If I do not do this manual step then I’m thrown error
“Failed to execute goal ch.sbb.maven.plugins:iib-maven-plugin:4.3-SNAPSHOT:package-iib-bar (default-package-iib-bar) on project XXXXXXX:
Unable to execute mojo: Failed to create assembly: Error creating assembly archive iib-project: You must set at least one file.”

Reply (Edit)

Nagaraju kondaveeti September 24, 2019

Hi,
I am also getting the same error.Can any one suggestions on it?

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project iib-maven-plugin:


Compilation failure: Compilation failure:
[ERROR] /C:/iib-maven-plugin/src/main/java/ch/sbb/maven/plugins/iib/mojos/ValidateBarBuildWorkspaceMojo.java:[18,52] package
ch.sbb.maven.plugins.iib.generated.maven_pom does not exist
[ERROR] /C:/iib-maven-plugin/src/main/java/ch/sbb/maven/plugins/iib/utils/PomXmlUtils.java:[10,52] package
ch.sbb.maven.plugins.iib.generated.maven_pom does not exist
[ERROR] /C:/iib-maven-plugin/src/main/java/ch/sbb/maven/plugins/iib/utils/PomXmlUtils.java:[23,19] cannot find symbol

Reply (Edit)

AnandAwasthi September 25, 2019


Hi Nagaraju,
Can you please share your maven settings.xml and project pom.xml so that I can look at it?

Reply (Edit)

Pranit Birje August 21, 2019


Hi Anand

I am going through the POM and I don’t see a section in POM which could be mapped to libraries / project referenced by Application. I am still not
able to figure out that part. POM might work for stand-alone Application. However that is not a case for IIB applications. It always has a java
application or library referenced. Could you please help me to understand ?

Reply (Edit)

AnandAwasthi September 25, 2019


Hi Pranit,
Apologies for late reply. IIB libraries can’t be included as dependencies in POM file directly. When you checkout your IIB application,
check-out referenced libraries/Java projects also in that workspace (No need to make referenced IIB libraries/Java projects as maven
project). This will ensure that generated bar file includes referenced libraries/Java projects.
Also, Shared libraries should be made maven projects and be deployed before referencing projects are deployed.

Reply (Edit)

Manmadhainfra July 02, 2019


Hi Team,

I have configured a jenkins job to stop and start integration node on daily bases for maintinance purpose .

Here the issue is mqsistop is happens successfully , i.e., integration node is stopping but mqsistart is not woring fine with jenkins jobs can any one
help on this ??

Reply (Edit)

Ian_Larner July 03, 2019


@Manmadhainfra Hi
I’ve passed your question on to the ACE/IIB Developers and hope for a reply soon.
Regards, Ian

Reply (Edit)

AnandAwasthi September 25, 2019

Hi Manmadhainfra,
I am able to stop and start integration nodes from Jenkins job successfully. Please share logs of the Jenkins job so that I can look at it.

Reply (Edit)

sanjeet kumar April 17, 2019


Hi,
I added the mentioned plugin in my toolkit of version Version: 10.0.0.3 but I am not able to see Maven in Windows->Prefrences.

I have checked the install software list and I see the plugin are installed of the same version you mentioned.

Help me to resolve this.

Thanks in advance.

Reply (Edit)

david.macedo.ch April 08, 2019


Hi,

Excellent post.
I have some doubts, for example:
Could maven manage static/shared libraries?
Is it possible to use iib-maven-plugin with IIB Toolkit in docker?

Reply (Edit)

AnandAwasthi April 09, 2019


Yes, Maven can manage static & shared libraries. Generally we do not manage static libraries as maven projects because they are deployed
as part of Application/Service. When building an application/service with static library:
1- Convert your application/library to maven project
2- Check-out/copy the referenced static libraries to the workspace before triggering maven build.

My recommendation is to manage shared libraries as separate maven projects.

Though I have not tested the pluginiib-maven-plugin with IIB toolkit in docker; however I believe it should work.

Reply (Edit)

david.macedo.ch April 12, 2019

For example, in the case of Java-Maven, Maven can download dependencies and libraries (.jar) from an Artifact Repository (Maven
Central, Artifactory or Nexus).
However, in the case IIBv9 and IIBv10, when you unzip a Bar file, you can see that the libraries are in .libzip format.
Is Maven compatible with this type of extension when using maven install/maven package? and if this is possible,
Could mqsicreatebar create a bar file using this .libzip format and without libraries source code?

About IIB toolkit in docker, I’ll try, although I must make some changes in the plugin.

Reply (Edit)

AnandAwasthi April 26, 2019


I don’t think maven can support non-jar dependencies out of the box. Though I have not tried, but I believe we should be
able to upload the compiled libraries to maven repository with packaging type ‘pom’. When you are building the project,
maven should be able to resolve and download it and you can further use it to create bar file.You can use mqsipackagebar
command to include pre-compiled resources, like appzip or libzip.
For docker, you would need to make changes to set-up the IIB command environment in the plugin. Currently the command
environment set-up is windows centric in the ace-maven-plugin.

Reply (Edit)

Ponmanikandan B February 27, 2019

I am getting below error.


I searching .project/.project
.project already file.

[ERROR] Failed to execute goal ch.sbb.maven.plugins:iib-maven-plugin:4.3-SNAPSHOT:validate-bar-build-workspace (default-validate-bar-build-


workspace) on project infinity-service_provider: Error parsing .project file in: C:\PROJECTS\Sample\.project: UnmarshalException:
C:\PROJECTS\Sample\.project\.project (The system cannot find the path specified)

Reply (Edit)
AnandAwasthi February 28, 2019

Hi,
The error appears to be related to the workspace where you are building the project. Can you share below info so that I can take a look:
1) POM file of your project
2) If you are building from Jenkins, what have you set for ‘workspaceDir’ and ‘buildsDir’

Reply (Edit)

Jakub Pavlat February 08, 2019

Hello, great post! Are you planning on doing something similar for ACE? I would love to use Maven for ACE builds, but I would think that the v10 plugin
will not work..

Reply (Edit)

AnandAwasthi March 29, 2019


Hi Jakub,
Yes, I would publish it for ACE 11 soon.
Thanks

Reply (Edit)

jai prakash kunwar January 11, 2019


hi
I am getting error as:
POM for com.ibm.broker:IntegrationAPI:jar:10.0.0.6 is missing, no dependency information available

Reply (Edit)

Anand Awasthi January 15, 2019


Hi Jai,
At which step did you get this error? Please provide POM file that you created for your project and output of the command “mvn clean
compile -X” , so that I can take a look.
Also as I responded to one comment, make sure to replace the POM file of iib-mavne-plugin for v10 with the one attached

Also, for compiling v10 project, add one more parameter in your project POM specified in step 4 here.
%IIB 10 install location%\server\bin

The parameter toolkitInstallDir should have below path.


%IIB 10 install location%\tools

Regards,
Anand

Reply (Edit)

AnandAwasthi January 15, 2019


XML tags get stripped-off while writing the comment here. So I am have uploaded a sample POM for v10 IIB projects. (attached) and make
changes in it as per your project/environment. Please make note of parameters defined in ‘configuration’ section of ‘iib-maven-plugin’.

Reply (Edit)

AnandAwasthi January 15, 2019


My apologies, you don’t need to add additional parameter for iib 10 projects. You can ignore the part of my comment to add additional
parameter in ‘configuration’ section. This parameter was introduced to support builds of iib 9 and iib 10 projects from a single plugin, but is
not in use now as we have separate plugins for v9 and v10 due to architectural differences.

Please do provide the information I asked so that I can see the issue you are facing.
Reply (Edit)

Abhishek Singh December 10, 2018


The pom.xml file seems to be missing some of the dependencies

Reply (Edit)

AnandAwasthi December 10, 2018


Hi Abhishek,
What is the issue you are facing ?

Thanks,
Anand

Reply (Edit)

VenkatAllam December 09, 2018

Hi Anand Aswathi,

I am getting below error when executing “mvn clean install”. do need to setup any config before running the mvn install.

D:\DevOps\iib-maven-plugin-v10\iib-maven-plugin>mvn clean install


[INFO] Scanning for projects…
[INFO]
[INFO] ——————————-
[INFO] Building iib-maven-plugin 4.3-SNAPSHOT
[INFO] —————————-[ maven-plugin ]—————————-
[INFO] ————————————————————————
[INFO] BUILD FAILURE
[INFO] ————————————————————————
[INFO] Total time: 0.367 s
[INFO] Finished at: 2018-12-09T08:07:56+02:00
[INFO] ————————————————————————
[ERROR] Plugin org.apache.maven.plugins:maven-source-plugin:2.4 or one of its de
pendencies could not be resolved: Failed to read artifact descriptor for org.apa
che.maven.plugins:maven-source-plugin:jar:2.4: Could not transfer artifact org.a
pache.maven.plugins:maven-source-plugin:pom:2.4 from/to central (RepoPath): Cann
ot access RepoPath with type default using the available connector factories: Ba
sicRepositoryConnectorFactory: Cannot access RepoPath using the registered trans
porter factories: WagonTransporterFactory: Unsupported transport protocol -> [He
lp 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResoluti
onException

D:\DevOps\iib-maven-plugin-v10\iib-maven-plugin>

Reply (Edit)

Venkata Allam December 09, 2018

Hi Anand Aswathi,

I am getting below error when executing “mvn clean install” . are there any dependencies or config settings before build.

D:\DevOps\iib-maven-plugin-v10\iib-maven-plugin>mvn clean install


[INFO] Scanning for projects…
[INFO]
[INFO] ——————————-
[INFO] Building iib-maven-plugin 4.3-SNAPSHOT
[INFO] —————————-[ maven-plugin ]—————————-
[INFO] ————————————————————————
[INFO] BUILD FAILURE
[INFO] ————————————————————————
[INFO] Total time: 0.367 s
[INFO] Finished at: 2018-12-09T08:07:56+02:00
[INFO] ————————————————————————
[ERROR] Plugin org.apache.maven.plugins:maven-source-plugin:2.4 or one of its de
pendencies could not be resolved: Failed to read artifact descriptor for org.apa
che.maven.plugins:maven-source-plugin:jar:2.4: Could not transfer artifact org.a
pache.maven.plugins:maven-source-plugin:pom:2.4 from/to central (RepoPath): Cann
ot access RepoPath with type default using the available connector factories: Ba
sicRepositoryConnectorFactory: Cannot access RepoPath using the registered trans
porter factories: WagonTransporterFactory: Unsupported transport protocol -> [He
lp 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResoluti
onException

D:\DevOps\iib-maven-plugin-v10\iib-maven-plugin>

Reply (Edit)

AnandAwasthi December 10, 2018


Hi Venkat,
Before running “mv clean install”, please review and either update appropriate repository path in POM file to your environment or remove
these sections from the POM file. Below are the sections where these paths are specified. If you still face the issue, please let me know.
Thanks,
Anand

1) Update in below section or remove this section.

central
Central Repository
RepoPath/url>

false

2) Update in below section or remove this section

central
Central Repository
RepoPath

false

3) Update in below section or remove this section

nexus-release
Corporate Repository
RepoPath
default

4) If you are going to check-in the source code into your source control repository and make maven release, you need to update below
section with source control url for the plugin source code. You can safely ignore it if you are building locally. Below is an example for svn:

scm:svn:PUT SVN Repository Path of plugin code here


Reply (Edit)

AnandAwasthi December 10, 2018


I have put the updated POM file without repository section at below location. Please replace your v10 plugin pom file with this and
retry.
https://developer.ibm.com/integration/wp-content/uploads/sites/25/2018/12/pom.xml

Thanks,
Anand

Reply (Edit)

Manish April 14, 2019


Hi Sir,
Iam facing below error:

ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project


iib-maven-plugin: Compilation failure: Compilation failure:
[ERROR] /C:/iib-maven-plugin/src/main/java/ch/sbb/maven/plugins/iib/mojos/ValidateBarBuildWorkspaceMojo.java:[18,52]
package ch.sbb.maven.plugins.iib.generated.maven_pom does not exist
[ERROR] /C:/iib-maven-plugin/src/main/java/ch/sbb/maven/plugins/iib/utils/PomXmlUtils.java:[10,52] package
ch.sbb.maven.plugins.iib.generated.maven_pom does not exist
[ERROR] /C:/iib-maven-plugin/src/main/java/ch/sbb/maven/plugins/iib/utils/PomXmlUtils.java:[23,19] cannot find symbol

Reply (Edit)

You might also like