packageManifest.setVersion("29.0"); // TODO: Make version configurable / auto
List<PackageTypeMembers> packageTypeMembersList = new ArrayList<PackageTypeMembers>();
scanFilesToDeploy(filesToDeploy, typeMembersByType, repositoryContainer);
for(String metadataType : typeMembersByType.keySet())
{
PackageTypeMembers packageTypeMembers = new PackageTypeMembers();
packageTypeMembers.setName(metadataType);
packageTypeMembers.setMembers((String[])typeMembersByType.get(metadataType).toArray(new String[0]));
packageTypeMembersList.add(packageTypeMembers);
}
packageManifest.setTypes((PackageTypeMembers[]) packageTypeMembersList.toArray(new PackageTypeMembers[0]));
// Serialise it (better way to do this?)
TypeMapper typeMapper = new TypeMapper();