1 19 package org.java.plugin.tools.ant; 20 21 import java.io.File ; 22 23 import org.apache.tools.ant.BuildException; 24 import org.java.plugin.tools.PluginArchiver; 25 26 30 public final class PackTask extends BaseJpfTask { 31 private File destFile; 32 33 36 public void setDestFile(final File aDestFile) { 37 this.destFile = aDestFile; 38 } 39 40 43 public void execute() { 44 if (destFile == null) { 45 throw new BuildException("destfile attribute must be set!", getLocation()); 47 } 48 initRegistry(true); 49 log("Creating plug-ins archive..."); try { 51 PluginArchiver.pack(getRegistry(), getPathResolver(), destFile); 52 log("... plug-ins archive created in file " + destFile); } catch (Exception e) { 54 throw new BuildException(e); 55 } 56 } 57 } 58 | Popular Tags |