You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by hi...@apache.org on 2012/08/02 22:08:21 UTC
svn commit: r1368683 - in /ant/ivy/core/trunk: ./
src/java/org/apache/ivy/osgi/core/ src/java/org/apache/ivy/osgi/p2/
src/java/org/apache/ivy/osgi/updatesite/
test/java/org/apache/ivy/osgi/core/ test/java/org/apache/ivy/osgi/p2/
test/test-p2/sources/ t...
Author: hibou
Date: Thu Aug 2 20:08:20 2012
New Revision: 1368683
URL: http://svn.apache.org/viewvc?rev=1368683&view=rev
Log:
Add support for source bundles from p2 repositories
Added:
ant/ivy/core/trunk/test/java/org/apache/ivy/osgi/p2/
ant/ivy/core/trunk/test/java/org/apache/ivy/osgi/p2/P2DescriptorTest.java (with props)
ant/ivy/core/trunk/test/test-p2/sources/
ant/ivy/core/trunk/test/test-p2/sources/artifacts.xml (with props)
ant/ivy/core/trunk/test/test-p2/sources/bundles/
ant/ivy/core/trunk/test/test-p2/sources/bundles/org.apache.ivy.source_2.2.0.final_20100923230623.jar
ant/ivy/core/trunk/test/test-p2/sources/bundles/org.apache.ivy_2.2.0.final_20100923230623.jar
ant/ivy/core/trunk/test/test-p2/sources/bundles/org.apache.ivyde.eclipse_2.0.0.final-200907011148-RELEASE.jar
ant/ivy/core/trunk/test/test-p2/sources/content.xml (with props)
Modified:
ant/ivy/core/trunk/CHANGES.txt
ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/core/BundleInfo.java
ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java
ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/core/ManifestParser.java
ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/p2/P2Descriptor.java
ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/p2/P2MetadataParser.java
ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/updatesite/UpdateSiteResolver.java
ant/ivy/core/trunk/test/java/org/apache/ivy/osgi/core/ManifestParserTest.java
Modified: ant/ivy/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=1368683&r1=1368682&r2=1368683&view=diff
==============================================================================
--- ant/ivy/core/trunk/CHANGES.txt (original)
+++ ant/ivy/core/trunk/CHANGES.txt Thu Aug 2 20:08:20 2012
@@ -48,7 +48,7 @@ for detailed view of each issue, please
John Gibson
Mitch Gitman
Scott Goldstein
- Pierre Hägnestrand
+ Pierre H�gnestrand
Scott Hebert
Tobias Himstedt
Aaron Hachez
@@ -134,6 +134,8 @@ for detailed view of each issue, please
- FIX: ivy.xml extends feature complains about Windows filesystem path (IVY-1359) (thanks to Mitch Gitman and Jean-Louis Boudart)
- FIX: buildlist task chokes on absolute path to parent Ivy module (IVY-1364) (thanks to Mitch Gitman and Jean-Louis Boudart)
+- IMPROVEMENT: add support for source bundles from p2 repositories
+
2.3.0-rc1
=====================================
- DOCUMENTATION: Bad example in Project dependencies Tutorial (IVY-1263)
@@ -736,7 +738,7 @@ for detailed view of each issue, please
- FIX: IOException during publish causes NullPointerException (IVY-371)
- FIX: Comments in ivy.xml duplicated (IVY-336) (thanks to Gilles Scokart)
- FIX: Ivy failure when the ivy.xml file contains non US-ASCII characters (IVY-346) (thanks to Gilles Scokart)
-- FIX: Urlresolver is not possible to use dynamic revisions on nonstandard repository structure (IVY-350) (thanks to Pierre Hägnestrand)
+- FIX: Urlresolver is not possible to use dynamic revisions on nonstandard repository structure (IVY-350) (thanks to Pierre H�gnestrand)
version 1.4.1 - 2006-11-09
Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/core/BundleInfo.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/core/BundleInfo.java?rev=1368683&r1=1368682&r2=1368683&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/core/BundleInfo.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/core/BundleInfo.java Thu Aug 2 20:08:20 2012
@@ -64,6 +64,14 @@ public class BundleInfo {
private URI uri;
+ private boolean isSource = false;
+
+ /** the symbolic name of the bundle it is source of */
+ private String symbolicNameTarget;
+
+ /** the version of the bundle it is source of */
+ private Version versionTarget;
+
public BundleInfo(String name, Version version) {
this.symbolicName = name;
this.version = version;
@@ -82,6 +90,12 @@ public class BundleInfo {
builder.append(", version=");
builder.append(version);
builder.append("]");
+ if (isSource) {
+ builder.append(" source of ");
+ builder.append(symbolicNameTarget);
+ builder.append("@");
+ builder.append(versionTarget);
+ }
return builder.toString();
}
@@ -177,6 +191,30 @@ public class BundleInfo {
this.executionEnvironments = executionEnvironment;
}
+ public void setSource(boolean isSource) {
+ this.isSource = isSource;
+ }
+
+ public boolean isSource() {
+ return isSource;
+ }
+
+ public void setSymbolicNameTarget(String symbolicNameTarget) {
+ this.symbolicNameTarget = symbolicNameTarget;
+ }
+
+ public String getSymbolicNameTarget() {
+ return symbolicNameTarget;
+ }
+
+ public void setVersionTarget(Version versionTarget) {
+ this.versionTarget = versionTarget;
+ }
+
+ public Version getVersionTarget() {
+ return versionTarget;
+ }
+
public int hashCode() {
final int prime = 31;
int result = 1;
@@ -186,6 +224,10 @@ public class BundleInfo {
result = prime * result + ((version == null) ? 0 : version.hashCode());
result = prime * result
+ ((executionEnvironments == null) ? 0 : executionEnvironments.hashCode());
+ result = prime * result + (isSource ? 1231 : 1237);
+ result = prime * result
+ + ((symbolicNameTarget == null) ? 0 : symbolicNameTarget.hashCode());
+ result = prime * result + ((versionTarget == null) ? 0 : versionTarget.hashCode());
return result;
}
@@ -235,6 +277,23 @@ public class BundleInfo {
} else if (!executionEnvironments.equals(other.executionEnvironments)) {
return false;
}
+ if (isSource != other.isSource) {
+ return false;
+ }
+ if (symbolicNameTarget == null) {
+ if (other.symbolicNameTarget != null) {
+ return false;
+ }
+ } else if (!symbolicNameTarget.equals(other.symbolicNameTarget)) {
+ return false;
+ }
+ if (versionTarget == null) {
+ if (other.versionTarget != null) {
+ return false;
+ }
+ } else if (!versionTarget.equals(other.versionTarget)) {
+ return false;
+ }
return true;
}
Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java?rev=1368683&r1=1368682&r2=1368683&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java Thu Aug 2 20:08:20 2012
@@ -113,23 +113,8 @@ public class BundleInfoAdapter {
URI uri = bundle.getUri();
if (uri != null) {
- DefaultArtifact artifact = null;
- if ("ivy".equals(uri.getScheme())) {
- artifact = decodeIvyURI(uri);
- } else {
- if (!uri.isAbsolute()) {
- uri = baseUri.resolve(uri);
- }
- try {
- artifact = new DefaultArtifact(mrid, null, bundle.getSymbolicName(), "jar",
- "jar", new URL(uri.toString()), null);
- } catch (MalformedURLException e) {
- throw new RuntimeException("Unable to make the uri into the url", e);
- }
- }
- if (artifact != null) {
- md.addArtifact(CONF_NAME_DEFAULT, artifact);
- }
+ DefaultArtifact artifact = buildArtifact(mrid, baseUri, uri, "jar");
+ md.addArtifact(CONF_NAME_DEFAULT, artifact);
}
if (profileProvider != null) {
@@ -161,6 +146,24 @@ public class BundleInfoAdapter {
return md;
}
+ public static DefaultArtifact buildArtifact(ModuleRevisionId mrid, URI baseUri, URI uri, String type) {
+ DefaultArtifact artifact;
+ if ("ivy".equals(uri.getScheme())) {
+ artifact = decodeIvyURI(uri);
+ } else {
+ if (!uri.isAbsolute()) {
+ uri = baseUri.resolve(uri);
+ }
+ try {
+ artifact = new DefaultArtifact(mrid, null, mrid.getName(), type, "jar", new URL(
+ uri.toString()), null);
+ } catch (MalformedURLException e) {
+ throw new RuntimeException("Unable to make the uri into the url", e);
+ }
+ }
+ return artifact;
+ }
+
public static List/*<String>*/ getConfigurations(BundleInfo bundle) {
List/*<String>*/ confs = new ArrayList();
confs.add(CONF_DEFAULT);
Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/core/ManifestParser.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/core/ManifestParser.java?rev=1368683&r1=1368682&r2=1368683&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/core/ManifestParser.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/core/ManifestParser.java Thu Aug 2 20:08:20 2012
@@ -21,6 +21,7 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
+import java.io.StringReader;
import java.text.ParseException;
import java.util.Iterator;
import java.util.List;
@@ -30,6 +31,7 @@ import java.util.jar.Manifest;
import org.apache.ivy.osgi.util.Version;
import org.apache.ivy.osgi.util.VersionRange;
+import org.apache.tools.ant.util.ReaderInputStream;
/**
* Provides an OSGi manifest parser.
@@ -59,6 +61,8 @@ public class ManifestParser {
private static final String BUNDLE_REQUIRED_EXECUTION_ENVIRONMENT = "Bundle-RequiredExecutionEnvironment";
+ private static final String ECLIPSE_SOURCE_BUNDLE = "Eclipse-SourceBundle";
+
private static final String ATTR_RESOLUTION = "resolution";
private static final String ATTR_VERSION = "version";
@@ -82,6 +86,13 @@ public class ManifestParser {
return parseManifest;
}
+ public static BundleInfo parseManifest(String manifest) throws IOException, ParseException {
+ final ReaderInputStream ris = new ReaderInputStream(new StringReader(manifest));
+ final BundleInfo parseManifest = parseManifest(ris);
+ ris.close();
+ return parseManifest;
+ }
+
public static BundleInfo parseManifest(InputStream manifestStream) throws IOException,
ParseException {
final BundleInfo parseManifest = parseManifest(new Manifest(manifestStream));
@@ -167,6 +178,22 @@ public class ManifestParser {
parseCapability(bundleInfo, mainAttributes, EXPORT_SERVICE, BundleInfo.SERVICE_TYPE);
+ // handle Eclipse specific source attachement
+ String eclipseSourceBundle = mainAttributes.getValue(ECLIPSE_SOURCE_BUNDLE);
+ if (eclipseSourceBundle != null) {
+ bundleInfo.setSource(true);
+ ManifestHeaderValue eclipseSourceBundleValue = new ManifestHeaderValue(
+ eclipseSourceBundle);
+ ManifestHeaderElement element = (ManifestHeaderElement) eclipseSourceBundleValue
+ .getElements().iterator().next();
+ String symbolicNameTarget = (String) element.getValues().iterator().next();
+ bundleInfo.setSymbolicNameTarget(symbolicNameTarget);
+ String v = (String) element.getAttributes().get(ATTR_VERSION);
+ if (v != null) {
+ bundleInfo.setVersionTarget(new Version(v));
+ }
+ }
+
return bundleInfo;
}
@@ -233,4 +260,38 @@ public class ManifestParser {
return new Version(v);
}
+ /**
+ * Ensure that the lines are not longer than 72 characters, so it can be parsed by the
+ * {@link Manifest} class
+ *
+ * @param manifest
+ * @return
+ */
+ public static String formatLines(String manifest) {
+ StringBuffer buffer = new StringBuffer(manifest.length());
+ String[] lines = manifest.split("\n");
+ for (int i = 0; i < lines.length; i++) {
+ if (lines[i].length() <= 72) {
+ buffer.append(lines[i]);
+ buffer.append('\n');
+ } else {
+ buffer.append(lines[i].substring(0, 72));
+ buffer.append("\n ");
+ int n = 72;
+ while (n <= lines[i].length() - 1) {
+ int end = n + 71;
+ if (end > lines[i].length()) {
+ end = lines[i].length();
+ }
+ buffer.append(lines[i].substring(n, end));
+ buffer.append('\n');
+ if (end != lines[i].length()) {
+ buffer.append(' ');
+ }
+ n = end;
+ }
+ }
+ }
+ return buffer.toString();
+ }
}
Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/p2/P2Descriptor.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/p2/P2Descriptor.java?rev=1368683&r1=1368682&r2=1368683&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/p2/P2Descriptor.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/p2/P2Descriptor.java Thu Aug 2 20:08:20 2012
@@ -17,16 +17,20 @@
*/
package org.apache.ivy.osgi.p2;
-import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.HashMap;
+import java.util.Iterator;
import java.util.Map;
+import org.apache.ivy.core.module.descriptor.DefaultArtifact;
+import org.apache.ivy.core.module.descriptor.DefaultModuleDescriptor;
import org.apache.ivy.osgi.core.BundleInfo;
+import org.apache.ivy.osgi.core.BundleInfoAdapter;
import org.apache.ivy.osgi.core.ExecutionEnvironmentProfileProvider;
import org.apache.ivy.osgi.repo.RepoDescriptor;
import org.apache.ivy.osgi.util.Version;
+import org.apache.ivy.util.Message;
public class P2Descriptor extends RepoDescriptor {
@@ -34,15 +38,10 @@ public class P2Descriptor extends RepoDe
private Map/* <String, Map<Version, String>> */artifactUrlPatterns = new HashMap();
- private String repoUrl;
+ private Map/* <String, Map<String, URI>> */sourceURIs = new HashMap();
public P2Descriptor(URI repoUri, ExecutionEnvironmentProfileProvider profileProvider) {
super(repoUri, profileProvider);
- try {
- repoUrl = repoUri.toURL().toExternalForm();
- } catch (MalformedURLException e) {
- throw new RuntimeException("Illegal repo uri", e);
- }
}
public void setTimestamp(long timestamp) {
@@ -50,9 +49,29 @@ public class P2Descriptor extends RepoDe
}
public void addBundle(BundleInfo bundleInfo) {
+ if (bundleInfo.isSource()) {
+ Map/*<String, URI>*/ byVersion = (Map) sourceURIs.get(bundleInfo.getSymbolicNameTarget());
+ if (byVersion == null) {
+ byVersion = new HashMap();
+ sourceURIs.put(bundleInfo.getSymbolicNameTarget(), byVersion);
+ }
+ URI sourceUri = getArtifactURI(bundleInfo);
+ URI old = (URI) byVersion.put(bundleInfo.getVersionTarget().toString(), sourceUri);
+ if (old != null) {
+ Message.debug("Duplicate source for the bundle "
+ + bundleInfo.getSymbolicNameTarget() + "@" + bundleInfo.getVersionTarget()
+ + " : " + sourceUri + " is replacing " + old);
+ }
+ return;
+ }
+
// before transforming it and adding it into the repo, let's add the artifacts
// and if no artifact, then no bundle
+ bundleInfo.setUri(getArtifactURI(bundleInfo));
+ super.addBundle(bundleInfo);
+ }
+ private URI getArtifactURI(BundleInfo bundleInfo) {
Map/* <Version, String> */urlPatternsByVersion = (Map) artifactUrlPatterns.get(bundleInfo
.getSymbolicName());
if (urlPatternsByVersion != null) {
@@ -61,14 +80,14 @@ public class P2Descriptor extends RepoDe
String url = urlPattern.replaceAll("\\$\\{id\\}", bundleInfo.getSymbolicName());
url = url.replaceAll("\\$\\{version\\}", bundleInfo.getVersion().toString());
try {
- bundleInfo.setUri(new URI(url));
+ return new URI(url);
} catch (URISyntaxException e) {
throw new RuntimeException("Unable to build the artifact uri of " + bundleInfo,
e);
}
- super.addBundle(bundleInfo);
}
}
+ return null;
}
public void addArtifactUrl(String classifier, String id, Version version, String url) {
@@ -84,4 +103,29 @@ public class P2Descriptor extends RepoDe
byVersion.put(version, url);
}
+ public void finish() {
+ artifactUrlPatterns = null;
+ Iterator itModules = getModules().iterator();
+ while (itModules.hasNext()) {
+ DefaultModuleDescriptor md = (DefaultModuleDescriptor) itModules.next();
+ String org = md.getModuleRevisionId().getOrganisation();
+ if (!org.equals(BundleInfo.BUNDLE_TYPE)) {
+ continue;
+ }
+ String symbolicName = md.getModuleRevisionId().getName();
+ Map/*<String, URI>*/ byVersion = (Map) sourceURIs.get(symbolicName);
+ if (byVersion == null) {
+ continue;
+ }
+ String rev = md.getRevision();
+ URI source = (URI) byVersion.get(rev);
+ if (source == null) {
+ continue;
+ }
+ DefaultArtifact sourceArtifact = BundleInfoAdapter.buildArtifact(
+ md.getModuleRevisionId(), getBaseUri(), source, "source");
+ md.addArtifact(BundleInfoAdapter.CONF_NAME_DEFAULT, sourceArtifact);
+ }
+ sourceURIs = null;
+ }
}
Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/p2/P2MetadataParser.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/p2/P2MetadataParser.java?rev=1368683&r1=1368682&r2=1368683&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/p2/P2MetadataParser.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/p2/P2MetadataParser.java Thu Aug 2 20:08:20 2012
@@ -33,6 +33,7 @@ import org.apache.ivy.osgi.core.BundleCa
import org.apache.ivy.osgi.core.BundleInfo;
import org.apache.ivy.osgi.core.BundleRequirement;
import org.apache.ivy.osgi.core.ExportPackage;
+import org.apache.ivy.osgi.core.ManifestParser;
import org.apache.ivy.osgi.p2.PropertiesParser.PropertiesHandler;
import org.apache.ivy.osgi.util.DelegetingHandler;
import org.apache.ivy.osgi.util.Version;
@@ -41,6 +42,7 @@ import org.apache.ivy.util.Message;
import org.apache.ivy.util.XMLHelper;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
public class P2MetadataParser implements XMLInputParser {
@@ -57,6 +59,7 @@ public class P2MetadataParser implements
} catch (ParserConfigurationException e) {
throw new SAXException(e);
}
+ p2Descriptor.finish();
}
static class RepositoryHandler extends DelegetingHandler {
@@ -234,6 +237,13 @@ public class P2MetadataParser implements
});
addChild(new ProvidesHandler(), new ChildElementHandler() {
public void childHanlded(DelegetingHandler child) {
+ String eclipseType = ((ProvidesHandler) child).eclipseType;
+ if ("source".equals(eclipseType)) {
+ // this is some source of some bundle
+ bundleInfo.setSource(true);
+ // we need to parse the manifest in the toupointData to figure out the
+ // targeted bundle
+ }
Iterator it = ((ProvidesHandler) child).capabilities.iterator();
while (it.hasNext()) {
bundleInfo.addCapability((BundleCapability) it.next());
@@ -268,22 +278,64 @@ public class P2MetadataParser implements
// public void childHanlded(DelegetingHandler child) {
// }
// });
- // addChild(new TouchpointDataHandler(), new ChildElementHandler() {
+ addChild(new TouchpointDataHandler(), new ChildElementHandler() {
+ public void childHanlded(DelegetingHandler child) throws SAXParseException {
+ if (!bundleInfo.isSource()) {
+ // we only care about parsing the manifest if it is a source
+ return;
+ }
+ String manifest = ((TouchpointDataHandler) child).manifest;
+ if (manifest != null) {
+ try {
+ // Eclipse may have serialized a little bit weirdly
+ manifest = ManifestParser.formatLines(manifest.trim());
+ BundleInfo embeddedInfo = ManifestParser.parseManifest(manifest);
+ if (!embeddedInfo.isSource()) {
+ throw new SAXParseException(
+ "Expecting an embedded manifest declaring being a source",
+ child.getLocator());
+ }
+ String symbolicNameTarget = embeddedInfo.getSymbolicNameTarget();
+ if (symbolicNameTarget == null) {
+ throw new SAXParseException(
+ "Expecting a symbolic name in the source header of the embedded manifest",
+ child.getLocator());
+ }
+ Version versionTarget = embeddedInfo.getVersionTarget();
+ if (versionTarget == null) {
+ throw new SAXParseException(
+ "Expecting a version in the source header of the embedded manifest",
+ child.getLocator());
+ }
+ bundleInfo.setSymbolicNameTarget(symbolicNameTarget);
+ bundleInfo.setVersionTarget(versionTarget);
+ } catch (IOException e) {
+ // now way, we are in ram
+ SAXParseException spe = new SAXParseException(e.getMessage(), child
+ .getLocator());
+ spe.initCause(e);
+ throw spe;
+ } catch (ParseException e) {
+ SAXParseException spe = new SAXParseException(e.getMessage(), child
+ .getLocator());
+ spe.initCause(e);
+ throw spe;
+ }
+ }
+ }
+ });
+ // addChild(new LicensesHandler(), new ChildElementHandler() {
// public void childHanlded(DelegetingHandler child) {
// }
// });
- // addChild(new LicensesHandler(), new ChildElementHandler() {
+ // addChild(new CopyrightHandler(), new ChildElementHandler() {
// public void childHanlded(DelegetingHandler child) {
// }
// });
- // addChild(new CopyrightHandler(), new ChildElementHandler() {
+ // addChild(new ChangesHandler(), new ChildElementHandler() {
// public void childHanlded(DelegetingHandler child) {
// }
// });
- addChild(new ChangesHandler(), new ChildElementHandler() {
- public void childHanlded(DelegetingHandler child) {
- }
- });
}
@@ -352,25 +404,33 @@ public class P2MetadataParser implements
List capabilities;
+ String eclipseType;
+
public ProvidesHandler() {
super(PROVIDES);
addChild(new ProvidedHandler(), new ChildElementHandler() {
public void childHanlded(DelegetingHandler child) {
String name = ((ProvidedHandler) child).name;
Version version = ((ProvidedHandler) child).version;
- String type = namespace2Type(((ProvidedHandler) child).namespace);
- if (type == null) {
- Message.debug("Unsupported provided capability "
- + ((ProvidedHandler) child).namespace + " " + name + " " + version);
- return;
- }
- BundleCapability capability;
- if (type == BundleInfo.PACKAGE_TYPE) {
- capability = new ExportPackage(name, version);
+ String namespace = ((ProvidedHandler) child).namespace;
+ if (namespace.equals("org.eclipse.equinox.p2.eclipse.type")) {
+ eclipseType = ((ProvidedHandler) child).name;
} else {
- capability = new BundleCapability(type, name, version);
+ String type = namespace2Type(namespace);
+ if (type == null) {
+ Message.debug("Unsupported provided capability "
+ + ((ProvidedHandler) child).namespace + " " + name + " "
+ + version);
+ return;
+ }
+ BundleCapability capability;
+ if (type == BundleInfo.PACKAGE_TYPE) {
+ capability = new ExportPackage(name, version);
+ } else {
+ capability = new BundleCapability(type, name, version);
+ }
+ capabilities.add(capability);
}
- capabilities.add(capability);
}
});
}
@@ -587,64 +647,74 @@ public class P2MetadataParser implements
// }
//
// }
- //
- // static class TouchpointDataHandler extends DelegetingHandler {
- //
- // private static final String TOUCHPOINTDATA = "touchpointData";
- //
- // private static final String SIZE = "size";
- //
- // public TouchpointDataHandler() {
- // super(TOUCHPOINTDATA);
- // addChild(new InstructionsHandler(), new ChildElementHandler() {
- // public void childHanlded(DelegetingHandler child) {
- // }
- // });
- // }
- //
- // protected void handleAttributes(Attributes atts) {
- // String size = atts.getValue(SIZE);
- // }
- //
- // }
- //
- // static class InstructionsHandler extends DelegetingHandler {
- //
- // private static final String INSTRUCTIONS = "instructions";
- //
- // private static final String SIZE = "size";
- //
- // public InstructionsHandler() {
- // super(INSTRUCTIONS);
- // addChild(new InstructionHandler(), new ChildElementHandler() {
- // public void childHanlded(DelegetingHandler child) {
- // }
- // });
- // }
- //
- // protected void handleAttributes(Attributes atts) {
- // String size = atts.getValue(SIZE);
- // }
- //
- // }
- //
- // static class InstructionHandler extends DelegetingHandler {
- //
- // private static final String INSTRUCTION = "instruction";
- //
- // private static final String KEY = "key";
- //
- // public InstructionHandler() {
- // super(INSTRUCTION);
- // setBufferingChar(true);
- // }
- //
- // protected void handleAttributes(Attributes atts) {
- // String size = atts.getValue(KEY);
- // }
- //
- // }
- //
+
+ static class TouchpointDataHandler extends DelegetingHandler {
+
+ private static final String TOUCHPOINTDATA = "touchpointData";
+
+ // private static final String SIZE = "size";
+
+ String manifest;
+
+ public TouchpointDataHandler() {
+ super(TOUCHPOINTDATA);
+ addChild(new InstructionsHandler(), new ChildElementHandler() {
+ public void childHanlded(DelegetingHandler child) {
+ manifest = ((InstructionsHandler) child).manifest;
+ }
+ });
+ }
+
+ protected void handleAttributes(Attributes atts) {
+ // String size = atts.getValue(SIZE);
+ }
+
+ }
+
+ static class InstructionsHandler extends DelegetingHandler {
+
+ private static final String INSTRUCTIONS = "instructions";
+
+ // private static final String SIZE = "size";
+
+ String manifest;
+
+ public InstructionsHandler() {
+ super(INSTRUCTIONS);
+ addChild(new InstructionHandler(), new ChildElementHandler() {
+ public void childHanlded(DelegetingHandler child) {
+ if (((InstructionHandler) child).key.equals("manifest")) {
+ manifest = ((InstructionHandler) child).getBufferedChars();
+ }
+ }
+ });
+ }
+
+ protected void handleAttributes(Attributes atts) {
+ // String size = atts.getValue(SIZE);
+ }
+
+ }
+
+ static class InstructionHandler extends DelegetingHandler {
+
+ private static final String INSTRUCTION = "instruction";
+
+ private static final String KEY = "key";
+
+ String key;
+
+ public InstructionHandler() {
+ super(INSTRUCTION);
+ setBufferingChar(true);
+ }
+
+ protected void handleAttributes(Attributes atts) {
+ key = atts.getValue(KEY);
+ }
+
+ }
+
// static class LicensesHandler extends DelegetingHandler {
//
// private static final String LICENSES = "licenses";
Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/updatesite/UpdateSiteResolver.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/updatesite/UpdateSiteResolver.java?rev=1368683&r1=1368682&r2=1368683&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/updatesite/UpdateSiteResolver.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/updatesite/UpdateSiteResolver.java Thu Aug 2 20:08:20 2012
@@ -65,11 +65,11 @@ public class UpdateSiteResolver extends
throw new RuntimeException("IO issue while trying to read the update site ("
+ e.getMessage() + ")");
} catch (ParseException e) {
- throw new RuntimeException("Failed to parse the updatesite (" + e.getMessage() + ")");
+ throw new RuntimeException("Failed to parse the updatesite (" + e.getMessage() + ")", e);
} catch (SAXException e) {
- throw new RuntimeException("Illformed updatesite (" + e.getMessage() + ")");
+ throw new RuntimeException("Illformed updatesite (" + e.getMessage() + ")", e);
} catch (URISyntaxException e) {
- throw new RuntimeException("Illformed url (" + e.getMessage() + ")");
+ throw new RuntimeException("Illformed url (" + e.getMessage() + ")", e);
}
}
}
Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/osgi/core/ManifestParserTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/osgi/core/ManifestParserTest.java?rev=1368683&r1=1368682&r2=1368683&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/osgi/core/ManifestParserTest.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/osgi/core/ManifestParserTest.java Thu Aug 2 20:08:20 2012
@@ -65,4 +65,23 @@ public class ManifestParserTest extends
assertEquals(1, bundleInfo.getImports().size());
assertTrue(bundleInfo.getImports().toString().indexOf("com.acme.charlie") != -1);
}
+
+ public void testFormatLines() throws Exception {
+ assertEquals("foo bar\n", ManifestParser.formatLines("foo bar"));
+ assertEquals(
+ "123456789012345678901234567890123456789012345678901234567890123456789012\n",
+ ManifestParser
+ .formatLines("123456789012345678901234567890123456789012345678901234567890123456789012"));
+ assertEquals(
+ "123456789012345678901234567890123456789012345678901234567890123456789012\n 3\n",
+ ManifestParser
+ .formatLines("1234567890123456789012345678901234567890123456789012345678901234567890123"));
+ assertEquals("foo bar\n"
+ + "123456789012345678901234567890123456789012345678901234567890123456789012\n"
+ + " 12345678901234567890123456789012345678901234567890123456789012345678901\n"
+ + " 21234\n" + "foo bar\n", ManifestParser.formatLines("foo bar\n"
+ + "123456789012345678901234567890123456789012345678901234567890123456789012"
+ + "123456789012345678901234567890123456789012345678901234567890123456789012"
+ + "1234\n" + "foo bar\n"));
+ }
}
Added: ant/ivy/core/trunk/test/java/org/apache/ivy/osgi/p2/P2DescriptorTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/osgi/p2/P2DescriptorTest.java?rev=1368683&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/osgi/p2/P2DescriptorTest.java (added)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/osgi/p2/P2DescriptorTest.java Thu Aug 2 20:08:20 2012
@@ -0,0 +1,121 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.ivy.osgi.p2;
+
+import java.io.File;
+import java.text.ParseException;
+
+import junit.framework.TestCase;
+
+import org.apache.ivy.Ivy;
+import org.apache.ivy.core.cache.RepositoryCacheManager;
+import org.apache.ivy.core.module.descriptor.Artifact;
+import org.apache.ivy.core.module.descriptor.DefaultDependencyDescriptor;
+import org.apache.ivy.core.module.id.ModuleRevisionId;
+import org.apache.ivy.core.report.ArtifactDownloadReport;
+import org.apache.ivy.core.report.DownloadReport;
+import org.apache.ivy.core.report.DownloadStatus;
+import org.apache.ivy.core.resolve.DownloadOptions;
+import org.apache.ivy.core.resolve.ResolveData;
+import org.apache.ivy.core.resolve.ResolveOptions;
+import org.apache.ivy.core.resolve.ResolvedModuleRevision;
+import org.apache.ivy.core.settings.IvySettings;
+import org.apache.ivy.osgi.core.BundleInfo;
+import org.apache.ivy.osgi.updatesite.UpdateSiteResolver;
+import org.apache.ivy.plugins.resolver.DependencyResolver;
+
+public class P2DescriptorTest extends TestCase {
+
+ private File cache;
+
+ private IvySettings settings;
+
+ private UpdateSiteResolver resolver;
+
+ private Ivy ivy;
+
+ private ResolveData data;
+
+ protected void setUp() throws Exception {
+ settings = new IvySettings();
+
+ resolver = new UpdateSiteResolver();
+ resolver.setName("p2-sources");
+ resolver.setUrl(new File("test/test-p2/sources").toURL().toExternalForm());
+ resolver.setSettings(settings);
+ settings.addResolver(resolver);
+
+ settings.setDefaultResolver("p2-sources");
+
+ cache = new File("build/cache");
+ cache.mkdirs();
+ settings.setDefaultCache(cache);
+
+ ivy = new Ivy();
+ ivy.setSettings(settings);
+ ivy.bind();
+
+ ivy.getResolutionCacheManager().clean();
+ RepositoryCacheManager[] caches = settings.getRepositoryCacheManagers();
+ for (int i = 0; i < caches.length; i++) {
+ caches[i].clean();
+ }
+
+ data = new ResolveData(ivy.getResolveEngine(), new ResolveOptions());
+ }
+
+ public void testResolve() throws Exception {
+ ModuleRevisionId mrid = ModuleRevisionId.newInstance(BundleInfo.BUNDLE_TYPE,
+ "org.apache.ivy", "2.2.0.final_20100923230623");
+
+ ResolvedModuleRevision rmr = resolver.getDependency(new DefaultDependencyDescriptor(mrid,
+ false), data);
+ assertNotNull(rmr);
+ assertEquals(mrid, rmr.getId());
+
+ assertEquals(2, rmr.getDescriptor().getAllArtifacts().length);
+
+ DownloadReport report = resolver.download(rmr.getDescriptor().getAllArtifacts(),
+ new DownloadOptions());
+ assertNotNull(report);
+
+ assertEquals(2, report.getArtifactsReports().length);
+
+ for (int i = 0; i < 2; i++) {
+ Artifact artifact = rmr.getDescriptor().getAllArtifacts()[i];
+ ArtifactDownloadReport ar = report.getArtifactReport(artifact);
+ assertNotNull(ar);
+
+ assertEquals(artifact, ar.getArtifact());
+ assertEquals(DownloadStatus.SUCCESSFUL, ar.getDownloadStatus());
+
+ // test to ask to download again, should use cache
+ DownloadReport report2 = resolver.download(new Artifact[] {artifact},
+ new DownloadOptions());
+ assertNotNull(report2);
+
+ assertEquals(1, report2.getArtifactsReports().length);
+
+ ar = report2.getArtifactReport(artifact);
+ assertNotNull(ar);
+
+ assertEquals(artifact, ar.getArtifact());
+ assertEquals(DownloadStatus.NO, ar.getDownloadStatus());
+ }
+ }
+}
Propchange: ant/ivy/core/trunk/test/java/org/apache/ivy/osgi/p2/P2DescriptorTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: ant/ivy/core/trunk/test/java/org/apache/ivy/osgi/p2/P2DescriptorTest.java
------------------------------------------------------------------------------
svn:keywords = Date Revision Author HeadURL Id
Propchange: ant/ivy/core/trunk/test/java/org/apache/ivy/osgi/p2/P2DescriptorTest.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: ant/ivy/core/trunk/test/test-p2/sources/artifacts.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/test-p2/sources/artifacts.xml?rev=1368683&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/test-p2/sources/artifacts.xml (added)
+++ ant/ivy/core/trunk/test/test-p2/sources/artifacts.xml Thu Aug 2 20:08:20 2012
@@ -0,0 +1,52 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<?artifactRepository version='1.1.0'?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<repository name='Test repo of artifacts with source' type='org.eclipse.equinox.p2.artifact.repository.simpleRepository' version='1'>
+ <properties size='2'>
+ <property name='p2.timestamp' value='1311544192362'/>
+ <property name='p2.compressed' value='false'/>
+ </properties>
+ <mappings size='1'>
+ <rule filter='(& (classifier=osgi.bundle))' output='${repoUrl}/bundles/${id}_${version}.jar'/>
+ </mappings>
+ <artifacts size='3'>
+ <artifact classifier='osgi.bundle' id='org.apache.ivyde.eclipse' version='2.0.0.final-200907011148-RELEASE'>
+ <properties size='3'>
+ <property name='artifact.size' value='2916005'/>
+ <property name='download.size' value='2916005'/>
+ <property name='download.md5' value='f9e5813d7930dc765a9531b73e0fdb86'/>
+ </properties>
+ </artifact>
+ <artifact classifier='osgi.bundle' id='org.apache.ivy' version='2.2.0.final_20100923230623'>
+ <properties size='3'>
+ <property name='artifact.size' value='947592'/>
+ <property name='download.size' value='947592'/>
+ <property name='download.md5' value='2703395cb677b36bbe04f0e868a10d2b'/>
+ </properties>
+ </artifact>
+ <artifact classifier='osgi.bundle' id='org.apache.ivy.source' version='2.2.0.final_20100923230623'>
+ <properties size='3'>
+ <property name='artifact.size' value='947592'/>
+ <property name='download.size' value='947592'/>
+ <property name='download.md5' value='2703395cb677b36bbe04f0e868a10d2b'/>
+ </properties>
+ </artifact>
+ </artifacts>
+</repository>
Propchange: ant/ivy/core/trunk/test/test-p2/sources/artifacts.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: ant/ivy/core/trunk/test/test-p2/sources/artifacts.xml
------------------------------------------------------------------------------
svn:keywords = Date Revision Author HeadURL Id
Propchange: ant/ivy/core/trunk/test/test-p2/sources/artifacts.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: ant/ivy/core/trunk/test/test-p2/sources/bundles/org.apache.ivy.source_2.2.0.final_20100923230623.jar
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/test-p2/sources/bundles/org.apache.ivy.source_2.2.0.final_20100923230623.jar?rev=1368683&view=auto
==============================================================================
(empty)
Added: ant/ivy/core/trunk/test/test-p2/sources/bundles/org.apache.ivy_2.2.0.final_20100923230623.jar
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/test-p2/sources/bundles/org.apache.ivy_2.2.0.final_20100923230623.jar?rev=1368683&view=auto
==============================================================================
(empty)
Added: ant/ivy/core/trunk/test/test-p2/sources/bundles/org.apache.ivyde.eclipse_2.0.0.final-200907011148-RELEASE.jar
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/test-p2/sources/bundles/org.apache.ivyde.eclipse_2.0.0.final-200907011148-RELEASE.jar?rev=1368683&view=auto
==============================================================================
(empty)
Added: ant/ivy/core/trunk/test/test-p2/sources/content.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/test-p2/sources/content.xml?rev=1368683&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/test-p2/sources/content.xml (added)
+++ ant/ivy/core/trunk/test/test-p2/sources/content.xml Thu Aug 2 20:08:20 2012
@@ -0,0 +1,216 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<?metadataRepository version='1.1.0'?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<repository name='Test repo of artifacts with source' type='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository' version='1'>
+ <properties size='2'>
+ <property name='p2.timestamp' value='1311544192366'/>
+ <property name='p2.compressed' value='false'/>
+ </properties>
+ <units size='3'>
+ <unit id='org.apache.ivy' version='2.2.0.final_20100923230623' singleton='false'>
+ <update id='org.apache.ivy' range='[0.0.0,2.2.0.final_20100923230623)' severity='0'/>
+ <properties size='3'>
+ <property name='org.eclipse.equinox.p2.name' value='Ivy'/>
+ <property name='org.eclipse.equinox.p2.provider' value='Apache Software Foundation'/>
+ <property name='org.eclipse.equinox.p2.doc.url' value='http://ant.apache.org/ivy/'/>
+ </properties>
+ <provides size='55'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='org.apache.ivy' version='2.2.0.final_20100923230623'/>
+ <provided namespace='osgi.bundle' name='org.apache.ivy' version='2.2.0.final_20100923230623'/>
+ <provided namespace='java.package' name='org.apache.ivy' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.ant' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.core' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.core.cache' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.core.check' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.core.deliver' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.core.event' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.core.event.download' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.core.event.publish' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.core.event.resolve' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.core.event.retrieve' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.core.install' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.core.module.descriptor' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.core.module.id' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.core.module.status' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.core.publish' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.core.report' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.core.repository' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.core.resolve' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.core.retrieve' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.core.search' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.core.settings' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.core.sort' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.plugins' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.plugins.circular' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.plugins.conflict' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.plugins.latest' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.plugins.lock' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.plugins.matcher' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.plugins.namespace' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.plugins.parser' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.plugins.parser.m2' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.plugins.parser.xml' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.plugins.report' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.plugins.repository' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.plugins.repository.file' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.plugins.repository.sftp' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.plugins.repository.ssh' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.plugins.repository.url' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.plugins.repository.vfs' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.plugins.repository.vsftp' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.plugins.resolver' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.plugins.resolver.packager' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.plugins.resolver.util' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.plugins.trigger' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.plugins.version' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.tools.analyser' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.util' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.util.cli' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.util.extendable' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.util.filter' version='2.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivy.util.url' version='2.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
+ </provides>
+ <requires size='31'>
+ <required namespace='java.package' name='com.jcraft.jsch' range='0.0.0' optional='true'/>
+ <required namespace='java.package' name='javax.crypto' range='0.0.0'/>
+ <required namespace='java.package' name='javax.swing' range='0.0.0' optional='true'/>
+ <required namespace='java.package' name='javax.swing.event' range='0.0.0' optional='true'/>
+ <required namespace='java.package' name='javax.xml.parsers' range='0.0.0'/>
+ <required namespace='java.package' name='javax.xml.transform' range='0.0.0'/>
+ <required namespace='java.package' name='javax.xml.transform.sax' range='0.0.0'/>
+ <required namespace='java.package' name='javax.xml.transform.stream' range='0.0.0'/>
+ <required namespace='java.package' name='org.apache.commons.httpclient' range='0.0.0' optional='true'/>
+ <required namespace='java.package' name='org.apache.commons.httpclient.methods' range='0.0.0' optional='true'/>
+ <required namespace='java.package' name='org.apache.commons.httpclient.params' range='0.0.0' optional='true'/>
+ <required namespace='java.package' name='org.apache.commons.httpclient.protocol' range='0.0.0' optional='true'/>
+ <required namespace='java.package' name='org.apache.commons.net.ftp' range='0.0.0' optional='true'/>
+ <required namespace='java.package' name='org.apache.commons.vfs' range='0.0.0' optional='true'/>
+ <required namespace='java.package' name='org.apache.commons.vfs.impl' range='0.0.0' optional='true'/>
+ <required namespace='java.package' name='org.apache.commons.vfs.provider' range='0.0.0' optional='true'/>
+ <required namespace='java.package' name='org.apache.commons.vfs.provider.ftp' range='0.0.0' optional='true'/>
+ <required namespace='java.package' name='org.apache.commons.vfs.provider.local' range='0.0.0' optional='true'/>
+ <required namespace='java.package' name='org.apache.commons.vfs.provider.sftp' range='0.0.0' optional='true'/>
+ <required namespace='java.package' name='org.apache.commons.vfs.provider.url' range='0.0.0' optional='true'/>
+ <required namespace='java.package' name='org.apache.oro.text' range='0.0.0' optional='true'/>
+ <required namespace='java.package' name='org.apache.oro.text.regex' range='0.0.0' optional='true'/>
+ <required namespace='java.package' name='org.apache.tools.ant' range='0.0.0' optional='true'/>
+ <required namespace='java.package' name='org.apache.tools.ant.filters' range='0.0.0' optional='true'/>
+ <required namespace='java.package' name='org.apache.tools.ant.taskdefs' range='0.0.0' optional='true'/>
+ <required namespace='java.package' name='org.apache.tools.ant.types' range='0.0.0' optional='true'/>
+ <required namespace='java.package' name='org.apache.tools.ant.util' range='0.0.0' optional='true'/>
+ <required namespace='java.package' name='org.apache.webdav' range='0.0.0' optional='true'/>
+ <required namespace='java.package' name='org.xml.sax' range='0.0.0'/>
+ <required namespace='java.package' name='org.xml.sax.ext' range='0.0.0'/>
+ <required namespace='java.package' name='org.xml.sax.helpers' range='0.0.0'/>
+ </requires>
+ <artifacts size='1'>
+ <artifact classifier='osgi.bundle' id='org.apache.ivy' version='2.2.0.final_20100923230623'/>
+ </artifacts>
+ <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='1'>
+ <instruction key='manifest'>
+ Bundle-Vendor: Apache Software Foundation
Bundle-ManifestVersion: 2
Implementation-Title: org.apache.ivy
Manifest-Version: 1.0
Implementation-Vendor-Id: org.apache
Bundle-SymbolicName: org.apache.ivy
Created-By: 1.6.0_04-b12 (Sun Microsystems Inc.)
Implementation-Vendor: Apache Software Foundation
Implementation-Version: 2.2.0
Export-Package: org.apache.ivy;version="2.0.0",org.apache.ivy.ant;version="2.0.0",org.apache.ivy.core;version="2.0.0",org.apache.ivy.core.cache;version="2.0.0",org.apache.ivy.core.check;version="2.0.0",org.apache.ivy.core.deliver;version="2.0.0",org.apache.ivy.core.event;version="2.0.0",org.apache.ivy.core.event.download;version="2.0.0",org.apache.ivy.core.event.publish;version="2.0.0",org.apache.ivy.core.event.resolve;version="2.0.0",org.apache.ivy.core.event.retrieve;version="2.0.0",org.apache.i
vy.core.install;version="2.0.0",org.apache.ivy.core.module.descriptor;version="2.0.0",org.apache.ivy.core.module.id;version="2.0.0",org.apache.ivy.core.module.status;version="2.0.0",org.apache.ivy.core.publish;version="2.0.0",org.apache.ivy.core.report;version="2.0.0",org.apache.ivy.core.repository;version="2.0.0",org.apache.ivy.core.resolve;version="2.0.0",org.apache.ivy.core.retrieve;version="2.0.0",org.apache.ivy.core.search;version="2.0.0",org.apache.ivy.core.settings;version="2.0.0",org.apache.ivy.core.sort;version="2.0.0",org.apache.ivy.plugins;version="2.0.0",org.apache.ivy.plugins.circular;version="2.0.0",org.apache.ivy.plugins.conflict;version="2.0.0",org.apache.ivy.plugins.latest;version="2.0.0",org.apache.ivy.plugins.lock;version="2.0.0",org.apache.ivy.plugins.matcher;version="2.0.0",org
.apache.ivy.plugins.namespace;version="2.0.0",org.apache.ivy.plugins.parser;version="2.0.0",org.apache.ivy.plugins.parser.m2;version="2.0.0",org.apache.ivy.plugins.parser.xml;version="2.0.0",org.apache.ivy.plugins.report;version="2.0.0",org.apache.ivy.plugins.repository;version="2.0.0",org.apache.ivy.plugins.repository.file;version="2.0.0",org.apache.ivy.plugins.repository.sftp;version="2.0.0",org.apache.ivy.plugins.repository.ssh;version="2.0.0",org.apache.ivy.plugins.repository.url;version="2.0.0",org.apache.ivy.plugins.repository.vfs;version="2.0.0",org.apache.ivy.plugins.repository.vsftp;version="2.0.0",org.apache.ivy.plugins.resolver;version="2.0.0",org.apache.ivy.plugins.resolver.packager;version="2.0.0",org.apache.ivy.plugins.resolver.util;version="2.0.0",org.apache.ivy.plugins.trigger;version="2.0.0",org.apach
e.ivy.plugins.version;version="2.0.0",org.apache.ivy.tools.analyser;version="2.0.0",org.apache.ivy.util;version="2.0.0",org.apache.ivy.util.cli;version="2.0.0",org.apache.ivy.util.extendable;version="2.0.0",org.apache.ivy.util.filter;version="2.0.0",org.apache.ivy.util.url;version="2.0.0"
Ant-Version: Apache Ant 1.8.1
Build-Version: 2.2.0
Extension-name: org.apache.ivy
Main-Class: org.apache.ivy.Main
Import-Package: com.jcraft.jsch;resolution:=optional,javax.crypto,javax.swing;resolution:=optional,javax.swing.event;resolution:=optional,javax.xml.parsers,javax.xml.transform,javax.xml.transform.sax,javax.xml.transform.stream,org.apache.commons.httpclient;resolution:=optional,org.apache.commons.httpclient.methods;resolution:=optional,org.apache.commons.httpclient.params;resolution:=optional,org.apache.commons.httpclient.protocol;resolution:=optional,org.apache.commons.net.ftp;resolution:=o
ptional,org.apache.commons.vfs;resolution:=optional,org.apache.commons.vfs.impl;resolution:=optional,org.apache.commons.vfs.provider;resolution:=optional,org.apache.commons.vfs.provider.ftp;resolution:=optional,org.apache.commons.vfs.provider.local;resolution:=optional,org.apache.commons.vfs.provider.sftp;resolution:=optional,org.apache.commons.vfs.provider.url;resolution:=optional,org.apache.oro.text;resolution:=optional,org.apache.oro.text.regex;resolution:=optional,org.apache.tools.ant;resolution:=optional,org.apache.tools.ant.filters;resolution:=optional,org.apache.tools.ant.taskdefs;resolution:=optional,org.apache.tools.ant.types;resolution:=optional,org.apache.tools.ant.util;resolution:=optional,org.apache.webdav;resolution:=optional,org.xml.sax,org.xml.sax.ext,org.xml.sax.helpers
Bundle-Name: Ivy
Bundle-ClassPath: .
Specification-Title: Apache Ivy with Ant tasks
Bundle-Version: 2.2.0.final_20100923230623
Bundle-DocURL: http://ant.apache.org/ivy/&#x
A;Specification-Vendor: Apache Software Foundation
Specification-Version: 2.2.0

+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ <unit id='org.apache.ivy.source' version='2.2.0.final_20100923230623' singleton='false'>
+ <update id='org.apache.ivy.source' range='[0.0.0,2.2.0.final_20100923230623)' severity='0'/>
+ <properties size='2'>
+ <property name='org.eclipse.equinox.p2.name' value='Ivy'/>
+ <property name='org.eclipse.equinox.p2.provider' value='Apache Software Foundation'/>
+ </properties>
+ <provides size='3'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='org.apache.ivy.source' version='2.2.0.final_20100923230623'/>
+ <provided namespace='osgi.bundle' name='org.apache.ivy.source' version='2.0.0.v200806031607'/>
+ <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='source' version='1.0.0'/>
+ </provides>
+ <artifacts size='1'>
+ <artifact classifier='osgi.bundle' id='org.apache.ivy.source' version='2.2.0.final_20100923230623'/>
+ </artifacts>
+ <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='1'>
+ <instruction key='manifest'>
+ Bundle-Vendor: Apache Software Foundation
Bundle-ManifestVersion: 2
Implementation-Title: org.apache.ivy
Manifest-Version: 1.0
Eclipse-SourceBundle: org.apache.ivy;version="2.2.0.final_20100923230623"
Implementation-Vendor-Id: org.apache
Bundle-SymbolicName: org.apache.ivy
Created-By: 1.6.0_04-b12 (Sun Microsystems Inc.)
Implementation-Vendor: Apache Software Foundation
Implementation-Version: 2.2.0
Export-Package: org.apache.ivy;version="2.0.0",org.apache.ivy.ant;version="2.0.0",org.apache.ivy.core;version="2.0.0",org.apache.ivy.core.cache;version="2.0.0",org.apache.ivy.core.check;version="2.0.0",org.apache.ivy.core.deliver;version="2.0.0",org.apache.ivy.core.event;version="2.0.0",org.apache.ivy.core.event.download;version="2.0.0",org.apache.ivy.core.event.publish;version="2.0.0",org.apache.ivy.core.event.resolve;version=&qu
ot;2.0.0",org.apache.ivy.core.event.retrieve;version="2.0.0",org.apache.ivy.core.install;version="2.0.0",org.apache.ivy.core.module.descriptor;version="2.0.0",org.apache.ivy.core.module.id;version="2.0.0",org.apache.ivy.core.module.status;version="2.0.0",org.apache.ivy.core.publish;version="2.0.0",org.apache.ivy.core.report;version="2.0.0",org.apache.ivy.core.repository;version="2.0.0",org.apache.ivy.core.resolve;version="2.0.0",org.apache.ivy.core.retrieve;version="2.0.0",org.apache.ivy.core.search;version="2.0.0",org.apache.ivy.core.settings;version="2.0.0",org.apache.ivy.core.sort;version="2.0.0",org.apache.ivy.plugins;version="2.0.0",org.apache.ivy.plugins.circular;version="2.0.0",org.apache.ivy.plugins.conflict;version="2.0.0",org.apache.ivy.plugins.latest;version="2.0.0",org.apache.ivy.plugins.loc
k;version="2.0.0",org.apache.ivy.plugins.matcher;version="2.0.0",org.apache.ivy.plugins.namespace;version="2.0.0",org.apache.ivy.plugins.parser;version="2.0.0",org.apache.ivy.plugins.parser.m2;version="2.0.0",org.apache.ivy.plugins.parser.xml;version="2.0.0",org.apache.ivy.plugins.report;version="2.0.0",org.apache.ivy.plugins.repository;version="2.0.0",org.apache.ivy.plugins.repository.file;version="2.0.0",org.apache.ivy.plugins.repository.sftp;version="2.0.0",org.apache.ivy.plugins.repository.ssh;version="2.0.0",org.apache.ivy.plugins.repository.url;version="2.0.0",org.apache.ivy.plugins.repository.vfs;version="2.0.0",org.apache.ivy.plugins.repository.vsftp;version="2.0.0",org.apache.ivy.plugins.resolver;version="2.0.0",org.apache.ivy.plugins.resolver.packager;version="2.0.0",org.apache.ivy.plugins.resolver.util;vers
ion="2.0.0",org.apache.ivy.plugins.trigger;version="2.0.0",org.apache.ivy.plugins.version;version="2.0.0",org.apache.ivy.tools.analyser;version="2.0.0",org.apache.ivy.util;version="2.0.0",org.apache.ivy.util.cli;version="2.0.0",org.apache.ivy.util.extendable;version="2.0.0",org.apache.ivy.util.filter;version="2.0.0",org.apache.ivy.util.url;version="2.0.0"
Ant-Version: Apache Ant 1.8.1
Build-Version: 2.2.0
Extension-name: org.apache.ivy
Main-Class: org.apache.ivy.Main
Import-Package: com.jcraft.jsch;resolution:=optional,javax.crypto,javax.swing;resolution:=optional,javax.swing.event;resolution:=optional,javax.xml.parsers,javax.xml.transform,javax.xml.transform.sax,javax.xml.transform.stream,org.apache.commons.httpclient;resolution:=optional,org.apache.commons.httpclient.methods;resolution:=optional,org.apache.commons.httpclient.params;resolution:=optional,org.apache.c
ommons.httpclient.protocol;resolution:=optional,org.apache.commons.net.ftp;resolution:=optional,org.apache.commons.vfs;resolution:=optional,org.apache.commons.vfs.impl;resolution:=optional,org.apache.commons.vfs.provider;resolution:=optional,org.apache.commons.vfs.provider.ftp;resolution:=optional,org.apache.commons.vfs.provider.local;resolution:=optional,org.apache.commons.vfs.provider.sftp;resolution:=optional,org.apache.commons.vfs.provider.url;resolution:=optional,org.apache.oro.text;resolution:=optional,org.apache.oro.text.regex;resolution:=optional,org.apache.tools.ant;resolution:=optional,org.apache.tools.ant.filters;resolution:=optional,org.apache.tools.ant.taskdefs;resolution:=optional,org.apache.tools.ant.types;resolution:=optional,org.apache.tools.ant.util;resolution:=optional,org.apache.webdav;resolution:=optional,org.xml.sax,org.xml.sax.ext,org.xml.sax.helpers
Bundle-Name: Ivy
Bundle-ClassPath: .
Specification-Title: Apache Ivy with Ant tasks
Bun
dle-Version: 2.2.0.final_20100923230623
Bundle-DocURL: http://ant.apache.org/ivy/
Specification-Vendor: Apache Software Foundation
Specification-Version: 2.2.0

+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ <unit id='org.apache.ivyde.eclipse' version='2.0.0.final-200907011148-RELEASE'>
+ <update id='org.apache.ivyde.eclipse' range='[0.0.0,2.0.0.final-200907011148-RELEASE)' severity='0'/>
+ <properties size='3'>
+ <property name='org.eclipse.equinox.p2.name' value='IvyDE Eclipse Plug-in'/>
+ <property name='org.eclipse.equinox.p2.provider' value='Apache Software Foundation'/>
+ <property name='org.eclipse.equinox.p2.bundle.localization' value='plugin'/>
+ </properties>
+ <provides size='15'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='org.apache.ivyde.eclipse' version='2.0.0.final-200907011148-RELEASE'/>
+ <provided namespace='osgi.bundle' name='org.apache.ivyde.eclipse' version='2.0.0.final-200907011148-RELEASE'/>
+ <provided namespace='java.package' name='org.apache.ivyde.eclipse' version='0.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivyde.eclipse.cpcontainer' version='0.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivyde.eclipse.cpcontainer.fragmentinfo' version='0.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivyde.eclipse.ui.actions' version='0.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivyde.eclipse.ui.console' version='0.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivyde.eclipse.ui.core' version='0.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivyde.eclipse.ui.editors' version='0.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivyde.eclipse.ui.editors.pages' version='0.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivyde.eclipse.ui.editors.xml' version='0.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivyde.eclipse.ui.preferences' version='0.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivyde.eclipse.ui.views' version='0.0.0'/>
+ <provided namespace='java.package' name='org.apache.ivyde.eclipse.ui.wizards' version='0.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
+ </provides>
+ <requires size='15'>
+ <required namespace='osgi.bundle' name='org.apache.xerces' range='0.0.0' optional='true'/>
+ <required namespace='osgi.bundle' name='org.eclipse.ui' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.core.runtime' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.jface.text' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.ui.editors' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.ui.workbench.texteditor' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.core.resources' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.ui.ide' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.ui.forms' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.search' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.jdt.core' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.jdt.ui' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.ui.console' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.apache.ivy' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.help' range='0.0.0'/>
+ </requires>
+ <artifacts size='1'>
+ <artifact classifier='osgi.bundle' id='org.apache.ivyde.eclipse' version='2.0.0.final-200907011148-RELEASE'/>
+ </artifacts>
+ <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='2'>
+ <instruction key='manifest'>
+ Bundle-ManifestVersion: 2
Export-Package: org.apache.ivyde.eclipse,org.apache.ivyde.eclipse.cpcontainer,org.apache.ivyde.eclipse.cpcontainer.fragmentinfo,org.apache.ivyde.eclipse.ui.actions,org.apache.ivyde.eclipse.ui.console,org.apache.ivyde.eclipse.ui.core,org.apache.ivyde.eclipse.ui.editors,org.apache.ivyde.eclipse.ui.editors.pages,org.apache.ivyde.eclipse.ui.editors.xml,org.apache.ivyde.eclipse.ui.preferences,org.apache.ivyde.eclipse.ui.views,org.apache.ivyde.eclipse.ui.wizards
Bundle-Localization: plugin
Require-Bundle: org.apache.xerces;resolution:=optional,org.eclipse.ui,org.eclipse.core.runtime,org.eclipse.jface.text,org.eclipse.ui.editors,org.eclipse.ui.workbench.texteditor,org.eclipse.core.resources,org.eclipse.ui.ide,org.eclipse.ui.forms,org.eclipse.search,org.eclipse.jdt.core,org.eclipse.jdt.ui,org.eclipse.ui.console,org.apache.ivy,org.eclipse.help
Bundle-Activator: org.apache.ivyde.eclipse.IvyPlugin
Bundle-Name: IvyDE Eclipse Plug
-in
Bundle-Version: 2.0.0.final-200907011148-RELEASE
Bundle-Vendor: Apache Software Foundation
Bundle-SymbolicName: org.apache.ivyde.eclipse; singleton:=true
Bundle-ClassPath: ivyde-eclipse.jar
Manifest-Version: 1.0
Eclipse-LazyStart: true

+ </instruction>
+ <instruction key='zipped'>
+ true
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ </units>
+</repository>
Propchange: ant/ivy/core/trunk/test/test-p2/sources/content.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: ant/ivy/core/trunk/test/test-p2/sources/content.xml
------------------------------------------------------------------------------
svn:keywords = Date Revision Author HeadURL Id
Propchange: ant/ivy/core/trunk/test/test-p2/sources/content.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml