Hi, my experience is that you cannot compiles such plugins via maven only because Jive plugin has different architecture. It is JAR but classes is in directory so classic dependency in Maven doesn't work.
Workaround is import both plugins into Eclipse/Idea and let IDE compile it. Then run mvn package (no compilation is done because classes already exists).
Before compiling plugin A, did you use mvn clean install to make sure plugin B made it into your .m2 repository? If you only used compile or package, it will build it in your target directory but won't install it in your repo to be found in other builds. I've been bit by this before.
Also, you should make sure that the dependency uses <scope>provided</scope>. You don't want to package plugin B in with plugin A since it will actually be made available at runtime anyway. Maybe you did but just didn't show the details.
Was just thinking a bit more about this...
Do make sure that when you install plugin.A that plugin.B is already installed or there will be problems. Here, we try to avoid dependencies on plugins to avoid that kind of scenario. If possible, you might be better off to factor some of the code out of plugin.B into a separate module (module.B) and then make plugin.A and plugin.B dependent on that with <scope>provided</scope>. Then, add module.B as a dependency in the war project. Once you mvn clean package the WAR file, it will include your dependencies in module.B and plugins A and B can both be installed independently.
Hej Valery Yahorau,
I just had the same problem and found this thread. I'm currently trying to solve this by packaging "dual use" plugins, so that the jar will contain both: classes filed under /classes for the runtime requirements of jive and furthermore directly under the root of the jar, so it can be used as a direct dependency from maven. So in the end all compiled classes are packaged double, but as far as I can see the size of the packaged jar is not getting twice as big, since the zipper is obviously able to notice that there are files doubled.
I simply added another fileset to the plugins assembly.xml like so:
I did not tested this approach at runtime yet, but I'm confident this will work. Let's see Cheers,