IBM Integration bus mqsicreatebar with references

2019-08-27 03:15发布

I'm bit confused with using mqsicreatebar in my environment. I have, for example, following file structure:

root
|--Libraries
|  \--Library1
\--Apps
   \--App1
      \--.project

And App1 is referencing Library1.

I want to run mqsicreatebar such that it will contain App1 with included Library1. I try to run next command in root/Apps folder:

mqsicreatebar -data ./ -b newbarfile.bar -cleanBuild -deployAsSource -a App1 -trace

I get error "Referenced project Library1 is not found on file system". What should I do to create BAR with this file structure?

2条回答
女痞
2楼-- · 2019-08-27 03:37

The only way I've found by myself is copying necessary artifacts to current directory before running mqsicreatebar and deleting them after build completion:

cd /root/Apps/
cp -R ../Libraries/Library1/ ./
mqsicreatebar -data ./ -b newbarfile.bar -cleanBuild -deployAsSource -a App1 -trace
rm -r Library1/
查看更多
萌系小妹纸
3楼-- · 2019-08-27 03:54

That "data" parameter tells the mqsicreatebar command where to find an eclipse workspace (Integration Toolkit workspace) that in turn tells the mqsicreatebar command where the project files and other files it needs for the build are.

If you don't have a workspace there already, the command will create one on the fly for you, but only for the current directory and its subdirectories. I do not know how deep this goes. I know it looks at least one subdirectory down for project files (though your comments imply it does not look down two subdirectories).

Alternatively, (and I understand this is not desired, but it's an option, similar to the one you already posted) you could give up on your folder organization and put your library and app subfolders in the same root folder. So you have:

root
|--Library_1
|--Library_2
|--App_1
|--App_2

This is what I have set up in my Bamboo project and the build commands work (even with no workspace files before running the command, as long as I point the data parameter at this root directory).

查看更多
登录 后发表回答