简体   繁体   English

OpenFire ant构建“ java”文件夹不存在

[英]OpenFire ant build “java” folder does not exists

Issue here that I am having is that when I try to build a plugin by configured ant launch configuration it give me error about not founding java folder where this java folder exists. 我遇到的问题是,当我尝试通过配置的ant启动配置来构建插件时,它给我有关在该Java文件夹存在的地方找不到java文件夹的错误。 And really it does, I checked :) 确实如此,我检查了:)

This is my project structure: 这是我的项目结构: 在此处输入图片说明

So... Time for error code now. 所以...现在是时候输入错误代码了。

Buildfile: C:\Users\Mateusz\Desktop\Java\OpenFire\openfire\build\build.xml
plugin:
   [delete] Deleting directory C:\Users\Mateusz\Desktop\Java\OpenFire\openfire\work\plugins-dev\PPMAntiSpamPlugin
    [mkdir] Created dir: C:\Users\Mateusz\Desktop\Java\OpenFire\openfire\work\plugins-dev\PPMAntiSpamPlugin
    [mkdir] Created dir: C:\Users\Mateusz\Desktop\Java\OpenFire\openfire\work\plugins-dev\PPMAntiSpamPlugin\target
    [mkdir] Created dir: C:\Users\Mateusz\Desktop\Java\OpenFire\openfire\work\plugins-dev\PPMAntiSpamPlugin\target\classes
 [trycatch] Caught exception: srcdir "C:\Users\Mateusz\Desktop\Java\OpenFire\openfire\src\plugins\PPMAntiSpamPlugin\src\java" does not exist!
     [echo] Error building plugin: PPMAntiSpamPlugin. Exception:
     [echo] C:\Users\Mateusz\Desktop\Java\OpenFire\openfire\build\build.xml:1324: srcdir "C:\Users\Mateusz\Desktop\Java\OpenFire\openfire\src\plugins\PPMAntiSpamPlugin\src\java" does not exist!
openfireHome:
adminPlugin:
spank:
BUILD SUCCESSFUL
Total time: 1 second

Ideas? 想法? Suggestions? 建议? Any one want a beer? 有人要啤酒吗?

@EDIT: I user default build.xml from openfire source to build by plugins. @EDIT:我从openfire源使用默认的build.xml来通过插件进行构建。

link to it on pastebin: http://pastebin.com/cjLHd8jV 在pastebin上链接到它: http : //pastebin.com/cjLHd8jV

I had the same problem. 我有同样的问题。 I figured it out by following these steps: 我按照以下步骤弄清楚了:

  1. I copied a inbuilt plugin(ex. subscription or presence plugin) from openfire src/plugins and then edited .java and plugin.xml files.(I edited existing one because of using exact structure of openfire plugin) 我从openfire src / plugins复制了一个内置插件(例如,订阅或状态插件),然后编辑了.java和plugin.xml文件。(我编辑了现有的插件,因为使用的是openfire插件的确切结构)

  2. I past this new plugin again with name "myplugin" in openfire src/plugins. 我在openfire src / plugins中再次使用名称为“ myplugin”的新插件。

now my project looks like 现在我的项目看起来像

在此处输入图片说明

  1. Now I added this plugin in build path from folder java (This step I was missing ..I think same issue with you) 现在,我在文件夹java的构建路径中添加了此插件 (这一步我不见了..我认为与您有同样的问题)

4.Now in ant view of build.xml I run clear (to clear target and work folder). 4.现在,在build.xml的ant视图中,我运行clear(以清除target和work文件夹)。

5.Now I run plugins in ant view to build my new plugin. 5.现在我在ant视图中运行插件以构建新的插件。

if no compilation error in your plugin at building time then you will find the jar of your plugin in target/plugin folder. 如果在构建时插件中没有编译错误,那么您将在target / plugin文件夹中找到插件的jar。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM