Revision 36702 branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.impl/src/main/java/org/gvsig/installer/lib/impl/creation/DefaultMakePluginPackageService.java

View differences:

DefaultMakePluginPackageService.java
170 170
		LOG.debug("Creating a package set of the package info: \n{0}",
171 171
				packageInfo);
172 172

  
173
		writeAdditionalFiles(packageInfo);
174 173
		String pluginFileName = manager.getPackageFileName(packageInfo);
175 174
		installerProviderServices.compressPackageSet(
176 175
				getAbsolutePluginPackageDirectory(packageInfo), pluginFileName,
177 176
				packageStream);
178 177
	}
179 178

  
180
	private void writeAdditionalFiles(PackageInfo packageInfo)
181
			throws MakePluginPackageServiceException {
182
		// Write the package.info file
183
		writePackageInfo(packageInfo);
179
    public void preparePackage(PackageInfo packageInfo)
180
        throws MakePluginPackageServiceException {
184 181

  
185
		if (packageInfo.getAntScript() != null) {
186
			// Create the ant file
187
			writeAntFile(packageInfo);
182
        LOG.debug("Preparing a package set of the package info: \n{0}",
183
            packageInfo);
184
        // Write the package.info file
185
        writePackageInfo(packageInfo);
186
        
187
        if (packageInfo.getAntScript() != null) {
188
        	// Create the ant file
189
        	writeAntFile(packageInfo);
190
        
191
        	// Copy the selected files
192
        	writeSelectedFiles(packageInfo);
193
        }
194
    }
188 195

  
189
			// Copy the selected files
190
			writeSelectedFiles(packageInfo);
191
		}
192
	}
193

  
194 196
	public void createPackage(PackageInfo packageInfo,
195 197
			OutputStream packageStream)
196 198
			throws MakePluginPackageServiceException {
197 199
		LOG.debug("Creating package of the package info: \n{0}", packageInfo);
198 200

  
199
		writeAdditionalFiles(packageInfo);
200 201
		installerProviderServices.compressPackage(
201 202
				getAbsolutePluginPackageDirectory(packageInfo), packageStream);
202 203
	}
......
290 291
            }
291 292
        } catch (IOException e) {
292 293
            throw new MakePluginPackageServiceException(
293
                "Exception copying the files");
294
                "Exception copying the files", e);
294 295
        }
295 296
    }
296 297

  

Also available in: Unified diff