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/11/07 09:41:01 UTC

[sling-org-apache-sling-installer-console] annotated tag org.apache.sling.installer.console-1.0.0 created (now 496ee63)

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

rombert pushed a change to annotated tag org.apache.sling.installer.console-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-installer-console.git.


      at 496ee63  (tag)
 tagging ffbbd5353f19598dd123e2281ec4db86e0fd6ecf (commit)
      by Carsten Ziegeler
      on Thu Oct 25 09:43:02 2012 +0000

- Log -----------------------------------------------------------------
org.apache.sling.installer.console-1.0.0
-----------------------------------------------------------------------

This annotated tag includes the following new commits:

     new fab99d4  SLING-2568 : Move webconsole plugin into separate bundle
     new b84d4aa  Merge branch 'SLING-2527'
     new b72be04  SLING-2612 : Add support for excluding artifacts for installation
     new cd66f40  SLING-2612 - EXCLUDED applies only to INSTALLED state IMO, and add (*) after INSTALLED if there's additional info
     new c7a6886  SLING-2612 : Add support for excluding artifacts for installation
     new 48043f1  Prepare release
     new 745f041  [maven-release-plugin] prepare release org.apache.sling.installer.console-1.0.0
     new ffbbd53  [maven-release-plugin]  copy for tag org.apache.sling.installer.console-1.0.0

The 8 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


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

[sling-org-apache-sling-installer-console] 02/08: Merge branch 'SLING-2527'

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit b84d4aaf16b40842a301db569df7ad23596ebd8e
Author: Ian Boston <ie...@apache.org>
AuthorDate: Thu Sep 27 10:07:25 2012 +0000

    Merge branch 'SLING-2527'
    
    * SLING-2527:
      Adjusted API Bundle version number to 1.0-SNAPSHOT after feedback.
      SLING-2527 Splits API from core in installer set of bundles.
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/installer/console@1390919 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index bd79404..7be3801 100644
--- a/pom.xml
+++ b/pom.xml
@@ -70,8 +70,8 @@
         </dependency>
         <dependency>
             <groupId>org.apache.sling</groupId>
-            <artifactId>org.apache.sling.installer.core</artifactId>
-            <version>3.3.8</version>
+            <artifactId>org.apache.sling.installer.api</artifactId>
+            <version>1.0-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
         <dependency>

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

[sling-org-apache-sling-installer-console] 04/08: SLING-2612 - EXCLUDED applies only to INSTALLED state IMO, and add (*) after INSTALLED if there's additional info

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit cd66f40ef23739709f4af13d62bc9d740d11489e
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Tue Oct 2 08:12:38 2012 +0000

    SLING-2612 - EXCLUDED applies only to INSTALLED state IMO, and add (*) after INSTALLED if there's additional info
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/installer/console@1392785 13f79535-47bb-0310-9956-ffa450edef68
---
 .../core/impl/console/OsgiInstallerWebConsolePlugin.java         | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

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 dde505c..003698b 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
@@ -91,8 +91,13 @@ public class OsgiInstallerWebConsolePlugin extends GenericServlet {
     }
 
     private String getState(final Resource rsrc) {
-        if ( rsrc.getAttribute(TaskResource.ATTR_INSTALL_EXCLUDED) != null ) {
-            return "EXCLUDED";
+        // INSTALLED state has some variants
+        if ( rsrc.getState() == ResourceState.INSTALLED) {
+            if(rsrc.getAttribute(TaskResource.ATTR_INSTALL_EXCLUDED) != null ) {
+                return "EXCLUDED";
+            } else if(rsrc.getAttribute(TaskResource.ATTR_INSTALL_INFO) != null) {
+                return "INSTALLED(*)";
+            }
         }
         return rsrc.getState().toString();
     }

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

[sling-org-apache-sling-installer-console] 06/08: Prepare release

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 48043f12b23cf06f2c2ffa5c37c0fbccb033f156
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Oct 25 09:38:24 2012 +0000

    Prepare release
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/installer/console@1402044 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 7be3801..892238a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -71,7 +71,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.installer.api</artifactId>
-            <version>1.0-SNAPSHOT</version>
+            <version>1.0.0</version>
             <scope>provided</scope>
         </dependency>
         <dependency>

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

[sling-org-apache-sling-installer-console] 05/08: SLING-2612 : Add support for excluding artifacts for installation

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit c7a6886398499ee413edfe4aa69585b7e9ed42b8
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Oct 2 09:00:15 2012 +0000

    SLING-2612 : Add support for excluding artifacts for installation
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/installer/console@1392797 13f79535-47bb-0310-9956-ffa450edef68
---
 .../core/impl/console/OsgiInstallerWebConsolePlugin.java     | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

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 003698b..8be72dd 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
@@ -91,15 +91,17 @@ public class OsgiInstallerWebConsolePlugin extends GenericServlet {
     }
 
     private String getState(final Resource rsrc) {
+        String stateInfo = rsrc.getState().toString();
         // INSTALLED state has some variants
         if ( rsrc.getState() == ResourceState.INSTALLED) {
-            if(rsrc.getAttribute(TaskResource.ATTR_INSTALL_EXCLUDED) != null ) {
-                return "EXCLUDED";
-            } else if(rsrc.getAttribute(TaskResource.ATTR_INSTALL_INFO) != null) {
-                return "INSTALLED(*)";
+            if (rsrc.getAttribute(TaskResource.ATTR_INSTALL_EXCLUDED) != null ) {
+                stateInfo = "EXCLUDED";
+            }
+            if (rsrc.getAttribute(TaskResource.ATTR_INSTALL_INFO) != null) {
+                stateInfo = stateInfo + "(*)";
             }
         }
-        return rsrc.getState().toString();
+        return stateInfo;
     }
 
     private String getInfo(final RegisteredResource rsrc) {

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

[sling-org-apache-sling-installer-console] 01/08: SLING-2568 : Move webconsole plugin into separate bundle

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit fab99d44ed4bd76b587e8e122835e62d05fa26b8
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Aug 23 16:38:20 2012 +0000

    SLING-2568 : Move webconsole plugin into separate bundle
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/installer/console@1376582 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                            |  86 +++++++
 .../console/OsgiInstallerWebConsolePlugin.java     | 284 +++++++++++++++++++++
 2 files changed, 370 insertions(+)

diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..bd79404
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.sling</groupId>
+        <artifactId>sling</artifactId>
+        <version>13</version>
+        <relativePath>../../parent/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>org.apache.sling.installer.console</artifactId>
+    <version>0.9.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+
+    <name>Apache Sling Installer WebConsole Plugin</name>
+    <description> 
+        Provides a web console plugin for the OSGi installer
+    </description>
+
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/installer/console</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/installer/console</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/installer/console</url>
+    </scm>
+
+	<build>
+		<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>
+					<instructions>
+						<Private-Package>
+						    org.apache.sling.installer.core.impl.console
+						</Private-Package>
+					</instructions>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.installer.core</artifactId>
+            <version>3.3.8</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.scr.annotations</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
new file mode 100644
index 0000000..53a3374
--- /dev/null
+++ b/src/main/java/org/apache/sling/installer/core/impl/console/OsgiInstallerWebConsolePlugin.java
@@ -0,0 +1,284 @@
+/*
+ * 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.installer.core.impl.console;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Collection;
+import java.util.Date;
+import java.util.Iterator;
+
+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;
+import org.apache.sling.installer.api.info.Resource;
+import org.apache.sling.installer.api.info.ResourceGroup;
+import org.apache.sling.installer.api.tasks.RegisteredResource;
+import org.apache.sling.installer.api.tasks.ResourceState;
+import org.osgi.framework.Constants;
+
+
+@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.configprinter.modes", value={"zip", "txt"})
+})
+@SuppressWarnings("serial")
+public class OsgiInstallerWebConsolePlugin extends GenericServlet {
+
+    @Reference
+    private InfoProvider installer;
+
+    private String getType(final RegisteredResource rsrc) {
+        final String type = rsrc.getType();
+        if ( type.equals(InstallableResource.TYPE_BUNDLE) ) {
+            return "Bundles";
+        } else if ( type.equals(InstallableResource.TYPE_CONFIG) ) {
+            return "Configurations";
+        } else if ( type.equals(InstallableResource.TYPE_FILE) ) {
+            return "Files";
+        } else if ( type.equals(InstallableResource.TYPE_PROPERTIES) ) {
+            return "Properties";
+        }
+        return type;
+    }
+
+    private String getEntityId(final RegisteredResource rsrc, String alias) {
+        String id = rsrc.getEntityId();
+        final int pos = id.indexOf(':');
+        if ( pos != -1 ) {
+            id = id.substring(pos + 1);
+        }
+        return (alias == null ? id : id + '\n' + alias);
+    }
+
+    private String getURL(final Resource rsrc) {
+        if ( rsrc.getVersion() != null ) {
+            return rsrc.getURL() + " (" + rsrc.getVersion() + ")";
+        }
+        return rsrc.getURL();
+    }
+
+    private String getInfo(final RegisteredResource rsrc) {
+        return rsrc.getDigest() + '/' + String.valueOf(rsrc.getPriority());
+    }
+
+    /** Default date format used. */
+    private final DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSS yyyy-MMM-dd");
+
+    /**
+     * Format a date
+     */
+    private synchronized String formatDate(final long time) {
+        if ( time == -1 ) {
+            return "-";
+        }
+        final Date d = new Date(time);
+        return dateFormat.format(d);
+    }
+
+    @Override
+    public void service(final ServletRequest req, final ServletResponse res)
+    throws IOException {
+        final PrintWriter pw = res.getWriter();
+
+        final InstallationState state = this.installer.getInstallationState();
+        pw.print("<p class='statline ui-state-highlight'>Apache Sling OSGi Installer");
+        if ( state.getActiveResources().size() == 0 && state.getInstalledResources().size() == 0 && state.getUntransformedResources().size() == 0 ) {
+            pw.print(" - no resources registered.");
+        }
+        pw.print("</p>");
+
+        String rt = null;
+        for(final ResourceGroup group : state.getActiveResources()) {
+            final Resource toActivate = group.getResources().get(0);
+            if ( !toActivate.getType().equals(rt) ) {
+                if ( rt != null ) {
+                    pw.println("</tbody></table>");
+                }
+                pw.println("<div class='ui-widget-header ui-corner-top buttonGroup' style='height: 15px;'>");
+                pw.printf("<span style='float: left; margin-left: 1em;'>Active Resources - %s</span>", getType(toActivate));
+                pw.println("</div>");
+                pw.println("<table class='nicetable'><tbody>");
+                pw.printf("<tr><th>Entity ID</th><th>Digest/Priority</th><th>URL (Version)</th><th>State</th></tr>");
+                rt = toActivate.getType();
+            }
+            pw.printf("<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>",
+                    getEntityId(toActivate, group.getAlias()),
+                    getInfo(toActivate),
+                    getURL(toActivate),
+                    toActivate.getState());
+        }
+        if ( rt != null ) {
+            pw.println("</tbody></table>");
+        }
+        rt = null;
+
+        for(final ResourceGroup group : state.getInstalledResources()) {
+            final Collection<Resource> resources = group.getResources();
+            if (resources.size() > 0) {
+                final Iterator<Resource> iter = resources.iterator();
+                final Resource first = iter.next();
+                if ( !first.getType().equals(rt) ) {
+                    if ( rt != null ) {
+                        pw.println("</tbody></table>");
+                    }
+                    pw.println("<div class='ui-widget-header ui-corner-top buttonGroup' style='height: 15px;'>");
+                    pw.printf("<span style='float: left; margin-left: 1em;'>Processed Resources - %s</span>", getType(first));
+                    pw.println("</div>");
+                    pw.println("<table class='nicetable'><tbody>");
+                    pw.printf("<tr><th>Entity ID</th><th>Digest/Priority</th><th>URL (Version)</th><th>State</th></tr>");
+                    rt = first.getType();
+                }
+                pw.print("<tr><td>");
+                pw.print(getEntityId(first, group.getAlias()));
+                pw.print("</td><td>");
+                pw.print(getInfo(first));
+                pw.print("</td><td>");
+                pw.print(getURL(first));
+                pw.print("</td><td>");
+                pw.print(first.getState());
+                if ( first.getState() == ResourceState.INSTALLED ) {
+                    final long lastChange = first.getLastChange();
+                    if ( lastChange > 0 ) {
+                        pw.print("<br/>");
+                        pw.print(formatDate(lastChange));
+                    }
+                }
+                pw.print("</td></tr>");
+
+                while ( iter.hasNext() ) {
+                    final Resource resource = iter.next();
+                    pw.printf("<tr><td></td><td>%s</td><td>%s</td><td>%s</td></tr>",
+                        getInfo(resource),
+                        getURL(resource),
+                        resource.getState());
+                }
+            }
+        }
+        if ( rt != null ) {
+            pw.println("</tbody></table>");
+        }
+
+        rt = null;
+        for(final RegisteredResource registeredResource : state.getUntransformedResources()) {
+            if ( !registeredResource.getType().equals(rt) ) {
+                if ( rt != null ) {
+                    pw.println("</tbody></table>");
+                }
+                pw.println("<div class='ui-widget-header ui-corner-top buttonGroup' style='height: 15px;'>");
+                pw.printf("<span style='float: left; margin-left: 1em;'>Untransformed Resources - %s</span>", getType(registeredResource));
+                pw.println("</div>");
+                pw.println("<table class='nicetable'><tbody>");
+                pw.printf("<tr><th>Digest/Priority</th><th>URL</th></tr>");
+
+                rt = registeredResource.getType();
+            }
+            pw.printf("<tr><td>%s</td><td>%s</td></tr>",
+                getInfo(registeredResource),
+                registeredResource.getURL());
+        }
+        if ( rt != null ) {
+            pw.println("</tbody></table>");
+        }
+    }
+
+    /**
+     * Method for the configuration printer.
+     */
+    public void printConfiguration(final PrintWriter pw, final String mode) {
+        if ( !"zip".equals(mode) && !"txt".equals(mode) ) {
+            return;
+        }
+        pw.println("Apache Sling OSGi Installer");
+        pw.println("===========================");
+        final InstallationState state = this.installer.getInstallationState();
+        pw.println("Active Resources");
+        pw.println("----------------");
+        String rt = null;
+        for(final ResourceGroup group : state.getActiveResources()) {
+            final Resource toActivate = group.getResources().get(0);
+            if ( !toActivate.getType().equals(rt) ) {
+                pw.printf("%s:%n", getType(toActivate));
+                rt = toActivate.getType();
+            }
+            pw.printf("- %s: %s, %s, %s%n",
+                    getEntityId(toActivate, group.getAlias()),
+                    getInfo(toActivate),
+                    getURL(toActivate),
+                    toActivate.getState());
+        }
+        pw.println();
+
+        pw.println("Processed Resources");
+        pw.println("-------------------");
+        rt = null;
+        for(final ResourceGroup group : state.getInstalledResources()) {
+            final Collection<Resource> resources = group.getResources();
+            if (resources.size() > 0) {
+                final Iterator<Resource> iter = resources.iterator();
+                final Resource first = iter.next();
+                if ( !first.getType().equals(rt) ) {
+                    pw.printf("%s:%n", getType(first));
+                    rt = first.getType();
+                }
+                pw.printf("* %s: %s, %s, %s%n",
+                        getEntityId(first, group.getAlias()),
+                        getInfo(first),
+                        getURL(first),
+                        first.getState());
+                while ( iter.hasNext() ) {
+                    final Resource resource = iter.next();
+                    pw.printf("  - %s, %s, %s%n",
+                        getInfo(resource),
+                        getURL(resource),
+                        resource.getState());
+                }
+            }
+        }
+        pw.println();
+
+        pw.println("Untransformed Resources");
+        pw.println("-----------------------");
+        rt = null;
+        for(final RegisteredResource registeredResource : state.getUntransformedResources()) {
+            if ( !registeredResource.getType().equals(rt) ) {
+                pw.printf("%s:%n", getType(registeredResource));
+                rt = registeredResource.getType();
+            }
+            pw.printf("- %s, %s%n",
+                    getInfo(registeredResource),
+                    registeredResource.getURL());
+        }
+    }
+}

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

[sling-org-apache-sling-installer-console] 07/08: [maven-release-plugin] prepare release org.apache.sling.installer.console-1.0.0

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 745f04126b1557fb88efcca7ec8081a0443d9d90
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Oct 25 09:42:49 2012 +0000

    [maven-release-plugin] prepare release org.apache.sling.installer.console-1.0.0
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/installer/console@1402051 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 892238a..4edbdc4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
     </parent>
 
     <artifactId>org.apache.sling.installer.console</artifactId>
-    <version>0.9.0-SNAPSHOT</version>
+    <version>1.0.0</version>
     <packaging>bundle</packaging>
 
     <name>Apache Sling Installer WebConsole Plugin</name>
@@ -37,9 +37,9 @@
     </description>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/installer/console</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/installer/console</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/installer/console</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.installer.console-1.0.0</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.installer.console-1.0.0</developerConnection>
+        <url>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.installer.console-1.0.0</url>
     </scm>
 
 	<build>

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

[sling-org-apache-sling-installer-console] 03/08: SLING-2612 : Add support for excluding artifacts for installation

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit b72be0448ac7f95f840d75e15b838372046dee29
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Oct 2 07:50:50 2012 +0000

    SLING-2612 : Add support for excluding artifacts for installation
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/installer/console@1392776 13f79535-47bb-0310-9956-ffa450edef68
---
 .../console/OsgiInstallerWebConsolePlugin.java     | 47 +++++++++++++++++-----
 1 file changed, 36 insertions(+), 11 deletions(-)

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 53a3374..dde505c 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
@@ -42,6 +42,7 @@ import org.apache.sling.installer.api.info.Resource;
 import org.apache.sling.installer.api.info.ResourceGroup;
 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;
 
 
@@ -89,6 +90,13 @@ public class OsgiInstallerWebConsolePlugin extends GenericServlet {
         return rsrc.getURL();
     }
 
+    private String getState(final Resource rsrc) {
+        if ( rsrc.getAttribute(TaskResource.ATTR_INSTALL_EXCLUDED) != null ) {
+            return "EXCLUDED";
+        }
+        return rsrc.getState().toString();
+    }
+
     private String getInfo(final RegisteredResource rsrc) {
         return rsrc.getDigest() + '/' + String.valueOf(rsrc.getPriority());
     }
@@ -109,7 +117,7 @@ public class OsgiInstallerWebConsolePlugin extends GenericServlet {
 
     @Override
     public void service(final ServletRequest req, final ServletResponse res)
-    throws IOException {
+            throws IOException {
         final PrintWriter pw = res.getWriter();
 
         final InstallationState state = this.installer.getInstallationState();
@@ -167,7 +175,7 @@ public class OsgiInstallerWebConsolePlugin extends GenericServlet {
                 pw.print("</td><td>");
                 pw.print(getURL(first));
                 pw.print("</td><td>");
-                pw.print(first.getState());
+                pw.print(getState(first));
                 if ( first.getState() == ResourceState.INSTALLED ) {
                     final long lastChange = first.getLastChange();
                     if ( lastChange > 0 ) {
@@ -176,13 +184,21 @@ public class OsgiInstallerWebConsolePlugin extends GenericServlet {
                     }
                 }
                 pw.print("</td></tr>");
+                if ( first.getAttribute(TaskResource.ATTR_INSTALL_EXCLUDED) != null ) {
+                    pw.printf("<tr><td></td><td colspan='2'>%s</td><td></td></tr>",
+                            first.getAttribute(TaskResource.ATTR_INSTALL_EXCLUDED));
+                }
+                if ( first.getAttribute(TaskResource.ATTR_INSTALL_INFO) != null ) {
+                    pw.printf("<tr><td></td><td colspan='2'>%s</td><td></td></tr>",
+                            first.getAttribute(TaskResource.ATTR_INSTALL_INFO));
 
+                }
                 while ( iter.hasNext() ) {
                     final Resource resource = iter.next();
                     pw.printf("<tr><td></td><td>%s</td><td>%s</td><td>%s</td></tr>",
-                        getInfo(resource),
-                        getURL(resource),
-                        resource.getState());
+                            getInfo(resource),
+                            getURL(resource),
+                            resource.getState());
                 }
             }
         }
@@ -205,8 +221,8 @@ public class OsgiInstallerWebConsolePlugin extends GenericServlet {
                 rt = registeredResource.getType();
             }
             pw.printf("<tr><td>%s</td><td>%s</td></tr>",
-                getInfo(registeredResource),
-                registeredResource.getURL());
+                    getInfo(registeredResource),
+                    registeredResource.getURL());
         }
         if ( rt != null ) {
             pw.println("</tbody></table>");
@@ -256,13 +272,22 @@ public class OsgiInstallerWebConsolePlugin extends GenericServlet {
                         getEntityId(first, group.getAlias()),
                         getInfo(first),
                         getURL(first),
-                        first.getState());
+                        getState(first));
+                if ( first.getAttribute(TaskResource.ATTR_INSTALL_EXCLUDED) != null ) {
+                    pw.printf("  : %s",
+                            first.getAttribute(TaskResource.ATTR_INSTALL_EXCLUDED));
+                }
+                if ( first.getAttribute(TaskResource.ATTR_INSTALL_INFO) != null ) {
+                    pw.printf("  : %s",
+                            first.getAttribute(TaskResource.ATTR_INSTALL_INFO));
+
+                }
                 while ( iter.hasNext() ) {
                     final Resource resource = iter.next();
                     pw.printf("  - %s, %s, %s%n",
-                        getInfo(resource),
-                        getURL(resource),
-                        resource.getState());
+                            getInfo(resource),
+                            getURL(resource),
+                            resource.getState());
                 }
             }
         }

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

[sling-org-apache-sling-installer-console] 08/08: [maven-release-plugin] copy for tag org.apache.sling.installer.console-1.0.0

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit ffbbd5353f19598dd123e2281ec4db86e0fd6ecf
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Oct 25 09:43:02 2012 +0000

    [maven-release-plugin]  copy for tag org.apache.sling.installer.console-1.0.0
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.installer.console-1.0.0@1402052 13f79535-47bb-0310-9956-ffa450edef68

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