Because our OpenFire plug-in introduced more and more of the package, resulting in the plug-in is also growing, and openfire3.10.x after the cancellation of pack200 packaging Method (compression), resulting in the packaging of the plug-in more and more large, about 10M, upload speed about 200kb/s, Sometimes upload plug-ins to more than 50%, because the network is not good, resulting in re-transmission, egg pain ~ ~ ~
Therefore, you want to think about whether you can not rely on the plug-in development of the third-party package, not packaged into the plug-in. The following analysis is based on the openfire3.10.x version operation
1, the first decompression plug-in analysis structure, we can find the entire plug-in depends on the package is put into the Lib ( and our development directory lib very much like Ah ~ ~ ~ ~ ~), the initial inference package is directly in the Lib directory of all the contents of the copy of the past.
2, we first remove the plugin in the Lib directory of the jar file build path, and now our plug-in code because the class can not find the Red fork is displayed.
3. We create a new Chatlib directory in the Build folder sibling directory and copy all the jar files in the plugin Lib and delete the Lib directory. and build the jar file into path (I put it into chatlib Unified management) as shown in.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/75/28/wKiom1YzQfeySuNEAABCgP0SCO4425.jpg "title=" 2.jpg " alt= "Wkiom1yzqfeysuneaabcgp0sco4425.jpg"/>
4, at this time, our code does not show the Red Fork, but the use of build.xml for the build will be error. The class is not found, and we need to modify the Build.xml. First I create a new attribute that points to the Lib directory where our plugin relies on the jar, as shown in
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/75/3C/wKioL1YzQuzDAmhuAAFzqeQKjSI444.jpg "title=" 3.jpg " alt= "Wkiol1yzquzdamhuaafzqeqkjsi444.jpg"/>5, but also to modify a place, as shown (this method is only for build our own plug-in)
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/75/3D/wKioL1YzQ5TyZZ8BAAHPtxlScGI916.jpg "title=" 4.jpg " alt= "Wkiol1yzq5tyzz8baahptxlscgi916.jpg"/>6, build again, our plugin can build successfully. To enable OpenFire to run this plugin, we also need to copy the jar that our plugin relies on to the OpenFire Lib directory, or you can create a new directory yourself in the OpenFire root directory, but this method needs to be modified openfire/ The script for the OpenFire file in the bin directory.
By the way Openfire.jar that file why did not introduce LIB, because there is a parameter in the Build.xml, the specific name is not clear, you can copy the dependent class directly into the plug-in directory ~ ~
PostScript: Here I only provide a way, the specific operation or according to the actual needs to pack, if you do not understand can contact me ~ ~
This article is from the "studious, Good thinking" blog, please be sure to keep this source http://porterxie.blog.51cto.com/1787765/1708162
OpenFire Development (v) OpenFire plug-in packaging alternative play