Install an artifact without publishing dependencies
We use maven to build Flex SWF applications. These SWF artifacts have a couple of dependencies to Flex SWC libraries, but the compiled artifacts have everything they need compiled in. Now, when I add a dependency from my WAR module to this SWF in order to copy the resulting SWF this WAR file receives a transitive dependency to the SWC libraries:
myWar
+-myFlexApp.swf
+-framework.swc
+-rpc.swc
+...
I don't see a reason that a SWF applikation should announce it's dependencies as these are compiled into the SWF files. So is there a possibility to get rid of the SWFs dependencies, while ins开发者_JAVA百科talling the SWF into the repository?
I already tried to set the dependency to myFlexApp.swf in myWar to scope 'provided' - did not help. So the only possibility I see that's left is to exclude all dependencies of each single SWF application, which is a huge overhead to maintain as each SWF has a couple of SWF library dependencies.
I think your only option for now is to list all artifacts you don't want in the 'exclude' section of the your pom.xml (under SWF dependency). It is painful, I agree. You can use maven to list full resolved dependency tree, or generate effective pom and grab artifact names and versions from there.
精彩评论