Artifact bundleArtifact = new DefaultArtifact("org.apache.example", "example", "1.0.0",
null, "jar", null,
new DefaultArtifactHandler());
bundle.setArtifact(bundleArtifact);
ArtifactRef configFile = new ArtifactRef("mvn:org.apache.example/example/1.0.0/cfg");
Artifact configFileArtifact = new DefaultArtifact("org.apache.example", "example", "1.0.0",
null, "xml", "exampleconfig",
new DefaultArtifactHandler());
configFile.setArtifact(configFileArtifact);
Feature feature = new Feature("example");
feature.addBundle(bundle);
feature.addConfigFile(configFile);