问题
I need to customize openfire plugin and i have made one plugin for openfire but no idea how to compile.I have followed many tutorial but not working.
Here is one video for compile openfire but got 505 error.
I have followed official tutorial but not able to compile.
build\build.xml:238: Must use JDK 1.5.x or higher to build Openfire
got this exception.
Not get idea how can i make jar file with compilation or without.If with, I tried with ant as well but there is some problem.
I'm stack here in openfire problem and compilation of plugin. If anybody have idea about this problem please help me. Thanks in advance.
回答1:
There is no need to build or compile plugin from eclipse.If you use ant-build for build openfire then it work fine. Just you make sure, Ant is installed and configure proper path in your system.
Go to your downloaded openfire and paste your plugin under openfire/src/plugin folder.
Go command line, you can pass command
ant -f build/build.xml clean openfire plugins
or build specific plugin you can pass
ant -f build/build.xml clean openfire plugin -Dplugin=nameofyourplugin
after building you can check your plugin in this path.
\openfire\target\openfire\plugins
Thanks hope this will help you.
回答2:
According to our extended discussion from chat, you added the following part:
<condition property="java.not.ok" value="true">
<not>
<or>
<contains string="${ant.java.version}" substring="1.5"/>
<contains string="${ant.java.version}" substring="1.6"/>
<contains string="${ant.java.version}" substring="1.7"/>
</or>
</not>
</condition>
You also need to add the following line after those 3 similar lines:
<contains string="${ant.java.version}" substring="1.8"/>
because you are using Java 8 (according to your comment related to compiler version). Otherwise, this condition will be evaluated to true (java.not.ok=true
) and this will activate the following line:
<fail if="java.not.ok" message="Must use JDK 1.5.x or higher to build Openfire"/>
来源:https://stackoverflow.com/questions/36353231/create-jar-file-from-openfire-plugin