This is an automated email from the ASF dual-hosted git repository. radu pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-servlets-resolver.git
commit 0d03d773bcf104fbc8b9d4e247051cc254c8624c Author: Radu Cotescu <[email protected]> AuthorDate: Fri Jan 29 11:15:25 2021 +0100 SLING-9999 - Remove cyclic dependency between scripting and servlets features * moved the o.a.s.servlets.resolver.bundle.tracker API to a dedicated bundle --- pom.xml | 7 +- .../resolver/bundle/tracker/BundledRenderUnit.java | 145 ------------------- .../tracker/BundledRenderUnitCapability.java | 91 ------------ .../bundle/tracker/BundledRenderUnitFinder.java | 62 -------- .../resolver/bundle/tracker/ResourceType.java | 161 --------------------- .../resolver/bundle/tracker/TypeProvider.java | 45 ------ .../resolver/bundle/tracker/package-info.java | 22 --- .../resolver/it/ServletResolverTestSupport.java | 1 + 8 files changed, 7 insertions(+), 527 deletions(-) diff --git a/pom.xml b/pom.xml index c780bb5..bfb9f5a 100644 --- a/pom.xml +++ b/pom.xml @@ -179,6 +179,11 @@ </build> <dependencies> + <dependency> + <groupId>org.apache.sling</groupId> + <artifactId>org.apache.sling.servlets.resolver.api</artifactId> + <version>1.0.0-SNAPSHOT</version> + </dependency> <dependency> <groupId>commons-io</groupId> @@ -214,7 +219,7 @@ <dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.api</artifactId> - <version>2.22.0</version> + <version>2.23.3-SNAPSHOT</version> <scope>provided</scope> </dependency> <!-- for ServiceUserMapped (SLING-4312) --> diff --git a/src/main/java/org/apache/sling/servlets/resolver/bundle/tracker/BundledRenderUnit.java b/src/main/java/org/apache/sling/servlets/resolver/bundle/tracker/BundledRenderUnit.java deleted file mode 100644 index 2c89309..0000000 --- a/src/main/java/org/apache/sling/servlets/resolver/bundle/tracker/BundledRenderUnit.java +++ /dev/null @@ -1,145 +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.sling.servlets.resolver.bundle.tracker; - -import java.io.InputStream; -import java.util.Set; - -import javax.script.ScriptException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; -import org.osgi.annotation.versioning.ConsumerType; -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleContext; - -/** - * <p> - * A {@code BundledRenderUnit} represents a pre-packaged script or precompiled script (Java class) that will be executed in order to - * render a {@link org.apache.sling.api.SlingHttpServletRequest}. - * </p> - * <p> - * The {@code BundledRenderUnit} provider module is responsible for defining how a unit is executed. However, when executing the unit in the - * context of a {@link javax.script.ScriptEngine}, the provider module should add the current executing unit into the {@link - * javax.script.ScriptEngine}'s {@link javax.script.ScriptContext} using the {@link #VARIABLE} key. - * </p> - */ -@ConsumerType -public interface BundledRenderUnit { - - /** - * The variable available in the {@link javax.script.Bindings} associated to a {@link org.apache.sling.api.SlingHttpServletRequest} if - * that request is served by a {@code BundledRenderUnit}. - */ - String VARIABLE = BundledRenderUnit.class.getName(); - - /** - * In case this {@code BundledRenderUnit} wraps a precompiled script, this method will return an instance of that object. - * - * @return a precompiled unit, if {@code this} unit wraps a precompiled script; {@code null} otherwise - */ - @Nullable - default Object getUnit() { - return null; - } - - /** - * Returns the name of {@code this BundledRenderUnit}. This can be the name of the wrapped script or precompiled script. - * - * @return the name {@code this BundledRenderUnit} - */ - @NotNull String getName(); - - /** - * Returns the {@link Bundle} the publishing bundle of this unit (not to be confused with the provider module, which is the module that - * instantiates a {@link BundledRenderUnit}). This method can be useful for getting an instance of the bundle's classloader, when - * needed to load dependencies at run-time. To do so the following code example can help: - * - * <pre> - * Bundle bundle = bundledRenderUnit.getBundle(); - * Classloader bundleClassloader = bundle.adapt(BundleWiring.class).getClassLoader(); - * </pre> - */ - @NotNull Bundle getBundle(); - - /** - * Returns the {@link BundleContext} to use for this unit. This method can be useful for getting an instance of the publishing bundle's - * context, when needed to load dependencies at run-time. - * - * @return the bundle context of the bundle publishing this unit - */ - @NotNull BundleContext getBundleContext(); - - /** - * Returns the {@code Set} of {@link TypeProvider}s which are related to this unit. - * - * @return the set of providers; if the unit doesn't have any inheritance chains, then the set will contain only one {@link - * TypeProvider} - */ - @NotNull Set<TypeProvider> getTypeProviders(); - - /** - * Retrieves an OSGi runtime dependency of the wrapped script identified by the passed {@code className} parameter. - * - * @param className the fully qualified class name - * @param <T> the expected service type - * @return an instance of the {@link T} or {@code null} - */ - @Nullable <T> T getService(@NotNull String className); - - /** - * Retrieves multiple instances of an OSGi runtime dependency of the wrapped script identified by the passed {@code className} - * parameter, filtered according to the passed {@code filter}. - * - * @param className the fully qualified class name - * @param filter a filter expression or {@code null} if all the instances should be returned; for more details about the {@code - * filter}'s syntax check {@link org.osgi.framework.BundleContext#getServiceReferences(String, String)} - * @param <T> the expected service type - * @return an instance of the {@link T} or {@code null} - */ - @Nullable <T> T[] getServices(@NotNull String className, @Nullable String filter); - - /** - * Returns the path of this executable in the resource type hierarchy. The path can be relative to the search paths or absolute. - * - * @return the path of this executable in the resource type hierarchy - */ - @NotNull - String getPath(); - - /** - * This method will execute / evaluate the wrapped script or precompiled script with the given request. - * - * @throws ScriptException if the execution leads to an error - */ - void eval(@NotNull HttpServletRequest request, @NotNull HttpServletResponse response) throws ScriptException; - - /** - * This method will return an input stream if {@code this} unit is backed by a script that can be interpreted. - * - * @return an {@link InputStream} providing the source code of the backing script; if {@code this} unit is backed by a precompiled - * script (essentially a Java class), then this method will return {@code null} - */ - @Nullable - default InputStream getInputStream() { - return null; - } -} diff --git a/src/main/java/org/apache/sling/servlets/resolver/bundle/tracker/BundledRenderUnitCapability.java b/src/main/java/org/apache/sling/servlets/resolver/bundle/tracker/BundledRenderUnitCapability.java deleted file mode 100644 index e0693cb..0000000 --- a/src/main/java/org/apache/sling/servlets/resolver/bundle/tracker/BundledRenderUnitCapability.java +++ /dev/null @@ -1,91 +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.sling.servlets.resolver.bundle.tracker; - -import java.util.List; -import java.util.Set; - -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; -import org.osgi.annotation.versioning.ProviderType; - -/** - * A {@code BundledRenderUnitCapability} encapsulates the values of a {@code Provided-Capability}, based on which {@link BundledRenderUnit}s - * are generated. - */ -@ProviderType -public interface BundledRenderUnitCapability { - - /** - * Returns the resource types to which a {@link BundledRenderUnit} described by this capability will be bound to. - * - * @return the resource types to which a {@link BundledRenderUnit} described by this capability will be bound to - */ - @NotNull Set<ResourceType> getResourceTypes(); - - /** - * Returns the path to which a {@link BundledRenderUnit} described by this capability will be bound to. - * - * @return the path to which a {@link BundledRenderUnit} described by this capability will be bound to; this can be {@code null} if the - * {@link #getResourceTypes()} doesn't return an empty set - */ - @Nullable String getPath(); - - /** - * Returns the selectors to which a {@link BundledRenderUnit} described by this capability will be bound to. - * - * @return the selectors to which a {@link BundledRenderUnit} described by this capability will be bound to - */ - @NotNull List<String> getSelectors(); - - /** - * Returns the extension to which a {@link BundledRenderUnit} described by this capability will be bound to. - * - * @return the extension to which a {@link BundledRenderUnit} described by this capability will be bound to - */ - @Nullable String getExtension(); - - /** - * Returns the resource type extended by this capability. - * - * @return the extended resource type or {@code null} - */ - @Nullable String getExtendedResourceType(); - - /** - * Returns the request method to which a {@link BundledRenderUnit} described by this capability will be bound to. - * - * @return the request method to which a {@link BundledRenderUnit} described by this capability will be bound to - */ - @Nullable String getMethod(); - - /** - * Returns the script engine short name which can be used to evaluate the {@link BundledRenderUnit} described by this capability. - * - * @return the script engine short name which can be used to evaluate the {@link BundledRenderUnit} described by this capability. - */ - @Nullable String getScriptEngineName(); - - /** - * Returns the original's script extension that was used to generate this capability. - * - * @return the original's script extension that was used to generate this capability. - */ - @Nullable String getScriptExtension(); -} diff --git a/src/main/java/org/apache/sling/servlets/resolver/bundle/tracker/BundledRenderUnitFinder.java b/src/main/java/org/apache/sling/servlets/resolver/bundle/tracker/BundledRenderUnitFinder.java deleted file mode 100644 index d632ba8..0000000 --- a/src/main/java/org/apache/sling/servlets/resolver/bundle/tracker/BundledRenderUnitFinder.java +++ /dev/null @@ -1,62 +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.sling.servlets.resolver.bundle.tracker; - -import java.util.Set; - -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; -import org.osgi.annotation.versioning.ConsumerType; -import org.osgi.framework.BundleContext; - -/** - * The {@code BundledScriptFinder} finds the {@link BundledRenderUnit} corresponding to a certain chain of {@link TypeProvider}s or - * corresponding to a certain path-based {@link BundledRenderUnitCapability}. - */ -@ConsumerType -public interface BundledRenderUnitFinder { - - /** - * Retrieves the best matching {@link BundledRenderUnit} for the provided {@code inheritanceChain}, by scanning all {@link TypeProvider} - * bundles for the class or script capable of providing a rendering for resource type chain. - * - * @param context the bundle context to use. - * @param inheritanceChain the resource type chain; the set is ordered from the most specific resource type to the most generic one - * @param allRelatedProviders this is a super set, containing both the {@code inheritanceChain} but also all the required providers; a - * required provider is a provider that's needed by a {@link ResourceType} in order to delegate rendering to - * it, but it's not extended by the same {@link ResourceType} - * @return a {@link BundledRenderUnit} if one was found, {@code null} otherwise - */ - @Nullable - BundledRenderUnit findUnit(@NotNull BundleContext context, @NotNull Set<TypeProvider> inheritanceChain, @NotNull Set<TypeProvider> allRelatedProviders); - - /** - * Retrieves a path-based {@link BundledRenderUnit} from the passed {@code provider}. - * - * @param context the bundle context to use. - * @param provider the provider from which to retrieve the unit - * @param allRelatedProviders this is a super set, containing both the providers connected through an inheritance relationship but also - * all the required providers; a required provider is a provider that's needed by a {@link ResourceType} in - * order to delegate rendering to it, but it's not extended by the same {@link ResourceType} - * @return a {@link BundledRenderUnit} if one was found, {@code null} otherwise - * @see BundledRenderUnitCapability#getPath() - */ - @Nullable - BundledRenderUnit findUnit(@NotNull BundleContext context, @NotNull TypeProvider provider, @NotNull Set<TypeProvider> allRelatedProviders); -} diff --git a/src/main/java/org/apache/sling/servlets/resolver/bundle/tracker/ResourceType.java b/src/main/java/org/apache/sling/servlets/resolver/bundle/tracker/ResourceType.java deleted file mode 100644 index 0f2929e..0000000 --- a/src/main/java/org/apache/sling/servlets/resolver/bundle/tracker/ResourceType.java +++ /dev/null @@ -1,161 +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.sling.servlets.resolver.bundle.tracker; - -import java.util.Objects; -import java.util.regex.Pattern; - -import org.apache.commons.lang3.StringUtils; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; -import org.osgi.framework.Version; - -/** - * The {@code ResourceType} encapsulates details about a Sling resource type and provides methods for parsing resource type strings. - * - * <p>The following patterns are supported for parsing:</p> - * <ol> - * <li><tt>a/b/c</tt> - path-based</li> - * <li><tt>a/b/c/1.0.0</tt> - path-based, versioned</li> - * <li><tt>a.b.c</tt> - Java package name</li> - * <li><tt>a.b.c/1.0.0</tt> - Java package name, versioned</li> - * <li><tt>a</tt> - flat (sub-set of path-based)</li> - * </ol> - */ -public final class ResourceType { - - private static final Pattern versionPattern = Pattern.compile("[\\d\\.]+(-.*)*$"); - - private final String type; - private final String version; - private final String resourceLabel; - private final String toString; - - private ResourceType(@NotNull String type, @Nullable String version) { - this.type = type; - this.version = version; - if (type.lastIndexOf('/') != -1) { - resourceLabel = type.substring(type.lastIndexOf('/') + 1); - } else if (type.lastIndexOf('.') != -1) { - resourceLabel = type.substring(type.lastIndexOf('.') + 1); - } else { - resourceLabel = type; - } - toString = type + (version == null ? "" : "/" + version); - } - - /** - * Returns a resource type's label. The label is important for script selection, since it will provide the name of the main script - * for this resource type. For more details check the Apache Sling - * <a href="https://sling.apache.org/documentation/the-sling-engine/url-to-script-resolution.html#scripts-for-get-requests">URL to - * Script Resolution</a> page - * - * @return the resource type label - */ - @NotNull - public String getResourceLabel() { - return resourceLabel; - } - - /** - * Returns the resource type string, without any version information. - * - * @return the resource type string - */ - @NotNull - public String getType() { - return type; - } - - /** - * Returns the version, if available. - * - * @return the version, if available; {@code null} otherwise - */ - @Nullable - public String getVersion() { - return version; - } - - @Override - public String toString() { - return toString; - } - - /** - * Given a {@code resourceTypeString}, this method will extract a {@link ResourceType} object. - * <p>The accepted patterns are:</p> - * <ol> - * <li><tt>a/b/c</tt> - path-based</li> - * <li><tt>a/b/c/1.0.0</tt> - path-based, versioned</li> - * <li><tt>a.b.c</tt> - Java package name</li> - * <li><tt>a.b.c/1.0.0</tt> - Java package name, versioned</li> - * <li><tt>a</tt> - flat (sub-set of path-based)</li> - * </ol> - * - * @param resourceTypeString the resource type string to parse - * @return a {@link ResourceType} object - * @throws IllegalArgumentException if the {@code resourceTypeString} cannot be parsed - */ - @NotNull - public static ResourceType parseResourceType(@NotNull String resourceTypeString) { - String type = StringUtils.EMPTY; - String version = null; - if (StringUtils.isNotEmpty(resourceTypeString)) { - int lastSlash = resourceTypeString.lastIndexOf('/'); - if (lastSlash != -1 && !resourceTypeString.endsWith("/")) { - String versionString = resourceTypeString.substring(lastSlash + 1); - if (versionPattern.matcher(versionString).matches()) { - try { - version = Version.parseVersion(versionString).toString(); - type = resourceTypeString.substring(0, lastSlash); - } catch (IllegalArgumentException e) { - type = resourceTypeString; - } - } else { - type = resourceTypeString; - } - } else { - type = resourceTypeString; - } - } - if (StringUtils.isEmpty(type)) { - throw new IllegalArgumentException(String.format("Cannot extract a type for the resourceTypeString %s.", resourceTypeString)); - } - return new ResourceType(type, version); - } - - @Override - public int hashCode() { - return Objects.hash(type, version, resourceLabel); - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj instanceof ResourceType) { - ResourceType other = (ResourceType) obj; - return Objects.equals(type, other.type) && Objects.equals(version, other.version) && Objects.equals(resourceLabel, - other.resourceLabel); - } - return false; - } -} diff --git a/src/main/java/org/apache/sling/servlets/resolver/bundle/tracker/TypeProvider.java b/src/main/java/org/apache/sling/servlets/resolver/bundle/tracker/TypeProvider.java deleted file mode 100644 index 7e36d7d..0000000 --- a/src/main/java/org/apache/sling/servlets/resolver/bundle/tracker/TypeProvider.java +++ /dev/null @@ -1,45 +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.sling.servlets.resolver.bundle.tracker; - -import org.jetbrains.annotations.NotNull; -import org.osgi.annotation.versioning.ProviderType; -import org.osgi.framework.Bundle; - -/** - * A {@code TypeProvider} keeps an association between a {@link BundledRenderUnitCapability} and the bundle that provides it. - */ -@ProviderType -public interface TypeProvider { - - /** - * Returns the {@link BundledRenderUnitCapability}. - * - * @return the {@link BundledRenderUnitCapability} - */ - @NotNull BundledRenderUnitCapability getBundledRenderUnitCapability(); - - /** - * Returns the providing bundle. - * - * @return the providing bundle - */ - @NotNull Bundle getBundle(); - -} diff --git a/src/main/java/org/apache/sling/servlets/resolver/bundle/tracker/package-info.java b/src/main/java/org/apache/sling/servlets/resolver/bundle/tracker/package-info.java deleted file mode 100644 index 91b289b..0000000 --- a/src/main/java/org/apache/sling/servlets/resolver/bundle/tracker/package-info.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. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ -@Version("0.2.0") -package org.apache.sling.servlets.resolver.bundle.tracker; - -import org.osgi.annotation.versioning.Version; diff --git a/src/test/java/org/apache/sling/servlets/resolver/it/ServletResolverTestSupport.java b/src/test/java/org/apache/sling/servlets/resolver/it/ServletResolverTestSupport.java index c69703d..045654c 100644 --- a/src/test/java/org/apache/sling/servlets/resolver/it/ServletResolverTestSupport.java +++ b/src/test/java/org/apache/sling/servlets/resolver/it/ServletResolverTestSupport.java @@ -91,6 +91,7 @@ public class ServletResolverTestSupport extends TestSupport { slingServlets(), mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.converter").version("1.0.12"), // new Sling API dependency testBundle("bundle.filename"), + mavenBundle().groupId("org.apache.sling").artifactId("org.apache.sling.servlets.resolver.api").versionAsInProject(), mavenBundle().groupId("org.apache.sling").artifactId("org.apache.sling.servlet-helpers").versionAsInProject(), junitBundles(), newConfiguration("org.apache.felix.http")
