简体   繁体   中英

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. 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.

link to it on 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)

  2. I past this new plugin again with name "myplugin" in openfire src/plugins.

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)

4.Now in ant view of build.xml I run clear (to clear target and work folder).

5.Now I run plugins in ant view to build my new plugin.

if no compilation error in your plugin at building time then you will find the jar of your plugin in target/plugin folder.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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