You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2017/05/08 11:50:28 UTC

svn commit: r1794342 - in /sling/trunk/installer/console: pom.xml src/main/java/org/apache/sling/installer/core/impl/console/OsgiInstallerWebConsolePlugin.java

Author: cziegeler
Date: Mon May  8 11:50:27 2017
New Revision: 1794342

URL: http://svn.apache.org/viewvc?rev=1794342&view=rev
Log:
Update to parent pom 30

Modified:
    sling/trunk/installer/console/pom.xml
    sling/trunk/installer/console/src/main/java/org/apache/sling/installer/core/impl/console/OsgiInstallerWebConsolePlugin.java

Modified: sling/trunk/installer/console/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/installer/console/pom.xml?rev=1794342&r1=1794341&r2=1794342&view=diff
==============================================================================
--- sling/trunk/installer/console/pom.xml (original)
+++ sling/trunk/installer/console/pom.xml Mon May  8 11:50:27 2017
@@ -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>

Modified: sling/trunk/installer/console/src/main/java/org/apache/sling/installer/core/impl/console/OsgiInstallerWebConsolePlugin.java
URL: http://svn.apache.org/viewvc/sling/trunk/installer/console/src/main/java/org/apache/sling/installer/core/impl/console/OsgiInstallerWebConsolePlugin.java?rev=1794342&r1=1794341&r2=1794342&view=diff
==============================================================================
--- sling/trunk/installer/console/src/main/java/org/apache/sling/installer/core/impl/console/OsgiInstallerWebConsolePlugin.java (original)
+++ sling/trunk/installer/console/src/main/java/org/apache/sling/installer/core/impl/console/OsgiInstallerWebConsolePlugin.java Mon May  8 11:50:27 2017
@@ -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.ta
 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 OsgiInstallerWebConsolePlug
         }
         return stateInfo;
     }
-    
+
     private String getError(final Resource rsrc) {
         String error = rsrc.getError();
         return error != null ? error : "";