powered by Jive Software

I need to develop a JM plugin, but compile file is error!

please give me a standard build file of plugin , thanks !

<javac srcdir="${src.dir}" destdir="${build.dir}"

debug="$"

optimize="$">

Buildfile: D:\Work\workspace\outworker\build.xml

init:

compile:

Compiling 9 source files to D:\Work\workspace\outworker\build

An exception has occurred in the compiler (1.5.0_02). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you.

java.lang.IndexOutOfBoundsException

at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:122)

at com.sun.tools.javac.jvm.ClassReader.fillIn(ClassReader.java:1566)

at com.sun.tools.javac.jvm.ClassReader.complete(ClassReader.java:1518)

at com.sun.tools.javac.code.Symbol.complete(Symbol.java:355)

at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:614)

at com.sun.tools.javac.jvm.ClassReader.loadClass(ClassReader.java:1618)

at com.sun.tools.javac.comp.Resolve.loadClass(Resolve.java:808)

at com.sun.tools.javac.comp.Resolve.findIdentInPackage(Resolve.java:977)

at com.sun.tools.javac.comp.Attr.selectSym(Attr.java:1776)

at com.sun.tools.javac.comp.Attr.visitSelect(Attr.java:1699)

at com.sun.tools.javac.tree.Tree$Select.accept(Tree.java:993)

at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:280)

at com.sun.tools.javac.comp.Attr.attribType(Attr.java:308)

at com.sun.tools.javac.comp.MemberEnter.attribImportType(MemberEnter.java:655)

at com.sun.tools.javac.comp.MemberEnter.visitImport(MemberEnter.java:539)

at com.sun.tools.javac.tree.Tree$Import.accept(Tree.java:401)

at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:383)

at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:395)

at com.sun.tools.javac.comp.MemberEnter.visitTopLevel(MemberEnter.java:506)

at com.sun.tools.javac.tree.Tree$TopLevel.accept(Tree.java:386)

at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:383)

at com.sun.tools.javac.comp.MemberEnter.complete(MemberEnter.java:777)

at com.sun.tools.javac.code.Symbol.complete(Symbol.java:355)

at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:614)

at com.sun.tools.javac.comp.Enter.complete(Enter.java:448)

at com.sun.tools.javac.comp.Enter.main(Enter.java:426)

at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:413)

at com.sun.tools.javac.main.Main.compile(Main.java:592)

at com.sun.tools.javac.main.Main.compile(Main.java:544)

at com.sun.tools.javac.Main.compile(Main.java:67)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at org.apache.tools.ant.taskdefs.compilers.Javac13.execute(Javac13.java:55)

at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:931)

at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:757)

at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)

at org.apache.tools.ant.Task.perform(Task.java:364)

at org.apache.tools.ant.Target.execute(Target.java:341)

at org.apache.tools.ant.Target.performTasks(Target.java:369)

at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)

at org.apache.tools.ant.Project.executeTarget(Project.java:1185)

at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java :40)

at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(Ec lipseDefaultExecutor.java:32)

at org.apache.tools.ant.Project.executeTargets(Project.java:1068)

at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner. java:423)

at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner .java:137)

BUILD FAILED

D:\Work\workspace\outworker\build.xml:26: Compile failed; see the compiler error output for details.

Total time: 3 seconds

Message was edited by:

zhuam

Hi Zhaum,

There are a few threads already describing the best approach to developing a plugin.

see: http://www.jivesoftware.org/forums/thread.jspa?threadID=15042

for example

The best part is that you don’'t have to write your own ant script at all!

Hope this helps,

Conor.

Hi Conor !

thanks!

yes ! That is talking about develop plugin for bese JM project ,but I think create a new project for forum plugin !

  1. /home/joeuser/java/myplugins/ <- Point to this directory

  2. |- fooplugin/

  3. |- barplugin/

plugin.dev.dir= ??

How did you config to plugin.dev.dir ? thanks !

Zhuam,

  1. Copy a plugin dir from JM source, e.g. registration, into your own work dir

c:/myplugins/registration

  1. rename registration to your plugin name e.g. mygreatplugin

  2. edit the build.properties

plugin.dev.dir=c:/myplugins

  1. run the JM ant build “plugins” target, your output will be in

JM/target/plugins-dev/mygreatplugin, the distro will be in JM/target/plugins/mygreatplugin.jar

Conor.

Thanks !!