Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2010-05-12 12:28:05 -0400
committerPascal Rapicault2010-05-12 12:28:05 -0400
commitf19abed12ad5dbed3a6d97d0eb7fa71ba236d513 (patch)
tree2d8ad5bcc83ca836f69c77bed00e3bc36d1cb05d /bundles/org.eclipse.equinox.p2.repository
parent10520757435420504f38ac5144bfba24fc444af9 (diff)
downloadrt.equinox.p2-f19abed12ad5dbed3a6d97d0eb7fa71ba236d513.tar.gz
rt.equinox.p2-f19abed12ad5dbed3a6d97d0eb7fa71ba236d513.tar.xz
rt.equinox.p2-f19abed12ad5dbed3a6d97d0eb7fa71ba236d513.zip
Bug 274272 - [repository] Cache artifact repository index
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.repository')
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/.project5
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/META-INF/MANIFEST.MF1
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/OSGI-INF/cacheManager.xml8
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/build.properties19
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManager.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManagerComponent.java27
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Messages.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/messages.properties7
8 files changed, 56 insertions, 20 deletions
diff --git a/bundles/org.eclipse.equinox.p2.repository/.project b/bundles/org.eclipse.equinox.p2.repository/.project
index 120c0420d..ee1e6707b 100644
--- a/bundles/org.eclipse.equinox.p2.repository/.project
+++ b/bundles/org.eclipse.equinox.p2.repository/.project
@@ -25,6 +25,11 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ds.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
diff --git a/bundles/org.eclipse.equinox.p2.repository/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.repository/META-INF/MANIFEST.MF
index 8c9fb2323..63428ef07 100644
--- a/bundles/org.eclipse.equinox.p2.repository/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.repository/META-INF/MANIFEST.MF
@@ -55,3 +55,4 @@ Import-Package: javax.xml.parsers,
org.osgi.util.tracker;version="1.3.0",
org.xml.sax,
org.xml.sax.helpers
+Service-Component: OSGI-INF/cacheManager.xml
diff --git a/bundles/org.eclipse.equinox.p2.repository/OSGI-INF/cacheManager.xml b/bundles/org.eclipse.equinox.p2.repository/OSGI-INF/cacheManager.xml
new file mode 100644
index 000000000..d04c8dfb1
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.repository/OSGI-INF/cacheManager.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.p2.repository">
+ <implementation class="org.eclipse.equinox.internal.p2.repository.CacheManagerComponent"/>
+ <service>
+ <provide interface="org.eclipse.equinox.p2.core.spi.IAgentServiceFactory"/>
+ </service>
+ <property name="p2.agent.servicename" type="String" value="org.eclipse.equinox.internal.p2.repository.CacheManager"/>
+</scr:component>
diff --git a/bundles/org.eclipse.equinox.p2.repository/build.properties b/bundles/org.eclipse.equinox.p2.repository/build.properties
index 7ac06b41b..82222b857 100644
--- a/bundles/org.eclipse.equinox.p2.repository/build.properties
+++ b/bundles/org.eclipse.equinox.p2.repository/build.properties
@@ -1,19 +1,10 @@
-###############################################################################
-# Copyright (c) 2005, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
about.html,\
- plugin.properties
+ plugin.properties,\
+ OSGI-INF/cacheManager.xml
src.includes = about.html
-javacTarget=jsr14
-javacSource=1.5
+javacSource = 1.5
+javacTarget = jsr14
+source.. = src/
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManager.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManager.java
index 8bf33c346..e2fe061ce 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManager.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManager.java
@@ -10,7 +10,7 @@
* Cloudsmith Inc - additional implementation
* Sonatype Inc - additional implementation
*******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository;
+package org.eclipse.equinox.internal.p2.repository;
import java.io.*;
import java.net.URI;
@@ -19,8 +19,6 @@ import java.util.HashSet;
import org.eclipse.core.runtime.*;
import org.eclipse.ecf.filetransfer.UserCancelledException;
import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.repository.*;
-import org.eclipse.equinox.internal.p2.repository.Activator;
import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
import org.eclipse.equinox.internal.provisional.p2.core.eventbus.SynchronousProvisioningListener;
import org.eclipse.equinox.internal.provisional.p2.repository.IStateful;
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManagerComponent.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManagerComponent.java
new file mode 100644
index 000000000..26d5851b5
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManagerComponent.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Sonatype, Inc and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sonatype, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.repository;
+
+import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
+import org.eclipse.equinox.p2.core.IAgentLocation;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory;
+
+public class CacheManagerComponent implements IAgentServiceFactory {
+
+ public Object createService(IProvisioningAgent agent) {
+ final IProvisioningEventBus eventBus = (IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME);
+ CacheManager cache = new CacheManager((IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME));
+ cache.setEventBus(eventBus);
+ return cache;
+ }
+
+}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Messages.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Messages.java
index 2ed09a9d3..daf6642ee 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Messages.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Messages.java
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Cloudsmith Inc - additional messages
+ * Sonatype Inc - ongoing development
*******************************************************************************/
package org.eclipse.equinox.internal.p2.repository;
@@ -16,6 +17,10 @@ import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.repository.messages"; //$NON-NLS-1$
+ public static String CacheManager_AuthenticationFaileFor_0;
+ public static String CacheManager_FailedCommunicationWithRepo_0;
+ public static String CacheManager_Neither_0_nor_1_found;
+
public static String artifact_not_found;
public static String io_failedRead;
public static String ecf_configuration_error;
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/messages.properties b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/messages.properties
index 15728fe56..510885ba0 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/messages.properties
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/messages.properties
@@ -8,6 +8,7 @@
# Contributors:
# IBM Corporation - initial API and implementation
# Cloudsmith Inc - additional messages
+# Sonatype Inc - ongoing implementation
###############################################################################
artifact_not_found=Artifact not found: {0}.
@@ -18,9 +19,9 @@ ecf_configuration_error=Transport initialization error.
repoMan_internalError=Internal error.
repo_loading = Loading the repository {0}
-
-
-
+CacheManager_Neither_0_nor_1_found=Neither {0} nor {1} found.
+CacheManager_AuthenticationFaileFor_0=Authentication failed for {0}.
+CacheManager_FailedCommunicationWithRepo_0=Communication with repository at {0} failed.
exception_malformedRepoURI = The repository location ({0}) must be a URI.

Back to the top