* @param targetID A string representing a target.
* @return An array of artifact URLs.
* @throws java.io.IOException When there is a problem processing an artifact for deployment.
*/
DeploymentArtifact[] getNecessaryDeploymentArtifacts(String targetID, String version) throws IOException {
TargetObject to = getTargetObject(targetID);
Map<ArtifactObject, String> bundles = new HashMap<ArtifactObject, String>();
Map<ArtifactObject, String> artifacts = new HashMap<ArtifactObject, String>();
Map<ArtifactObject, Map<FeatureObject, List<DistributionObject>>> path =
new HashMap<ArtifactObject, Map<FeatureObject, List<DistributionObject>>>();
// First, find all basic bundles and artifacts. An while we're traversing the
// tree of objects, build the tree of properties.
if (to != null) {
for (DistributionObject distribution : to.getDistributions()) {
for (FeatureObject feature : distribution.getFeatures()) {
for (ArtifactObject artifact : feature.getArtifacts()) {
if (m_bundleHelper.canUse(artifact)) {
bundles.put(artifact, m_bundleHelper.getResourceProcessorPIDs(artifact));
}