http://git-wip-us.apache.org/repos/asf/sling-site/blob/f542b22e/documentation/bundles/validation.html ---------------------------------------------------------------------- diff --git a/documentation/bundles/validation.html b/documentation/bundles/validation.html index c9d4089..82067b2 100644 --- a/documentation/bundles/validation.html +++ b/documentation/bundles/validation.html @@ -75,17 +75,16 @@ </h1><div class="row"><div class="small-12 columns"><section class="wrap"><p><!-- TODO reactivate TOC once JBake moves to flexmark-java --> </p> <p>Many Sling projects want to be able to validate both Resources and request parameters. Through the Sling Validation framework this is possible with the help of validation model resources which define validation rules for a certain resourceType.</p> -<h1>Prerequisites</h1> +<h1><a href="#prerequisites" name="prerequisites">Prerequisites</a></h1> <p>To use this validation framework the following bundles need to be deployed</p> <ol> <li><code>org.apache.sling.validation.api</code></li> <li><code>org.apache.sling.validation.core</code></li> </ol> <p>In addition a <a href="/documentation/the-sling-engine/service-authentication.html">service resolver mapping</a> needs to be configured for the service name <code>org.apache.sling.validation.core</code>. The bound service user needs to have at least read access to all resources within the resource resolver's search paths (usually <code>/apps</code> and <code>/libs</code>).</p> -<h1>Basic Usage</h1> +<h1><a href="#basic-usage" name="basic-usage">Basic Usage</a></h1> <p>To validate a resource one first needs to get a <code>ValidationModel</code> and then validate the resource with that model. Both functionalities are provided by the <code>ValidationService</code> OSGi service:</p> -<pre><code>::java -try { +<pre><code><!-- TODO syntax marker (::java) disabled -->try { ValidationModel validationModel = validationService.getValidationModel(resource, true); if (validationModel != null) { ValidationResult result = validationService.validate(resource, validationModel); @@ -98,8 +97,7 @@ try { } </code></pre> <p>Apart from that it is also possible to validate resources including all child resources having their own validation model (i.e. a merged view of the validation models is applied). The appropriate validation model is being looked up by getting the resource type for each node. Since by default the JCR will return the primary type in case there is no <code>sling:resourceType</code> property found on the node, either the 2nd parameter <code>enforceValidation</code> should be set to <code>false</code> or some resource types must be explicitly ignored by the given filter in the 3rd parameter <code>filter</code> to also properly support validation models which have children resources on their own.</p> -<pre><code>::java -try { +<pre><code><!-- TODO syntax marker (::java) disabled -->try { final Predicate ignoreResourceType1Predicate = new Predicate<Resource>() { @Override public boolean test(final Resource resource) { @@ -118,7 +116,7 @@ try { } </code></pre> <p>All methods to retrieve a validation model support a boolean parameter <code>considerResourceSuperTypeModels</code>. If this is set to true, the validation model is not only being looked up for exactly the given resource type but also for all its resource super types. The returned model is then a merged model of all found validation model along the resource type hierarchy.</p> -<h2>ValidationResult</h2> +<h2><a href="#validationresult" name="validationresult">ValidationResult</a></h2> <p>The <code>ValidationResult</code> indicates whether a given <code>Resource</code> or <code>ValueMap</code> is valid or invalid according to a given validation model. In the latter case it aggregates one or more <code>ValidationFailure</code>s. Each <code>ValidationFailure</code> is encapsulating an error message and a severity. The severity may be set on the following locations (where locations on top may overwrite severity from locations below):</p> <ol> <li>validation model (per use case of a <code>Validator</code>)</li> @@ -126,7 +124,7 @@ try { <li>the default severity (may be set through the OSGi configuration for PID <code>org.apache.sling.validation.impl.ValidationServiceImpl</code>, is 0 by default)</li> </ol> <p>You have to use a <code>ResourceBundle</code> (<a href="/documentation/bundles/internationalization-support-i18n.html">Internationalization Support</a>) to resolve the message for a specific locale. By default Sling Validation comes only with English failure messages.</p> -<h1>Validation Model Resources</h1> +<h1><a href="#validation-model-resources" name="validation-model-resources">Validation Model Resources</a></h1> <p>The <code>ValidationModel</code> is constructed from resources with the resourceType <strong>sling/validation/model</strong>. Those resources are considered validation model resources if they are located below the Sling ResourceResolver search paths (*/apps* and <em>/libs</em>).</p> <p>The resources should have the following format:</p> <table> @@ -168,17 +166,16 @@ try { </tbody> </table> <p><code>properties\<propertyName></code> | Resource | - | This resource ensures that the property with the name <code><propertyName></code> is there. The resource name has no longer a meaning if the property <code>nameRegex</code> is set on this node. | no | <code>false</code> <code>properties\<propertyName>\optional</code> | Property | <code>Boolean</code> | If <code>true</code> it is not an error if there is no property with the given <code><propertyName></code> or none matching the <code>nameRegex</code>. If not set or <code>false</code> the property must be there. | no | <code>false</code> <code>properties\<propertyName>\propertyMultiple</code> | Property | <code>Boolean</code> | If <code>true</code> only multivalue properties are allowed with the name <code><propertyName></code> or matching the <code>nameRegex</code>. If not set or <code>false</code>, multi- and single-value properties are accepted. | no | <code>false</code> <code>properties \<propertyName>\nameRegex</code> | Property | <code>String</code> | If set the <code><propertyName></code> has no longer a meaning. Rather all properties which match the given regular expression are considered. At least one match is required, otherwise the validated resource/valuemap is considered invalid. | no | <code>property[0-8]</code><br/><code>properties\<propertyName>\validators\<validatorId></code> | Resource | - | The <code><validatorId></code> must be the id of a validator. The id is given by the OSGi service property <code>validator.id</code> set in the validator. Each validators node might have arbitrarily many child resources (one per validator). | no | <code>false</code><br/><code>properties\<propertyName>\validators\<validatorId>\validatorArguments</code> | Property | <code>String[]</code> | The parametrization for the validator with the id <code><validatorId></code>. Each value must have the pattern <code>key=value</cod e>. The parametrization differs per validator. | no | <code>regex=^[a-z]*$</code> <code>properties\<propertyName>\validators\<validatorId>\severity</code> | Property | <code>Integer</code> | The severity which should be set on all emitted validation failures by this validator. | no | <code>0</code> <code>children\<resourceName></code> | Resource | - | This resource ensures that the resource with the name <code><resourceName></code> is there. The resource name has no longer a meaning if the property <code>nameRegex</code> is set on this node. | no | <code>child1</code> <code>children\<resourceName>\nameRegex</code> | Property | <code>String</code> | If set the <code><resourceName></code> has no longer a meaning. Rather all resources whose name match the given regular expression are considered. At least one match is required, otherwise the validated resource/valuemap is considered invalid. | no | <code>child[1-9]</code> <code>children\<resourceNa me>\optional</code> | Property | <code>Boolean</code> | If <code>true</code> it is not an error if there is no resource with the given <code><resourceName></code> or none matching the <code>nameRegex</code>. If not set or <code>false</code> the resource must be there. | no | <code>false</code> <code>children\<resourceName>\properties</code> | Resource | - | The properties can be configured on the child level in the same way as on the root level. | no | -</p> -<h2>Validation Model Inheritance</h2> +<h2><a href="#validation-model-inheritance" name="validation-model-inheritance">Validation Model Inheritance</a></h2> <p>Sling Validation optionally supports the inheritance of Sling Validation Models. This means not only the model for exactly the given resource type is considered, but also the models for all resource super types. To overwrite some property or child from one of the super type models, just define a property/child on the same level and with the same name in a model for a resource type which is more specific. That way the property/child on the super validation model is no longer effective.</p> -<h2>Precedence of Validation Models</h2> +<h2><a href="#precedence-of-validation-models" name="precedence-of-validation-models">Precedence of Validation Models</a></h2> <p>In case there are multiple validation models registered for the same resource type the one gets chosen which has the longest matching applicablePath. In case even that does not resolve to a single model the one in the first resource resolver's search path is chosen (models below <code>/apps</code> before the ones below <code>/libs</code>). If even that does not resolve to a single validation model any of the equally ranked models might be picked.</p> <h1>Usage in <a href="/documentation/bundles/models.html">Sling Models</a></h1> -<h2>Since Sling Models 1.2.0</h2> +<h2><a href="#since-sling-models-1-2-0" name="since-sling-models-1-2-0">Since Sling Models 1.2.0</a></h2> <p>See <a href="/documentation/bundles/models.html#validation">Sling Models validation</a></p> -<h2>Before Sling Models 1.2.0</h2> +<h2><a href="#before-sling-models-1-2-0" name="before-sling-models-1-2-0">Before Sling Models 1.2.0</a></h2> <p>One needs to call the validate method within the PostConstruct method of the according Sling Model</p> -<pre><code>::java -@SlingObject +<pre><code><!-- TODO syntax marker (::java) disabled -->@SlingObject protected Resource resource; @OSGiService @@ -202,7 +199,7 @@ public void validate() { } } </code></pre> -<h1>Validators</h1> +<h1><a href="#validators" name="validators">Validators</a></h1> <table> <thead> <tr> @@ -221,11 +218,11 @@ public void validate() { </tr> </tbody> </table> -<h1>Writing Validators</h1> +<h1><a href="#writing-validators" name="writing-validators">Writing Validators</a></h1> <p>To write a validator one needs to implement the <a href="https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/api/src/main/java/org/apache/sling/validation/spi/Validator.java"><code>org.apache.sling.validation.spi.Validator</code></a> interface in an OSGi service (look at <a href="https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/validation/core/src/main/java/org/apache/sling/validation/impl/validators/RegexValidator.java"><code>org.apache.sling.validation.core.RegexValidator</code></a> for an example). That interface defines the method <code>validate</code>. That is called for each property which is bound to the validator through the validation model. Each validator needs to specify one type parameter which defines upon which classes the validator can act (usually <code>String</code>). Array types are also supported here. Collection types are not supported. If a property value cannot be converted to the requested type from the validator (throu gh <code>ValueMap.get(name, type)</code>), validation will fail.</p> <p>In addition the OSGi service must expose a String property named <code>validation.id</code>. The value of this property should always start with the providing bundle's symbolic name. Only through this value the validator can be referenced from validation models. If multiple validators have the same <code>validation.id</code> value the one with the highest service ranking gets always chosen.</p> <p>A validator may also expose a service property named <code>validation.severity</code> with an Integer value. This defines the default severity of the Validator (which may be overwritten in the validation model).</p> -<h1>References</h1> +<h1><a href="#references" name="references">References</a></h1> <ol> <li><a href="http://www.slideshare.net/raducotescu/apache-sling-generic-validation-framework">Apache Sling Generic Validation Framework, adaptTo 2014</a></li> </ol></section></div></div>
http://git-wip-us.apache.org/repos/asf/sling-site/blob/f542b22e/documentation/bundles/web-console-extensions.html ---------------------------------------------------------------------- diff --git a/documentation/bundles/web-console-extensions.html b/documentation/bundles/web-console-extensions.html index 539337b..ce3c00b 100644 --- a/documentation/bundles/web-console-extensions.html +++ b/documentation/bundles/web-console-extensions.html @@ -75,10 +75,10 @@ </h1><div class="row"><div class="small-12 columns"><section class="wrap"><p>The Apache Sling project provides two extensions to the <a href="http://felix.apache.org/site/apache-felix-web-console.html">Apache Felix Web Console</a> (in addition to a number of plugins, of course):</p> <p><!-- TODO reactivate TOC once JBake moves to flexmark-java --> </p> -<h2>Branding (org.apache.sling.extensions.webconsolebranding)</h2> +<h2><a href="#branding-org-apache-sling-extensions-webconsolebranding-" name="branding-org-apache-sling-extensions-webconsolebranding-">Branding (org.apache.sling.extensions.webconsolebranding)</a></h2> <p>The Apache Sling Web Console Branding provided by Apache Sling is currently just for the product logo displayed in the upper right corner of the Web Console and some titles and strings.</p> <p>This bundle will attach as a fragment bundle to the Apache Felix Web Console bundle. To enable it after installation into a running system, you might have to refresh the package imports of the Apache Felix Web Console bundle. If you install using the Apache Felix Web Console bundle installation functionality, this will be taken care of by the Web Console.</p> -<h2>Security Provider (org.apache.sling.extensions.webconsolesecurityprovider)</h2> +<h2><a href="#security-provider-org-apache-sling-extensions-webconsolesecurityprovider-" name="security-provider-org-apache-sling-extensions-webconsolesecurityprovider-">Security Provider (org.apache.sling.extensions.webconsolesecurityprovider)</a></h2> <p>The Apache Sling Web Console Security Provider implements the Apache Felix Web Console <code>WebConsoleSecurityProvider</code> and <code>WebConsoleSecurityProvider2</code> interface for authenticating Web Console users against the JCR repository. Each username and password presented is used to login to the JCR repository and to check the respective session.</p> <ol> <li>Ensure the username and password can be used to login to the default workspace. If not, access is denied</li> @@ -86,7 +86,7 @@ <li>Otherwise if the user is a (direct or indirect) member of one of the groups configured with the <code>groups</code> configuration property, access is granted.</li> </ol> <p>Access is denied if the username and password cannot be used to login to the default workspace or if the user is neither one of the configured allowed users nor in any of the configured groups.</p> -<h3>Configuration</h3> +<h3><a href="#configuration" name="configuration">Configuration</a></h3> <p>The Security Provider is configured with the configuration PID <code>org.apache.sling.extensions.webconsolesecurityprovider.internal.SlingWebConsoleSecurityProvider</code> supporting the following properties:</p> <table> <thead> @@ -113,7 +113,7 @@ </tbody> </table> <p>Note, that while the default value explicitly grants the <em>admin</em> user to access the Web Console it is suggested that system administrators define a special group and assign users with Web Console access to this group.</p> -<h3>Authentication Handling</h3> +<h3><a href="#authentication-handling" name="authentication-handling">Authentication Handling</a></h3> <p>As long as the web console security provider bundle is not activate and has not installed one of the above mentioned services, the default authentication of the web console is used. Once the bundle is active and a JCR repository service is available, the repository is used for authentication as explained above. But still the login form of the web console is used which is usually basic authentication. Once startup is finished and a Sling authentication service is available as well, the security provider replaces the JCR repository based auth provider with a Sling based auth provider. Both authenticate against the JCR repository, however the Sling based one using Sling to render the login form. Therefore, this provider is not registered until startup is finished</p></section></div></div> <div class="footer"> <div class="trademarkFooter"> http://git-wip-us.apache.org/repos/asf/sling-site/blob/f542b22e/documentation/configuration.html ---------------------------------------------------------------------- diff --git a/documentation/configuration.html b/documentation/configuration.html index 5e8797d..05548e3 100644 --- a/documentation/configuration.html +++ b/documentation/configuration.html @@ -72,7 +72,7 @@ </div> <div class="main"> <div class="breadcrumbs"><a href="/ng/">Home</a> » <a href="/ng/documentation.html">Documentation</a> » </div> <h1> Configuration - </h1><div class="row"><div class="small-12 columns"><section class="wrap"><h2>Introduction</h2> + </h1><div class="row"><div class="small-12 columns"><section class="wrap"><h2><a href="#introduction" name="introduction">Introduction</a></h2> <p>Configuration in Sling is aligned with respective support by the OSGi specification:</p> <ul> <li>Framework and Java system properties are available through the <code>BundleContext.getProperty(String)</code> method. These properties are provided in Sling through the Sling launcher.</li> @@ -88,7 +88,7 @@ </ul> <p>For the discussion to follow we differentiate between initial configuration provided by Framework and system properties and managed configuration provided by the Configuration Admin Service.</p> <p>Components managed by the Service Component Runtime are generally configured (as listed above) through the descriptor properties and configuration set by Configuration Admin Service configuration. The descriptor property values may be seen as configuration default values set by the component developer, which may be overwritten by user configuration through the Configuration Admin Service. Components may but are not required to make use of Framework properties by accessing the <code>BundleContext</code> through the <code>ComponentContext</code> given to the <code>activate(ComponentContext)</code> method of the component.</p> -<h2>Initial Configuration</h2> +<h2><a href="#initial-configuration" name="initial-configuration">Initial Configuration</a></h2> <p>The lifecycle of the OSGi framework implemented by an instance of the <code>org.apache.felix.framework.Felix</code> class is managed by the Sling launcher class <code>org.apache.sling.launcher.Sling</code>. This class is used by the standalone main class (<code>org.apache.sling.launcher.main.Main</code>) and the Sling Servlet (<code>org.apache.sling.launcher.servlet.SlingServlet</code>) to control the lifecycle.</p> <p>The Sling launcher is responsible to provide the Framework properties to the OSGi framework. The properties are prepared as a <code>java.util.Map<String, String></code> instance as follows (later steps may overwrite properties defined in earlier steps) :</p> <ol> @@ -112,7 +112,7 @@ </ol> <p>Using file system copies of the initial configuration and referred files, it is easy to modify this configuration without the need to unpack and repackage the web application archive.</p> <p>The only property really required is actually the <code>sling.home</code> property, which defines the file system location where runtime files will be placed. The default if this property is missing will be <em>sling</em> in the current working directory as defined the <code>user.dir</code> system property.</p> -<h3>Standalone Application</h3> +<h3><a href="#standalone-application" name="standalone-application">Standalone Application</a></h3> <p>When launching Sling as a standalone application the <code>sling-app.jar</code> file is used. This is an executable JAR File. The <code>sling.properties</code> file as well as the <code>sling_install.properties</code> and JRE specific properties files are located at the root of the JAR file hierarchy.</p> <p>The standalone application currently sets properties for the third step of the configuration setup to ensure the HTTP Servlet integration is using the Apache Felix <em>http.jetty</em> bundle. Additionally system properties may be set using the <code>-D</code> command line switch of the Java binary.</p> <p>In addition the following command line arguments are accepted:</p> @@ -144,11 +144,11 @@ </table> <p>| <code>-a address</code> | -- | the interfact to bind to (use 0.0.0.0 for any) (not supported yet) | | <code>-p port</code> | <code>org.osgi.service.http.port</code> | the port to listen to (default 8080) | | <code>-h</code> | -- | Prints a simple usage message and exits. |</p> <p>The standalone application exits with status code 0 (zero) if Sling terminates normally, that is if the OSGi framework is stopped or if just the usage note has been displayed. If any error occurrs during command line parsing, the cause is printed to the error output and the application exists with status code 1 (one). If the OSGi framework fails to start, the cause is printed to the error output and the application exists with status code 2.</p> -<h3>Web Application</h3> +<h3><a href="#web-application" name="web-application">Web Application</a></h3> <p>When launching Sling as a web application using the <code>sling-servlet.war</code> or any derived Web Application archive file, the <code>sling.properties</code> file is located in the <code>WEB-INF</code> folder along with the <code>sling_install.properties</code> and JRE specific properties files.</p> <p>The Sling Servlet uses the Servlet Context and Servlet <code>init-param</code> configurations to prepare the properties for the third step of the configuration setup.</p> <p>If the OSGi framework fails to startup for any reason a <code>javax.servlet.UnavailableException</code>.</p> -<h3>Property File Inclusions</h3> +<h3><a href="#property-file-inclusions" name="property-file-inclusions">Property File Inclusions</a></h3> <p>Twice in the configuration setup (second and seventh step) any property file inclusions will be handled. Property files may be included by defining one or more properties containing a comma-separated list of properties files to include. Property file inclusion looks at the <code>sling.include</code> property and any other property whose prefix is <code>sling.include.</code>. When such properties exist, the files listed in those properties are included.</p> <p>The order of handling the property file inclusion properties is defined as natural sort order of the actual property names. So the properties of the files listed in the <code>sling.include.first</code> property will be loaded before the files listed in the <code>sling.include.second</code> but after the files listed in the <code>sling.include.a</code> property.</p> <p>Any file which does not exist is silently ignored.</p> @@ -163,7 +163,7 @@ <pre><code>sling.include.jre = jre-${java.specification.version}.properties </code></pre> <p>This is used to include the JRE package list to be made visible inside the OSGi framework.</p> -<h3>OSGi Boot Delegation Support</h3> +<h3><a href="#osgi-boot-delegation-support" name="osgi-boot-delegation-support">OSGi Boot Delegation Support</a></h3> <p>Some packages may have to be shared between bundles in an OSGi framework and the rest of Java VM in which the framework has been launched. This is especially true for OSGi framework instances launched in embedding such as Servlet Containers. In the case of a Sling Application accessing a JCR Repository launched in a different Web Application, this mainly concerns an API packages as well as the JNDI Initial Factory package(s).</p> <p>To cope with this sharing issue, the OSGi core specification defines two properties, which may list packages to be used from the environment:</p> <ul> @@ -191,7 +191,7 @@ </tbody> </table> <p><em>Note</em> Even though packages listed in the <code>org.osgi.framework.bootdelegation</code> property will always be loaded from the environment, any bundles using these packages must still import them (through <code>Import-Package</code> or <code>DynamicImport-Package</code>) and the bundles must resolve for being usable.</p> -<h3>OSGi System Packages Support</h3> +<h3><a href="#osgi-system-packages-support" name="osgi-system-packages-support">OSGi System Packages Support</a></h3> <p>As listed in the above section on OSGi Boot Delegation Support, the <code>org.osgi.framework.system.packages</code> property may be used to extend the export list of the system bundle. Similar to the support for extending the boot delegation packages list, Sling supports extending the system packages list. The mechanism to extend the default setting of the <code>org.osgi.framework.system.packages</code> property by adding properties prefixed with <code>sling.system.packages.</code>. The value of each of these prefixed properties is conditionally appended to the <code>org.osgi.framework.system.packages</code> property. <em>Conditionally</em> means, that the property name may contain the fully qualified name of a class, which is checked to see whether to add the property value or not.</p> <p><em>Examples</em></p> <table> @@ -213,7 +213,7 @@ </tbody> </table> <p><em>Note</em> Packages listed in the <code>org.osgi.framework.system.packages</code> required by any bundles must be imported by those bundles by listing them in the <code>Import-Package</code> or <code>DynamicImport-Package</code> manifest header.</p> -<h2>Recommendations for property names</h2> +<h2><a href="#recommendations-for-property-names" name="recommendations-for-property-names">Recommendations for property names</a></h2> <p>The following system property names are reserved:</p> <ul> <li>Names starting with <code>org.osgi.</code> are reserved for OSGi defined Framework properties</li> @@ -225,7 +225,7 @@ <li>Use fully qualified property names for initial configuration through Framework properties</li> <li>Use unqualified property names for configuration through the Configuration Admin Service</li> </ul> -<h2>Well Known Properties</h2> +<h2><a href="#well-known-properties" name="well-known-properties">Well Known Properties</a></h2> <p>The following table is a collection of well known property names from different parts of Project Sling.</p> <table> <thead> @@ -257,7 +257,7 @@ </tr> </tbody> </table> -<h2>Configuration Admin Service</h2> +<h2><a href="#configuration-admin-service" name="configuration-admin-service">Configuration Admin Service</a></h2> <p>Configuration of the system entities, such as services and components, by the system administrator is supported the Configuration Admin Service. The Configuration Admin Service acts as the center for the management of the configuration data, to which GUI-based tools will connect to retrieve and update configuration data. The Configuration Admin Service is responsible for persisting the configuration data and for providing configuration consumers with the configuration data. Specifically services registered with the <code>ManagedService</code> or <code>ManagedServiceFactory</code> interfaces are updated with the configuration upon updated. The Service Component Runtime on the other hand recognizes updated configuration and provides it to the managed components as defined in the OSGi Declarative Services Specification.</p> <p>By default the Configuration Admin Service is installed when Sling is started for the first time. This service is used by the Service Component Runtime launching the OSGi components declared in the bundles with configuration values. The Sling Management Console provides a simple GUI to manage these configuration elements on the 'Configuration' page.</p> <p>For more information on the Configuration Admin Service refer to the OSGi Configuration Admin Service Specification in the OSGi Service Platform Service Compendium book.</p></section></div></div> http://git-wip-us.apache.org/repos/asf/sling-site/blob/f542b22e/documentation/development.html ---------------------------------------------------------------------- diff --git a/documentation/development.html b/documentation/development.html index db41f42..2dd451f 100644 --- a/documentation/development.html +++ b/documentation/development.html @@ -73,7 +73,7 @@ <div class="breadcrumbs"><a href="/ng/">Home</a> » <a href="/ng/documentation.html">Documentation</a> » </div> <h1> Development </h1><div class="row"><div class="small-12 columns"><section class="wrap"><p>Welcome to the wonderful world of extending Sling. Refer to these pages to find out how we envision the extension of Sling and how to do it.</p> -<h2>Using Sling as your Development Framework</h2> +<h2><a href="#using-sling-as-your-development-framework" name="using-sling-as-your-development-framework">Using Sling as your Development Framework</a></h2> <p>Look here for more information on developper support when your are using Sling to build your own applications.</p> <ul> <li><a href="/documentation/development/getting-and-building-sling.html">Getting and Building Sling</a></li> @@ -86,7 +86,7 @@ <li><a href="/documentation/development/ide-tooling.html">Sling IDE Tooling</a></li> <li><a href="/documentation/development/jsr-305.html">Leveraging JSR-305 null annotations</a></li> </ul> -<h2>Testing Sling-based Applications</h2> +<h2><a href="#testing-sling-based-applications" name="testing-sling-based-applications">Testing Sling-based Applications</a></h2> <ul> <li><a href="/documentation/tutorials-how-tos/testing-sling-based-applications.html">Testing Sling-based Applications</a></li> <li><a href="/documentation/bundles/org-apache-sling-junit-bundles.html">Junit Server-Side Tests Support</a></li> @@ -96,7 +96,7 @@ <li><a href="/documentation/development/jcr-mock.html">JCR Mocks</a></li> <li><a href="/documentation/development/hamcrest.html">Hamcrest integration</a></li> </ul> -<h2>Maven Stuff</h2> +<h2><a href="#maven-stuff" name="maven-stuff">Maven Stuff</a></h2> <p>Sling is using Apache Maven 3 as its build system. Over time we have created a number of Maven 3 plugins and gathered a whole range of knowledge about using Maven.</p> <ul> <li><a href="http://sling.apache.org/components/maven-sling-plugin/">Maven Sling Plugin</a></li> @@ -107,7 +107,7 @@ <li><a href="/documentation/development/maven-archetypes.html">Maven Archetypes</a></li> <li><a href="/documentation/development/maventipsandtricks.html">Maven Tips & Tricks</a></li> </ul> -<h2>Sling Development</h2> +<h2><a href="#sling-development" name="sling-development">Sling Development</a></h2> <p>Last but not least, here is some more information on how we ourselves are working on Sling</p> <ul> <li><a href="/documentation/development/dependency-management.html">Dependency Management</a></li> http://git-wip-us.apache.org/repos/asf/sling-site/blob/f542b22e/documentation/development/client-request-logging.html ---------------------------------------------------------------------- diff --git a/documentation/development/client-request-logging.html b/documentation/development/client-request-logging.html index 039a712..ffca3c6 100644 --- a/documentation/development/client-request-logging.html +++ b/documentation/development/client-request-logging.html @@ -73,7 +73,7 @@ <div class="breadcrumbs"><a href="/ng/">Home</a> » <a href="/ng/documentation.html">Documentation</a> » <a href="/ng/documentation/development.html">Development</a> » </div> <h1> Client Request Logging </h1><div class="row"><div class="small-12 columns"><section class="wrap"><p>Sling provides extensive support to log various information at the before and after processing client requests. Out of the box, there are two loggers configured to write traditional <code>access.log</code> and <code>request.log</code> files. In addition more logging can be configured by providing OSGi Configuration Admin configuration.</p> -<h2>Traditional access.log and request.log Files</h2> +<h2><a href="#traditional-access-log-and-request-log-files" name="traditional-access-log-and-request-log-files">Traditional access.log and request.log Files</a></h2> <p>In the Web Console configure the <em>Apache Sling Request Logger</em> (PID=<code>org.apache.sling.engine.impl.log.RequestLogger</code>) configuration.</p> <p>In the Sling Web Console locate the Configuration page (<code>/system/console/configMgr</code>) and click on the pencil (edit) symbol on the <em>Apache Sling Request Logger</em> line. This opens a dialog to enter the configuration whose properties can be configured as follows:</p> <table> @@ -124,7 +124,7 @@ </tr> </tbody> </table> -<h4>Log Output</h4> +<h4><a href="#log-output" name="log-output">Log Output</a></h4> <p>Output of client request logging is defined by the Logger Type and and Logger Name where the use of the Logger Name property value depends on the Logger Type:</p> <table> <thead> @@ -153,7 +153,7 @@ </tbody> </table> <p><strong>Note:</strong> If logging to a file, this file is not rotated and/or limited by size. To get log file rotation use the <em>Logger Name</em> logging type. See <a href="#rotating-logger-files">Rotating Logger Files</a> below for information on how logging information can be written to rotated and/or size limited files.</p> -<h3>Additional per-request Loggers</h3> +<h3><a href="#additional-per-request-loggers" name="additional-per-request-loggers">Additional per-request Loggers</a></h3> <p>In the Web Console create <em>Apache Sling Customizable Request Data Logger</em> (Factory PID=<code>org.apache.sling.engine.impl.log.RequestLoggerService</code>) configuration.</p> <p>In the Sling Web Console locate the Configuration page (<code>/system/console/configMgr</code>) and click on the <code>+</code> (plus) symbol on the <em>Apache Sling Customizable Request Data Logger</em> line. This opens a dialog to enter the configuration whose properties can be configured as follows:</p> <table> @@ -192,7 +192,7 @@ </tr> </tbody> </table> -<h4>Log Format Specification</h4> +<h4><a href="#log-format-specification" name="log-format-specification">Log Format Specification</a></h4> <p>The log format specification generally follows the <a href="http://httpd.apache.org/docs/current/mod/mod_log_config.html">definition of the <code>format</code> argument for the <code>LogFormat</code> and <code>CustomLog</code> directives of Apache httpd</a>. Please see the below table for details and exceptions.</p> <p>The characteristics of the request itself are logged by placing "%" directives in the format string, which are replaced in the log file by the values as follows:</p> <table> @@ -350,7 +350,7 @@ <p>The Apache httpd modifiers "<" and ">" are not supported by Sling and currently ignored.</p> <p><strong>Some Notes</strong></p> <p>For security reasons non-printable and other special characters in %C, %i and %o are escaped using \uhhhh sequences, where hhhh stands for the hexadecimal representation of the character's unicode value. Exceptions from this rule are " and \, which are escaped by prepending a backslash, and all whitespace characters, which are written in their Java-style notation (\n, \t, etc).</p> -<h4>Rotating Logger Files</h4> +<h4><a href="#rotating-logger-files" name="rotating-logger-files">Rotating Logger Files</a></h4> <p>If you want to write the request (and access) logging information into a rotated file, you should configure as follows:</p> <ol> <li>Configure the Log Type to be a <em>Logger Name</em> and some usefull Logger name. For example <code>clientlog.request</code>.</li> http://git-wip-us.apache.org/repos/asf/sling-site/blob/f542b22e/documentation/development/dependency-management.html ---------------------------------------------------------------------- diff --git a/documentation/development/dependency-management.html b/documentation/development/dependency-management.html index 095c246..75d44b1 100644 --- a/documentation/development/dependency-management.html +++ b/documentation/development/dependency-management.html @@ -75,7 +75,7 @@ </h1><div class="row"><div class="small-12 columns"><section class="wrap"><p>This page is about how we do and don't do dependency management in the Sling project.</p> <p><!-- TODO reactivate TOC once JBake moves to flexmark-java --> </p> -<h2>Introduction</h2> +<h2><a href="#introduction" name="introduction">Introduction</a></h2> <p>Maven provides projects with a nice feature called dependency management. In Sling we currently use this feature to declare the non-Sling dependencies of modules in the parent POM.</p> <p>After working with this some time and trying to upgrade various dependencies we came to the conclusion, that using Maven dependency management is not going to work out in the Sling scenario.</p> <p>Why ? Maven's dependency management is aimed at traditional applicaitons, which are glued together statically during the build process. For this environment, dependency management is a great thing, since it guarantees a consistent application setup.</p> @@ -84,7 +84,7 @@ <p>When using Maven dependency management, upgrading any dependencies in the parent POM may automatically increase the version numbers in the <code>Import-Package</code> headers and hence may cause any such bundle to fail resolution if deployed - even though the bundle did not change and does not really require a new version of the dependency.</p> <p>So, in the case of OSGi deployment, Maven's dependency management actually interferes with the OSGi framework dependency management.</p> <p>As a consequence, I suggest we drop dependency management in the parent POM (almost) completely and state the following.</p> -<h2>Dependency Management</h2> +<h2><a href="#dependency-management" name="dependency-management">Dependency Management</a></h2> <p>The parent POM only does dependency management for build time dependencies and a very limited number of API dependencies used Sling wide. These dependencies are:</p> <ul> <li>All plugin dependencies. That is <code>pluginManagement</code> is still used. Maven plugins are actually build time dependencies and therefore have no influence on the actual deployment.</li> @@ -167,7 +167,7 @@ <p>All dependencies per module are fully described in terms of version, scope, and classifier by the respective project.</p> <p>The version of the module dependency should be selected according to the following rule: The lowest version providing the functionality required by the module (or bundle). By required functionality we bascially mean provided API.</p> <p>Generally there is a constant flow of releases of dependent libraries. In general this should not cause the dependency version number of a using module to be increased. There is one exception though: If the fixed library version contains a bug fix, which has an influence on the operation of the module, an increase in the version number is indicated and should also be applied.</p> -<h2>References</h2> +<h2><a href="#references" name="references">References</a></h2> <ul> <li><a href="http://markmail.org/message/5qpmsukdk4mdacdy">Dependency Management</a> -- Discussion thread about reducing Maven Dependency Management</li> <li><a href="https://issues.apache.org/jira/browse/SLING-811">SLING-811</a> -- The actual issue governing the changes to the project descriptors</li> http://git-wip-us.apache.org/repos/asf/sling-site/blob/f542b22e/documentation/development/embedding-sling.html ---------------------------------------------------------------------- diff --git a/documentation/development/embedding-sling.html b/documentation/development/embedding-sling.html index dfdb1b6..708619f 100644 --- a/documentation/development/embedding-sling.html +++ b/documentation/development/embedding-sling.html @@ -87,7 +87,7 @@ <li>Allows propagation of core setup functionality depending on the environment</li> </ul> <p>This page is about the internal details of the Sling Launchpad Base module. To get an outside overview of the Sling Launchpad you might want to refer to <a href="/documentation/the-sling-engine/the-sling-launchpad.html">The Sling Launchpad</a> page.</p> -<h1>Structure</h1> +<h1><a href="#structure" name="structure">Structure</a></h1> <p>The Launcher is based on three parts:</p> <ol> <li>The external part which is for example the standalone Java application's main class or the servlet deployed into the servlet container</li> @@ -99,7 +99,7 @@ <li>The <code>Launcher</code> interface is implemented by a class in the internal part which is loaded through the bridge class loader. This interface allows setting, starting and stopping of the framework.</li> <li>The <code>Notifiable</code> interface is implemented by a class in the external part which instance is handed to the <code>Launcher</code> instance. This interface allows the internal part to communicate back to the external part, most notably to indicate that the framework has been stopped from within or that the framework has been updated and must be restarted.</li> </ul> -<h1>The Bridging Part</h1> +<h1><a href="#the-bridging-part" name="the-bridging-part">The Bridging Part</a></h1> <p>The bridging part is provided in the <code>org.apache.sling.launchpad.base.shared</code> package:</p> <table> <thead> @@ -131,7 +131,7 @@ </tr> </tbody> </table> -<h1>The Internal Part</h1> +<h1><a href="#the-internal-part" name="the-internal-part">The Internal Part</a></h1> <p>The main class from the internal class directly used is <a href="http://svn.apache.org/repos/asf/sling/trunk/launchpad/base/src/main/java/org/apache/sling/launchpad/base/impl/Sling.java"><code>Sling</code></a> which instantiated to start the OSGi Framework. This class is responsible for setting up the environment to finally start the OSGi Framework:</p> <ul> <li>Read the <code>sling.properties</code> file</li> @@ -139,9 +139,9 @@ <li>Execute the bootstrap installations, updates and uninstallations</li> </ul> <p>The <a href="http://svn.apache.org/repos/asf/sling/trunk/launchpad/base/src/main/java/org/apache/sling/launchpad/base/impl/SlingFelix.java"><code>SlingFelix</code></a> class extends the Apache Felix <code>Felix</code> class which is the actual OSGi framework implementation. We extend the class to be able to notify the <code>Notifiable</code> implementation and update the OSGi framework from within the OSGi framework by updating the system bundle.</p> -<h2>The External Part</h2> +<h2><a href="#the-external-part" name="the-external-part">The External Part</a></h2> <p>The external part is comprised of a main class started from the environment -- main class of the Java applicaction or the servlet deployed in the servlet container -- and a corresponding delegate class located inside of the launchpad base library. This delegate class is instantiated by the <code>Loader</code> loading from the <code>LauncherClassLoader</code>.</p> -<h3>Standalone Java Application</h3> +<h3><a href="#standalone-java-application" name="standalone-java-application">Standalone Java Application</a></h3> <p>The standalone Java Application makes use of three classes:</p> <table> <thead> @@ -166,7 +166,7 @@ </tbody> </table> <p>At the moment these classes are not directly suitable to be embedded in an existing application (or custom application launcher framework) unless that embedding prepares command line arguments in a <code>String[]</code> and calls the <code>Main.main</code> method. To allow for custom embeddings or extensions, the work distributions between the three classes should be refactored.</p> -<h3>Embedding the Standalone Java Application</h3> +<h3><a href="#embedding-the-standalone-java-application" name="embedding-the-standalone-java-application">Embedding the Standalone Java Application</a></h3> <div class="info"> This work is being done as part of [SLING-2225](https://issues.apache.org/jira/browse/SLING-2225) and will be officially available with the Sling Launchpad Base release 2.4.0. If you want to use the embedding before the release, you have to checkout the source from [SVN|http://svn.apache.org/repos/asf/sling/trunk/launchpad/base] and build yourself. </div> @@ -197,7 +197,7 @@ This work is being done as part of [SLING-2225](https://issues.apache.org/jira/b </tr> </tbody> </table> -<h4>External Control of the Sling Application</h4> +<h4><a href="#external-control-of-the-sling-application" name="external-control-of-the-sling-application">External Control of the Sling Application</a></h4> <p>By using control actions, the Sling Launcher may open or connect to a control port to communicate. The <code>doControlAction()</code> method together with the <code>sling.control.action</code> and <code>sling.control.socket</code> properties is able to setup this communication.</p> <p>The <code>sling.control.socket</code> is either a normal port number, in which case the connection is opened on the <code>localhost</code> interface (usually 127.0.0.1). Otheriwse, it may also be a value of the form <em>host:port</em> where <em>host</em> is the name or IP address of the interface to connect to and port is the port number. For security reasons it is suggested to not use an interface which is available remotely. So the default of <code>localhost</code> is usually the best choice.</p> <p>The <code>sling.control.action</code> takes either of three values:</p> @@ -223,7 +223,7 @@ This work is being done as part of [SLING-2225](https://issues.apache.org/jira/b </tr> </tbody> </table> -<h4>Conversion of Commandline Arguments to Properties</h4> +<h4><a href="#conversion-of-commandline-arguments-to-properties" name="conversion-of-commandline-arguments-to-properties">Conversion of Commandline Arguments to Properties</a></h4> <p>When calling the Main class through the JVM startup the <code>Main.main(String[] args)</code> methods is called which reads the command line arguments and converts them into a <code>Map<String, String></code> suitable for the constructore as follows:</p> <table> <thead> @@ -275,7 +275,7 @@ This work is being done as part of [SLING-2225](https://issues.apache.org/jira/b </tr> </tbody> </table> -<h3>Web Application</h3> +<h3><a href="#web-application" name="web-application">Web Application</a></h3> <p>The web application makes use of 5 classes:</p> <table> <thead> http://git-wip-us.apache.org/repos/asf/sling-site/blob/f542b22e/documentation/development/getting-and-building-sling.html ---------------------------------------------------------------------- diff --git a/documentation/development/getting-and-building-sling.html b/documentation/development/getting-and-building-sling.html index 2b02349..2da9c8d 100644 --- a/documentation/development/getting-and-building-sling.html +++ b/documentation/development/getting-and-building-sling.html @@ -75,7 +75,7 @@ </h1><div class="row"><div class="small-12 columns"><section class="wrap"><p>A quick guide for getting the Sling source, then building and running the resulting Sling instance; either without or with Eclipse.</p> <p>Note that you don't <em>have</em> to build Sling yourself, if you don't need the bleeding-edge stuff you can get prebuilt binaries from the <a href="/downloads.cgi">Downloads</a> page. But those, especially the launchpad runnable jar, are not released often and can be outdated. In case of doubt, build it yourself as shown below or ask on the Sling users mailing list.</p> <p>Rather than performing a full build of Sling, which can take 5-10 minutes on a recent computer once your local Maven repository is up to date, it's recommended to build only the launchpad and the modules you're interested in.</p> -<h2>tl:dr - Short form build + run instructions</h2> +<h2><a href="#tl-dr-short-form-build-run-instructions" name="tl-dr-short-form-build-run-instructions">tl:dr - Short form build + run instructions</a></h2> <p>If you already have the required svn (or Git, see below) client, JDK and Maven installed, here's the short form recipe:</p> <pre><code>$ svn co http://svn.apache.org/repos/asf/sling/trunk sling $ cd sling # you are now in the Sling SVN checkout @@ -85,7 +85,7 @@ $ export DBG="-Xmx384M -agentlib:jdwp..." # (see below) $ java $DBG -jar target/org.apache.sling.launchpad... # (see below) </code></pre> <p>With this, Sling should be running at http://localhost:8080 with remote debugging active as per the $DBG variable.</p> -<h2>Prerequisites</h2> +<h2><a href="#prerequisites" name="prerequisites">Prerequisites</a></h2> <p>Before you begin, you need to have the following tools installed on your system:</p> <ul> <li>Java 7 or higher</li> @@ -97,9 +97,9 @@ $ java $DBG -jar target/org.apache.sling.launchpad... # (see below) <li>M2Eclipse plugin for Eclipse (sonatype) -> <a href="http://m2eclipse.sonatype.org/installing-m2eclipse.html">instructions</a></li> <li><a href="http://www.polarion.com/products/svn/subversive.php">Subversive plugin</a> or <a href="http://subclipse.tigris.org">Subclipse-plugin</a> for Eclipse</li> </ul> -<h2>Environment Setup</h2> +<h2><a href="#environment-setup" name="environment-setup">Environment Setup</a></h2> <p>The full build process requires quite a lot of resources, so you may run into limits. The following hints should show you what to setup before building Sling.</p> -<h3>Environment Variable Space</h3> +<h3><a href="#environment-variable-space" name="environment-variable-space">Environment Variable Space</a></h3> <ul> <li><em>Problem</em> - Build aborts when trying to launch the integration tests with the message <p>[INFO] Error while executing forked tests.; nested exception is org.apache.maven.surefire.booter.shade.org.codehaus.plexus.util.cli.CommandLineException: Error setting up environmental variables</p> @@ -111,10 +111,10 @@ $ java $DBG -jar target/org.apache.sling.launchpad... # (see below) <li><em>Platform</em> - OpenSolaris</li> <li><em>Fix</em> - If this issue persists you will need to check your system requirements and configuration with regard to swap, before taking action - if necessary.</li> </ul> -<h2>Configuring Maven</h2> +<h2><a href="#configuring-maven" name="configuring-maven">Configuring Maven</a></h2> <p>See <a href="/documentation/development/maventipsandtricks.html">MavenTipsAndTricks</a>.</p> -<h2>Getting the Sling Source</h2> -<h3>From the Apache Sling Subversion repository</h3> +<h2><a href="#getting-the-sling-source" name="getting-the-sling-source">Getting the Sling Source</a></h2> +<h3><a href="#from-the-apache-sling-subversion-repository" name="from-the-apache-sling-subversion-repository">From the Apache Sling Subversion repository</a></h3> <ol> <li> <p>Install an svn client if needed.</p></li> @@ -123,7 +123,7 @@ $ java $DBG -jar target/org.apache.sling.launchpad... # (see below) <p>$ svn checkout http://svn.apache.org/repos/asf/sling/trunk sling</p> </li> </ol> -<h3>From the Sling GitHub mirror</h3> +<h3><a href="#from-the-sling-github-mirror" name="from-the-sling-github-mirror">From the Sling GitHub mirror</a></h3> <ol> <li> <p>Install a Git client if needed</p></li> @@ -132,11 +132,11 @@ $ java $DBG -jar target/org.apache.sling.launchpad... # (see below) <p>$ git clone https://github.com/apache/sling.git</p> </li> </ol> -<h3>With Eclipse Subversive or Subclipse</h3> +<h3><a href="#with-eclipse-subversive-or-subclipse" name="with-eclipse-subversive-or-subclipse">With Eclipse Subversive or Subclipse</a></h3> <p>First note how simple the above SVN instructions are...but if you <em>really</em> want to do this, read on.</p> <p>If you use the Subversive plugin make sure you have installed the "Subversive Integration for M2Eclipse Project" which can be found under the following Eclipse update site: <a href="http://community.polarion.com/projects/subversive/download/integrations/update-site/">http://community.polarion.com/projects/subversive/download/integrations/update-site/</a>.</p> <p>Also, make sure that you have installed either the "Maven SCM handler for Subclipse" or the "Maven SCM handler for Subversive".</p> -<h4>Create a new workspace</h4> +<h4><a href="#create-a-new-workspace" name="create-a-new-workspace">Create a new workspace</a></h4> <p>It's best to create a new workspace for the sling project:</p> <ol> <li>List item</li> @@ -148,7 +148,7 @@ $ java $DBG -jar target/org.apache.sling.launchpad... # (see below) <li>Expand the "Deprecated and restricted API" and change "Forbidden references (access rules)" from "Error" to "Warning"</li> <li>Click OK</li> </ol> -<h4>Checkout the Sling source</h4> +<h4><a href="#checkout-the-sling-source" name="checkout-the-sling-source">Checkout the Sling source</a></h4> <ol> <li>Menu: File->Import</li> <li>In the Import wizard select Maven->"Check out Maven Projects from SCM"</li> @@ -163,9 +163,9 @@ $ java $DBG -jar target/org.apache.sling.launchpad... # (see below) <li>A couple of changes will be displayed</li> <li>Click OK</li> </ol> -<h2>Building Sling</h2> +<h2><a href="#building-sling" name="building-sling">Building Sling</a></h2> <p>Note that while it's possible to build the full Sling reactor, using the pom.xml file in the root of the SVN checkout, this should rarely be needed and it's almost always too slow to consider. Instead, it's recommended to build the Sling launchpad and the module you're working on at the moment.</p> -<h3>With the Maven command line tool</h3> +<h3><a href="#with-the-maven-command-line-tool" name="with-the-maven-command-line-tool">With the Maven command line tool</a></h3> <ol> <li>Enter the directory, then do a build and local install of the launchpad (below are unix/linux commands, slightly different under windows) <pre><code>$ cd sling @@ -199,7 +199,7 @@ $ mvn clean install sling:install <li>the bundle is installed in the local repository so future builds of the launchpad module will pick it up ( <code>install</code> goal )</li> <li>the bundle is deployed in the running launchpad instance ( <code>sling:install</code> goal )</li> </ul> -<h3>With M2Eclipse</h3> +<h3><a href="#with-m2eclipse" name="with-m2eclipse">With M2Eclipse</a></h3> <ol> <li>Make sure you're in the Java perspective (Menu: Window->Open Perspective)</li> <li>Menu: Run->Run Configurations...</li> @@ -212,7 +212,7 @@ $ mvn clean install sling:install <li>Click Apply</li> <li>Click Run</li> </ol> -<h3>Alternative setup in Eclipse without M2Eclipse plugin</h3> +<h3><a href="#alternative-setup-in-eclipse-without-m2eclipse-plugin" name="alternative-setup-in-eclipse-without-m2eclipse-plugin">Alternative setup in Eclipse without M2Eclipse plugin</a></h3> <p>In the case that you do not want to use the M2Eclipse plugin there's another setup that lets you have the automatic build turned on:</p> <ol> <li>Checkout the whole sling trunk (with subversive or the subclipse plugin) from SVN to a single project</li> @@ -222,8 +222,8 @@ $ mvn clean install sling:install </ol> <p>If you use "mvn clean install" to build Sling be sure you have set MAVEN_OPTS to "-Xmx384m -XX:PermSize=256m" otherwise you will probably get OutOfmemory errors.</p> <p>Congratulations ! You should now have a running Sling instance, that you can start playing around with.</p> -<h2>Further Tips and Tricks</h2> -<h3>Debug Sling in Eclipse</h3> +<h2><a href="#further-tips-and-tricks" name="further-tips-and-tricks">Further Tips and Tricks</a></h2> +<h3><a href="#debug-sling-in-eclipse" name="debug-sling-in-eclipse">Debug Sling in Eclipse</a></h3> <p>You can use remote debugging to debug Sling in Eclipse, here's a little How-To</p> <ol> <li> @@ -244,12 +244,12 @@ $ mvn clean install sling:install <li>Click "Debug"</li> </ol> <p>Now you should be able to set breakpoints, evaluate properties, and so on as usual.</p> -<h3>Debug Maven Tests in Eclipse</h3> +<h3><a href="#debug-maven-tests-in-eclipse" name="debug-maven-tests-in-eclipse">Debug Maven Tests in Eclipse</a></h3> <p>In the same way as you can debug the sling app, you are also able to debug a maven test. Just run the maven tests like this</p> <pre><code>mvn -Dmaven.surefire.debug test </code></pre> <p>The tests will automatically pause and await a remote debugger on port 5005. You can then attach to the running tests using Eclipse. You can setup a "Remote Java Application" launch configuration via the menu command "Run" > "Open Debug Dialog..." (see above). For more information on this see the <a href="http://maven.apache.org/plugins/maven-surefire-plugin/examples/debugging.html">Maven Surefire Docu</a>.</p> -<h3>Simple way to develop new bundle in Eclipse for Sling</h3> +<h3><a href="#simple-way-to-develop-new-bundle-in-eclipse-for-sling" name="simple-way-to-develop-new-bundle-in-eclipse-for-sling">Simple way to develop new bundle in Eclipse for Sling</a></h3> <p>The easiest way that I found is to create a new folder in the existing Eclipse workspace. After that you can follow these steps:</p> <ul> <li>Start by copying and adapting an existing Sling pom.xml (eg. the pom.xml from the espblog sample)</li> http://git-wip-us.apache.org/repos/asf/sling-site/blob/f542b22e/documentation/development/hamcrest.html ---------------------------------------------------------------------- diff --git a/documentation/development/hamcrest.html b/documentation/development/hamcrest.html index 7688a98..f2ac18b 100644 --- a/documentation/development/hamcrest.html +++ b/documentation/development/hamcrest.html @@ -73,22 +73,20 @@ <div class="breadcrumbs"><a href="/ng/">Home</a> » <a href="/ng/documentation.html">Documentation</a> » <a href="/ng/documentation/development.html">Development</a> » </div> <h1> Hamcrest Integration </h1><div class="row"><div class="small-12 columns"><section class="wrap"><p>Deeper integration with the <a href="http://hamcrest.org/">Hamcrest matcher library</a>.</p> -<h2>Maven Dependency</h2> +<h2><a href="#maven-dependency" name="maven-dependency">Maven Dependency</a></h2> <div class="warning"> This module has not yet been officially released. </div> -<pre><code>#!xml -<dependency> +<pre><code><!-- TODO syntax marker (#!xml) disabled --><dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.testing.hamcrest</artifactId> </dependency> </code></pre> <p>Note that to keep the classpath consistent this module has all its dependencies marked as <code>provided</code>. It relies on your own project to define the needed dependencies, such as <code>org.hamcrest:hamcrest-core</code> and <code>org.apache.sling:org.apache.sling.api</code> .</p> <p>See latest version on the <a href="/downloads.cgi">downloads page</a>.</p> -<h2>Usage</h2> +<h2><a href="#usage" name="usage">Usage</a></h2> <p>The class <code>org.apache.sling.testing.hamcrest.ResourceMatchers</code> is the main entry point. It contains static methods that can be used to create assertions.</p> -<pre><code>#!java -import static org.apache.sling.hamcrest.ResourceMatchers.resourceOfType; +<pre><code><!-- TODO syntax marker (#!java) disabled -->import static org.apache.sling.hamcrest.ResourceMatchers.resourceOfType; public void MyServiceTest { http://git-wip-us.apache.org/repos/asf/sling-site/blob/f542b22e/documentation/development/ide-tooling.html ---------------------------------------------------------------------- diff --git a/documentation/development/ide-tooling.html b/documentation/development/ide-tooling.html index 8ef62c2..a081fa5 100644 --- a/documentation/development/ide-tooling.html +++ b/documentation/development/ide-tooling.html @@ -74,28 +74,28 @@ Sling IDE tooling for Eclipse User Guide </h1><div class="row"><div class="small-12 columns"><section class="wrap"><p><!-- TODO reactivate TOC once JBake moves to flexmark-java --> </p> -<h2>Installation</h2> -<h3>Prerequisites</h3> +<h2><a href="#installation" name="installation">Installation</a></h2> +<h3><a href="#prerequisites" name="prerequisites">Prerequisites</a></h3> <p>The Sling IDE tooling is known to work on Eclipse versions starting with Kepler. There is a hard dependency on the faceted project framework, which is included in the 'Eclipse IDE for Java EE Developers' package. If you're running a different package, you can always install it from the main Eclipse update site.</p> <p>There is an optional feature which relies on m2eclipse. For now it only provides project creation wizards, so if you don't use Maven you don't have to install it.</p> -<h3>Update site installation</h3> +<h3><a href="#update-site-installation" name="update-site-installation">Update site installation</a></h3> <p>The links to the latest update site, including a permanent URL which stays up to date, are listed on the <a href="/downloads.cgi#ide-tooling">Download page, IDE tooling section</a>. There are also zipped update sites available from download for the latest version.</p> -<h3>Building from source</h3> +<h3><a href="#building-from-source" name="building-from-source">Building from source</a></h3> <p>The update sites are provided as a convenience for users that do not wish to build the project themselves. Building the project only requires a recent Maven installation. The project can be checked out, either <a href="https://svn.apache.org/repos/asf/sling/trunk/tooling/ide/">from trunk for the latest development version</a> or <a href="https://svn.apache.org/repos/asf/sling/tags/">from a tag for released versions</a>, where the tags names have the format sling-ide-tooling-$VERSION. Once you have obtained the source code, it is enough to run</p> <pre><code>mvn package </code></pre> <p>and you will find a p2 update site in p2update/target/repository .</p> -<h2>Overall concepts</h2> +<h2><a href="#overall-concepts" name="overall-concepts">Overall concepts</a></h2> <p>The Sling IDE tooling is centered around the Server and Module concepts. A Server is an instance of a Sling launchpad - or derivatives such as Adobe CQ - on which you deploy your content. A Module is a collection of resources grouped into a single Eclipse project which can be deployed onto one or multiple Servers.</p> <p>The tooling supports content and bundle modules. Content modules typically hold Sling scripts - like JSP and ESP files, client-side resources like CSS and JSS file, but also arbitrary repository content. Content modules support support setting JCR properties for nodes other than nodes and files, based on the FileVault serialization format. You can read mode about FileVault at the <a href="https://jackrabbit.apache.org/filevault/">Apache Jackkrabit FileVault docs</a>. Bundle modules represent a single OSGi bundle.</p> -<h3>Server definition</h3> +<h3><a href="#server-definition" name="server-definition">Server definition</a></h3> <p>To create a new Sling launchpad server you will need to start a Sling launchpad outside of Eclipse. We do not yet support starting Sling Launchpad instances from Eclipse.</p> <p>To kick off, create a new Sling Server using the File -> New -> Other... menu entry.</p> <p><img src="ide-tooling/new-server.png" alt="New Server" /></p> <p>In the resulting wizard, select the Sling Server (External) entry and enter the host name.</p> <p><img src="ide-tooling/new-server-2.png" alt="New Server Step 2" /></p> <p>Once that is done, press finish.</p> -<h2>Server configuration</h2> +<h2><a href="#server-configuration" name="server-configuration">Server configuration</a></h2> <p>The server will appear in the servers view. You can double-click on it to review the settings which were automatically provided.</p> <p><img src="ide-tooling/servers-view.png" alt="Servers View" /></p> <p>There are a couple of important settings in the server definition page:</p> @@ -111,14 +111,14 @@ </ul> <p><img src="ide-tooling/server-definition.png" alt="Servers Definition" /></p> <p>You can now connect to the server.</p> -<h2>Content sync</h2> +<h2><a href="#content-sync" name="content-sync">Content sync</a></h2> <p>Content projects are required to have at least</p> <ul> <li>a jcr_root directory, which contains the serialized content of the repository</li> <li>a META-INF/vault/filter.xml file, which contains the workspace filter definition</li> </ul> <p>All changes performed in the local workspace are synchronized to the repository, given that they are included in the workspace filter definition.</p> -<h3>Creating a new content project</h3> +<h3><a href="#creating-a-new-content-project" name="creating-a-new-content-project">Creating a new content project</a></h3> <p>Creating a new Sling content project is easily done by using the new Sling Content Project Wizard. To kick off, start by selected File -> New -> Project and select Sling Content Project under the Sling category.</p> <p><img src="ide-tooling/new-content-project-step-1.png" alt="New content project step 1" /></p> <p>You will then be asked to name the project and select its location.</p> @@ -127,8 +127,8 @@ <p><img src="ide-tooling/new-content-project-step-3.png" alt="New content project step 3" /></p> <p>Once you press finish, the project will be created and deployed to the server if needed.</p> <p>Note that deploying a project on the server publishes all the resources from the project if the server is started. If the server is stopped, you need to manually publish the changes after startup.</p> -<h3>Converting existing projects</h3> -<h4>Automatic conversion</h4> +<h3><a href="#converting-existing-projects" name="converting-existing-projects">Converting existing projects</a></h3> +<h4><a href="#automatic-conversion" name="automatic-conversion">Automatic conversion</a></h4> <p>Maven projects configured using the <code>com.day.jcr.vault:content-package-maven-plugin</code> are now automatically configured as content projects, removing the need to manually add the needed facets after importing them into Eclipse for the first time.</p> <p>The following pom properties can be used to tweak how the project is configured</p> <table> @@ -153,28 +153,28 @@ </tr> </tbody> </table> -<h4>Manual conversion</h4> +<h4><a href="#manual-conversion" name="manual-conversion">Manual conversion</a></h4> <p>To mark a project as being a Sling content module, click it in the Project Explorer and Select Configure -> Convert to Sling Content Project... . A dialog will pop up and will ask you to confirm the inferred location of the jcr_root directory. You can also change this from the project properties, the Sling page.</p> -<h3>Content navigator</h3> +<h3><a href="#content-navigator" name="content-navigator">Content navigator</a></h3> <p>In the Project Explorer view there is an additional 'jcr_root' contribution to the project. It is denoted by a folder icon with a small web overlay. This contribution provides a logical view over the repository content, taking into account JCR metadata. As such, .content.xml files will be folded into the corresponding node.</p> <p><img src="ide-tooling/content-navigator.png" alt="Content navigator" /></p> <p>Node properties can be edited in a distinct JCR properties view.</p> <p><img src="ide-tooling/jcr-properties.png" alt="JCR properties" /></p> -<h3>filter.xml - workspace filter definition</h3> +<h3><a href="#filter-xml-workspace-filter-definition" name="filter-xml-workspace-filter-definition">filter.xml - workspace filter definition</a></h3> <p>A content project does not synchronize all its contents to the workspace. Instead, it looks for a filter.xml file which defines which content is included in synchronization operations. More information about the filter.xml file format and semantics can be found at <a href="https://jackrabbit.apache.org/filevault/filter.html">FileVault docs - Workspace Filter</a>.</p> -<h3>Deploying projects on the server</h3> +<h3><a href="#deploying-projects-on-the-server" name="deploying-projects-on-the-server">Deploying projects on the server</a></h3> <p>To deploy a project on the server, open the Servers view and use the Add and Remove... dialog to add one or more modules.</p> <p><img src="ide-tooling/add-remove-projects.png" alt="Add and Remove projects from server" /></p> <p>After content projects are deployed, each change will cause the changed resources to be updated in the repository.</p> -<h3>Manual content sync</h3> +<h3><a href="#manual-content-sync" name="manual-content-sync">Manual content sync</a></h3> <p>It is possible to manually import/export content from/to the repository. The precondition is that the content project must be associated with a started Sling launchpad server. The actions are available on the project root, or on any child resource under the jcr_root folder.</p> <p>The export wizard is available under the Sling -> Export Content ... action.</p> <p><img src="ide-tooling/repository-export.png" alt="Repository export" /></p> <p>The import wizard is available under the Sling -> Import Content ... action.</p> <p><img src="ide-tooling/repository-import.png" alt="Repository import" /></p> -<h2>Bundle sync</h2> +<h2><a href="#bundle-sync" name="bundle-sync">Bundle sync</a></h2> <p>The only requirement for bundle projects is that they are Java projects which generate an exploded OSGi bundle in their output directory. That requires at least a valid OSGi Manifest located in META-INF/MANIFEST.MF, but typically one of more Java classes. Other auxiliary files, such as Declarative Service descriptors, must also be placed under the project's output directory.</p> -<h3>Creating a new bundle project</h3> +<h3><a href="#creating-a-new-bundle-project" name="creating-a-new-bundle-project">Creating a new bundle project</a></h3> <p>Creating a new Sling bundle project is easily done by using the new Sling Bundle Project Wizard. This wizard is only available when the Maven-based integration is installed. To kick off, start by selected File -> New -> Project and select Sling Bundle Project under the Sling category.</p> <p><img src="ide-tooling/new-bundle-project-step-1.png" alt="New bundle project step 1" /></p> <p>The next page allows you to select the archetype to use. It's recommended to select the latest version of the archetype.</p> @@ -184,13 +184,13 @@ <p>Finally, you can select whether to add the project to an existing server, create a new one, or leave it undeployed.</p> <p><img src="ide-tooling/new-bundle-project-step-4.png" alt="New bundle project step 4" /></p> <p>Once you press finish, the project will be created and deployed to the server if needed.</p> -<h3>Converting existing projects</h3> +<h3><a href="#converting-existing-projects" name="converting-existing-projects">Converting existing projects</a></h3> <p>To mark a project as being a Sling bundle module, right click it in the Project Explorer and Select Configure -> Convert to Sling Bundle Project... . A dialog will appear with all the candidate Sling bundle project from the workspace so that you can quickly select multiple projects.</p> -<h3>Deploying projects on the server</h3> +<h3><a href="#deploying-projects-on-the-server" name="deploying-projects-on-the-server">Deploying projects on the server</a></h3> <p>To deploy a project on the server, open the Servers view and use the Add and Remove... dialog to add one or more modules.</p> <p><img src="ide-tooling/add-remove-projects.png" alt="Add and Remove projects from server" /></p> <p>After OSGi bundle projects are deployed, each change will cause the bundle to be redeployed on the server.</p> -<h2>HTL support</h2> +<h2><a href="#htl-support" name="htl-support">HTL support</a></h2> <p><em>Available with Sling IDE Tooling for Eclipse 1.1 or newer</em></p> <p>Support for HTL (formerly known as Sightly) has been added through an additional, optional, feature named <em>Sling IDE Tools - Sightly Integration</em>.</p> <p>This feature provides the following enhancements:</p> @@ -201,23 +201,23 @@ </ul> <p><img src="ide-tooling/sightly-editor.png" alt="HTL Editor" /></p> <p>These enhancements are enabled once the HTL facet is added to a project. This is done automatically when converting a project to content project, but can also be done manually via the project properties, under the <em>Project Facets</em> page.</p> -<h2>Debugging</h2> +<h2><a href="#debugging" name="debugging">Debugging</a></h2> <p><em>Available with Sling IDE Tooling for Eclipse 1.1 or newer</em></p> <p>When first connecting to a Sling instance in debug mode, the IDE tooling tries to bind all the sources associated with the bundles deployed on the server and retrieves the associated source artifacts using Maven. Therefore, the debug classpath is as close as possible to sources used to build the bundles deployed on the server.</p> <p><img src="ide-tooling/debug.png" alt="Debugging" /></p> <p>Since a first source bundle resolution can potentially take a long time, this behaviour can be disabled from the server configuration page.</p> -<h2>Launchpad project support</h2> +<h2><a href="#launchpad-project-support" name="launchpad-project-support">Launchpad project support</a></h2> <p><em>Available with Sling IDE Tooling for Eclipse 1.2 or newer</em></p> <p>Maven projects configured with the <code>slingstart-maven-plugin</code> will automatically have their models directory configured as a top-level entry in the project tree. By default, the models directory is <code>src/main/provisioning</code>. This contribution is only available in the <em>Project Explorer</em> view.</p> <p>The configuration is done automatically on import, and you can also do it manually by right-clicking on the project and then selecting <em>Maven</em> â <em>Update Project...</em>.</p> <p><img src="ide-tooling/launchpad-models-directory.png" alt="Launchpad project" /></p> -<h2>Troubleshooting</h2> -<h3>Gathering debug information</h3> +<h2><a href="#troubleshooting" name="troubleshooting">Troubleshooting</a></h2> +<h3><a href="#gathering-debug-information" name="gathering-debug-information">Gathering debug information</a></h3> <p>All operations that are performed on the Sling launchpad are logged in the Sling console. To view these operations, open the Eclipse console view and select Open Console -> Sling Console.</p> <p><img src="ide-tooling/sling-console.png" alt="Sling Console" /></p> <p>Additional information can be obtained by enabling the Eclipse platform tracing facility. To do so, open the Eclipse preferences and navigate to General -> Tracing. Make sure that 'Enable tracing' is checked and all options under 'Sling IDE Tooling' are enabled.</p> <p><img src="ide-tooling/tracing.png" alt="Tracing" /></p> -<h3>Why do I get an error about "No DS descriptor found at..."?</h3> +<h3><a href="#why-do-i-get-an-error-about-no-ds-descriptor-found-at-" name="why-do-i-get-an-error-about-no-ds-descriptor-found-at-">Why do I get an error about "No DS descriptor found at..."?</a></h3> <p><img src="ide-tooling/missing-scr-descriptor.png" alt="Missing SCR descriptors" /></p> <p>Bundle deployment assumes that the OSGi bundle is packaged into the project's output directory. This includes:</p> <ul> @@ -227,9 +227,9 @@ <li>Declarative Services descriptors</li> </ul> <p>One often-occuring situation is that a Maven project using the maven-scr-plugin generates the descriptors outside of target/classes, typically in target/scr-plugin-generated. To fix this, make sure that you're using the maven-scr-plugin 1.15.0 or newer and that you have not set a custom outputDirectory.</p> -<h3>How do I fix the error "Missing m2e incremental build support for generating the bundle manifest, component descriptions and metatype resources"?</h3> +<h3><a href="#how-do-i-fix-the-error-missing-m2e-incremental-build-support-for-generating-the-bundle-manifest-component-descriptions-and-metatype-resources-" name="how-do-i-fix-the-error-missing-m2e-incremental-build-support-for-generating-the-bundle-manifest-component-descriptions-and-metatype-resources-">How do I fix the error "Missing m2e incremental build support for generating the bundle manifest, component descriptions and metatype resources"?</a></h3> <p>For further information on how to fix and configure the according maven plugins look at <a href="/documentation/development/ide-tooling/ide-tooling-incremental-build.html">Incremental Builds in Sling IDE tooling for Eclipse</a>.</p> -<h2>Known issues</h2> +<h2><a href="#known-issues" name="known-issues">Known issues</a></h2> <p>The content sync implementation tries to mimic the FileVault semantics as closely as possible. However, it is possible that some more exotic content structures will not be handled properly. Some of the problems we're are of are:</p> <ul> <li><a href="https://issues.apache.org/jira/browse/SLING-3591">SLING-3591 - Unable to delete all nodes of a full coverage aggregate</a> . The workaround is to manually delete the child nodes .</li> http://git-wip-us.apache.org/repos/asf/sling-site/blob/f542b22e/documentation/development/ide-tooling/ide-tooling-incremental-build.html ---------------------------------------------------------------------- diff --git a/documentation/development/ide-tooling/ide-tooling-incremental-build.html b/documentation/development/ide-tooling/ide-tooling-incremental-build.html index 45b0224..12d1c08 100644 --- a/documentation/development/ide-tooling/ide-tooling-incremental-build.html +++ b/documentation/development/ide-tooling/ide-tooling-incremental-build.html @@ -74,18 +74,18 @@ Incremental Builds in Sling IDE tooling for Eclipse </h1><div class="row"><div class="small-12 columns"><section class="wrap"><p><!-- TODO reactivate TOC once JBake moves to flexmark-java --> </p> -<h2>Overview</h2> +<h2><a href="#overview" name="overview">Overview</a></h2> <p>The Sling IDE Tooling relies on the <a href="https://wiki.eclipse.org/M2E_compatible_maven_plugins">m2e incremental build support</a> for the generation of the bundle's manifest, the component descriptions as well as the metatype resources (the latter two being generated through OSGi 6 <a href="https://osgi.org/javadoc/r6/cmpn/org/osgi/service/component/annotations/package-summary.html">component annotations</a> and <a href="https://osgi.org/javadoc/r6/cmpn/org/osgi/service/metatype/annotations/package-summary.html">metatype annotations</a> or through <a href="http://felix.apache.org/documentation/subprojects/apache-felix-maven-scr-plugin/scr-annotations.html">Apache Felix SCR annotations</a>). That means whenever at least one java class is touched and the auto-build in Eclipse is enabled the annotations on that class should be reevaluated. This may lead to a modification of the bundle's manifest and/or generation/modification of service description XMLs and/or Metatype resource files. Depending on which maven plugins you use you must adjust their configuration accordingly to properly support incremental builds.</p> -<h2>Manifest Generation</h2> -<h3>maven-bundle-plugin</h3> +<h2><a href="#manifest-generation" name="manifest-generation">Manifest Generation</a></h2> +<h3><a href="#maven-bundle-plugin" name="maven-bundle-plugin">maven-bundle-plugin</a></h3> <p>The <a href="http://felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html">maven-bundle-plugin</a> is based on the <a href="http://bnd.bndtools.org/">bnd library</a>. It uses bnd to generate the bundle's manifest.</p> -<h4>maven-bundle-plugin prior to version 3.2.0</h4> +<h4><a href="#maven-bundle-plugin-prior-to-version-3-2-0" name="maven-bundle-plugin-prior-to-version-3-2-0">maven-bundle-plugin prior to version 3.2.0</a></h4> <p>This version needs <a href="https://github.com/tesla/m2eclipse-tycho">m2eclipse-tycho</a> (an Eclipse plugin) to generate the manifest and service descriptions during the incremental build. This plugin can be installed through the Maven Discovery feature of m2e.</p> -<h4>maven-bundle-plugin since version 3.2.0</h4> +<h4><a href="#maven-bundle-plugin-since-version-3-2-0" name="maven-bundle-plugin-since-version-3-2-0">maven-bundle-plugin since version 3.2.0</a></h4> <p>Natively supports incremental builds for the <code>manifest</code> goal (<a href="https://issues.apache.org/jira/browse/FELIX-4009">FELIX-4009</a>) which needs to be explicitly configured as outlined in the <a href="http://felix.apache.org/documentation/faqs/apache-felix-bundle-plugin-faq.html#use-scr-metadata-generated-by-bnd-in-unit-tests">maven-bundle-plugin FAQ</a>. m2e-tycho is incompatible with that version, because it leads to errors like <code>Duplicate bundle executions found. Please remove any explicitly defined bundle executions in your pom.xml.</code> and <code>Duplicate manifest executions found. Please remove any explicitly defined manifest executions in your pom.xml.</code> (compare with <a href="https://github.com/tesla/m2eclipse-tycho/issues/31">issue 31</a>). Therefore uninstall m2eclipse-tycho if you want to use newer versions of the <code>maven-bundle-plugin</code>.</p> -<h3>bnd-maven-plugin</h3> +<h3><a href="#bnd-maven-plugin" name="bnd-maven-plugin">bnd-maven-plugin</a></h3> <p>The <a href="https://github.com/bndtools/bnd/tree/master/maven/bnd-maven-plugin">bnd-maven-plugin</a> is developed from the bnd team and is based on bnd as well. It is versioned in parallel with bnd and bndtools. It natively supports incremental builds since version 3.1.0 (<a href="https://github.com/bndtools/bnd/issues/1180">issue 1180</a>).</p> -<h2>Service Description and Metatype Resources</h2> +<h2><a href="#service-description-and-metatype-resources" name="service-description-and-metatype-resources">Service Description and Metatype Resources</a></h2> <p>OSGi component and metatype annotations (for OSGi 6) are natively supported through bnd (and therefore automatically generated through both maven-bundle-plugin and bnd-maven-plugin). You don't need to configure anything explicitly since version 3.0.0 of bnd (<a href="https://github.com/bndtools/bnd/issues/1041">issue 1041</a>).</p> <p>The maven-bundle-plugin can be optionally coupled with the <a href="http://felix.apache.org/documentation/subprojects/apache-felix-maven-scr-plugin/apache-felix-maven-scr-plugin-use.html">maven-scr-plugin</a>. Both maven-bundle-plugin as well as bnd-maven-plugin can be optionally coupled with the <a href="http://felix.apache.org/documentation/subprojects/apache-felix-maven-scr-plugin/apache-felix-scr-bndtools-use.html">scr-bnd-plugin</a>. Both approaches can be used to generate components descriptions and metatype resources out of the <a href="http://felix.apache.org/documentation/subprojects/apache-felix-maven-scr-plugin/scr-annotations.html">Felix SCR annotations</a>. The recommended way for new projects though is to rely on OSGi 6 annotations. However if you need to rely on Felix SCR annotations though it is recommended to rather use the scr-bnd-plugin over the maven-scr-plugin, as the former is nicely integrated into bnd and therefore means less overhead during the build.</p> </section></div></div> <div class="footer"> http://git-wip-us.apache.org/repos/asf/sling-site/blob/f542b22e/documentation/development/issue-tracker.html ---------------------------------------------------------------------- diff --git a/documentation/development/issue-tracker.html b/documentation/development/issue-tracker.html index 57a51a1..6b40ad0 100644 --- a/documentation/development/issue-tracker.html +++ b/documentation/development/issue-tracker.html @@ -75,7 +75,7 @@ </h1><div class="row"><div class="small-12 columns"><section class="wrap"><p>Apache Sling uses Jira for tracking bug reports and requests for improvements, new features, and other changes.</p> <p>The issue tracker is available at <a href="https://issues.apache.org/jira/browse/SLING">https://issues.apache.org/jira/browse/SLING</a> and is readable by everyone. A Jira account is needed to create new issues and to comment on existing issues. Use the <a href="https://issues.apache.org/jira/secure/Signup!default.jspa">registration form</a> to request an account if you do not already have one.</p> <p>See below for guidelines on creating and managing issues.</p> -<h2>Issue type</h2> +<h2><a href="#issue-type" name="issue-type">Issue type</a></h2> <p>When creating a new issue, select the issue type based as follows:</p> <table> <thead> @@ -107,9 +107,9 @@ </tr> </tbody> </table> -<h2>Summary</h2> +<h2><a href="#summary" name="summary">Summary</a></h2> <p>The issue summary should be a short and clear statement that indicates the scope of the issue. You are probably being too verbose if you exceed the length of the text field. Use the Environment and Description fields to provide more detailed information.</p> -<h2>Issue priority</h2> +<h2><a href="#issue-priority" name="issue-priority">Issue priority</a></h2> <p>Issue priority should be set according to the following:</p> <table> <thead> @@ -141,7 +141,7 @@ </tr> </tbody> </table> -<h2>Issue States</h2> +<h2><a href="#issue-states" name="issue-states">Issue States</a></h2> <p>Sling issues can transition through a number of states while being processed:</p> <table> <thead> @@ -193,7 +193,7 @@ <p>Users generally create issues and provide feedback while work on the issue is in progress. When the developer thinks the issue has been resolved, he resolves the issue. At this point, the user may test the resolution and reopen the issue if it has not really be solved. Otherwise the user may just acknowledge the fix.</p> <p>Developers transition the issue through the workflow while working on it. When done with the issue, they mark the issue resolved with the appropriate resolution and ask the reporting user to confirm.</p> <p>Issues are closed once the project against which it has been reported has been released. Issues once closed cannot be opened again. Rather new issues should be created against the new release to have broken implementations fixed or extended.</p> -<h2>Patches</h2> +<h2><a href="#patches" name="patches">Patches</a></h2> <p>When reporting a bug, requesting a feature or propose an improvement, it is a good thing to attach a patch to the issue. This may speed up issue processing and helps you being recognized as a good community member leading to closer involvement with Sling.</p></section></div></div> <div class="footer"> <div class="trademarkFooter">
