[izpack-devel] Custom Actions NPE, patch
Scott Plante
splante at insightsys.com
Thu Mar 8 11:51:59 CET 2007
Hi Klaus, et.al.,
Sorry. I wasn't complaining. I just didn't understand at first. I
thought the build-installer-listener tag associated the name with the
class, but I see now that you might include several classes in there, so
that wouldn't really work.
I made a patch for the doc on how to create a listener, but when I do an
"ant build.docu" it doesn't change the html, and I don't see anything in
the build.xml that would generate the node9.html from the node9.xml. I
only see the copy of the xml. How do you gen the .html? Do you use a
tool for editing the docbook xml?
Scott
PS. Since I haven't been able to view it in the browser, it might not be
right yet. This is just to give you an idea of what I'm doing in case
I'm on the wrong track.
Index: src/doc-ng/docbooks/node9.xml
===================================================================
--- src/doc-ng/docbooks/node9.xml (revision 1753)
+++ src/doc-ng/docbooks/node9.xml (working copy)
@@ -319,13 +319,14 @@
Implement
<literal>com.izforge.izpack.event.CompilerListener</literal> or extend
<literal>com.izforge.izpack.event.SimpleCompilerListener</literal>.
Place it as <literal>
[IzPackRoot]/src/lib/[MyPackagePath]/MyCompilerListener.java</literal>.
</para></listitem><listitem><para>
- Add a "compile.simple" antcall in to
<literal>[IzPackRoot]/src/build.xml</literal>.
+ Add a "build-install-listener" antcall in to the
<literal>build.listeners</literal> target in
<literal>[IzPackRoot]/src/build.xml</literal>. Note that
+ the name attribute value in the build-instealler-listener must
match
+ <literal>CompilerListener</literal> implementation class name (not
+ including the package).
<programlisting>
-<antcall target="compile.listener.simple">
- <param name="listener" value="MyCompilerListener"/>
- <param name="listener-dir" value="MyCompilerListener"/>
- <param name="listener-include" value="[MyPackagePath]"/>
-</antcall>
+ <build-installer-listener name="MyCompilerListener">
+ <include
name="com/zyross/izpack/MyCompilerListener.java"/>
+ </build-installer-listener>
</programlisting>
</para></listitem><listitem><para>
Run <literal>[IzPackRoot]/src/build.xml</literal>.
@@ -744,4 +745,4 @@
<address xmlns="http://www.w3.org/1999/xhtml">
Julien Ponge 2005-05-24
</address>
- <para/></section></article>
\ No newline at end of file
+ <para/></section></article>
Bartz, Klaus wrote:
> Hi Scott,
> I do not really understand how the compiler should detect
> the custom action class if they is not determined in any way.
> To search for a class which implements the interface will
> not help because you can derive the classes, then you have more
> as one which implements the interface.
> But this is not a really necessary discussion. Problem can be
> appearanced and a nullpointer exception is not a feature else
> a bug...
> I have just checked in you patch into trunk (1772).
>
> Cheers
>
> Klaus
>
>
>> -----Original Message-----
>> From: izpack-devel-bounces at lists.berlios.de
>> [mailto:izpack-devel-bounces at lists.berlios.de] On Behalf Of
>> Scott Plante
>> Sent: Thursday, March 08, 2007 10:46 AM
>> To: izpack-devel at lists.berlios.de
>> Subject: Re: [izpack-devel] Custom Actions NPE, patch
>>
>>
>> Klaus wrote:
>>
>>> ?? What is the listener name?? Do you mean the name of the jar file?
>>>
>>>
>> Well, yes, the jar file too, but I was talking about the name
>> you put in
>> the compiler or installer attribute in the izpack.xml file,
>> and the name
>> attribute to the build-installer-listener tag in the izpack
>> build.xml
>> file.
>>
>>> Yes this have to be the same. This is not only for the
>>>
>> listener else
>>
>>> also for panels. It is something since many years (never
>>>
>> seen IzPack
>>
>>> other), therefore we do not remember it at the first step. May be
>>> about that I have not verified this in the compiler code.
>>>
>> To do it is
>>
>>> a good way to reduce errors, therefor I will put it into trunk.
>>>
>>> Cheers
>>>
>>> Klaus
>>>
>>>
>> Thanks Klaus!
>> _______________________________________________
>> izpack-devel mailing list
>> izpack-devel at lists.berlios.de
>> https://lists.berlios.de/mailman/listinfo/izpack-devel
>>
>>
> _______________________________________________
> izpack-devel mailing list
> izpack-devel at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/izpack-devel
>
>
--
Scott Plante, CTO
Insight Systems, Inc.
(+1) 404 873 0058 x104
splante at insightsys.com
http://zyross.com
More information about the izpack-devel
mailing list