info.setFilename(artifact.getFile().getName());
String name = artifact.getFile().getName(); name = name.substring(0, name.lastIndexOf('.')) + ".zip"; info.setFilename(name);
	protected void generateJbiDescriptor() throws JbiPluginException,			MojoExecutionException {		File outputDir = new File(generatedDescriptorLocation);		if (!outputDir.exists()) {			outputDir.mkdirs();		}		File descriptor = new File(outputDir, JBI_DESCRIPTOR);		List serviceUnits = new ArrayList();					Set artifacts = project.getArtifacts();		for (Iterator iter = artifacts.iterator(); iter.hasNext();) {			Artifact artifact = (Artifact) iter.next();			// TODO: utilise appropriate methods from project builder			ScopeArtifactFilter filter = new ScopeArtifactFilter(					Artifact.SCOPE_RUNTIME);			if (!artifact.isOptional() && filter.include(artifact)					&& (artifact.getDependencyTrail().size() == 2)) {				MavenProject project = null;				try {					project = pb.buildFromRepository(artifact, remoteRepos,							localRepo);				} catch (ProjectBuildingException e) {					getLog().warn(							"Unable to determine packaging for dependency : "									+ artifact.getArtifactId()									+ " assuming jar");				}				if ((project != null)						&& (project.getPackaging().equals("jbi-service-unit"))) {					DependencyInformation info = new DependencyInformation();					info.setName(artifact.getArtifactId());					info.setFilename(artifact.getFile().getName());					info.setComponent(getComponentName(project, artifacts,							artifact));					info.setDescription(project.getDescription());					serviceUnits.add(info);				}			}		}				List orderedServiceUnits = reorderServiceUnits(serviceUnits);		JbiServiceAssemblyDescriptorWriter writer = new JbiServiceAssemblyDescriptorWriter(				encoding);		writer.write(descriptor, name, description, orderedServiceUnits);	}