You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/10/18 23:27:09 UTC

[sling-org-apache-sling-installer-console] 30/31: Update to parent pom 30

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-installer-console.git

commit fd5dd987a67f201d65ea89c43334f8fbaa7d681d
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Mon May 8 11:50:27 2017 +0000

    Update to parent pom 30
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1794342 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                            | 14 +++-------
 .../console/OsgiInstallerWebConsolePlugin.java     | 31 +++++++++++-----------
 2 files changed, 18 insertions(+), 27 deletions(-)

diff --git a/pom.xml b/pom.xml
index fc02ae6..eb48b7c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>26</version>
+        <version>30</version>
         <relativePath />
     </parent>
 
@@ -46,10 +46,6 @@
 		<plugins>
 			<plugin>
 				<groupId>org.apache.felix</groupId>
-				<artifactId>maven-scr-plugin</artifactId>
-		    </plugin>
-			<plugin>
-				<groupId>org.apache.felix</groupId>
 				<artifactId>maven-bundle-plugin</artifactId>
 				<extensions>true</extensions>
 				<configuration>
@@ -66,7 +62,7 @@
     <dependencies>
         <dependency>
             <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.core</artifactId>
+            <artifactId>osgi.core</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.sling</groupId>
@@ -76,11 +72,7 @@
         </dependency>
         <dependency>
             <groupId>javax.servlet</groupId>
-            <artifactId>servlet-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.felix</groupId>
-            <artifactId>org.apache.felix.scr.annotations</artifactId>
+            <artifactId>javax.servlet-api</artifactId>
         </dependency>
     </dependencies>
 </project>
diff --git a/src/main/java/org/apache/sling/installer/core/impl/console/OsgiInstallerWebConsolePlugin.java b/src/main/java/org/apache/sling/installer/core/impl/console/OsgiInstallerWebConsolePlugin.java
index 19f07f0..35ada5c 100644
--- a/src/main/java/org/apache/sling/installer/core/impl/console/OsgiInstallerWebConsolePlugin.java
+++ b/src/main/java/org/apache/sling/installer/core/impl/console/OsgiInstallerWebConsolePlugin.java
@@ -30,11 +30,6 @@ import javax.servlet.GenericServlet;
 import javax.servlet.ServletRequest;
 import javax.servlet.ServletResponse;
 
-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.Reference;
-import org.apache.felix.scr.annotations.Service;
 import org.apache.sling.installer.api.InstallableResource;
 import org.apache.sling.installer.api.info.InfoProvider;
 import org.apache.sling.installer.api.info.InstallationState;
@@ -44,21 +39,25 @@ import org.apache.sling.installer.api.tasks.RegisteredResource;
 import org.apache.sling.installer.api.tasks.ResourceState;
 import org.apache.sling.installer.api.tasks.TaskResource;
 import org.osgi.framework.Constants;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Reference;
+import org.osgi.service.component.annotations.ReferencePolicyOption;
 
 
-@Component
-@Service(value=javax.servlet.Servlet.class)
-@Properties({
-    @Property(name=Constants.SERVICE_DESCRIPTION, value="Apache Sling OSGi Installer Web Console Plugin"),
-    @Property(name="felix.webconsole.label", value="osgi-installer"),
-    @Property(name="felix.webconsole.title", value="OSGi Installer"),
-    @Property(name="felix.webconsole.category", value="OSGi"),
-    @Property(name="felix.webconsole.configprinter.modes", value={"zip", "txt"})
-})
+@Component(service=javax.servlet.Servlet.class,
+    property = {
+        Constants.SERVICE_VENDOR + "=The Apache Software Foundation",
+        Constants.SERVICE_DESCRIPTION + "=Apache Sling OSGi Installer Web Console Plugin",
+        "felix.webconsole.label=osgi-installer",
+        "felix.webconsole.title=OSGi Installer",
+        "felix.webconsole.category=OSGi",
+        "felix.webconsole.configprinter.modes=zip",
+        "felix.webconsole.configprinter.modes=txt"
+    })
 @SuppressWarnings("serial")
 public class OsgiInstallerWebConsolePlugin extends GenericServlet {
 
-    @Reference
+    @Reference(policyOption=ReferencePolicyOption.GREEDY)
     private InfoProvider installer;
 
     private String getType(final RegisteredResource rsrc) {
@@ -104,7 +103,7 @@ public class OsgiInstallerWebConsolePlugin extends GenericServlet {
         }
         return stateInfo;
     }
-    
+
     private String getError(final Resource rsrc) {
         String error = rsrc.getError();
         return error != null ? error : "";

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.