This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to annotated tag org.apache.sling.commons.contentdetection-1.0.2 in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-contentdetection.git
commit 2e2d4113d3807227aa0a1d37dc092a89e096acca Author: Bertrand Delacretaz <[email protected]> AuthorDate: Mon Jun 1 13:52:04 2015 +0000 SLING-4757 - remove metatype.properties git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/commons/contentdetection@1682903 13f79535-47bb-0310-9956-ffa450edef68 --- pom.xml | 10 ++++++- .../internal/ContentAwareMimeTypeServiceImpl.java | 4 +-- .../internal/FileNameExtractorImpl.java | 8 ++++-- .../OSGI-INF/metatype/metatype.properties | 31 ---------------------- .../commons/contentdetection/internal/it/U.java | 5 +++- 5 files changed, 21 insertions(+), 37 deletions(-) diff --git a/pom.xml b/pom.xml index 297ce31..ebb4d85 100644 --- a/pom.xml +++ b/pom.xml @@ -35,13 +35,14 @@ <description>Content-based MIME type detection</description> <properties> - <exam.version>3.4.0</exam.version> + <exam.version>3.5.0</exam.version> <url.version>1.5.2</url.version> <org.ops4j.pax.logging.DefaultServiceLog.level>INFO</org.ops4j.pax.logging.DefaultServiceLog.level> <bundle.file.name>${basedir}/target/${project.build.finalName}.jar</bundle.file.name> <sling.java.version>6</sling.java.version> <sling.launchpad.version>7</sling.launchpad.version> <powermock.version>1.6.2</powermock.version> + <pax.vm.options>-Xmx256M</pax.vm.options> </properties> <dependencies> @@ -160,6 +161,12 @@ <plugin> <groupId>org.apache.rat</groupId> <artifactId>apache-rat-plugin</artifactId> + <configuration> + <excludes> + <exclude>derby.log</exclude> + <exclude>jackrabbit/**</exclude> + </excludes> + </configuration> </plugin> <plugin> @@ -180,6 +187,7 @@ <java.protocol.handler.pkgs>org.ops4j.pax.url</java.protocol.handler.pkgs> <bundle.file.name>${bundle.file.name}</bundle.file.name> <sling.launchpad.version>${sling.launchpad.version}</sling.launchpad.version> + <pax.vm.options>${pax.vm.options}</pax.vm.options> </systemPropertyVariables> <classpathDependencyExcludes> <!-- The osgi.org dependencies cause trouble with pax exam --> diff --git a/src/main/java/org/apache/sling/commons/contentdetection/internal/ContentAwareMimeTypeServiceImpl.java b/src/main/java/org/apache/sling/commons/contentdetection/internal/ContentAwareMimeTypeServiceImpl.java index 81b9e4a..32e29e7 100644 --- a/src/main/java/org/apache/sling/commons/contentdetection/internal/ContentAwareMimeTypeServiceImpl.java +++ b/src/main/java/org/apache/sling/commons/contentdetection/internal/ContentAwareMimeTypeServiceImpl.java @@ -31,11 +31,11 @@ import org.osgi.framework.Constants; import java.io.IOException; import java.io.InputStream; -@Component(label = "%contentawaremime.service.name", description = "%contentawaremime.service.description") +@Component @Service(value = {ContentAwareMimeTypeService.class}) - @Properties({ @Property(name = Constants.SERVICE_DESCRIPTION, value = "Apache Sling Content Aware MIME Type Service"), + @Property(name = Constants.SERVICE_VENDOR, value = "The Apache Software Foundation"), @Property(name = "detection.mode", value = "tika") } ) public class ContentAwareMimeTypeServiceImpl implements ContentAwareMimeTypeService { diff --git a/src/main/java/org/apache/sling/commons/contentdetection/internal/FileNameExtractorImpl.java b/src/main/java/org/apache/sling/commons/contentdetection/internal/FileNameExtractorImpl.java index f4c3eda..23d9c78 100644 --- a/src/main/java/org/apache/sling/commons/contentdetection/internal/FileNameExtractorImpl.java +++ b/src/main/java/org/apache/sling/commons/contentdetection/internal/FileNameExtractorImpl.java @@ -20,14 +20,18 @@ import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import org.apache.felix.scr.annotations.Component; +import org.apache.felix.scr.annotations.Properties; import org.apache.felix.scr.annotations.Property; import org.apache.felix.scr.annotations.Service; import org.apache.sling.commons.contentdetection.FileNameExtractor; import org.osgi.framework.Constants; -@Component(metatype = true, label = "%filenameextractor.service.name", description = "%filenameextractor.service.description") +@Component @Service(FileNameExtractor.class) -@Property(name = Constants.SERVICE_DESCRIPTION, value = "Apache Sling Filename Extractor Service") +@Properties({ + @Property(name = Constants.SERVICE_DESCRIPTION, value = "Apache Sling Filename Extractor Service"), + @Property(name = Constants.SERVICE_VENDOR, value = "The Apache Software Foundation"), +}) public class FileNameExtractorImpl implements FileNameExtractor { public String extract(String name) { // If the name is a URL, skip the trailing query and fragment parts diff --git a/src/main/resources/OSGI-INF/metatype/metatype.properties b/src/main/resources/OSGI-INF/metatype/metatype.properties deleted file mode 100644 index 5572b18..0000000 --- a/src/main/resources/OSGI-INF/metatype/metatype.properties +++ /dev/null @@ -1,31 +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. -# - - -# -# This file contains localization strings for configuration labels and -# descriptions as used in the metatype.xml descriptor generated by the -# the Felix SCR plugin - -contentawaremime.service.name = Apache Sling Content Aware MIME Type Service -contentawaremime.service.description = The Sling Content Aware MIME Type Service provides support for \ -determining the MIME type based on filename and its contents. -filenameextractor.service.name = Apache Sling Filename extractor Service -filenameextractor.service.description = The Sling Filename extractor Service provides support for \ -extracting the file's name from a url or path \ No newline at end of file diff --git a/src/test/java/org/apache/sling/commons/contentdetection/internal/it/U.java b/src/test/java/org/apache/sling/commons/contentdetection/internal/it/U.java index 33ecd38..a555177 100644 --- a/src/test/java/org/apache/sling/commons/contentdetection/internal/it/U.java +++ b/src/test/java/org/apache/sling/commons/contentdetection/internal/it/U.java @@ -28,9 +28,12 @@ public class U { public static Option[] paxConfig() { final File thisProjectsBundle = new File(System.getProperty( "bundle.file.name", "BUNDLE_FILE_NOT_SET" )); final String launchpadVersion = System.getProperty("sling.launchpad.version", "LAUNCHPAD_VERSION_NOT_SET"); + final String paxVmOptions = System.getProperty("pax.vm.options", "PAX_VM_OPTIONS_NOT_SET"); return new DefaultCompositeOption( SlingPaxOptions.defaultLaunchpadOptions(launchpadVersion), - CoreOptions.provision(CoreOptions.bundle(thisProjectsBundle.toURI().toString())) + CoreOptions.provision(CoreOptions.bundle(thisProjectsBundle.toURI().toString())), + CoreOptions.vmOption(paxVmOptions) + ).getOptions(); } } -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
