lmPI = Math.min(piList.lastModified(), systemPluginList.lastModified());
lmPI = Math.max(piList.lastModified(), systemPluginList.lastModified());
    public void execute() throws BuildException {        final long start = System.currentTimeMillis();        final PluginList piList;        final PluginList systemPluginList;        final long lmPI;        try {            piList = getPluginList();            systemPluginList = getSystemPluginList();            if ((destFile == null) && (destDir != null)) {                destFile = new File(destDir, piList.getName() + ".jgz");            }            lmPI = Math.min(piList.lastModified(), systemPluginList.lastModified());        } catch (PluginException ex) {            throw new BuildException(ex);        } catch (IOException ex) {            throw new BuildException(ex);        }        final long lmDest = destFile.lastModified();        final long lmPIL = getPluginListFile().lastModified();        if ((lmPIL < lmDest) && (lmPI < lmDest)) {            // No need to do anything, skip            return;        }        destFile.delete();        final File tmpFile = new File(destFile + ".tmp");        tmpFile.delete();        try {            // Load the plugin descriptors            /*             * final PluginRegistry piRegistry; piRegistry = new             * PluginRegistryModel(piList.getDescriptorUrlList());             */            final Jar jarTask = new Jar();            jarTask.setProject(getProject());            jarTask.setTaskName(getTaskName());            jarTask.setDestFile(tmpFile);            jarTask.setCompress(false);            final Manifest mf = piList.getManifest();            if (mf != null) {                jarTask.addConfiguredManifest(mf);            }            final URL[] systemPlugins = systemPluginList.getPluginList();            final ArrayList<PluginJar> pluginJars = new ArrayList<PluginJar>();            for (URL url : systemPlugins) {                final BuildPluginJar piJar = new BuildPluginJar(url);                if (!piJar.getDescriptor().isSystemPlugin()) {                    log("Non-system plugin " + piJar.getDescriptor().getId()                            + " in plugin-list will be ignored",                            Project.MSG_WARN);                } else {                    pluginJars.add(piJar);                }            }            final URL[] pluginList = piList.getPluginList();            for (URL url : pluginList) {                final BuildPluginJar piJar = new BuildPluginJar(url);                if (piJar.getDescriptor().isSystemPlugin()) {                    log("System plugin " + piJar.getDescriptor().getId()                            + " in plugin-list will be ignored",                            Project.MSG_WARN);                } else {                    pluginJars.add(piJar);                }            }            testPluginPrerequisites(pluginJars);            final List<PluginJar> sortedPluginJars = sortPlugins(pluginJars);            for (Iterator<PluginJar> i = sortedPluginJars.iterator(); i                    .hasNext();) {                final BuildPluginJar piJar = (BuildPluginJar) i.next();                if (!piJar.getDescriptor().isSystemPlugin()) {//                    pluginJars.add(piJar);                    final File f = new File(piJar.getPluginUrl().getPath());                    final FileSet fs = new FileSet();                    fs.setDir(f.getParentFile());                    fs.setIncludes(f.getName());                    jarTask.addFileset(fs);                }            }            /*             * for (Iterator i = piRegistry.getDescriptorIterator();             * i.hasNext(); ) { final PluginDescriptor descr =             * (PluginDescriptor)i.next(); final Runtime rt =             * descr.getRuntime(); if (rt != null) { final Library[] libs =             * rt.getLibraries(); for (int l = 0; l < libs.length; l++) {             * processLibrary(jarTask, libs[l], fileSets, getPluginDir()); } }             */            // Now create the jar file            jarTask.execute();            // Now zip it            final GZip gzipTask = new GZip();            gzipTask.setProject(getProject());            gzipTask.setTaskName(getTaskName());            gzipTask.setSrc(tmpFile);            gzipTask.setZipfile(destFile);            gzipTask.execute();            tmpFile.delete();        } catch (Exception ex) {            ex.printStackTrace();            throw new BuildException(ex);        }        final long end = System.currentTimeMillis();        log("Building initjar took " + (end - start) + "ms");    }