powered by Jive Software

Calling all Ant experts

Hey Guys,

We’‘re having an Ant problem with building plugins, the JM-58 issue has the details. Basically, plugin builds are failing when there’‘s more than one plugin that has JSPs to compile. There’‘s a bug in Ant I can’‘t seem to get around and it has to do with re-initializing the JSPC task. Anyone have any experience with this? We’'d love some help.

Cheers,

–Bill

Doh, I guess no one here is an Ant expert. Any ideas?

Cheers,

–Bill

Hi BIll,

Try changing line ~812 in the build.xml from:

<taskdef classname="org.apache.jasper.JspC" name="jasper2" >

to:

<taskdef classname="org.apache.jasper.JspC" name="jasper2" loaderref="jasper" >

Hope that helps,

Ryan

Hi Bill,

While you’‘re in the build.xml file you might want to also add some code to copy over the classes directory when the plugins jar is being created. I wasn’'t entirely sure as to where files inside the classes dir was suppose to end up but presumabely it would look something like this when expanded:

myplugin/ |- plugin.xml |- lib/                |- plugin-myPlugin.jar
     |   |- [classes dir files]       <-- right here?
     |   |- com
     |       |- mycompany
     |           |- *.class |- web/

Thanks,

Ryan

Ryan,

Perfect! That did it! Thanks for the tip – I didn’'t know about that attribute.

Cheers,

–Bill

Ryan,

While you’'re in the build.xml file you might want to …

Thanks, I’'ll look into this as well.

Cheers,

–Bill

Hi Bill,

Did you have a chance to look into my request? Adding the following snippet of code at line 788 seems to do the trick:

<!-- Copy over any files in the classes directory -->
<copy todir="${plugin.dev.dest.dir}/@{plugin}/target/classes" failonerror="false">
   <fileset dir="@{pluginsrc}/@{plugin}/classes" includes="**/*.*" />
</copy>

Let me know what you think.

Thanks,

Ryan

Ryan,

I looked at this a little – why do you need this change? Those plugin classes are part of the plugin jar.

Cheers,

–Bill

Hi Bill,

According to the url=http://jivesoftware.org/builds/messenger/docs/latest/documentation/plugin-de v-guide.htmlplugin dev guide[/url], “resources your plugin needs” are suppose to be placed in the classes directory. In my case I want to place an xml schema document in that directory that will then get bundled as part of the java jar inside the main plugin jar. Maybe I’‘m misreading the instructions and I should be placing my xml file in the src/java directory (which I can certainly do), but I’'ve always preferred not to mix different types of source files.

Am I headed down the wrong path here?

Thanks,

Ryan