Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Arthorne2009-10-20 14:17:33 -0400
committerJohn Arthorne2009-10-20 14:17:33 -0400
commitd80ba2d81fc220ab5862e72c05e93e403542efb1 (patch)
tree2d49008e3573a51df96b2e55304607dcff8fdf1d /bundles/org.eclipse.equinox.p2.artifact.repository
parent0f37c767a9e304c0b15c4eaa08f833bd5f454831 (diff)
downloadrt.equinox.p2-d80ba2d81fc220ab5862e72c05e93e403542efb1.tar.gz
rt.equinox.p2-d80ba2d81fc220ab5862e72c05e93e403542efb1.tar.xz
rt.equinox.p2-d80ba2d81fc220ab5862e72c05e93e403542efb1.zip
Bug 290207 - Support multiple p2 instances in a single VM
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.artifact.repository')
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/.project5
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/META-INF/MANIFEST.MF3
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/OSGI-INF/repositoryManager.xml8
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/build.properties23
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRepositoryComponent.java26
5 files changed, 49 insertions, 16 deletions
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/.project b/bundles/org.eclipse.equinox.p2.artifact.repository/.project
index 529f56491..ad19a3475 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/.project
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/.project
@@ -35,6 +35,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.artifact.repository/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.artifact.repository/META-INF/MANIFEST.MF
index ac38803c9..0f87eab08 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/META-INF/MANIFEST.MF
@@ -61,6 +61,8 @@ Import-Package: javax.xml.parsers,
org.eclipse.equinox.internal.provisional.p2.metadata,
org.eclipse.equinox.internal.provisional.p2.repository,
org.eclipse.equinox.internal.provisional.spi.p2.repository,
+ org.eclipse.equinox.p2.core,
+ org.eclipse.equinox.p2.core.spi,
org.eclipse.internal.provisional.equinox.p2.jarprocessor;resolution:=optional,
org.eclipse.osgi.framework.log;version="1.0.0",
org.eclipse.osgi.signedcontent;version="1.0.0",
@@ -75,3 +77,4 @@ Bundle-RequiredExecutionEnvironment: J2SE-1.4,
CDC-1.1/Foundation-1.1
Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)",
org.eclipse.equinox.registry
+Service-Component: OSGI-INF/repositoryManager.xml
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/OSGI-INF/repositoryManager.xml b/bundles/org.eclipse.equinox.p2.artifact.repository/OSGI-INF/repositoryManager.xml
new file mode 100644
index 000000000..c85058f8c
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/OSGI-INF/repositoryManager.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.artifact.repository">
+ <implementation class="org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryComponent"/>
+ <service>
+ <provide interface="org.eclipse.equinox.p2.core.spi.IAgentServiceFactory"/>
+ </service>
+ <property name="p2.agent.servicename" type="String" value="org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager"/>
+</scr:component> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/build.properties b/bundles/org.eclipse.equinox.p2.artifact.repository/build.properties
index f00d7fb2b..6a66d4e05 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/build.properties
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/build.properties
@@ -1,25 +1,16 @@
-###############################################################################
-# Copyright (c) 2007, 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/,\
.,\
plugin.xml,\
about.html,\
plugin.properties,\
- ant_tasks/artifactRepository-ant.jar
-src.includes = about.html,\
- schema/
-jars.extra.classpath = platform:/plugin/org.apache.ant/lib/ant.jar
+ ant_tasks/artifactRepository-ant.jar,\
+ OSGI-INF/
jars.compile.order = .,\
ant_tasks/artifactRepository-ant.jar
-source.ant_tasks/artifactRepository-ant.jar = src_ant/
output.ant_tasks/artifactRepository-ant.jar = bin_ant/
+src.includes = about.html,\
+ schema/
+source.. = src/
+source.ant_tasks/artifactRepository-ant.jar = src_ant/
+jars.extra.classpath = platform:/plugin/org.apache.ant/lib/ant.jar
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRepositoryComponent.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRepositoryComponent.java
new file mode 100644
index 000000000..39f807b30
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRepositoryComponent.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 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
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.artifact.repository;
+
+import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory;
+
+/**
+ * Service factory providing {@link IArtifactRepositoryManager} instances.
+ */
+public class ArtifactRepositoryComponent implements IAgentServiceFactory {
+
+ public Object createService(IProvisioningAgent agent) {
+ return new ArtifactRepositoryManager();
+ }
+
+}

Back to the top