[izpack-devel] Custom Actions NPE, patch

Scott Plante splante at insightsys.com
Sat Mar 10 19:27:56 CET 2007


Oops, try this one instead. I didn't close my tt tag in one spot before.

Index: doc-ng/XHTML/node9.html
===================================================================
--- doc-ng/XHTML/node9.html     (revision 1753)
+++ doc-ng/XHTML/node9.html     (working copy)
@@ -450,20 +450,26 @@
         [IzPackRoot]/src/lib/[MyPackagePath]/MyCompilerListener.java</tt>.
       </li>
       <li>
-        Add a "compile.simple" antcall in to 
<tt>[IzPackRoot]/src/build.xml</tt>.
+        Add a "<tt>build-compiler-listener</tt>" macro call in to the
+        <tt>build.listeners</tt> target in 
<tt>[IzPackRoot]/src/build.xml</tt>.
+        Note that the name attribute value in the build-instealler-listener
+        must match <tt>CompilerListener</tt> implementation class name (not
+        including the package). You should include the actual Listener
+        implementation, as well as any other classes required by the 
listener.
 <pre>
-&lt;antcall target="compile.listener.simple"&gt;
-  &lt;param name="listener" value="MyCompilerListener"/&gt;
-  &lt;param name="listener-dir" value="MyCompilerListener"/&gt;
-  &lt;param name="listener-include" value="[MyPackagePath]"/&gt;
-&lt;/antcall&gt;
+        &lt;build-compiler-listener name="MyCompilerListener"&gt;
+            &lt;include name="[MyPackagePath]/MyCompilerListener.java"/&gt;
+            &lt;include 
name="[MyPackagePath]/SomeOtherHelperClass.java"/&gt;
+        &lt;/build-compiler-listener&gt;
 </pre>
       </li>
       <li>
         Run <tt>[IzPackRoot]/src/build.xml</tt>.
+        An <tt>ant</tt> alone will execute the required targets.
       </li>
       <li>
-        Add a "listeners" ELEMENT with a "listener" ELEMENT with a 
"compiler" attribute in to [MyProjectPath]/install.xml
+        Add a "listeners" ELEMENT with a "listener" ELEMENT with a 
"compiler"
+        attribute in to [MyProjectPath]/install.xml
 <pre>
   &lt;listeners&gt;
     &lt;listener compiler="MyCompilerListener" /&gt;
@@ -471,7 +477,7 @@
 </pre>
       </li>
       <li>
-        Compile with
+        Compile with the following command, or an ant task you have set up.
 <pre>
 java -jar [IzPackRoot]/lib/compiler.jar -HOME [IzPackRoot]
   [MyProjectPath]/install.xml -b [MyProductPath] -o


Scott Plante wrote:
> Hi Klaus,
>
>  I updated the documentation as we discussed. Here is the patch. By 
> the way, we just distributed our first application packaged with 
> IzPack. We converted from InstallAnywhere, which wouldn't work with 
> the updated version of Java required for the new US Daylight Savings 
> Time date change, which goes into effect tomorrow night. I had some 
> trouble and the docs could certainly use some improvement, but the 
> beauty of open source is that the answers were all there with a little 
> digging in the source code. Perhaps as time goes on I will have a 
> chance to learn more about IzPack and submit some more documentation 
> (and other) patches to help make a great package even better. I also 
> wrote this wiki page a while back:
>
> http://www.izforge.com/izpack/wiki/native_launcher_and_alternatives#creating_a_native_launcher_that_installs_a_jre 
>
>
>  Thanks for your help.
>
> Scott
>
> splante at guinness:~/dev/izpack/src/> svn diff doc-ng/XHTML/node9.html
> Index: doc-ng/XHTML/node9.html
> ===================================================================
> --- doc-ng/XHTML/node9.html     (revision 1753)
> +++ doc-ng/XHTML/node9.html     (working copy)
> @@ -450,20 +450,26 @@
>         
> [IzPackRoot]/src/lib/[MyPackagePath]/MyCompilerListener.java</tt>.
>       </li>
>       <li>
> -        Add a "compile.simple" antcall in to 
> <tt>[IzPackRoot]/src/build.xml</tt>.
> +        Add a "<tt>build-compiler-listener</tt>" macro call in to the
> +        <tt>build.listeners</tt> target in 
> <tt>[IzPackRoot]/src/build.xml</tt>.
> +        Note that the name attribute value in the 
> build-instealler-listener
> +        must match <tt>CompilerListener</tt> implementation class 
> name (not
> +        including the package). You should include the actual Listener
> +        implementation, as well as any other classes required by the 
> listener.
> <pre>
> -&lt;antcall target="compile.listener.simple"&gt;
> -  &lt;param name="listener" value="MyCompilerListener"/&gt;
> -  &lt;param name="listener-dir" value="MyCompilerListener"/&gt;
> -  &lt;param name="listener-include" value="[MyPackagePath]"/&gt;
> -&lt;/antcall&gt;
> +        &lt;build-compiler-listener name="MyCompilerListener"&gt;
> +            &lt;include 
> name="[MyPackagePath]/MyCompilerListener.java"/&gt;
> +            &lt;include 
> name="[MyPackagePath]/SomeOtherHelperClass.java"/&gt;
> +        &lt;/build-compiler-listener&gt;
> </pre>
>       </li>
>       <li>
>         Run <tt>[IzPackRoot]/src/build.xml</tt>.
> +        An <tt>ant</a> alone will execute the required targets.
>       </li>
>       <li>
> -        Add a "listeners" ELEMENT with a "listener" ELEMENT with a 
> "compiler" attribute in to [MyProjectPath]/install.xml
> +        Add a "listeners" ELEMENT with a "listener" ELEMENT with a 
> "compiler"
> +        attribute in to [MyProjectPath]/install.xml
> <pre>
>   &lt;listeners&gt;
>     &lt;listener compiler="MyCompilerListener" /&gt;
> @@ -471,7 +477,7 @@
> </pre>
>       </li>
>       <li>
> -        Compile with
> +        Compile with the following command, or an ant task you have 
> set up.
> <pre>
> java -jar [IzPackRoot]/lib/compiler.jar -HOME [IzPackRoot]
>   [MyProjectPath]/install.xml -b [MyProductPath] -o
>
>
> Bartz, Klaus wrote:
>> Hi Scott,
>> will be nice if you addapt the docu to the current
>> "reality" (I hate to write docu :-( ).
>> I am always writing docu in the html file. The xml files
>> will be administered by an other developer (Fabrice).
>> Some time ago our docu was converted from latex to html.
>> Therefore some curios anchors.
>> If you can do the changes, send me the svn diff of
>> src/doc-ng/XHTML/node9.html.
>>
>> Cheers
>>
>> Klaus
>>  
>

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