Author |
Message
|
sleepyjamie |
Posted: Tue Jan 05, 2016 12:53 pm Post subject: mqsicreatebar command with git submodules |
|
|
Centurion
Joined: 29 Apr 2015 Posts: 135
|
I am building out our CI environment and automating the builds of our IIB projects using mqsicreatebar.
My project structure is as follows:
/MyProject
---/.settings
---/ApplicationA
---/Common
------/LibraryA
------/LibraryB
---/Common2
------/LibraryC
------/LibraryD
MyProject is a git repo
Common and Common2 are git submodules
Here is the command which is executed in the MyProject folder.
mqsicreatebar -data . -b build/EnsUpsellNotification-1.0.bar -a "ApplicationA" -version 1.0 -cleanBuild -deployAsSource -trace
The problem is that the mqsicreatebar command fails because it cannot find the LibraryA,B,C,D since they are located in sub folders.
Within IIB toolkit I can build the projects as they are imported.
Is there any way to tell mqsicreatebar to search sub folders for projects? I could not find any documentation on this. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jan 05, 2016 1:07 pm Post subject: Re: mqsicreatebar command with git submodules |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
sleepyjamie wrote: |
The problem is that the mqsicreatebar command fails because it cannot find the LibraryA,B,C,D since they are located in sub folders
....
Is there any way to tell mqsicreatebar to search sub folders for projects? I could not find any documentation on this. |
At the risk of being very dim (it's been a long day) why doesn't the -l parameter (the one that identifies Libraries) work for you in identifying the Libraries to the command? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
sleepyjamie |
Posted: Tue Jan 05, 2016 1:15 pm Post subject: Re: mqsicreatebar command with git submodules |
|
|
Centurion
Joined: 29 Apr 2015 Posts: 135
|
Vitor wrote: |
sleepyjamie wrote: |
The problem is that the mqsicreatebar command fails because it cannot find the LibraryA,B,C,D since they are located in sub folders
....
Is there any way to tell mqsicreatebar to search sub folders for projects? I could not find any documentation on this. |
At the risk of being very dim (it's been a long day) why doesn't the -l parameter (the one that identifies Libraries) work for you in identifying the Libraries to the command? |
Yeah I will try that.... duh It's been a long day for me too. I'll report back. |
|
Back to top |
|
 |
sleepyjamie |
Posted: Tue Jan 05, 2016 1:19 pm Post subject: Re: mqsicreatebar command with git submodules |
|
|
Centurion
Joined: 29 Apr 2015 Posts: 135
|
Looks like the -l parameter does not accept slashes. So the command:
-l "Common\LibraryA"
Returns the error
Project directory "Common" does not exist
 |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jan 05, 2016 1:24 pm Post subject: Re: mqsicreatebar command with git submodules |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
sleepyjamie wrote: |
Looks like the -l parameter does not accept slashes. |
I wouldn't have thought it needed to and it would have found Library A anyway but if it doesn't have you considered the -p parameter (to obtain the locations from the metadata) or the -o parameter (to provide the relative search path names)? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
sleepyjamie |
Posted: Tue Jan 05, 2016 2:06 pm Post subject: Re: mqsicreatebar command with git submodules |
|
|
Centurion
Joined: 29 Apr 2015 Posts: 135
|
Vitor wrote: |
sleepyjamie wrote: |
Looks like the -l parameter does not accept slashes. |
I wouldn't have thought it needed to and it would have found Library A anyway but if it doesn't have you considered the -p parameter (to obtain the locations from the metadata) or the -o parameter (to provide the relative search path names)? |
My understanding is that the -p is meant for integration projects not application projects. If I use -p and -o then it will require me to add dozens and dozens of files to add which is time consuming, tedious, and error prone. The -l parameter is ideal as it adds all the files within the project, however it requires all the projects to be in the root of the workspace. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Jan 05, 2016 8:49 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Your file structure is wrong. You need to have in the workspace all projects or referenced projects. That they look like they would be underneath the main (Application) project is an illusion of representation (IIB Toolkit).
They all need to be at the same level in the workspace ( Application, Common, Common2).
Move your projects to the correct level (workspace) and attempt the recompile.
You may want to look at a product like maeven or something like it for the dependencies in your CI projects.
This could analyze the .project file and download all the dependencies at the right level...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
sleepyjamie |
Posted: Wed Jan 06, 2016 7:05 am Post subject: |
|
|
Centurion
Joined: 29 Apr 2015 Posts: 135
|
fjb_saper wrote: |
Your file structure is wrong. You need to have in the workspace all projects or referenced projects. That they look like they would be underneath the main (Application) project is an illusion of representation (IIB Toolkit).
They all need to be at the same level in the workspace ( Application, Common, Common2).
Move your projects to the correct level (workspace) and attempt the recompile.
You may want to look at a product like maeven or something like it for the dependencies in your CI projects.
This could analyze the .project file and download all the dependencies at the right level...
Have fun  |
We use Apache Maven exclusively in our Java code, but not IIB. I doubt Maven will solve my problem with building using CI because we use GIT submodules to organize and version our IIB codebase. The purpose of GIT submodules it to pull a repository along with its dependencies. The only alternative is to make a submodule for each library, which is overkill.
The only maven plugin I know of is this guy's https://github.com/SchweizerischeBundesbahnen/iib-maven-plugin however there is no documentation provided and I'm weary about using stuff in CI production environment Github without any documentation.
I will open a PMR with IBM and see if they can provide any assistance.
I seems like the only workaround is when a build is performed to re-organize all of the projects before the mqsicreatebar command is executed. In the gcc and java world this would be easy.
Thanks
. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Jan 06, 2016 9:45 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Don't know about Git Submodules... The problem is that the libraries are not a sub of the application but a peer. They only appear as a sub in the toolkit ... and maybe in the deployed objects...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|