diff --git a/karaf/tooling/features-maven-plugin/src/main/java/org/apache/felix/karaf/tooling/features/ValidateFeaturesMojo.java b/karaf/tooling/features-maven-plugin/src/main/java/org/apache/felix/karaf/tooling/features/ValidateFeaturesMojo.java
index 4568372..bdea817 100644
--- a/karaf/tooling/features-maven-plugin/src/main/java/org/apache/felix/karaf/tooling/features/ValidateFeaturesMojo.java
+++ b/karaf/tooling/features-maven-plugin/src/main/java/org/apache/felix/karaf/tooling/features/ValidateFeaturesMojo.java
@@ -31,6 +31,9 @@
 import org.apache.felix.karaf.features.Repository;
 import org.apache.felix.karaf.features.internal.RepositoryImpl;
 import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.repository.DefaultArtifactRepository;
+import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
 import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
 import org.apache.maven.artifact.resolver.ArtifactResolutionException;
 import org.apache.maven.artifact.resolver.DefaultArtifactCollector;
@@ -57,6 +60,7 @@
 public class ValidateFeaturesMojo extends MojoSupport {
 
     private static final String MVN_URI_PREFIX = "mvn:";
+    private static final String MVN_REPO_SEPARATOR = "!";
 
     /**
      * The dependency tree builder to use.
@@ -323,7 +327,7 @@
      * Check if the artifact is an OSGi bundle
      */
     private boolean isBundle(Artifact artifact) {
-        if (artifact.getArtifactHandler().getPackaging().equals("bundle")) {
+        if ("bundle".equals(artifact.getArtifactHandler().getPackaging())) {
             return true;
         } else {
             try {
@@ -366,19 +370,40 @@
     /*
      * Resolve an artifact, downloading it from remote repositories when necessary
      */
-    private Artifact resolve(String bundle) throws ArtifactResolutionException, ArtifactNotFoundException {
+    private Artifact resolve(String bundle) throws Exception, ArtifactNotFoundException {
         Artifact artifact = getArtifact(bundle);
-        resolver.resolve(artifact, remoteRepos, localRepo);
-        return artifact;
+        if (bundle.indexOf(MVN_REPO_SEPARATOR) >= 0) {
+            if (bundle.startsWith(MVN_URI_PREFIX)) {
+                bundle = bundle.substring(MVN_URI_PREFIX.length());
+            }
+            String repo = bundle.substring(0, bundle.indexOf(MVN_REPO_SEPARATOR));
+            ArtifactRepository repository = new DefaultArtifactRepository(artifact.getArtifactId() + "-repo", repo,
+                                                                          new DefaultRepositoryLayout());
+            List<ArtifactRepository> repos = new LinkedList<ArtifactRepository>();
+            repos.add(repository);
+            resolver.resolve(artifact, repos, localRepo);
+        } else {
+            resolver.resolve(artifact, remoteRepos, localRepo);
+        }
+        if (artifact == null) {
+            throw new Exception("Unable to resolve artifact for uri " + bundle);
+        } else {
+            return artifact;
+        }
     }
 
     /*
      * Create an artifact for a given mvn: uri
      */
     private Artifact getArtifact(String uri) {
+        // remove the mvn: prefix when necessary
         if (uri.startsWith(MVN_URI_PREFIX)) {
             uri = uri.substring(MVN_URI_PREFIX.length());
         }
+        // remove the repository url when specified
+        if (uri.contains(MVN_REPO_SEPARATOR)) {
+            uri = uri.split(MVN_REPO_SEPARATOR)[1];
+        }
         String[] elements = uri.split("/");
         switch (elements.length) {
         case 5:
