diff --git a/build.xml b/build.xml index 44d17988..1aff31ab 100644 --- a/build.xml +++ b/build.xml @@ -427,13 +427,11 @@ - + - - - + md.getLastModified()) { - md.setLastModified(lastModified); - } - - String status = include.getStatus(); - if (status != null) { - md.setStatus(status); - } - - Map/* */extraInfo = include.getExtraInfo(); - if (extraInfo != null) { - Iterator itInfo = extraInfo.entrySet().iterator(); - while (itInfo.hasNext()) { - Entry/* */info = (Entry) itInfo.next(); - md.addExtraInfo((String) info.getKey(), (String) info.getValue()); - } - } - - License[] licenses = include.getLicenses(); - if (licenses != null) { - for (int i = 0; i < licenses.length; i++) { - md.addLicense(licenses[i]); - } - } - - Configuration[] configurations = include.getConfigurations(); - if (configurations != null) { - for (int i = 0; i < configurations.length; i++) { - md.addConfiguration(configurations[i]); - } - } - - } - - private static void includeMdDepedencies(DefaultModuleDescriptor md, ModuleDescriptor include) { - Artifact[] artifacts = include.getAllArtifacts(); - if (artifacts != null) { - for (int i = 0; i < artifacts.length; i++) { - String[] artifactConfs = artifacts[i].getConfigurations(); - for (int j = 0; j < artifactConfs.length; j++) { - md.addArtifact(artifactConfs[j], artifacts[i]); - } - } - } - - DependencyDescriptor[] dependencies = include.getDependencies(); - if (dependencies != null) { - for (int i = 0; i < dependencies.length; i++) { - md.addDependency(dependencies[i]); - } - } - - ExcludeRule[] excludeRules = include.getAllExcludeRules(); - if (excludeRules != null) { - for (int i = 0; i < excludeRules.length; i++) { - md.addExcludeRule(excludeRules[i]); - } - } - } -} diff --git a/src/java/org/apache/ivy/osgi/ivy/OsgiManifestParser.java b/src/java/org/apache/ivy/osgi/ivy/OsgiManifestParser.java deleted file mode 100644 index 315b3f5a..00000000 --- a/src/java/org/apache/ivy/osgi/ivy/OsgiManifestParser.java +++ /dev/null @@ -1,261 +0,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. - * - */ -package org.apache.ivy.osgi.ivy; - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.net.URL; -import java.text.ParseException; -import java.util.Date; -import java.util.HashSet; -import java.util.Iterator; -import java.util.Set; -import java.util.jar.JarInputStream; -import java.util.jar.Manifest; -import java.util.regex.Pattern; - -import org.apache.ivy.core.module.descriptor.Configuration; -import org.apache.ivy.core.module.descriptor.DefaultArtifact; -import org.apache.ivy.core.module.descriptor.DefaultDependencyDescriptor; -import org.apache.ivy.core.module.descriptor.DefaultModuleDescriptor; -import org.apache.ivy.core.module.descriptor.ModuleDescriptor; -import org.apache.ivy.core.module.id.ModuleRevisionId; -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.ivy.internal.PackageRegistry; -import org.apache.ivy.osgi.util.NameUtil; -import org.apache.ivy.osgi.util.NameUtil.OrgAndName; -import org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser; -import org.apache.ivy.plugins.parser.ModuleDescriptorParser; -import org.apache.ivy.plugins.parser.ParserSettings; -import org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorWriter; -import org.apache.ivy.plugins.repository.Resource; -import org.apache.ivy.plugins.repository.file.FileResource; -import org.apache.ivy.util.Message; - -/** - * An parser for OSGi Manifest descriptor. - */ -public class OsgiManifestParser extends AbstractModuleDescriptorParser { - - public static final String PACKAGE = ".package"; - - protected static final Pattern PATH_REGEX = Pattern - .compile("(.*/)?([\\w\\.]+)[\\-_](\\d\\.\\d\\.\\d)[\\.]?([\\w]+)?"); - - private static final OsgiManifestParser INSTANCE = new OsgiManifestParser(); - - public static OsgiManifestParser getInstance() { - return INSTANCE; - } - - public boolean accept(Resource res) { - if (res == null || res.getName() == null || res.getName().trim().equals("")) { - return false; - } - return res.getName().toUpperCase().endsWith("META-INF/MANIFEST.MF") - || res.getName().toUpperCase().endsWith(".JAR") - || res.getName().toUpperCase().endsWith(".PKGREF"); - } - - public ModuleDescriptor parseDescriptor(ParserSettings ivySettings, URL descriptorURL, - Resource res, boolean validate) throws ParseException, IOException { - - Message.debug("\tparse descriptor: resource=" + res); - - final InternalParser parser = new InternalParser(this); - parser.parse(res, ivySettings); - return parser.getModuleDescriptor(); - } - - public ModuleDescriptor parseExports(Resource res) throws ParseException, IOException { - - Message.debug("\tparse descriptor: resource=" + res); - - final InternalParser parser = new InternalParser(this); - parser.parse(res, true); - return parser.getModuleDescriptor(); - } - - public void toIvyFile(InputStream is, Resource res, File destFile, ModuleDescriptor md) - throws ParseException, IOException { - try { - XmlModuleDescriptorWriter.write(md, destFile); - } finally { - if (is != null) { - is.close(); - } - } - } - - public static class InternalParser extends AbstractParser { - - protected InternalParser(ModuleDescriptorParser parser) { - super(parser); - } - - public void parse(Resource res, ParserSettings ivySettings) throws IOException { - parse(res, false); - } - - public void parse(Resource res, boolean useExports) throws IOException { - Manifest manifest; - if ((res instanceof FileResource) && ((FileResource) res).getFile().isDirectory()) { - manifest = new Manifest( - new FileInputStream(res.getName() + "/META-INF/MANIFEST.MF")); - } else if (res.getName().toUpperCase().endsWith(".JAR")) { - manifest = new JarInputStream(res.openStream()).getManifest(); - } else { - manifest = new Manifest(res.openStream()); - } - - if (manifest == null) { - return; - } - - BundleInfo info; - try { - info = ManifestParser.parseManifest(manifest); - } catch (ParseException e) { - IOException ioe = new IOException(); - ioe.initCause(e); - throw ioe; - } - - setResource(res); - - // Set Info - OrgAndName orgAndName = NameUtil.instance().asOrgAndName(info.getSymbolicName()); - final ModuleRevisionId mrid = ModuleRevisionId.newInstance(orgAndName.org, - orgAndName.name, info.getVersion().toString()); - - getMd().setDescription(info.getDescription()); - getMd().setResolvedPublicationDate(new Date(res.getLastModified())); - getMd().setModuleRevisionId(mrid); - getMd().addConfiguration(new Configuration("default")); - getMd().addConfiguration(new Configuration("optional")); - getMd().addConfiguration(new Configuration("source")); - getMd().setStatus("release"); - getMd().addArtifact( - "default", - new DefaultArtifact(mrid, getDefaultPubDate(), info.getSymbolicName(), "jar", "jar")); - getMd().addArtifact( - "source", - new DefaultArtifact(mrid, getDefaultPubDate(), info.getSymbolicName() + ".source", - "src", "jar")); - - if (useExports) { - addExports(getMd(), info.getExports()); - } else { - Set/* */processedDeps = new HashSet/* */(); - processedDeps.add(mrid); - - addRequiredBundles(getMd(), info.getRequires(), processedDeps); - addImports(getMd(), info.getImports(), processedDeps); - } - - Message.debug("\t\tparse: bundle info: " + info); - } - - protected void addExports(DefaultModuleDescriptor parent, - Set/* */bundleDependencies) { - Iterator itDeps = bundleDependencies.iterator(); - while (itDeps.hasNext()) { - ExportPackage dep = (ExportPackage) itDeps.next(); - String rev = ""; - if (dep.getVersion() != null) { - rev = dep.getVersion().toString(); - } - - final ModuleRevisionId depMrid = ModuleRevisionId.newInstance(PACKAGE, - dep.getName(), rev); - final DefaultDependencyDescriptor dd = new DefaultDependencyDescriptor(parent, - depMrid, false, false, true); - dd.addDependencyConfiguration("default", "default"); - parent.addDependency(dd); - } - } - - protected void addRequiredBundles(DefaultModuleDescriptor parent, - Set/* */bundleDependencies, - Set/* */processedDeps) { - Iterator itDeps = bundleDependencies.iterator(); - while (itDeps.hasNext()) { - BundleRequirement dep = (BundleRequirement) itDeps.next(); - String rev = ""; - if (dep.getVersion() != null) { - rev = dep.getVersion().toIvyRevision(); - } - - OrgAndName orgAndName = NameUtil.instance().asOrgAndName(dep.getName()); - final ModuleRevisionId depMrid = ModuleRevisionId.newInstance(orgAndName.org, - orgAndName.name, rev); - - if (processedDeps.contains(depMrid)) { - return; - } - - processedDeps.add(depMrid); - - final DefaultDependencyDescriptor dd = new DefaultDependencyDescriptor(parent, - depMrid, false, false, true); - if (dep.getResolution() == null) { - dd.addDependencyConfiguration("default", "default"); - } else { - dd.addDependencyConfiguration(dep.getResolution(), dep.getResolution()); - } - parent.addDependency(dd); - } - - } - - protected void addImports(DefaultModuleDescriptor parent, - Set/* */bundleDependencies, - Set/* */processedDeps) { - Iterator itDeps = bundleDependencies.iterator(); - while (itDeps.hasNext()) { - BundleRequirement dep = (BundleRequirement) itDeps.next(); - final ModuleRevisionId pkgMrid = PackageRegistry.getInstance().processImports( - dep.getName(), dep.getVersion()); - - if (processedDeps.contains(pkgMrid)) { - return; - } - - processedDeps.add(pkgMrid); - - if (pkgMrid != null) { - final DefaultDependencyDescriptor dd = new DefaultDependencyDescriptor(parent, - pkgMrid, false, false, true); - if (dep.getResolution() == null) { - dd.addDependencyConfiguration("default", "default"); - } else { - dd.addDependencyConfiguration(dep.getResolution(), dep.getResolution()); - } - parent.addDependency(dd); - } else { - Message.error("Failed to resolve imported package: " + dep); - } - } - } - } -} diff --git a/src/java/org/apache/ivy/osgi/ivy/OsgiRevisionStrategy.java b/src/java/org/apache/ivy/osgi/ivy/OsgiRevisionStrategy.java deleted file mode 100644 index 1ce901ea..00000000 --- a/src/java/org/apache/ivy/osgi/ivy/OsgiRevisionStrategy.java +++ /dev/null @@ -1,235 +0,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. - * - */ -package org.apache.ivy.osgi.ivy; - -import java.util.Comparator; -import java.util.HashMap; -import java.util.Locale; -import java.util.Map; -import java.util.regex.Pattern; - -import org.apache.ivy.core.IvyContext; -import org.apache.ivy.core.module.id.ModuleRevisionId; -import org.apache.ivy.plugins.latest.ArtifactInfo; -import org.apache.ivy.plugins.latest.ComparatorLatestStrategy; -import org.apache.ivy.plugins.version.VersionMatcher; - -public class OsgiRevisionStrategy extends ComparatorLatestStrategy { - - private static final Pattern ALPHA_NUM_REGEX = Pattern.compile("([a-zA-Z])(\\d)"); - - private static final Pattern NUM_ALPHA_REGEX = Pattern.compile("(\\d)([a-zA-Z])"); - - private static final Pattern LABEL_REGEX = Pattern.compile("[_\\-\\+]"); - - /** - * Compares two ModuleRevisionId by their revision. Revisions are compared using an algorithm - * inspired by PHP version_compare one. - */ - final class MridComparator implements Comparator/* */{ - - public int compare(Object o1, Object o2) { - return compare((ModuleRevisionId) o1, (ModuleRevisionId) o2); - } - - public int compare(ModuleRevisionId o1, ModuleRevisionId o2) { - String rev1 = o1.getRevision(); - String rev2 = o2.getRevision(); - - String[] outerParts1 = rev1.split("[\\.]"); - String[] outerParts2 = rev2.split("[\\.]"); - - for (int i = 0; i < outerParts1.length && i < outerParts2.length; i++) { - String outerPart1 = outerParts1[i]; - String outerPart2 = outerParts2[i]; - - if (outerPart1.equals(outerPart2)) { - continue; - } - - outerPart1 = ALPHA_NUM_REGEX.matcher(outerPart1).replaceAll("$1_$2"); - outerPart1 = NUM_ALPHA_REGEX.matcher(outerPart1).replaceAll("$1_$2"); - outerPart2 = ALPHA_NUM_REGEX.matcher(outerPart2).replaceAll("$1_$2"); - outerPart2 = NUM_ALPHA_REGEX.matcher(outerPart2).replaceAll("$1_$2"); - - String[] innerParts1 = LABEL_REGEX.split(outerPart1); - String[] innerParts2 = LABEL_REGEX.split(outerPart2); - - for (int j = 0; j < innerParts1.length && j < innerParts2.length; j++) { - if (innerParts1[j].equals(innerParts2[j])) { - continue; - } - boolean is1Number = isNumber(innerParts1[j]); - boolean is2Number = isNumber(innerParts2[j]); - if (is1Number && !is2Number) { - return 1; - } - if (is2Number && !is1Number) { - return -1; - } - if (is1Number && is2Number) { - return Long.valueOf(innerParts1[j]).compareTo(Long.valueOf(innerParts2[j])); - } - // both are strings, we compare them taking into account special meaning - Map/* */meanings = getSpecialMeanings(); - Integer sm1 = (Integer) meanings.get(innerParts1[j].toLowerCase(Locale.US)); - Integer sm2 = (Integer) meanings.get(innerParts2[j].toLowerCase(Locale.US)); - if (sm1 != null) { - sm2 = sm2 == null ? new Integer(0) : sm2; - return sm1.compareTo(sm2); - } - if (sm2 != null) { - return new Integer(0).compareTo(sm2); - } - return innerParts1[j].compareTo(innerParts2[j]); - } - if (i < innerParts1.length) { - return isNumber(innerParts1[i]) ? 1 : -1; - } - if (i < innerParts2.length) { - return isNumber(innerParts2[i]) ? -1 : 1; - } - } - - if (outerParts1.length > outerParts2.length) { - return 1; - } else if (outerParts1.length < outerParts2.length) { - return -1; - } - - return 0; - } - - private boolean isNumber(String str) { - return str.matches("\\d+"); - } - } - - /** - * Compares two ArtifactInfo by their revision. Revisions are compared using an algorithm - * inspired by PHP version_compare one, unless a dynamic revision is given, in which case the - * version matcher is used to perform the comparison. - */ - final class ArtifactInfoComparator implements Comparator/* */{ - - public int compare(Object o1, Object o2) { - return compare((ArtifactInfo) o1, (ArtifactInfo) o2); - } - - public int compare(ArtifactInfo o1, ArtifactInfo o2) { - String rev1 = o1.getRevision(); - String rev2 = o2.getRevision(); - - /* - * The revisions can still be not resolved, so we use the current version matcher to - * know if one revision is dynamic, and in this case if it should be considered greater - * or lower than the other one. Note that if the version matcher compare method returns - * 0, it's because it's not possible to know which revision is greater. In this case we - * consider the dynamic one to be greater, because most of the time it will then be - * actually resolved and a real comparison will occur. - */ - VersionMatcher vmatcher = IvyContext.getContext().getSettings().getVersionMatcher(); - ModuleRevisionId mrid1 = ModuleRevisionId.newInstance("", "", rev1); - ModuleRevisionId mrid2 = ModuleRevisionId.newInstance("", "", rev2); - if (vmatcher.isDynamic(mrid1)) { - int c = vmatcher.compare(mrid1, mrid2, mridComparator); - return c >= 0 ? 1 : -1; - } else if (vmatcher.isDynamic(mrid2)) { - int c = vmatcher.compare(mrid2, mrid1, mridComparator); - return c >= 0 ? -1 : 1; - } - - return mridComparator.compare(mrid1, mrid2); - } - } - - public static class SpecialMeaning { - private String name; - - private Integer value; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Integer getValue() { - return value; - } - - public void setValue(Integer value) { - this.value = value; - } - - public void validate() { - if (name == null) { - throw new IllegalStateException("a special meaning should have a name"); - } - if (value == null) { - throw new IllegalStateException("a special meaning should have a value"); - } - } - } - - private static final Map/* */DEFAULT_SPECIAL_MEANINGS; - static { - DEFAULT_SPECIAL_MEANINGS = new HashMap/* */(); - DEFAULT_SPECIAL_MEANINGS.put("dev", new Integer(-1)); - DEFAULT_SPECIAL_MEANINGS.put("rc", new Integer(1)); - DEFAULT_SPECIAL_MEANINGS.put("final", new Integer(2)); - } - - private final Comparator/* */mridComparator = new MridComparator(); - - private final Comparator/* */artifactInfoComparator = new ArtifactInfoComparator(); - - private Map/* */specialMeanings = null; - - private boolean usedefaultspecialmeanings = true; - - public OsgiRevisionStrategy() { - setComparator(artifactInfoComparator); - setName("latest-revision"); - } - - public void addConfiguredSpecialMeaning(SpecialMeaning meaning) { - meaning.validate(); - getSpecialMeanings().put(meaning.getName().toLowerCase(Locale.US), meaning.getValue()); - } - - public synchronized Map/* */getSpecialMeanings() { - if (specialMeanings == null) { - specialMeanings = new HashMap/* */(); - if (isUsedefaultspecialmeanings()) { - specialMeanings.putAll(DEFAULT_SPECIAL_MEANINGS); - } - } - return specialMeanings; - } - - public boolean isUsedefaultspecialmeanings() { - return usedefaultspecialmeanings; - } - - public void setUsedefaultspecialmeanings(boolean usedefaultspecialmeanings) { - this.usedefaultspecialmeanings = usedefaultspecialmeanings; - } -} diff --git a/src/java/org/apache/ivy/osgi/ivy/internal/FilePackageScanner.java b/src/java/org/apache/ivy/osgi/ivy/internal/FilePackageScanner.java deleted file mode 100644 index a19f8539..00000000 --- a/src/java/org/apache/ivy/osgi/ivy/internal/FilePackageScanner.java +++ /dev/null @@ -1,103 +0,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. - * - */ -package org.apache.ivy.osgi.ivy.internal; - -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import org.apache.ivy.core.cache.DefaultRepositoryCacheManager; -import org.apache.ivy.plugins.repository.file.FileResource; -import org.apache.ivy.plugins.resolver.ResolverSettings; -import org.apache.ivy.util.Message; - -public class FilePackageScanner { - - private final Map/* > */patternFiles = new HashMap/* - * > - */(); - - private final boolean useFileCache = false; - - public void scanAllPackageExportHeaders(List/* */ivyPatterns, ResolverSettings settings) { - final DefaultRepositoryCacheManager cacheManager = (DefaultRepositoryCacheManager) settings - .getDefaultRepositoryCacheManager(); - - Iterator itPatterns = ivyPatterns.iterator(); - while (itPatterns.hasNext()) { - String ivyPattern = (String) itPatterns.next(); - Collection/* */fileList = null; - fileList = (Collection) patternFiles.get(ivyPattern); - if (fileList == null || !useFileCache) { - fileList = new ArrayList/* */(); - patternFiles.put(ivyPattern, fileList); - final File rootDir = new File(ivyPattern.split("\\[[\\w]+\\]")[0]); - scanDir(rootDir, fileList); - } - - Iterator itFile = fileList.iterator(); - while (itFile.hasNext()) { - File currFile = (File) itFile.next(); - try { - PackageRegistry.getInstance().processExports(cacheManager.getBasedir(), - new FileResource(null, currFile)); - } catch (IOException e) { - Message.error("Failed to process exports for file: " + currFile); - } - } - } - } - - protected void scanDir(File currFile, Collection/* */fileList) { - if (!currFile.canRead()) { - return; - } - - if (currFile.isDirectory()) { - List/* */files = new ArrayList/* */(); - File[] listFiles = currFile.listFiles(); - for (int i = 0; i < listFiles.length; i++) { - File file = listFiles[i]; - files.add(file); - // pre-process to check if we have recursed into an exploded bundle - if (file.getPath().endsWith("META-INF")) { - fileList.add(new File(file, "MANIFEST.MF")); - return; - } - } - // continue scanning... - Iterator itFile = files.iterator(); - while (itFile.hasNext()) { - File file = (File) itFile.next(); - scanDir(file, fileList); - } - } else if (currFile.isFile()) { - final String path = currFile.getPath(); - if (path.toUpperCase().endsWith("META-INF/MANIFEST.MF") - || path.toUpperCase().endsWith(".JAR")) { - fileList.add(currFile); - } - } - } -} diff --git a/src/java/org/apache/ivy/osgi/ivy/internal/JarEntryResource.java b/src/java/org/apache/ivy/osgi/ivy/internal/JarEntryResource.java deleted file mode 100644 index d4be7494..00000000 --- a/src/java/org/apache/ivy/osgi/ivy/internal/JarEntryResource.java +++ /dev/null @@ -1,95 +0,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. - * - */ -package org.apache.ivy.osgi.ivy.internal; - -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.util.zip.ZipEntry; -import java.util.zip.ZipInputStream; - -import org.apache.ivy.plugins.repository.Resource; -import org.apache.ivy.plugins.repository.file.FileRepository; -import org.apache.ivy.plugins.repository.file.FileResource; - -/** - * A resource decorator that handles extracting jar file entries using the bang(!) notation to - * separate the internal entry name. - */ -public class JarEntryResource implements Resource { - - private final String entryName; - - private final Resource resource; - - public JarEntryResource(String name) { - final String[] tokens = name.split("[!]"); - final String path = tokens[0]; - resource = new FileResource(new FileRepository(), new File(path)); - entryName = tokens[1]; - } - - public JarEntryResource(Resource resource, String entryName) { - this.resource = resource; - this.entryName = entryName; - } - - public String toString() { - return "resource:" + resource + ", jarEntry=" + entryName; - } - - public Resource clone(String cloneName) { - return resource.clone(cloneName); - } - - public boolean exists() { - return resource.exists(); - } - - public long getContentLength() { - return resource.getContentLength(); - } - - public long getLastModified() { - return resource.getLastModified(); - } - - public String getName() { - return resource.getName() + "!" + entryName; - } - - public boolean isLocal() { - return resource.isLocal(); - } - - public InputStream openStream() throws IOException { - final ZipInputStream zis = new ZipInputStream(resource.openStream()); - ZipEntry entry = null; - while ((entry = zis.getNextEntry()) != null) { - if (entry.getName().equalsIgnoreCase(entryName)) { - break; - } - } - if (entry == null) { - throw new IllegalStateException("Jar entry: " + entryName + ", not in resource:" - + resource); - } - return zis; - } - -} diff --git a/src/java/org/apache/ivy/osgi/ivy/internal/JarFileRepository.java b/src/java/org/apache/ivy/osgi/ivy/internal/JarFileRepository.java deleted file mode 100644 index 7a77548f..00000000 --- a/src/java/org/apache/ivy/osgi/ivy/internal/JarFileRepository.java +++ /dev/null @@ -1,49 +0,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. - * - */ -package org.apache.ivy.osgi.ivy.internal; - -import java.io.File; -import java.io.IOException; - -import org.apache.ivy.plugins.repository.Resource; -import org.apache.ivy.plugins.repository.file.FileRepository; - -/** - * A file repository that handles extracting jar file entries using the bang(!) notation to separate - * the internal entry name. - */ -public class JarFileRepository extends FileRepository { - - private final RepositoryJarHandler jarHandler = new RepositoryJarHandler(); - - public void get(String source, File destination) throws IOException { - if (jarHandler.canHandle(source)) { - this.jarHandler.get(source, destination); - return; - } - super.get(source, destination); - } - - public Resource getResource(String source) throws IOException { - if (jarHandler.canHandle(source)) { - return this.jarHandler.getResource(source); - } - return super.getResource(source); - } - -} diff --git a/src/java/org/apache/ivy/osgi/ivy/internal/PackageRegistry.java b/src/java/org/apache/ivy/osgi/ivy/internal/PackageRegistry.java deleted file mode 100644 index 7de1e769..00000000 --- a/src/java/org/apache/ivy/osgi/ivy/internal/PackageRegistry.java +++ /dev/null @@ -1,148 +0,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. - * - */ -package org.apache.ivy.osgi.ivy.internal; - -import java.io.File; -import java.io.FilenameFilter; -import java.io.IOException; -import java.util.HashSet; -import java.util.Iterator; -import java.util.Map.Entry; -import java.util.Set; -import java.util.TreeMap; - -import org.apache.ivy.core.module.descriptor.DependencyDescriptor; -import org.apache.ivy.core.module.descriptor.ModuleDescriptor; -import org.apache.ivy.core.module.id.ModuleId; -import org.apache.ivy.core.module.id.ModuleRevisionId; -import org.apache.ivy.osgi.ivy.OsgiManifestParser; -import org.apache.ivy.osgi.util.Version; -import org.apache.ivy.osgi.util.VersionComparator; -import org.apache.ivy.osgi.util.VersionRange; -import org.apache.ivy.plugins.repository.Resource; -import org.apache.ivy.util.Message; - -public class PackageRegistry { - - private final static PackageRegistry instance = new PackageRegistry(); - - public static PackageRegistry getInstance() { - return instance; - } - - private static final String PKGREF = ".pkgref"; - - private final OsgiManifestParser osgiManifestParser = new OsgiManifestParser(); - - private final Set/* */processedEntries = new HashSet/* */(); - - private File cacheDir; - - private PackageRegistry() { - // nothing to initialize - } - - public void processExports(File cacheDirectory, Resource res) throws IOException { - this.cacheDir = cacheDirectory; - - if (processedEntries.contains(res.getName()) || !osgiManifestParser.accept(res)) { - return; - } - - ModuleDescriptor md; - try { - md = osgiManifestParser.parseExports(res); - } catch (Exception e) { - Message.error("\t\tFailed to parse package resource descriptor: " + res); - e.printStackTrace(); - return; - } - - if (md == null) { - return; - } - - final ModuleRevisionId mrid = md.getResolvedModuleRevisionId(); - - final File pkgRootDir = new File(cacheDir, OsgiManifestParser.PACKAGE); - pkgRootDir.mkdirs(); - - DependencyDescriptor[] deps = md.getDependencies(); - for (int i = 0; i < deps.length; i++) { - DependencyDescriptor dep = deps[i]; - final ModuleRevisionId depMrid = dep.getDependencyRevisionId(); - if (depMrid.getOrganisation().equalsIgnoreCase(OsgiManifestParser.PACKAGE)) { - final File pkgDir = new File(pkgRootDir, - (depMrid.getName().replace('.', '/') + "/")); - pkgDir.mkdirs(); - final File file = new File(pkgDir, mrid + PKGREF); - if (!file.exists()) { - Message.debug("\t\tWriting pkg ref: " + file); - file.createNewFile(); - } - } - } - - processedEntries.add(res.getName()); - } - - public ModuleRevisionId processImports(final String pkgName, final VersionRange importRange) { - final File pkgRootDir = new File(cacheDir, OsgiManifestParser.PACKAGE); - if (!pkgRootDir.canRead() || !pkgRootDir.isDirectory()) { - return null; - } - - final File pkgDir = new File(pkgRootDir, pkgName.replace('.', '/') + "/"); - - final TreeMap/* */pkgMrids = new TreeMap/* - * - */( - VersionComparator.DESCENDING); - pkgDir.listFiles(new FilenameFilter() { - public boolean accept(File dir, String name) { - if (name.endsWith(PKGREF)) { - final String baseName = name.substring(0, (name.length() - PKGREF.length())); - final int hashIdx = baseName.indexOf('#'); - final int semicolIdx = baseName.indexOf(';'); - final String mridOrg = baseName.substring(0, hashIdx); - final String[] tokens = baseName.substring(hashIdx + 1, semicolIdx) - .split("[#]"); - final String mridName = tokens[0]; - final String mridBranch = (tokens.length > 1 ? tokens[1] : null); - final String mridRev = baseName.substring(semicolIdx + 1); - pkgMrids.put(new Version(mridRev), new ModuleRevisionId(new ModuleId(mridOrg, - mridName), mridBranch, mridRev)); - } - return false; - } - }); - - ModuleRevisionId matchingMrid = null; - Iterator itMrid = pkgMrids.entrySet().iterator(); - while (itMrid.hasNext()) { - Entry/* */entry = (Entry) itMrid.next(); - if (importRange == null || importRange.contains((String) entry.getKey())) { - matchingMrid = (ModuleRevisionId) entry.getValue(); - break; - } - } - - return matchingMrid; - } -} diff --git a/src/java/org/apache/ivy/osgi/ivy/internal/RepositoryJarHandler.java b/src/java/org/apache/ivy/osgi/ivy/internal/RepositoryJarHandler.java deleted file mode 100644 index 6519fc1f..00000000 --- a/src/java/org/apache/ivy/osgi/ivy/internal/RepositoryJarHandler.java +++ /dev/null @@ -1,43 +0,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. - * - */ -package org.apache.ivy.osgi.ivy.internal; - -import java.io.File; -import java.io.IOException; -import java.io.InputStream; - -import org.apache.ivy.plugins.repository.Resource; -import org.apache.ivy.util.FileUtil; - -public class RepositoryJarHandler { - - public boolean canHandle(String source) { - return source.toUpperCase().contains(".JAR!"); - } - - public void get(String source, File destination) throws IOException { - final InputStream inputStream = new JarEntryResource(source).openStream(); - FileUtil.copy(inputStream, destination, null); - inputStream.close(); - } - - public Resource getResource(String source) { - return new JarEntryResource(source); - } - -} diff --git a/src/java/org/apache/ivy/osgi/obr/OBRResolver.java b/src/java/org/apache/ivy/osgi/obr/OBRResolver.java new file mode 100644 index 00000000..3c21e11b --- /dev/null +++ b/src/java/org/apache/ivy/osgi/obr/OBRResolver.java @@ -0,0 +1,141 @@ +/* + * 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.obr; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; +import java.net.MalformedURLException; +import java.net.URL; +import java.text.ParseException; + +import org.apache.ivy.osgi.obr.xml.OBRXMLParser; +import org.apache.ivy.osgi.repo.BundleRepoResolver; +import org.apache.ivy.osgi.repo.RelativeURLRepository; +import org.apache.ivy.plugins.repository.file.FileRepository; +import org.xml.sax.SAXException; + +public class OBRResolver extends BundleRepoResolver { + + private String repoXmlURL; + + private String repoXmlFile; + + public void setRepoXmlFile(String repositoryXmlFile) { + this.repoXmlFile = repositoryXmlFile; + } + + public void setRepoXmlURL(String repositoryXmlURL) { + this.repoXmlURL = repositoryXmlURL; + } + + protected void ensureInit() { + if (repoXmlFile != null && repoXmlURL != null) { + throw new RuntimeException("The OBR repository resolver " + getName() + + " couldn't be configured: repoXmlFile and repoXmlUrl cannot be set both"); + } + if (repoXmlFile != null) { + File f = new File(repoXmlFile); + setRepository(new FileRepository(f.getParentFile())); + FileInputStream in; + try { + in = new FileInputStream(f); + } catch (FileNotFoundException e) { + throw new RuntimeException("The OBR repository resolver " + getName() + + " couldn't be configured: the file " + repoXmlFile + " was not found"); + } + try { + setRepoDescriptor(OBRXMLParser.parse(in)); + } catch (ParseException e) { + throw new RuntimeException("The OBR repository resolver " + getName() + + " couldn't be configured: the file " + repoXmlFile + + " is incorrectly formed (" + e.getMessage() + ")"); + } catch (IOException e) { + throw new RuntimeException("The OBR repository resolver " + getName() + + " couldn't be configured: the file " + repoXmlFile + + " could not be read (" + e.getMessage() + ")"); + } catch (SAXException e) { + throw new RuntimeException("The OBR repository resolver " + getName() + + " couldn't be configured: the file " + repoXmlFile + + " has incorrect XML (" + e.getMessage() + ")"); + } + try { + in.close(); + } catch (IOException e) { + // don't care + } + } else if (repoXmlURL != null) { + URL url; + try { + url = new URL(repoXmlURL); + } catch (MalformedURLException e) { + throw new RuntimeException("The OBR repository resolver " + getName() + + " couldn't be configured: repoXmlURL '" + repoXmlURL + "' is not an URL"); + } + URL baseUrl; + String basePath = "/"; + int i = url.getPath().lastIndexOf("/"); + if (i > 0) { + basePath = url.getPath().substring(0, i + 1); + } + try { + baseUrl = new URL(url.getProtocol(), url.getHost(), url.getPort(), basePath); + } catch (MalformedURLException e) { + throw new RuntimeException( + "The OBR repository resolver " + + getName() + + " couldn't be configured: the base url couldn'd be extracted from the url " + + url + " (" + e.getMessage() + ")"); + } + setRepository(new RelativeURLRepository(baseUrl)); + InputStream in; + try { + in = url.openStream(); + } catch (IOException e) { + throw new RuntimeException("The OBR repository resolver " + getName() + + " couldn't be configured: the file " + repoXmlURL + " couldn't be read (" + + e.getMessage() + ")"); + } + try { + setRepoDescriptor(OBRXMLParser.parse(in)); + } catch (ParseException e) { + throw new RuntimeException("The OBR repository resolver " + getName() + + " couldn't be configured: the file " + repoXmlURL + + " is incorrectly formed (" + e.getMessage() + ")"); + } catch (IOException e) { + throw new RuntimeException("The OBR repository resolver " + getName() + + " couldn't be configured: the file " + repoXmlURL + + " could not be read (" + e.getMessage() + ")"); + } catch (SAXException e) { + throw new RuntimeException("The OBR repository resolver " + getName() + + " couldn't be configured: the file " + repoXmlURL + + " has incorrect XML (" + e.getMessage() + ")"); + } + try { + in.close(); + } catch (IOException e) { + // don't care + } + } else { + throw new RuntimeException("The OBR repository resolver " + getName() + + " couldn't be configured: repoXmlFile or repoXmlUrl is missing"); + } + } +} diff --git a/src/java/org/apache/ivy/osgi/repo/BundleRepoResolver.java b/src/java/org/apache/ivy/osgi/repo/BundleRepoResolver.java index 1d9f1301..861eedfc 100644 --- a/src/java/org/apache/ivy/osgi/repo/BundleRepoResolver.java +++ b/src/java/org/apache/ivy/osgi/repo/BundleRepoResolver.java @@ -18,12 +18,7 @@ package org.apache.ivy.osgi.repo; import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; import java.io.IOException; -import java.io.InputStream; -import java.net.MalformedURLException; -import java.net.URL; import java.text.ParseException; import java.util.ArrayList; import java.util.Arrays; @@ -70,10 +65,6 @@ public class BundleRepoResolver extends BasicResolver { private Repository repository = null; - private String repoXmlURL; - - private String repoXmlFile; - private BundleRepo repoDescriptor = null; private ExecutionEnvironmentProfileProvider profileProvider; @@ -106,113 +97,23 @@ public class BundleRepoResolver extends BasicResolver { setImportPackageStrategy(RequirementStrategy.valueOf(strategy)); } - public void setRepoXmlFile(String repositoryXmlFile) { - this.repoXmlFile = repositoryXmlFile; - } - - public void setRepoXmlURL(String repositoryXmlURL) { - this.repoXmlURL = repositoryXmlURL; - } - public void add(ExecutionEnvironmentProfileProvider pp) { this.profileProvider = pp; } - private void ensureInit() { - if (repoDescriptor != null && repository != null) { - return; - } + protected void setRepository(Repository repository) { + this.repository = repository; + } + + protected void setRepoDescriptor(BundleRepo repoDescriptor) { + this.repoDescriptor = repoDescriptor; + } + + protected void ensureInit() { if (repoDescriptor != null || repository != null) { throw new IllegalStateException("The osgi repository resolver " + getName() + " wasn't correctly configured, see previous error in the logs"); } - if (repoXmlFile != null && repoXmlURL != null) { - throw new RuntimeException("The osgi repository resolver " + getName() - + " couldn't be configured: repoXmlFile and repoXmlUrl cannot be set both"); - } - if (repoXmlFile != null) { - File f = new File(repoXmlFile); - repository = new FileRepository(f.getParentFile()); - FileInputStream in; - try { - in = new FileInputStream(f); - } catch (FileNotFoundException e) { - throw new RuntimeException("The osgi repository resolver " + getName() - + " couldn't be configured: the file " + repoXmlFile + " was not found"); - } - try { - repoDescriptor = OBRXMLParser.parse(in); - } catch (ParseException e) { - throw new RuntimeException("The osgi repository resolver " + getName() - + " couldn't be configured: the file " + repoXmlFile - + " is incorrectly formed (" + e.getMessage() + ")"); - } catch (IOException e) { - throw new RuntimeException("The osgi repository resolver " + getName() - + " couldn't be configured: the file " + repoXmlFile - + " could not be read (" + e.getMessage() + ")"); - } catch (SAXException e) { - throw new RuntimeException("The osgi repository resolver " + getName() - + " couldn't be configured: the file " + repoXmlFile - + " has incorrect XML (" + e.getMessage() + ")"); - } - try { - in.close(); - } catch (IOException e) { - // don't care - } - } else { - URL url; - try { - url = new URL(repoXmlURL); - } catch (MalformedURLException e) { - throw new RuntimeException("The osgi repository resolver " + getName() - + " couldn't be configured: repoXmlURL '" + repoXmlURL + "' is not an URL"); - } - URL baseUrl; - String basePath = "/"; - int i = url.getPath().lastIndexOf("/"); - if (i > 0) { - basePath = url.getPath().substring(0, i + 1); - } - try { - baseUrl = new URL(url.getProtocol(), url.getHost(), url.getPort(), basePath); - } catch (MalformedURLException e) { - throw new RuntimeException( - "The osgi repository resolver " - + getName() - + " couldn't be configured: the base url couldn'd be extracted from the url " - + url + " (" + e.getMessage() + ")"); - } - repository = new RelativeURLRepository(baseUrl); - InputStream in; - try { - in = url.openStream(); - } catch (IOException e) { - throw new RuntimeException("The osgi repository resolver " + getName() - + " couldn't be configured: the file " + repoXmlURL + " couldn't be read (" - + e.getMessage() + ")"); - } - try { - repoDescriptor = OBRXMLParser.parse(in); - } catch (ParseException e) { - throw new RuntimeException("The osgi repository resolver " + getName() - + " couldn't be configured: the file " + repoXmlURL - + " is incorrectly formed (" + e.getMessage() + ")"); - } catch (IOException e) { - throw new RuntimeException("The osgi repository resolver " + getName() - + " couldn't be configured: the file " + repoXmlURL - + " could not be read (" + e.getMessage() + ")"); - } catch (SAXException e) { - throw new RuntimeException("The osgi repository resolver " + getName() - + " couldn't be configured: the file " + repoXmlURL - + " has incorrect XML (" + e.getMessage() + ")"); - } - try { - in.close(); - } catch (IOException e) { - // don't care - } - } } public Repository getRepository() { diff --git a/src/java/org/apache/ivy/osgi/util/NameUtil.java b/src/java/org/apache/ivy/osgi/util/NameUtil.java deleted file mode 100644 index f26b103c..00000000 --- a/src/java/org/apache/ivy/osgi/util/NameUtil.java +++ /dev/null @@ -1,113 +0,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. - * - */ -package org.apache.ivy.osgi.util; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.util.HashSet; -import java.util.Set; - -/** - * Provides a bundle name conversion utility. - */ -public class NameUtil { - - private static final NameUtil instance = new NameUtil(); - - public static NameUtil instance() { - return instance; - } - - private final Set/* */tlds = new HashSet/* */(); - - private NameUtil() { - final InputStream inputStream = getClass().getClassLoader() - .getResourceAsStream("orgs.list"); - if (inputStream == null) { - throw new IllegalStateException("Unable to find required file in classpath: orgs.list"); - } - final BufferedReader bis = new BufferedReader(new InputStreamReader(inputStream)); - try { - String line = null; - while ((line = bis.readLine()) != null) { - line = line.trim(); - if (line.equals("") || line.startsWith("#")) { - continue; - } - tlds.add(line); - } - } catch (IOException e) { - e.printStackTrace(); - } - } - - public OrgAndName asOrgAndName(String qname) { - final String[] tokens = qname.split("\\."); - if ((tokens == null) || (tokens.length == 0)) { - throw new IllegalStateException("Qualified name is empty or invalid: " + qname); - } - - String org = null; - String name = null; - - if (tlds.contains(tokens[0])) { - org = append(tokens, 0, 1); - name = append(tokens, 2, tokens.length); - } else if (tokens.length == 1) { - org = tokens[0]; - name = tokens[0]; - } else if (tokens.length >= 2) { - org = tokens[0]; - name = append(tokens, 1, tokens.length); - } - - if (org == null || name == null) { - throw new IllegalStateException("Null org/name: org=" + org + ", name=" + name - + ", qname=" + qname); - } - - return new OrgAndName(org, name); - } - - private String append(String[] strs, int start, int end) { - final StringBuffer sbuf = new StringBuffer(); - boolean dot = false; - for (int i = start; i <= end && i < strs.length; i++) { - if (dot) { - sbuf.append('.'); - } - sbuf.append(strs[i]); - dot = true; - } - return sbuf.toString(); - } - - public static class OrgAndName { - public final String org; - - public final String name; - - private OrgAndName(String org, String name) { - this.org = org; - this.name = name; - } - - } -} diff --git a/src/java/orgs.list b/src/java/orgs.list deleted file mode 100644 index 1e23ea5e..00000000 --- a/src/java/orgs.list +++ /dev/null @@ -1,269 +0,0 @@ -ac -ad -ae -aero -af -ag -ai -al -am -an -ao -aq -ar -arpa -as -asia -at -au -aw -ax -az -ba -bb -bd -be -bf -bg -bh -bi -biz -bj -bm -bn -bo -br -bs -bt -bv -bw -by -bz -ca -cat -cc -cd -cf -cg -ch -ci -ck -cl -cm -cn -co -com -coop -cr -cu -cv -cx -cy -cz -de -dj -dk -dm -do -dz -ec -edu -ee -eg -er -es -et -eu -fi -fj -fk -fm -fo -fr -ga -gb -gd -ge -gf -gg -gh -gi -gl -gm -gn -gov -gp -gq -gr -gs -gt -gu -gw -gy -hk -hm -hn -hr -ht -hu -id -ie -il -im -in -info -int -io -iq -ir -is -it -je -jm -jo -jobs -jp -ke -kg -kh -ki -km -kn -kp -kr -kw -ky -kz -la -lb -lc -li -lk -lr -ls -lt -lu -lv -ly -ma -mc -md -me -mg -mh -mil -mk -ml -mm -mn -mo -mobi -mp -mq -mr -ms -mt -mu -museum -mv -mw -mx -my -mz -na -name -nc -ne -net -nf -ng -ni -nl -no -np -nr -nu -nz -om -org -pa -pe -pf -pg -ph -pk -pl -pm -pn -pr -pro -ps -pt -pw -py -qa -re -ro -rs -ru -rw -sa -sb -sc -sd -se -sg -sh -si -sj -sk -sl -sm -sn -so -sr -st -su -sv -sy -sz -tc -td -tel -tf -tg -th -tj -tk -tl -tm -tn -to -tp -tr -travel -tt -tv -tw -tz -ua -ug -uk -us -uy -uz -va -vc -ve -vg -vi -vn -vu -wf -ws -ye -yt -yu -za -zm -zw \ No newline at end of file diff --git a/test/java/org/apache/ivy/osgi/core/ManifestParserTest.java b/test/java/org/apache/ivy/osgi/core/ManifestParserTest.java index 765e9866..42d1e188 100644 --- a/test/java/org/apache/ivy/osgi/core/ManifestParserTest.java +++ b/test/java/org/apache/ivy/osgi/core/ManifestParserTest.java @@ -29,8 +29,8 @@ public class ManifestParserTest extends TestCase { public void testParseManifest() throws Exception { BundleInfo bundleInfo; - bundleInfo = ManifestParser.parseJarManifest(getClass().getClassLoader() - .getResourceAsStream("com.acme.alpha-1.0.0.20080101.jar")); + bundleInfo = ManifestParser.parseJarManifest(getClass().getResourceAsStream( + "com.acme.alpha-1.0.0.20080101.jar")); assertEquals("com.acme.alpha", bundleInfo.getSymbolicName()); assertEquals("1.0.0", bundleInfo.getVersion().numbersAsString()); assertEquals("20080101", bundleInfo.getVersion().qualifier()); @@ -49,8 +49,8 @@ public class ManifestParserTest extends TestCase { assertTrue(importsList.contains("com.acme.bravo")); assertTrue(importsList.contains("com.acme.delta")); - bundleInfo = ManifestParser.parseJarManifest(getClass().getClassLoader() - .getResourceAsStream("com.acme.bravo-2.0.0.20080202.jar")); + bundleInfo = ManifestParser.parseJarManifest(getClass().getResourceAsStream( + "com.acme.bravo-2.0.0.20080202.jar")); assertNotNull(bundleInfo); assertEquals("com.acme.bravo", bundleInfo.getSymbolicName()); assertEquals("2.0.0", bundleInfo.getVersion().numbersAsString()); diff --git a/test/java/org/apache/ivy/osgi/core/com.acme.alpha-1.0.0.20080101.jar b/test/java/org/apache/ivy/osgi/core/com.acme.alpha-1.0.0.20080101.jar new file mode 100644 index 00000000..468aae82 Binary files /dev/null and b/test/java/org/apache/ivy/osgi/core/com.acme.alpha-1.0.0.20080101.jar differ diff --git a/test/java/org/apache/ivy/osgi/core/com.acme.bravo-2.0.0.20080202.jar b/test/java/org/apache/ivy/osgi/core/com.acme.bravo-2.0.0.20080202.jar new file mode 100644 index 00000000..9963f8f4 Binary files /dev/null and b/test/java/org/apache/ivy/osgi/core/com.acme.bravo-2.0.0.20080202.jar differ diff --git a/test/java/org/apache/ivy/osgi/ivy/IvyIntegrationTest.java b/test/java/org/apache/ivy/osgi/ivy/IvyIntegrationTest.java deleted file mode 100644 index 3baabf0a..00000000 --- a/test/java/org/apache/ivy/osgi/ivy/IvyIntegrationTest.java +++ /dev/null @@ -1,69 +0,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. - * - */ -package org.apache.ivy.osgi.ivy; - -import java.io.File; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.Arrays; -import java.util.Collection; -import java.util.HashSet; -import java.util.Iterator; -import java.util.Set; - -import org.apache.ivy.Ivy; -import org.apache.ivy.core.module.id.ModuleId; -import org.apache.ivy.core.module.id.ModuleRevisionId; -import org.apache.ivy.core.report.ResolveReport; -import org.apache.ivy.core.resolve.IvyNode; -import org.apache.ivy.core.resolve.ResolveOptions; -import org.apache.ivy.plugins.parser.AbstractModuleDescriptorParserTester; - -public class IvyIntegrationTest extends AbstractModuleDescriptorParserTester { - - private URL getTestResource(String resource) throws MalformedURLException { - return new File("test/test-ivy/" + resource).toURI().toURL(); - } - - public void testAcmeResolveAlpha() throws Exception { - final Ivy ivy = Ivy.newInstance(); - ivy.configure(getTestResource("acme-ivysettings.xml")); - - final ModuleRevisionId mrid = new ModuleRevisionId(new ModuleId("com.acme", "alpha"), - "1.0+"); - // final ModuleRevisionId mrid = new ModuleRevisionId(new ModuleId("com.acme", "delta"), - // "4+"); - // final ModuleRevisionId mrid = new ModuleRevisionId(new ModuleId("com.acme", "echo"), - // "5+"); - final ResolveOptions options = new ResolveOptions(); - options.setConfs(new String[] {"default"}); - - final ResolveReport report = ivy.resolve(mrid, options, false); - assertEquals(5, report.getDependencies().size()); - - final String[] names = new String[] {"com.acme#alpha;1.0.0.20080101", - "com.acme#bravo;2.0.0.20080202", "com.acme#charlie;3.0.0.20080303", - "com.acme#delta;4.0.0", "com.acme#echo;5.0.0"}; - final Set/* */nodeNames = new HashSet/* */(Arrays.asList(names)); - Iterator itNode = ((Collection/* */) report.getDependencies()).iterator(); - while (itNode.hasNext()) { - IvyNode node = (IvyNode) itNode.next(); - assertTrue(" Contains: " + node, nodeNames.contains(node.toString())); - } - } -} diff --git a/test/java/org/apache/ivy/osgi/ivy/JarHandlingRepositoryTest.java b/test/java/org/apache/ivy/osgi/ivy/JarHandlingRepositoryTest.java deleted file mode 100644 index c2e8d62c..00000000 --- a/test/java/org/apache/ivy/osgi/ivy/JarHandlingRepositoryTest.java +++ /dev/null @@ -1,36 +0,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. - * - */ -package org.apache.ivy.osgi.ivy; - -import java.io.IOException; - -import junit.framework.TestCase; - -import org.apache.ivy.osgi.ivy.internal.JarEntryResource; - -public class JarHandlingRepositoryTest extends TestCase { - - public void test() throws IOException { - final JarEntryResource resource = new JarEntryResource( - "test/test-bundles/jars/com.acme.alpha-1.0.0.20080101.jar!META-INF/MANIFEST.MF"); - assertNotNull(resource.openStream()); - assertTrue(resource.isLocal()); - assertTrue(resource.exists()); - } - -} diff --git a/test/java/org/apache/ivy/osgi/ivy/OsgiIvyParserTest.java b/test/java/org/apache/ivy/osgi/ivy/OsgiIvyParserTest.java deleted file mode 100644 index 0bf218b3..00000000 --- a/test/java/org/apache/ivy/osgi/ivy/OsgiIvyParserTest.java +++ /dev/null @@ -1,86 +0,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. - * - */ -package org.apache.ivy.osgi.ivy; - -import java.io.File; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; - -import junit.framework.TestCase; - -import org.apache.ivy.core.module.descriptor.ModuleDescriptor; -import org.apache.ivy.core.settings.IvySettings; -import org.apache.ivy.plugins.parser.ModuleDescriptorParser; -import org.apache.ivy.plugins.parser.ModuleDescriptorParserRegistry; -import org.apache.ivy.plugins.repository.url.URLResource; - -public class OsgiIvyParserTest extends TestCase { - - public void testSimple() throws Exception { - IvySettings settings = new IvySettings(); - settings.load(new File("test/test-ivy/include/ivysettings.xml")); - - URLResource includingResource = new URLResource( - new File("test/test-ivy/include/ivy.xml").toURL()); - ModuleDescriptorParser includingParser = ModuleDescriptorParserRegistry.getInstance() - .getParser(includingResource); - assertTrue(includingParser instanceof OsgiIvyParser); - ModuleDescriptor includingMd = includingParser.parseDescriptor(settings, - includingResource.getURL(), false); - - assertNotNull(includingMd); - - URLResource resultResource = new URLResource(new File( - "test/test-ivy/include/ivy-result.xml").toURL()); - ModuleDescriptorParser resultParser = ModuleDescriptorParserRegistry.getInstance() - .getParser(resultResource); - ModuleDescriptor resultMd = resultParser.parseDescriptor(settings, resultResource.getURL(), - false); - - assertEquals(resultMd.getModuleRevisionId(), includingMd.getModuleRevisionId()); - assertEquals(resultMd.getResolvedModuleRevisionId(), - includingMd.getResolvedModuleRevisionId()); - assertEquals(resultMd.getDescription(), includingMd.getDescription()); - assertEquals(resultMd.getHomePage(), includingMd.getHomePage()); - // assertEquals(resultMd.getLastModified(), includingMd.getLastModified()); - assertEquals(resultMd.getStatus(), includingMd.getStatus()); - assertEquals(resultMd.getExtraInfo(), includingMd.getExtraInfo()); - assertArrayEquals((Object[]) resultMd.getLicenses(), (Object[]) includingMd.getLicenses()); - assertArrayEquals(resultMd.getConfigurations(), includingMd.getConfigurations()); - assertArrayEquals((Object[]) resultMd.getAllArtifacts(), - (Object[]) includingMd.getAllArtifacts()); - assertEquals(resultMd.getDependencies().length, includingMd.getDependencies().length); - for (int i = 0; i < resultMd.getDependencies().length; i++) { - assertEquals(resultMd.getDependencies()[i].getDependencyRevisionId(), - includingMd.getDependencies()[i].getDependencyRevisionId()); - assertArrayEquals((Object[]) resultMd.getDependencies()[i].getModuleConfigurations(), - (Object[]) includingMd.getDependencies()[i].getModuleConfigurations()); - } - } - - private static/* */void assertArrayEquals(Object/* T1 */[] expected, - Object/* T2 */[] actual) { - assertSetEquals(Arrays.asList(expected), Arrays.asList(actual)); - } - - private static/* */void assertSetEquals(List/* */expected, List/* */actual) { - assertEquals(new HashSet/* */(expected), new HashSet/* */(actual)); - } - -} diff --git a/test/java/org/apache/ivy/osgi/ivy/OsgiManifestParserTest.java b/test/java/org/apache/ivy/osgi/ivy/OsgiManifestParserTest.java deleted file mode 100644 index f968a2b1..00000000 --- a/test/java/org/apache/ivy/osgi/ivy/OsgiManifestParserTest.java +++ /dev/null @@ -1,150 +0,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. - * - */ -package org.apache.ivy.osgi.ivy; - -import java.io.BufferedReader; -import java.io.File; -import java.io.IOException; -import java.io.InputStreamReader; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.Date; -import java.util.HashSet; -import java.util.Set; - -import org.apache.ivy.core.module.descriptor.Artifact; -import org.apache.ivy.core.module.descriptor.DefaultArtifact; -import org.apache.ivy.core.module.descriptor.DependencyDescriptor; -import org.apache.ivy.core.module.descriptor.ModuleDescriptor; -import org.apache.ivy.core.module.id.ModuleId; -import org.apache.ivy.core.module.id.ModuleRevisionId; -import org.apache.ivy.core.settings.IvySettings; -import org.apache.ivy.plugins.parser.AbstractModuleDescriptorParserTester; -import org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParserTest; -import org.apache.ivy.plugins.repository.url.URLResource; -import org.apache.ivy.util.FileUtil; - -public class OsgiManifestParserTest extends AbstractModuleDescriptorParserTester { - - private URL getTestResource(String resource) throws MalformedURLException { - return new File("test/test-ivy/" + resource).toURI().toURL(); - } - - public void testAccept() throws Exception { - assertTrue(OsgiManifestParser.getInstance().accept( - new URLResource( - getTestResource("osgi/eclipse/plugins/test-simple/META-INF/MANIFEST.MF")))); - assertFalse(OsgiManifestParser.getInstance().accept( - new URLResource(XmlModuleDescriptorParserTest.class.getResource("test.xml")))); - } - - public void testSimple() throws Exception { - final ModuleDescriptor md = OsgiManifestParser.getInstance().parseDescriptor( - new IvySettings(), - getTestResource("osgi/eclipse/plugins/test-simple/META-INF/MANIFEST.MF"), false); - assertNotNull(md); - assertSimpleModuleDescriptor(md); - } - - public void testSimpleFromJar() throws Exception { - final ModuleDescriptor md = OsgiManifestParser.getInstance().parseDescriptor( - new IvySettings(), getTestResource("test-simple.jar"), false); - assertNotNull(md); - assertSimpleModuleDescriptor(md); - } - - public void testFull() throws Exception { - final ModuleDescriptor md = OsgiManifestParser.getInstance().parseDescriptor( - new IvySettings(), - getTestResource("osgi/eclipse/plugins/test-full/META-INF/MANIFEST.MF"), false); - assertNotNull(md); - assertSimpleModuleDescriptor(md); - assertDependencies(md); - } - - public void testFullFromJar() throws Exception { - final ModuleDescriptor md = OsgiManifestParser.getInstance().parseDescriptor( - new IvySettings(), getTestResource("test-full.jar"), false); - assertNotNull(md); - assertSimpleModuleDescriptor(md); - assertDependencies(md); - } - - public void testJB() throws Exception { - final ModuleRevisionId mrid = new ModuleRevisionId(new ModuleId("org", "name"), - "revisionId"); - final Artifact artifact = new DefaultArtifact(mrid, new Date(), "META-INF/MANIFEST", - "manifest", "MF", true); - System.out.println(artifact); - } - - private void assertSimpleModuleDescriptor(ModuleDescriptor md) throws Exception { - final ModuleRevisionId mrid = ModuleRevisionId.newInstance("org.eclipse", - "datatools.connectivity.ui", "1.0.1.200708231"); - assertEquals(mrid, md.getModuleRevisionId()); - - assertNotNull(md.getConfigurations()); - assertEquals(3, md.getConfigurations().length); - assertNotNull(md.getConfiguration("default")); - - assertNotNull(md.getAllArtifacts()); - assertEquals(2, md.getAllArtifacts().length); - final Artifact[] artifact = md.getArtifacts("default"); - assertEquals(1, artifact.length); - assertEquals(mrid, artifact[0].getModuleRevisionId()); - assertEquals("org.eclipse.datatools.connectivity.ui", artifact[0].getName()); - assertEquals("jar", artifact[0].getExt()); - assertEquals("jar", artifact[0].getType()); - - } - - private void assertDependencies(ModuleDescriptor md) throws Exception { - final DependencyDescriptor[] dds = md.getDependencies(); - assertNotNull(dds); - Set/* */actual = new HashSet/* */(); - DependencyDescriptor[] deps = md.getDependencies(); - for (int i = 0; i < deps.length; i++) { - DependencyDescriptor dd = deps[i]; - actual.add(dd.getDependencyRevisionId()); - } - Set/* */expected = new HashSet/* */(); - expected.add(ModuleRevisionId.newInstance("org.eclipse", "core.runtime", "[3.2.0,4.0.0)")); - expected.add(ModuleRevisionId.newInstance("org.eclipse", "core.resources", "[3.2.0,4.0.0)")); - expected.add(ModuleRevisionId.newInstance("org.eclipse", "ui", "[3.2.0,4.0.0)")); - expected.add(ModuleRevisionId.newInstance("org.eclipse", "ui.views", "[3.2.0,4.0.0)")); - expected.add(ModuleRevisionId.newInstance("org.eclipse", "datatools.connectivity", - "[0.9.1,1.5.0)")); - expected.add(ModuleRevisionId.newInstance("org.eclipse", "ui.navigator", "[3.2.0,4.0.0)")); - expected.add(ModuleRevisionId.newInstance("org.eclipse", "core.expressions", - "[3.2.0,4.0.0)")); - expected.add(ModuleRevisionId.newInstance("com.ibm", "icu", "[3.4.0,4.0.0)")); - expected.add(ModuleRevisionId.newInstance("org.eclipse", "ltk.core.refactoring", - "[3.2.0,4.0.0)")); - expected.add(ModuleRevisionId.newInstance("org.eclipse", "datatools.help", "[1.0.0,2.0.0)")); - expected.add(ModuleRevisionId.newInstance("org.eclipse", "help", "[3.2.0,4.0.0)")); - expected.add(ModuleRevisionId.newInstance("org.eclipse", "help.base", "[3.2.0,4.0.0)")); - - assertEquals(expected, actual); - } - - private String readEntirely(String resource) throws IOException { - return FileUtil.readEntirely(new BufferedReader(new InputStreamReader(ClassLoader - .getSystemResource(resource).openStream()))); - } - -} diff --git a/test/java/org/apache/ivy/osgi/repo/BundleRepoResolverTest.java b/test/java/org/apache/ivy/osgi/obr/OBRResolverTest.java similarity index 95% rename from test/java/org/apache/ivy/osgi/repo/BundleRepoResolverTest.java rename to test/java/org/apache/ivy/osgi/obr/OBRResolverTest.java index 8216164d..bf450887 100644 --- a/test/java/org/apache/ivy/osgi/repo/BundleRepoResolverTest.java +++ b/test/java/org/apache/ivy/osgi/obr/OBRResolverTest.java @@ -15,7 +15,7 @@ * limitations under the License. * */ -package org.apache.ivy.osgi.repo; +package org.apache.ivy.osgi.obr; import java.io.File; import java.io.FileInputStream; @@ -46,15 +46,17 @@ 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.core.ManifestParser; +import org.apache.ivy.osgi.obr.OBRResolver; +import org.apache.ivy.osgi.repo.BundleInfoAdapter; import org.apache.ivy.osgi.repo.BundleRepoResolver.RequirementStrategy; import org.apache.ivy.plugins.resolver.DependencyResolver; import org.apache.ivy.plugins.resolver.DualResolver; import org.apache.ivy.plugins.resolver.FileSystemResolver; -public class BundleRepoResolverTest extends TestCase { +public class OBRResolverTest extends TestCase { private static final ModuleRevisionId MRID_TEST_BUNDLE = ModuleRevisionId.newInstance("", - "org.apache.ivy.osgitestbundle", "1.2.3", BundleInfoAdapter.OSGI_BUNDLE); + "org.apache.ivy.osgi.testbundle", "1.2.3", BundleInfoAdapter.OSGI_BUNDLE); private static final ModuleRevisionId MRID_TEST_BUNDLE_IMPORTING = ModuleRevisionId .newInstance("", "org.apache.ivy.osgi.testbundle.importing", "3.2.1", @@ -83,23 +85,23 @@ public class BundleRepoResolverTest extends TestCase { private Ivy ivy; - private BundleRepoResolver bundleResolver; + private OBRResolver bundleResolver; - private BundleRepoResolver bundleUrlResolver; + private OBRResolver bundleUrlResolver; private DualResolver dualResolver; public void setUp() throws Exception { settings = new IvySettings(); - bundleResolver = new BundleRepoResolver(); + bundleResolver = new OBRResolver(); bundleResolver.setRepoXmlFile(new File("test/test-repo/bundlerepo/repo.xml") .getAbsolutePath()); bundleResolver.setName("bundle"); bundleResolver.setSettings(settings); settings.addResolver(bundleResolver); - bundleUrlResolver = new BundleRepoResolver(); + bundleUrlResolver = new OBRResolver(); bundleUrlResolver.setRepoXmlURL(new File("test/test-repo/bundlerepo/repo.xml").toURI() .toURL().toExternalForm()); bundleUrlResolver.setName("bundleurl"); @@ -107,8 +109,8 @@ public class BundleRepoResolverTest extends TestCase { settings.addResolver(bundleUrlResolver); dualResolver = new DualResolver(); - BundleRepoResolver resolver = new BundleRepoResolver(); - resolver.setRepoXmlFile("test/test-repo/ivyrepo/repo.xml"); + OBRResolver resolver = new OBRResolver(); + resolver.setRepoXmlFile(new File("test/test-repo/ivyrepo/repo.xml").getAbsolutePath()); resolver.setName("dual-bundle"); resolver.setSettings(settings); dualResolver.add(resolver); diff --git a/test/java/org/apache/ivy/osgi/util/NameUtilTest.java b/test/java/org/apache/ivy/osgi/util/NameUtilTest.java deleted file mode 100644 index 80b962e7..00000000 --- a/test/java/org/apache/ivy/osgi/util/NameUtilTest.java +++ /dev/null @@ -1,66 +0,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. - * - */ -package org.apache.ivy.osgi.util; - -import junit.framework.TestCase; - -import org.apache.ivy.osgi.util.NameUtil.OrgAndName; - -public class NameUtilTest extends TestCase { - - public void testAsOrgAndName() { - OrgAndName oan; - - oan = NameUtil.instance().asOrgAndName("foo"); - assertEquals("foo", oan.org); - assertEquals("foo", oan.name); - - oan = NameUtil.instance().asOrgAndName("java.foo"); - assertEquals("java", oan.org); - assertEquals("foo", oan.name); - - oan = NameUtil.instance().asOrgAndName("java.foo.bar"); - assertEquals("java", oan.org); - assertEquals("foo.bar", oan.name); - - oan = NameUtil.instance().asOrgAndName("javax.foo"); - assertEquals("javax", oan.org); - assertEquals("foo", oan.name); - - oan = NameUtil.instance().asOrgAndName("javax.foo.bar"); - assertEquals("javax", oan.org); - assertEquals("foo.bar", oan.name); - - oan = NameUtil.instance().asOrgAndName("org.eclipse.foo"); - assertEquals("org.eclipse", oan.org); - assertEquals("foo", oan.name); - - oan = NameUtil.instance().asOrgAndName("org.eclipse.foo.bar"); - assertEquals("org.eclipse", oan.org); - assertEquals("foo.bar", oan.name); - - oan = NameUtil.instance().asOrgAndName("com.eclipse.foo.bar"); - assertEquals("com.eclipse", oan.org); - assertEquals("foo.bar", oan.name); - - oan = NameUtil.instance().asOrgAndName("net.eclipse.foo.bar"); - assertEquals("net.eclipse", oan.org); - assertEquals("foo.bar", oan.name); - } - -} diff --git a/test/test-bundles/alpha/.settings/org.eclipse.jdt.core.prefs b/test/test-bundles/alpha/.settings/org.eclipse.jdt.core.prefs deleted file mode 100755 index ab6b0f2c..00000000 --- a/test/test-bundles/alpha/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,25 +0,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. -# *************************************************************** -#Thu Aug 07 12:00:41 BST 2008 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/test/test-bundles/alpha/.settings/org.eclipse.pde.core.prefs b/test/test-bundles/alpha/.settings/org.eclipse.pde.core.prefs deleted file mode 100755 index 215f95bb..00000000 --- a/test/test-bundles/alpha/.settings/org.eclipse.pde.core.prefs +++ /dev/null @@ -1,23 +0,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. -# *************************************************************** -#Thu Aug 07 12:00:50 BST 2008 -eclipse.preferences.version=1 -pluginProject.equinox=false -pluginProject.extensions=false -resolve.requirebundle=false diff --git a/test/test-bundles/alpha/src/com/acme/alpha/Alpha.java b/test/test-bundles/alpha/src/com/acme/alpha/Alpha.java deleted file mode 100755 index e41bef97..00000000 --- a/test/test-bundles/alpha/src/com/acme/alpha/Alpha.java +++ /dev/null @@ -1,22 +0,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. - * - */ -package com.acme.alpha; - -public class Alpha { - -} diff --git a/test/test-bundles/bravo/.settings/org.eclipse.jdt.core.prefs b/test/test-bundles/bravo/.settings/org.eclipse.jdt.core.prefs deleted file mode 100755 index 5cb69a7b..00000000 --- a/test/test-bundles/bravo/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,25 +0,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. -# *************************************************************** -#Thu Aug 07 12:01:28 BST 2008 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/test/test-bundles/bravo/.settings/org.eclipse.pde.core.prefs b/test/test-bundles/bravo/.settings/org.eclipse.pde.core.prefs deleted file mode 100755 index fa885b52..00000000 --- a/test/test-bundles/bravo/.settings/org.eclipse.pde.core.prefs +++ /dev/null @@ -1,23 +0,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. -# *************************************************************** -#Thu Aug 07 12:01:28 BST 2008 -eclipse.preferences.version=1 -pluginProject.equinox=false -pluginProject.extensions=false -resolve.requirebundle=false diff --git a/test/test-bundles/bravo/src/com/acme/bravo/Bravo.java b/test/test-bundles/bravo/src/com/acme/bravo/Bravo.java deleted file mode 100755 index 5aaaa50a..00000000 --- a/test/test-bundles/bravo/src/com/acme/bravo/Bravo.java +++ /dev/null @@ -1,22 +0,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. - * - */ -package com.acme.bravo; - -public class Bravo { - -} diff --git a/test/test-bundles/build.xml b/test/test-bundles/build.xml deleted file mode 100644 index 4bdd7f32..00000000 --- a/test/test-bundles/build.xml +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/test/test-bundles/charlie/.settings/org.eclipse.jdt.core.prefs b/test/test-bundles/charlie/.settings/org.eclipse.jdt.core.prefs deleted file mode 100755 index 79c172ae..00000000 --- a/test/test-bundles/charlie/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,25 +0,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. -# *************************************************************** -#Thu Aug 07 12:01:53 BST 2008 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/test/test-bundles/charlie/.settings/org.eclipse.pde.core.prefs b/test/test-bundles/charlie/.settings/org.eclipse.pde.core.prefs deleted file mode 100755 index b8c0dc02..00000000 --- a/test/test-bundles/charlie/.settings/org.eclipse.pde.core.prefs +++ /dev/null @@ -1,23 +0,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. -# *************************************************************** -#Thu Aug 07 12:01:53 BST 2008 -eclipse.preferences.version=1 -pluginProject.equinox=false -pluginProject.extensions=false -resolve.requirebundle=false diff --git a/test/test-bundles/charlie/src/com/acme/charlie/Charlie.java b/test/test-bundles/charlie/src/com/acme/charlie/Charlie.java deleted file mode 100755 index 8988f1cd..00000000 --- a/test/test-bundles/charlie/src/com/acme/charlie/Charlie.java +++ /dev/null @@ -1,22 +0,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. - * - */ -package com.acme.charlie; - -public class Charlie { - -} diff --git a/test/test-bundles/delta/.settings/org.eclipse.jdt.core.prefs b/test/test-bundles/delta/.settings/org.eclipse.jdt.core.prefs deleted file mode 100755 index aab52aed..00000000 --- a/test/test-bundles/delta/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,25 +0,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. -# *************************************************************** -#Thu Aug 07 12:02:12 BST 2008 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/test/test-bundles/delta/.settings/org.eclipse.pde.core.prefs b/test/test-bundles/delta/.settings/org.eclipse.pde.core.prefs deleted file mode 100755 index c2d5fcd7..00000000 --- a/test/test-bundles/delta/.settings/org.eclipse.pde.core.prefs +++ /dev/null @@ -1,23 +0,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. -# *************************************************************** -#Thu Aug 07 12:02:12 BST 2008 -eclipse.preferences.version=1 -pluginProject.equinox=false -pluginProject.extensions=false -resolve.requirebundle=false diff --git a/test/test-bundles/delta/src/com/acme/delta/Delta.java b/test/test-bundles/delta/src/com/acme/delta/Delta.java deleted file mode 100755 index d64e5ad8..00000000 --- a/test/test-bundles/delta/src/com/acme/delta/Delta.java +++ /dev/null @@ -1,22 +0,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. - * - */ -package com.acme.delta; - -public class Delta { - -} diff --git a/test/test-bundles/echo/.settings/org.eclipse.jdt.core.prefs b/test/test-bundles/echo/.settings/org.eclipse.jdt.core.prefs deleted file mode 100755 index 354605e1..00000000 --- a/test/test-bundles/echo/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,25 +0,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. -# *************************************************************** -#Thu Aug 07 12:02:35 BST 2008 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/test/test-bundles/echo/.settings/org.eclipse.pde.core.prefs b/test/test-bundles/echo/.settings/org.eclipse.pde.core.prefs deleted file mode 100755 index 9d727dea..00000000 --- a/test/test-bundles/echo/.settings/org.eclipse.pde.core.prefs +++ /dev/null @@ -1,23 +0,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. -# *************************************************************** -#Thu Aug 07 12:02:35 BST 2008 -eclipse.preferences.version=1 -pluginProject.equinox=false -pluginProject.extensions=false -resolve.requirebundle=false diff --git a/test/test-bundles/echo/src/com/acme/echo/Echo.java b/test/test-bundles/echo/src/com/acme/echo/Echo.java deleted file mode 100755 index 20cfbd2a..00000000 --- a/test/test-bundles/echo/src/com/acme/echo/Echo.java +++ /dev/null @@ -1,22 +0,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. - * - */ -package com.acme.echo; - -public class Echo { - -} diff --git a/test/test-ivy/acme-ivysettings.xml b/test/test-ivy/acme-ivysettings.xml deleted file mode 100644 index f933e427..00000000 --- a/test/test-ivy/acme-ivysettings.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/test/test-ivy/include/MANIFEST.MF b/test/test-ivy/include/MANIFEST.MF deleted file mode 100644 index 9db21749..00000000 --- a/test/test-ivy/include/MANIFEST.MF +++ /dev/null @@ -1,5 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: org.apache.ivy.osgi.testbundle -Bundle-Version: 1.2.3 -Export-Package: org.apache.ivy.osgi.testbundle;version="1.2.3",org.apache.ivy.osgi.testbundle.util;version="1.2.3" diff --git a/test/test-ivy/include/ivy-result.xml b/test/test-ivy/include/ivy-result.xml deleted file mode 100644 index ebf63734..00000000 --- a/test/test-ivy/include/ivy-result.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/test/test-ivy/include/ivy.xml b/test/test-ivy/include/ivy.xml deleted file mode 100644 index 96dbf089..00000000 --- a/test/test-ivy/include/ivy.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - diff --git a/test/test-ivy/include/ivysettings.xml b/test/test-ivy/include/ivysettings.xml deleted file mode 100644 index 92f11ccc..00000000 --- a/test/test-ivy/include/ivysettings.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/test/test-ivy/ivysettings.xml b/test/test-ivy/ivysettings.xml deleted file mode 100644 index 504618ca..00000000 --- a/test/test-ivy/ivysettings.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/test/test-ivy/test-full-ivy.xml b/test/test-ivy/test-full-ivy.xml deleted file mode 100644 index c12826c3..00000000 --- a/test/test-ivy/test-full-ivy.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/test-ivy/test-full.jar b/test/test-ivy/test-full.jar deleted file mode 100644 index 1a4d7d70..00000000 Binary files a/test/test-ivy/test-full.jar and /dev/null differ diff --git a/test/test-ivy/test-simple.jar b/test/test-ivy/test-simple.jar deleted file mode 100644 index eb343d3e..00000000 Binary files a/test/test-ivy/test-simple.jar and /dev/null differ diff --git a/test/test-repo/bundlerepo/repo.xml b/test/test-repo/bundlerepo/repo.xml index 913ee928..dc8dd776 100644 --- a/test/test-repo/bundlerepo/repo.xml +++ b/test/test-repo/bundlerepo/repo.xml @@ -16,7 +16,7 @@ KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --->org.apache.ivy.osgi +-->