svn commit: r1482216 - in /felix/trunk/scrplugin/annotations: changelog.txt src/main/java/org/apache/felix/scrplugin/processing/SlingAnnotationProcessor.java
Author: cziegeler Date: Tue May 14 06:26:06 2013 New Revision: 1482216 URL: http://svn.apache.org/r1482216 Log: FELIX-4063 : Avoid warnings when using @SlingServlet and @SlingFilter annotations . Apply modified patch from Julian Sedding Modified: felix/trunk/scrplugin/annotations/changelog.txt felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/processing/SlingAnnotationProcessor.java Modified: felix/trunk/scrplugin/annotations/changelog.txt URL: http://svn.apache.org/viewvc/felix/trunk/scrplugin/annotations/changelog.txt?rev=1482216r1=1482215r2=1482216view=diff == --- felix/trunk/scrplugin/annotations/changelog.txt (original) +++ felix/trunk/scrplugin/annotations/changelog.txt Tue May 14 06:26:06 2013 @@ -1,7 +1,10 @@ Changes from 1.9.4 to 1.9.2 -** -* [FELIX-4047] - Unable to single valued (String) array property +** Bug +* [FELIX-4047] - Unable to single valued (String) array property + +** Improvement +* [FELIX-4063] - Avoid warnings when using @SlingServlet and @SlingFilter annotations Changes from 1.9.2 to 1.9.0 Modified: felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/processing/SlingAnnotationProcessor.java URL: http://svn.apache.org/viewvc/felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/processing/SlingAnnotationProcessor.java?rev=1482216r1=1482215r2=1482216view=diff == --- felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/processing/SlingAnnotationProcessor.java (original) +++ felix/trunk/scrplugin/annotations/src/main/java/org/apache/felix/scrplugin/processing/SlingAnnotationProcessor.java Tue May 14 06:26:06 2013 @@ -83,6 +83,8 @@ public class SlingAnnotationProcessor im private void processSlingServlet(final ClassAnnotation cad, final ClassDescription classDescription) { // generate ComponentDescription if required final boolean generateComponent = cad.getBooleanValue(generateComponent, true); +final boolean metatype = cad.getBooleanValue(metatype, !generateComponent); + if (generateComponent) { final ComponentDescription cd = new ComponentDescription(cad); cd.setName(cad.getStringValue(name, classDescription.getDescribedClass().getName())); @@ -91,7 +93,7 @@ public class SlingAnnotationProcessor im cd.setLabel(cad.getStringValue(label, null)); cd.setDescription(cad.getStringValue(description, null)); -cd.setCreateMetatype(cad.getBooleanValue(metatype, false)); +cd.setCreateMetatype(metatype); classDescription.add(cd); } @@ -112,7 +114,7 @@ public class SlingAnnotationProcessor im pd.setName(sling.servlet.paths); pd.setMultiValue(paths); pd.setType(PropertyType.String); -pd.setPrivate(true); +pd.setPrivate(metatype); classDescription.add(pd); } @@ -123,7 +125,7 @@ public class SlingAnnotationProcessor im pd.setName(sling.servlet.resourceTypes); pd.setMultiValue(resourceTypes); pd.setType(PropertyType.String); -pd.setPrivate(true); +pd.setPrivate(metatype); classDescription.add(pd); } @@ -134,7 +136,7 @@ public class SlingAnnotationProcessor im pd.setName(sling.servlet.selectors); pd.setMultiValue(selectors); pd.setType(PropertyType.String); -pd.setPrivate(true); +pd.setPrivate(metatype); classDescription.add(pd); } @@ -145,7 +147,7 @@ public class SlingAnnotationProcessor im pd.setName(sling.servlet.extensions); pd.setMultiValue(extensions); pd.setType(PropertyType.String); -pd.setPrivate(true); +pd.setPrivate(metatype); classDescription.add(pd); } @@ -156,7 +158,7 @@ public class SlingAnnotationProcessor im pd.setName(sling.servlet.methods); pd.setMultiValue(methods); pd.setType(PropertyType.String); -pd.setPrivate(true); +pd.setPrivate(metatype); classDescription.add(pd); } } @@ -167,6 +169,8 @@ public class SlingAnnotationProcessor im private void processSlingFilter(final ClassAnnotation cad, final ClassDescription classDescription) { // generate ComponentDescription if required final boolean generateComponent = cad.getBooleanValue(generateComponent, true); +final boolean metatype = cad.getBooleanValue(metatype, !generateComponent); + if (generateComponent) { final ComponentDescription cd = new ComponentDescription(cad);
svn commit: r1482218 - /felix/trunk/scrplugin/annotations/changelog.txt
Author: cziegeler Date: Tue May 14 06:29:27 2013 New Revision: 1482218 URL: http://svn.apache.org/r1482218 Log: Update readme Modified: felix/trunk/scrplugin/annotations/changelog.txt Modified: felix/trunk/scrplugin/annotations/changelog.txt URL: http://svn.apache.org/viewvc/felix/trunk/scrplugin/annotations/changelog.txt?rev=1482218r1=1482217r2=1482218view=diff == --- felix/trunk/scrplugin/annotations/changelog.txt (original) +++ felix/trunk/scrplugin/annotations/changelog.txt Tue May 14 06:29:27 2013 @@ -1,7 +1,7 @@ Changes from 1.9.4 to 1.9.2 ** Bug -* [FELIX-4047] - Unable to single valued (String) array property +* [FELIX-4047] - Unable to create single valued (String) array property ** Improvement * [FELIX-4063] - Avoid warnings when using @SlingServlet and @SlingFilter annotations
svn commit: r1482228 - /felix/site/trunk/content/documentation/faqs/apache-felix-scr-plugin-faq.mdtext
Author: cziegeler Date: Tue May 14 06:48:44 2013 New Revision: 1482228 URL: http://svn.apache.org/r1482228 Log: CMS commit to felix by cziegeler Modified: felix/site/trunk/content/documentation/faqs/apache-felix-scr-plugin-faq.mdtext Modified: felix/site/trunk/content/documentation/faqs/apache-felix-scr-plugin-faq.mdtext URL: http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/faqs/apache-felix-scr-plugin-faq.mdtext?rev=1482228r1=1482227r2=1482228view=diff == --- felix/site/trunk/content/documentation/faqs/apache-felix-scr-plugin-faq.mdtext (original) +++ felix/site/trunk/content/documentation/faqs/apache-felix-scr-plugin-faq.mdtext Tue May 14 06:48:44 2013 @@ -26,12 +26,13 @@ During a SCR plugin run, a syntax error ## NoClassDefFoundError during build -If the javadoc tags are used (and not the annotations) then the QDox library is used to parse/introspect the java class. For this the classes have to be loaded and static fields have to be initialized. If you have have for example something like +This error might happen with older versions of the Maven SCR Plugins in combination with javadoc tags or newer versions in combination with the annotations. +In both cases, the scanned classes have to be loaded and static fields have to be initialized. If you have have for example something like :::java private static final org.slf4f.Logger LOGGER = org.slf4j.LoggerFactory.getLogger(name); -in your code, during the plugin run, a slf4j logger is tried to instantiated. This requires an implementation of the logger. Ususally your module only depends on the slf4j API and therefore a +in your code, during the plugin run, a slf4j logger is tried to be instantiated. This requires an implementation of the logger. Ususally your module only depends on the slf4j API and therefore a :::plaintext java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder @@ -55,3 +56,4 @@ In these cases you should add a dependen ... /plugin +or in the special case of slf4j, using slf4j API 1.6 or higher solves the problem as well \ No newline at end of file
svn commit: r861934 - in /websites/staging/felix/trunk/content: ./ documentation/faqs/apache-felix-scr-plugin-faq.html
Author: buildbot Date: Tue May 14 06:48:58 2013 New Revision: 861934 Log: Staging update by buildbot for felix Modified: websites/staging/felix/trunk/content/ (props changed) websites/staging/felix/trunk/content/documentation/faqs/apache-felix-scr-plugin-faq.html Propchange: websites/staging/felix/trunk/content/ -- --- cms:source-revision (original) +++ cms:source-revision Tue May 14 06:48:58 2013 @@ -1 +1 @@ -1478675 +1482228 Modified: websites/staging/felix/trunk/content/documentation/faqs/apache-felix-scr-plugin-faq.html == --- websites/staging/felix/trunk/content/documentation/faqs/apache-felix-scr-plugin-faq.html (original) +++ websites/staging/felix/trunk/content/documentation/faqs/apache-felix-scr-plugin-faq.html Tue May 14 06:48:58 2013 @@ -94,12 +94,13 @@ for documentation on that plugin./p h2 id=noclassdeffounderror-during-buildNoClassDefFoundError during build/h2 -pIf the javadoc tags are used (and not the annotations) then the QDox library is used to parse/introspect the java class. For this the classes have to be loaded and static fields have to be initialized. If you have have for example something like/p +pThis error might happen with older versions of the Maven SCR Plugins in combination with javadoc tags or newer versions in combination with the annotations. +In both cases, the scanned classes have to be loaded and static fields have to be initialized. If you have have for example something like/p div class=codehiliteprespan class=kdprivate/span span class=kdstatic/span span class=kdfinal/span span class=norg/spanspan class=o./spanspan class=naslf4f/spanspan class=o./spanspan class=naLogger/span span class=nLOGGER/span span class=o=/span span class=norg/spanspan class=o./spanspan class=naslf4j/spanspan class=o./spanspan class=naLoggerFactory/spanspan class=o./spanspan class=nagetLogger/spanspan class=o(/spanspan class=squot;namequot;/spanspan class=o);/span /pre/div -pin your code, during the plugin run, a slf4j logger is tried to instantiated. This requires an implementation of the logger. Ususally your module only depends on the slf4j API and therefore a /p +pin your code, during the plugin run, a slf4j logger is tried to be instantiated. This requires an implementation of the logger. Ususally your module only depends on the slf4j API and therefore a /p div class=codehiliteprespan class=njava/spanspan class=o./spanspan class=nlang/spanspan class=o./spanspan class=nNoClassDefFoundError:/span span class=norg/spanspan class=sr/slf4j/im/spanspan class=npl/spanspan class=o//spanspan class=nStaticLoggerBinder/span /pre/div @@ -120,8 +121,11 @@ for documentation on that plugin./p ... span class=ntlt;/plugingt;/span /pre/div + + +por in the special case of slf4j, using slf4j API 1.6 or higher solves the problem as well/p div class=timestamp style=margin-top: 30px; font-size: 80%; text-align: right; -Rev. 1438983 by fmeschbe on Sat, 26 Jan 2013 22:54:42 + +Rev. 1482228 by cziegeler on Tue, 14 May 2013 06:48:44 + /div div class=trademarkFooter Apache Felix, Felix, Apache, the Apache feather logo, and the Apache Felix project
svn commit: r1482253 - /felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java
Author: cziegeler Date: Tue May 14 08:42:23 2013 New Revision: 1482253 URL: http://svn.apache.org/r1482253 Log: FELIX-4061 : Implement service endpoint registration property Modified: felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java Modified: felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java URL: http://svn.apache.org/viewvc/felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java?rev=1482253r1=1482252r2=1482253view=diff == --- felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java (original) +++ felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java Tue May 14 08:42:23 2013 @@ -16,8 +16,16 @@ */ package org.apache.felix.http.jetty.internal; +import java.net.Inet4Address; +import java.net.Inet6Address; +import java.net.InetAddress; +import java.net.NetworkInterface; +import java.net.SocketException; +import java.util.ArrayList; import java.util.Dictionary; +import java.util.Enumeration; import java.util.Hashtable; +import java.util.List; import java.util.Properties; import org.apache.felix.http.base.internal.DispatcherServlet; @@ -31,6 +39,7 @@ import org.eclipse.jetty.server.SessionM import org.eclipse.jetty.server.bio.SocketConnector; import org.eclipse.jetty.server.handler.StatisticsHandler; import org.eclipse.jetty.server.nio.SelectChannelConnector; +import org.eclipse.jetty.server.ssl.SslConnector; import org.eclipse.jetty.server.ssl.SslSelectChannelConnector; import org.eclipse.jetty.server.ssl.SslSocketConnector; import org.eclipse.jetty.servlet.ServletContextHandler; @@ -45,6 +54,9 @@ public final class JettyService /** PID for configuration of the HTTP service. */ private static final String PID = org.apache.felix.http; +/** Endpoint service registration property from RFC 189 */ +private static final String REG_PROPERTY_ENDPOINTS = osgi.http.service.endpoints; + private final JettyConfig config; private final BundleContext context; private boolean running; @@ -99,6 +111,7 @@ public final class JettyService { HashtableString, Object props = new HashtableString, Object(); this.config.setServiceProperties(props); +this.addEndpointProperties(props, null); this.controller.setProperties(props); } @@ -169,7 +182,7 @@ public final class JettyService } ServletContextHandler context = new ServletContextHandler(this.server, this.config.getContextPath(), ServletContextHandler.SESSIONS); - + message.append( on context path ).append(this.config.getContextPath()); configureSessionManager(context); context.addEventListener(eventDispatcher); @@ -348,4 +361,105 @@ public final class JettyService stopJetty(); } } + +private String getEndpoint(final Connector listener, final InetAddress ia) +{ +if (ia.isLoopbackAddress()) +{ +return null; +} + +String address = ia.getHostAddress().trim().toLowerCase(); +if ( ia instanceof Inet6Address ) +{ +// skip link-local +if ( address.startsWith(fe80:0:0:0:) ) +{ +return null; +} +address = [ + address + ]; +} +else if ( ! ( ia instanceof Inet4Address ) ) +{ +return null; +} + +return getEndpoint(listener, address); +} + +private String getEndpoint(final Connector listener, final String hostname) +{ +final StringBuilder sb = new StringBuilder(); +sb.append(http); +int defaultPort = 80; +if ( listener instanceof SslConnector ) +{ +sb.append('s'); +defaultPort = 443; +} +sb.append(://); +sb.append(hostname); +if ( listener.getPort() != defaultPort ) +{ +sb.append(':'); +sb.append(String.valueOf(listener.getPort())); +} +sb.append(config.getContextPath()); + +return sb.toString(); +} + +private void addEndpointProperties(final HashtableString, Object props, Object container) +{ +final ListString endpoints = new ArrayListString(); + +final Connector[] connectors = this.server.getConnectors(); +if ( connectors != null ) +{ +for(int i=0 ; i connectors.length; i++) +{ +final Connector connector = connectors[i]; + +if ( connector.getHost() == null ) +{ +try +{ +final EnumerationNetworkInterface nis = NetworkInterface.getNetworkInterfaces(); +
buildbot failure in ASF Buildbot on felix-site-staging
The Buildbot has detected a new failure on builder felix-site-staging while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/felix-site-staging/builds/129 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-cms-slave Build Reason: scheduler Build Source Stamp: [branch felix/site] 1482395 Blamelist: fmeschbe BUILD FAILED: failed compile sincerely, -The Buildbot
svn commit: r1482398 - /felix/site/trunk/content/documentation/subprojects/apache-felix-inventory.mdtext
Author: fmeschbe Date: Tue May 14 15:35:37 2013 New Revision: 1482398 URL: http://svn.apache.org/r1482398 Log: fix template issue Modified: felix/site/trunk/content/documentation/subprojects/apache-felix-inventory.mdtext Modified: felix/site/trunk/content/documentation/subprojects/apache-felix-inventory.mdtext URL: http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-inventory.mdtext?rev=1482398r1=1482397r2=1482398view=diff == --- felix/site/trunk/content/documentation/subprojects/apache-felix-inventory.mdtext (original) +++ felix/site/trunk/content/documentation/subprojects/apache-felix-inventory.mdtext Tue May 14 15:35:37 2013 @@ -1,6 +1,7 @@ Title: Apache Felix Inventory Printer -[TOC] {#top} +a id=top/a +[TOC] The Apache Felix Inventory Printer is a simple and extensible framework to retrieve inventory information about applications running in an OSGi Framework. Typical information includes currently installed bundles, their state, available configurations, framework properties, log files etc. @@ -111,7 +112,8 @@ To prevent an Invetory Printer from bein -## Integration with the Apache Felix Gogo Shell {#gogo-shell} +a id=gogo-shell/a +## Integration with the Apache Felix Gogo Shell [Top](#top) Gogo Shell integration is not implemented in the first version of the Apache Felix Inventory Printer module.
buildbot success in ASF Buildbot on felix-site-staging
The Buildbot has detected a restored build on builder felix-site-staging while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/felix-site-staging/builds/130 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-cms-slave Build Reason: scheduler Build Source Stamp: [branch felix/site] 1482398 Blamelist: fmeschbe Build succeeded! sincerely, -The Buildbot
svn commit: r1482403 - /felix/site/trunk/content/documentation/subprojects/apache-felix-inventory.mdtext
Author: fmeschbe Date: Tue May 14 15:38:17 2013 New Revision: 1482403 URL: http://svn.apache.org/r1482403 Log: fix template issue Modified: felix/site/trunk/content/documentation/subprojects/apache-felix-inventory.mdtext Modified: felix/site/trunk/content/documentation/subprojects/apache-felix-inventory.mdtext URL: http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-inventory.mdtext?rev=1482403r1=1482402r2=1482403view=diff == --- felix/site/trunk/content/documentation/subprojects/apache-felix-inventory.mdtext (original) +++ felix/site/trunk/content/documentation/subprojects/apache-felix-inventory.mdtext Tue May 14 15:38:17 2013 @@ -1,6 +1,7 @@ Title: Apache Felix Inventory Printer a id=top/a + [TOC] The Apache Felix Inventory Printer is a simple and extensible framework @@ -83,7 +84,7 @@ See also the [API JavaDoc](/apidocs/inve ## ZIP Attachment Provider [Top](#top) -If an Inventory Printer wants to provide additional contents to an Inventory ZIP File, it can implement the [ZIPAttachmentProider](/apidocs/inventory/current/org/apache/felix/inventory/ZipAttachmentProvider.html) interface and provide additional files when the zip is created. +If an Inventory Printer wants to provide additional contents to an Inventory ZIP File, it can implement the [ZipAttachmentProvider](/apidocs/inventory/current/org/apache/felix/inventory/ZipAttachmentProvider.html) interface and provide additional files when the zip is created. ## Configuration Printer Services @@ -118,7 +119,7 @@ To prevent an Invetory Printer from bein Gogo Shell integration is not implemented in the first version of the Apache Felix Inventory Printer module. -See [Provide Gogo Shell integration for InventoryPrinter services](https://issues.apache.org/jira/browse/FELIX-4065). +See the issue [FELIX-4065 Provide Gogo Shell integration for InventoryPrinter services](https://issues.apache.org/jira/browse/FELIX-4065). ## Issues
svn commit: r861977 - in /websites/staging/felix/trunk/content: ./ documentation/subprojects/apache-felix-inventory.html
Author: buildbot Date: Tue May 14 15:39:19 2013 New Revision: 861977 Log: Staging update by buildbot for felix Modified: websites/staging/felix/trunk/content/ (props changed) websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-inventory.html Propchange: websites/staging/felix/trunk/content/ -- --- cms:source-revision (original) +++ cms:source-revision Tue May 14 15:39:19 2013 @@ -1 +1 @@ -1482398 +1482403 Modified: websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-inventory.html == --- websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-inventory.html (original) +++ websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-inventory.html Tue May 14 15:39:19 2013 @@ -69,8 +69,22 @@ h1Apache Felix Inventory Printer/h1 - pa id=top/a -[TOC]/p + pa id=top/a/p +div class=toc +ul +lia href=#introductionIntroduction/a/li +lia href=#requirementsRequirements/a/li +lia href=#inventory-printer-servicesInventory Printer Services/aul +lia href=#example-inventory-printer-serviceExample Inventory Printer Service/a/li +/ul +/li +lia href=#zip-attachment-providerZIP Attachment Provider/a/li +lia href=#configuration-printer-servicesConfiguration Printer Services/a/li +lia href=#integration-with-the-apache-felix-web-consoleIntegration with the Apache Felix Web Console/a/li +lia href=#integration-with-the-apache-felix-gogo-shellIntegration with the Apache Felix Gogo Shell/a/li +lia href=#issuesIssues/a/li +/ul +/div pThe Apache Felix Inventory Printer is a simple and extensible framework to retrieve inventory information about applications running in an OSGi Framework. Typical information includes currently installed bundles, their state, available configurations, framework properties, log files etc./p pHistorically the Inventory Printer evolved from the Web Console Configuration @@ -149,7 +163,7 @@ Printer framework./p pSee also the a href=/apidocs/inventory/current/API JavaDoc/a./p h2 id=zip-attachment-providerZIP Attachment Provider/h2 pa href=#topTop/a/p -pIf an Inventory Printer wants to provide additional contents to an Inventory ZIP File, it can implement the a href=/apidocs/inventory/current/org/apache/felix/inventory/ZipAttachmentProvider.htmlZIPAttachmentProider/a interface and provide additional files when the zip is created./p +pIf an Inventory Printer wants to provide additional contents to an Inventory ZIP File, it can implement the a href=/apidocs/inventory/current/org/apache/felix/inventory/ZipAttachmentProvider.htmlZipAttachmentProvider/a interface and provide additional files when the zip is created./p h2 id=configuration-printer-servicesConfiguration Printer Services/h2 pa href=#topTop/a/p pFor backwards compatibility the Inventory Printer framework also supports legacy Apache Felix Web Console codeConfigurationPrinter/code services./p @@ -189,7 +203,7 @@ Printer framework./p h2 id=integration-with-the-apache-felix-gogo-shellIntegration with the Apache Felix Gogo Shell/h2 pa href=#topTop/a/p pGogo Shell integration is not implemented in the first version of the Apache Felix Inventory Printer module./p -pSee a href=https://issues.apache.org/jira/browse/FELIX-4065;Provide Gogo Shell integration for InventoryPrinter services/a./p +pSee the issue a href=https://issues.apache.org/jira/browse/FELIX-4065;FELIX-4065 Provide Gogo Shell integration for InventoryPrinter services/a./p h2 id=issuesIssues/h2 pa href=#topTop/a/p pShould you have any questions using the Inventory Printer, please send a @@ -198,7 +212,7 @@ note to one of our a href=/mailinglist system (a href=https://issues.apache.org/jira/browse/Felix;JIRA/a) and be sure to report for the emInventory/em component. See our a href=/documentation/development/issue-tracking.htmlIssue Tracking/a page for more details./p div class=timestamp style=margin-top: 30px; font-size: 80%; text-align: right; -Rev. 1482398 by fmeschbe on Tue, 14 May 2013 15:35:37 + +Rev. 1482403 by fmeschbe on Tue, 14 May 2013 15:38:17 + /div div class=trademarkFooter Apache Felix, Felix, Apache, the Apache feather logo, and the Apache Felix project