add arq containers
[idea/community.git] / plugins / maven / src / main / java / org / jetbrains / idea / maven / utils / library / RepositoryLibraryDescription.java
index 764a9f9c91d47342568b331b1537d5c4ef5bb546..f0850ee2969ffde4f11eaf8c88330a275bc2f9d3 100644 (file)
@@ -24,19 +24,29 @@ import org.jetbrains.annotations.Nullable;
 import org.jetbrains.idea.maven.model.MavenRepositoryInfo;
 
 import javax.swing.*;
-import java.util.Collections;
+import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
 
 public abstract class RepositoryLibraryDescription {
   protected static final ExtensionPointName<RepositoryLibraryDescription> EP_NAME
     = ExtensionPointName.create("org.jetbrains.idea.maven.repositoryLibrary");
-  private static final List<MavenRepositoryInfo> defaultRemoteRepositories = Collections.singletonList(new MavenRepositoryInfo(
-    "maven.central",
-    "maven.central",
-    "http://repo1.maven.org/maven2"));
+  protected static final MavenRepositoryInfo mavenCentralRepository = new MavenRepositoryInfo(
+    "central",
+    "Maven Central repository",
+    "http://repo1.maven.org/maven2");
+  protected static final MavenRepositoryInfo jbossCommunityRepository = new MavenRepositoryInfo(
+    "jboss.community",
+    "JBoss Community repository",
+    "http://repository.jboss.org/nexus");
+  private static final List<MavenRepositoryInfo> defaultRemoteRepositories =
+    Arrays.asList(mavenCentralRepository, jbossCommunityRepository);
   private static Map<String, RepositoryLibraryDescription> registeredLibraries;
 
+  public static <C extends RepositoryLibraryDescription> C ofClass(Class<C> clazz) {
+    return EP_NAME.findExtension(clazz);
+  }
+
   @NotNull
   public static synchronized RepositoryLibraryDescription findDescription(@NotNull final RepositoryLibraryProperties properties) {
     if (registeredLibraries == null) {