jmborer opened a new issue, #128:
URL: https://github.com/apache/netbeans-mavenutils-nbm-maven-plugin/issues/128

   There is this warning message that appears during the creation of the NBM 
file.
   
   This occurs when CreateNbmMojo.java is invoked during the build process.  
The mojo uses the ant harness from Netbeans where it invokes:
   ```
   MakeNBM` nbmTask = (MakeNBM) antProject.createTask( "makenbm" ) 
   ```
   which is an Ant task that lives in the Netbeans Build System..
   
   The warning message appears because the method createUpdaterJar  is never 
invoked in CreateNbmMojo.java:
   
   MakeNBM.java
   ```
      public Path createUpdaterJar() {
           return updaterJar = new Path(getProject());
       }
   
   ...
   
           if (updaterJar != null && updaterJar.size() > 0) {
               try {
                   ByteArrayOutputStream baos = new ByteArrayOutputStream();
                   XMLUtil.write(doc, baos);
                   validateAgainstAUDTDs(new InputSource(new 
ByteArrayInputStream(baos.toByteArray())), updaterJar, this);
               } catch (Exception x) {
                   throw new BuildException("Could not validate Info.xml before 
writing: " + x, x, getLocation());
               }
           } else {
               log("No updater.jar specified, cannot validate Info.xml against 
DTD", Project.MSG_WARN);
           }
    
   ```
   
   This is how Netbeans build.xml uses it:
   
   ```
           <makenbm file="${build.dir}/${nbm}"
                    productdir="${cluster}"
                    module="${module.jar}"
                    homepage="${nbm.homepage}"
                    distribution="${nbm.distribution}"
                    needsrestart="${nbm.needs.restart}"
                    global="${nbm.is.global}"
                    preferredupdate="${nbm.is.preferredupdate}"
                    usepack200="${use.pack200}"
                    pack200excludes="${pack200.excludes}"
                    alwayscreatenbm="${nbm.always.create}"
                    targetcluster="${nbm.target.cluster}"
                    releasedate="${nbm.release.date}"
                    moduleauthor="${nbm.module.author}"
                    locales="${nbm.locales}"
                    >
               <license file="${license.file.override}"/>
               <signature keystore="${keystore}" storepass="${storepass}" 
alias="${nbm_alias}" tsaurl="${tsaurl}" tsacert="${tsacert}"/>
               <updaterjar>
                   <pathfileset>
                       <path refid="cluster.path.id"/>
                       <filename name="modules/ext/updater.jar"/>
                   </pathfileset>
               </updaterjar>
               <executables refid="module.executable.files"/>
               <extranbmfiles refid="extra.nbm.files"/>
           </makenbm>
   ```
   
   So somehow, CreateNbmMojo.java shall call the the method `createUpdaterJar` 
on the `MakeNBM` Ant task to properly initialize the updater.jar value.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to