svn commit: r1600564 - in /sling/trunk/bundles/extensions/healthcheck/core/src: main/java/org/apache/sling/hc/api/ main/java/org/apache/sling/hc/core/impl/ main/java/org/apache/sling/hc/core/impl/exec
Author: bdelacretaz Date: Thu Jun 5 07:04:54 2014 New Revision: 1600564 URL: http://svn.apache.org/r1600564 Log: SLING-3500 - use HealthCheckExecutor in CompositeHealthCheck - contributed by Georg Henzler, thanks! Added: sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/CompositeResult.java sling/trunk/bundles/extensions/healthcheck/core/src/test/java/org/apache/sling/hc/core/impl/CompositeHealthCheckTest.java Modified: sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/api/Result.java sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/CompositeHealthCheck.java sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/executor/ExecutionResult.java sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/executor/HealthCheckExecutorImpl.java Modified: sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/api/Result.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/api/Result.java?rev=1600564r1=1600563r2=1600564view=diff == --- sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/api/Result.java (original) +++ sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/api/Result.java Thu Jun 5 07:04:54 2014 @@ -22,7 +22,7 @@ import java.util.Iterator; /** The result of executing a {@link HealthCheck} */ public class Result implements Iterable ResultLog.Entry { -private final ResultLog resultLog; +protected final ResultLog resultLog; public enum Status { DEBUG, // used by ResultLog for debug messages, not an actual output status Modified: sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/CompositeHealthCheck.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/CompositeHealthCheck.java?rev=1600564r1=1600563r2=1600564view=diff == --- sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/CompositeHealthCheck.java (original) +++ sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/CompositeHealthCheck.java Thu Jun 5 07:04:54 2014 @@ -18,7 +18,9 @@ package org.apache.sling.hc.core.impl; import java.util.Arrays; +import java.util.HashSet; import java.util.List; +import java.util.Set; import org.apache.felix.scr.annotations.Activate; import org.apache.felix.scr.annotations.Component; @@ -27,15 +29,22 @@ import org.apache.felix.scr.annotations. import org.apache.felix.scr.annotations.Properties; import org.apache.felix.scr.annotations.Property; import org.apache.felix.scr.annotations.PropertyUnbounded; +import org.apache.felix.scr.annotations.Reference; import org.apache.felix.scr.annotations.Service; import org.apache.sling.commons.osgi.PropertiesUtil; import org.apache.sling.hc.api.HealthCheck; import org.apache.sling.hc.api.Result; import org.apache.sling.hc.api.Result.Status; -import org.apache.sling.hc.api.ResultLog; +import org.apache.sling.hc.api.execution.HealthCheckExecutionResult; +import org.apache.sling.hc.api.execution.HealthCheckExecutor; import org.apache.sling.hc.util.FormattingResultLog; import org.apache.sling.hc.util.HealthCheckFilter; +import org.apache.sling.hc.util.HealthCheckMetadata; import org.osgi.framework.BundleContext; +import org.osgi.framework.Constants; +import org.osgi.framework.InvalidSyntaxException; +import org.osgi.framework.ServiceReference; +import org.osgi.service.component.ComponentConstants; import org.osgi.service.component.ComponentContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -66,73 +75,140 @@ import org.slf4j.LoggerFactory; public class CompositeHealthCheck implements HealthCheck { private final Logger log = LoggerFactory.getLogger(getClass()); -private BundleContext bundleContext; @Property(unbounded=PropertyUnbounded.ARRAY, label=Filter Tags, description=Tags used to select which health checks the composite health check executes.) -private static final String PROP_FILTER_TAGS = filter.tags; +static final String PROP_FILTER_TAGS = filter.tags; private String [] filterTags; -private final ThreadLocalBoolean recursionLock = new ThreadLocalBoolean(); +@Reference +private HealthCheckExecutor healthCheckExecutor; + +private BundleContext bundleContext; +private ServiceReference referenceToThis; +private HealthCheckFilter healthCheckFilter; + @Activate protected
svn commit: r1600565 - in /sling/trunk/bundles/extensions/healthcheck/core/src: main/java/org/apache/sling/hc/core/impl/CompositeHealthCheck.java test/java/org/apache/sling/hc/core/impl/CompositeHealt
Author: bdelacretaz Date: Thu Jun 5 07:09:20 2014 New Revision: 1600565 URL: http://svn.apache.org/r1600565 Log: SLING-3500 - minor tweaks Modified: sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/CompositeHealthCheck.java sling/trunk/bundles/extensions/healthcheck/core/src/test/java/org/apache/sling/hc/core/impl/CompositeHealthCheckTest.java Modified: sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/CompositeHealthCheck.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/CompositeHealthCheck.java?rev=1600565r1=1600564r2=1600565view=diff == --- sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/CompositeHealthCheck.java (original) +++ sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/CompositeHealthCheck.java Thu Jun 5 07:09:20 2014 @@ -110,8 +110,8 @@ public class CompositeHealthCheck implem @Override public Result execute() { -Result result = null; -if ((result = checkForRecursion(referenceToThis, new HashSetString())) != null) { +Result result = checkForRecursion(referenceToThis, new HashSetString()); +if(result != null) { // return recursion error return result; } Modified: sling/trunk/bundles/extensions/healthcheck/core/src/test/java/org/apache/sling/hc/core/impl/CompositeHealthCheckTest.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/healthcheck/core/src/test/java/org/apache/sling/hc/core/impl/CompositeHealthCheckTest.java?rev=1600565r1=1600564r2=1600565view=diff == --- sling/trunk/bundles/extensions/healthcheck/core/src/test/java/org/apache/sling/hc/core/impl/CompositeHealthCheckTest.java (original) +++ sling/trunk/bundles/extensions/healthcheck/core/src/test/java/org/apache/sling/hc/core/impl/CompositeHealthCheckTest.java Thu Jun 5 07:09:20 2014 @@ -91,7 +91,7 @@ public class CompositeHealthCheckTest { } @Test -public void testRecursionCheckSimle() { +public void testSimpleRecursion() { // composite check referencing itself final String[] filterTags = new String[] { check1 }; @@ -123,7 +123,7 @@ public class CompositeHealthCheckTest { } @Test -public void testRecursionCheckCyclic() { +public void testCyclicRecursion() { // three checks, cyclic final String[] filterTags = new String[] { check2 };
[CONF] Apache Sling Status Report September 2014
Robert Munteanu created a page: Status Report September 2014 September Board Report (not submitted) Apache Sling is an OSGI-based scriptable web framework that uses a Java Content Repository, such as Apache Jackrabbit, to store and manage content. There are no issues which require board attention at the moment. Community Good activity level overall, contributions from different people continue. Releases New Release: Apache Sling Bundle JCR Install Archetype 1.0.2 (June 4th, 2014) New Release: Apache Sling Tooling Support Install 1.0.0 (June 4th, 2014) New Release: Apache Sling Bundle Archetype 1.0.2 (June 4th, 2014) New Release: Apache Sling Servlet Archetype 1.0.2 (June 4th, 2014) Documentation and infrastructure Website has moved to Apache CMS Dist folder has moved to svn Project Branding is tracked in SLING-2696. View Online Like Add Comment Stop watching space Manage Notifications This message was sent by Atlassian Confluence 5.0.3, Team Collaboration Software
[CONF] Apache Sling Sling IDE tooling User Guide
Robert Munteanu edited the page: Sling IDE tooling User Guide Comment: Known issue - SLING-3644 ... SLING-3586 - Publishing content fails if intermediate nodes are not present in the repository . The workaround is to manually create the missing nodes in the repository . SLING-3591 - Unable to delete all nodes of a full coverage aggregate . The workaround is to manually delete the child nodes . SLING-3573 - Local resources which are no longer present in the repository are not deleted when importing . The workaround is to manually delete the workspace files . SLING-3644 - Improve handling of binary properties outside nt:file file nodes. Currently there is no workaround, but in practice this is not an often-encountered situation. View Online Like View Changes Add Comment Stop watching space Manage Notifications This message was sent by Atlassian Confluence 5.0.3, Team Collaboration Software
svn commit: r1600611 - in /sling/trunk/tooling/ide: impl-vlt-test/src/test/java/org/apache/sling/ide/impl/vlt/serialization/ impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serializatio
Author: rombert Date: Thu Jun 5 11:36:54 2014 New Revision: 1600611 URL: http://svn.apache.org/r1600611 Log: SLING-3609 - StringIndexOutOfBoundsException with empty {Binary} property Ignore binary properties when parsing .content.xml files. We will revisit this later. Added: sling/trunk/tooling/ide/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/bin.binary sling/trunk/tooling/ide/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/binary-property.xml (with props) Modified: sling/trunk/tooling/ide/impl-vlt-test/src/test/java/org/apache/sling/ide/impl/vlt/serialization/ContentXmlHandlerTest.java sling/trunk/tooling/ide/impl-vlt/src/org/apache/sling/ide/impl/vlt/serialization/ContentXmlHandler.java Modified: sling/trunk/tooling/ide/impl-vlt-test/src/test/java/org/apache/sling/ide/impl/vlt/serialization/ContentXmlHandlerTest.java URL: http://svn.apache.org/viewvc/sling/trunk/tooling/ide/impl-vlt-test/src/test/java/org/apache/sling/ide/impl/vlt/serialization/ContentXmlHandlerTest.java?rev=1600611r1=1600610r2=1600611view=diff == --- sling/trunk/tooling/ide/impl-vlt-test/src/test/java/org/apache/sling/ide/impl/vlt/serialization/ContentXmlHandlerTest.java (original) +++ sling/trunk/tooling/ide/impl-vlt-test/src/test/java/org/apache/sling/ide/impl/vlt/serialization/ContentXmlHandlerTest.java Thu Jun 5 11:36:54 2014 @@ -19,7 +19,7 @@ package org.apache.sling.ide.impl.vlt.se import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.Matchers.array; import static org.hamcrest.Matchers.hasEntry; -import static org.hamcrest.Matchers.hasItem; +import static org.hamcrest.Matchers.hasSize; import static org.junit.Assert.assertThat; import java.io.IOException; @@ -148,6 +148,14 @@ public class ContentXmlHandlerTest { assertThat(node contains /50-50, root.getChildren(), hasChildPath(/50-50)); } +@Test +public void parseContentXmlWithBinaryProperty() throws ParserConfigurationException, SAXException, IOException { + +ResourceProxy root = parseContentXmlFile(binary-property.xml, /); + +assertThat(root has 1 property, binary property is ignored, root.getProperties().entrySet(), hasSize(1)); +} + private static MatcherCalendar millis(long millis) { return new CalendarTimeInMillisMatcher(millis); Added: sling/trunk/tooling/ide/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/bin.binary URL: http://svn.apache.org/viewvc/sling/trunk/tooling/ide/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/bin.binary?rev=1600611view=auto == --- sling/trunk/tooling/ide/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/bin.binary (added) +++ sling/trunk/tooling/ide/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/bin.binary Thu Jun 5 11:36:54 2014 @@ -0,0 +1 @@ +nbsp; \ No newline at end of file Added: sling/trunk/tooling/ide/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/binary-property.xml URL: http://svn.apache.org/viewvc/sling/trunk/tooling/ide/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/binary-property.xml?rev=1600611view=auto == --- sling/trunk/tooling/ide/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/binary-property.xml (added) +++ sling/trunk/tooling/ide/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/binary-property.xml Thu Jun 5 11:36:54 2014 @@ -0,0 +1,4 @@ +?xml version=1.0 encoding=UTF-8? +jcr:root xmlns:sling=http://sling.apache.org/jcr/sling/1.0; xmlns:jcr=http://www.jcp.org/jcr/1.0; xmlns:nt=http://www.jcp.org/jcr/nt/1.0; +jcr:primaryType=nt:unstructured +bin={Binary}/ \ No newline at end of file Propchange: sling/trunk/tooling/ide/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/binary-property.xml -- svn:eol-style = native Propchange: sling/trunk/tooling/ide/impl-vlt-test/src/test/resources/org/apache/sling/ide/impl/vlt/serialization/binary-property.xml -- svn:mime-type = text/xml Modified: sling/trunk/tooling/ide/impl-vlt/src/org/apache/sling/ide/impl/vlt/serialization/ContentXmlHandler.java URL: http://svn.apache.org/viewvc/sling/trunk/tooling/ide/impl-vlt/src/org/apache/sling/ide/impl/vlt/serialization/ContentXmlHandler.java?rev=1600611r1=1600610r2=1600611view=diff == ---
svn commit: r1600612 - in /sling/trunk/tooling/ide: eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/ eclipse-ui/src/org/apache/sling/ide/eclipse/ui/internal/
Author: stefanegli Date: Thu Jun 5 11:39:04 2014 New Revision: 1600612 URL: http://svn.apache.org/r1600612 Log: SLING-3638 : adding support for 'publish' and 'clean-publish' also on a module (1/multiple) level - plus added 'doNotAskAgain' (without using preferences though atm) Added: sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/ServerBehaviourDelegateWithModulePublishSupport.java (with props) sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/internal/refresh.gif (with props) Removed: sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/internal/refresh.png Modified: sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingLaunchpadBehaviour.java sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/internal/ServersActionModeFiddlerActionDelegate.java Added: sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/ServerBehaviourDelegateWithModulePublishSupport.java URL: http://svn.apache.org/viewvc/sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/ServerBehaviourDelegateWithModulePublishSupport.java?rev=1600612view=auto == --- sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/ServerBehaviourDelegateWithModulePublishSupport.java (added) +++ sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/ServerBehaviourDelegateWithModulePublishSupport.java Thu Jun 5 11:39:04 2014 @@ -0,0 +1,184 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the License); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.sling.ide.eclipse.core.internal; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.MultiStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.wst.server.core.IModule; +import org.eclipse.wst.server.core.model.PublishOperation; +import org.eclipse.wst.server.core.model.ServerBehaviourDelegate; + +/** + * Extension of ServerBehaviourDelegate which is capable of publishing + * individual IModules - which the parent ServerBehaviourDelegate does + * not support. + * p + * Copyright note: parts of this class have been migrated and adjusted from parent. + * p + * TODO remove once WST supports this + */ +public abstract class ServerBehaviourDelegateWithModulePublishSupport extends +ServerBehaviourDelegate { + +private IAdaptable info3; +private ListIModule[] modules3; + +@Override +public void publish(int kind, ListIModule[] modules, +IProgressMonitor monitor, IAdaptable info) throws CoreException { +info3 = info; +modules3 = modules==null ? null : new LinkedListIModule[](modules); +super.publish(kind, modules, monitor, info); +} + +// from WST's ServerBehavior +private ListInteger computeDelta(final ListIModule[] moduleList) { + +final ListInteger deltaKindList = new ArrayListInteger(); +final IteratorIModule[] iterator = moduleList.iterator(); +while (iterator.hasNext()) { +IModule[] module = iterator.next(); +if (hasBeenPublished(module)) { +IModule m = module[module.length - 1]; +if ((m.getProject() != null !m.getProject().isAccessible()) +|| getPublishedResourceDelta(module).length == 0) { +deltaKindList.add(new Integer(ServerBehaviourDelegate.NO_CHANGE)); +} +else { +deltaKindList.add(new Integer(ServerBehaviourDelegate.CHANGED)); +} +} +else { +deltaKindList.add(new Integer(ServerBehaviourDelegate.ADDED)); +} +} +//this.addRemovedModules(moduleList, null); +//while (deltaKindList.size()
svn commit: r1600624 - /sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingLaunchpadBehaviour.java
Author: rombert Date: Thu Jun 5 12:13:22 2014 New Revision: 1600624 URL: http://svn.apache.org/r1600624 Log: SLING-3645 - Ignore publish requests if the server is stopped Modified: sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingLaunchpadBehaviour.java Modified: sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingLaunchpadBehaviour.java URL: http://svn.apache.org/viewvc/sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingLaunchpadBehaviour.java?rev=1600624r1=1600623r2=1600624view=diff == --- sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingLaunchpadBehaviour.java (original) +++ sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingLaunchpadBehaviour.java Thu Jun 5 12:13:22 2014 @@ -148,6 +148,12 @@ public class SlingLaunchpadBehaviour ext logger.trace(traceOperation(kind, deltaKind, module)); +if (getServer().getServerState() == IServer.STATE_STOPPED) { +logger.trace(Ignoring request to publish module when the server is stopped); +setModulePublishState(module, IServer.PUBLISH_STATE_NONE); +return; +} + if ((kind == IServer.PUBLISH_AUTO || kind == IServer.PUBLISH_INCREMENTAL) deltaKind == ServerBehaviourDelegate.NO_CHANGE) { logger.trace(Ignoring request to publish the module when no resources have changed; most likely another module has changed); @@ -230,6 +236,28 @@ public class SlingLaunchpadBehaviour ext break; } +switch (getServer().getServerState()) { +case IServer.STATE_STARTED: +trace.append(STARTED, ); +break; + +case IServer.STATE_STARTING: +trace.append(STARTING, ); +break; + +case IServer.STATE_STOPPED: +trace.append(STOPPED, ); +break; + +case IServer.STATE_STOPPING: +trace.append(STOPPING, ); +break; + +default: +trace.append(UNKONWN - ).append(getServer().getServerState()).append(, ); +break; +} + trace.append(Arrays.toString(module)).append()); return trace.toString(); @@ -393,7 +421,7 @@ public class SlingLaunchpadBehaviour ext if (file == null) { // Usually happens on server startup, it seems to be safe to ignore for now Activator.getDefault().getPluginLogger() -.trace(Got null '{0}' and '{1}' for {2}, IFile.class.getSimpleName(), +.trace(Got null {0} and {1} for {2}, IFile.class.getSimpleName(), IFolder.class.getSimpleName(), resource); return null; }
svn commit: r1600629 - /sling/trunk/bundles/jcr/it-jackrabbit-oak/src/test/java/org/apache/sling/jcr/repository/it/JackrabbitRepositoryIT.java
Author: bdelacretaz Date: Thu Jun 5 12:23:01 2014 New Revision: 1600629 URL: http://svn.apache.org/r1600629 Log: SNAPSHOT not needed anymore, and causes http://ci.apache.org/builders/sling-trunk build to fail Modified: sling/trunk/bundles/jcr/it-jackrabbit-oak/src/test/java/org/apache/sling/jcr/repository/it/JackrabbitRepositoryIT.java Modified: sling/trunk/bundles/jcr/it-jackrabbit-oak/src/test/java/org/apache/sling/jcr/repository/it/JackrabbitRepositoryIT.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/it-jackrabbit-oak/src/test/java/org/apache/sling/jcr/repository/it/JackrabbitRepositoryIT.java?rev=1600629r1=1600628r2=1600629view=diff == --- sling/trunk/bundles/jcr/it-jackrabbit-oak/src/test/java/org/apache/sling/jcr/repository/it/JackrabbitRepositoryIT.java (original) +++ sling/trunk/bundles/jcr/it-jackrabbit-oak/src/test/java/org/apache/sling/jcr/repository/it/JackrabbitRepositoryIT.java Thu Jun 5 12:23:01 2014 @@ -91,7 +91,7 @@ public class JackrabbitRepositoryIT exte mavenBundle(org.apache.sling, org.apache.sling.adapter, 2.1.0), mavenBundle(org.apache.sling, org.apache.sling.jcr.resource, 2.3.6), mavenBundle(org.apache.sling, org.apache.sling.jcr.classloader, 3.2.0), -mavenBundle(org.apache.sling, org.apache.sling.jcr.contentloader, 2.1.7-SNAPSHOT), +mavenBundle(org.apache.sling, org.apache.sling.jcr.contentloader, 2.1.8), mavenBundle(org.apache.sling, org.apache.sling.engine, 2.3.2), mavenBundle(org.apache.sling, org.apache.sling.event, 3.2.0), mavenBundle(org.apache.sling, org.apache.sling.serviceusermapper, 1.0.0),
svn commit: r1600654 - in /sling/trunk/bundles/extensions/discovery/impl/src/test/java/org/apache/sling/discovery/impl/topology: Connector.java LargeTopologyWithHubTest.java TopologyTest.java Topology
Author: bdelacretaz Date: Thu Jun 5 13:36:08 2014 New Revision: 1600654 URL: http://svn.apache.org/r1600654 Log: SLING-3495 - separate LargeTopologyWithHubTest to prepare for adding retries to it Added: sling/trunk/bundles/extensions/discovery/impl/src/test/java/org/apache/sling/discovery/impl/topology/Connector.java sling/trunk/bundles/extensions/discovery/impl/src/test/java/org/apache/sling/discovery/impl/topology/LargeTopologyWithHubTest.java Modified: sling/trunk/bundles/extensions/discovery/impl/src/test/java/org/apache/sling/discovery/impl/topology/TopologyTest.java sling/trunk/bundles/extensions/discovery/impl/src/test/java/org/apache/sling/discovery/impl/topology/TopologyTestHelper.java Added: sling/trunk/bundles/extensions/discovery/impl/src/test/java/org/apache/sling/discovery/impl/topology/Connector.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/discovery/impl/src/test/java/org/apache/sling/discovery/impl/topology/Connector.java?rev=1600654view=auto == --- sling/trunk/bundles/extensions/discovery/impl/src/test/java/org/apache/sling/discovery/impl/topology/Connector.java (added) +++ sling/trunk/bundles/extensions/discovery/impl/src/test/java/org/apache/sling/discovery/impl/topology/Connector.java Thu Jun 5 13:36:08 2014 @@ -0,0 +1,40 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * License); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.sling.discovery.impl.topology; + +import org.apache.sling.discovery.impl.setup.Instance; +import org.apache.sling.discovery.impl.topology.connector.TopologyConnectorClientInformation; + +class Connector { +@SuppressWarnings(unused) +private final Instance from; +@SuppressWarnings(unused) +private final Instance to; +private final int jettyPort; +@SuppressWarnings(unused) +private final TopologyConnectorClientInformation connectorInfo; + +Connector(Instance from, Instance to) throws Throwable { +this.from = from; +this.to = to; +to.startJetty(); +this.jettyPort = to.getJettyPort(); +this.connectorInfo = from.connectTo(http://localhost:+jettyPort+/system/console/topology/connector;); +} +} \ No newline at end of file Added: sling/trunk/bundles/extensions/discovery/impl/src/test/java/org/apache/sling/discovery/impl/topology/LargeTopologyWithHubTest.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/discovery/impl/src/test/java/org/apache/sling/discovery/impl/topology/LargeTopologyWithHubTest.java?rev=1600654view=auto == --- sling/trunk/bundles/extensions/discovery/impl/src/test/java/org/apache/sling/discovery/impl/topology/LargeTopologyWithHubTest.java (added) +++ sling/trunk/bundles/extensions/discovery/impl/src/test/java/org/apache/sling/discovery/impl/topology/LargeTopologyWithHubTest.java Thu Jun 5 13:36:08 2014 @@ -0,0 +1,65 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * License); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.sling.discovery.impl.topology; + +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; + +import org.apache.sling.discovery.impl.setup.Instance; +import org.junit.After; +import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class LargeTopologyWithHubTest { + +private final Logger logger =
svn commit: r1600674 - /sling/site/trunk/content/res/site.css
Author: dklco Date: Thu Jun 5 14:26:25 2014 New Revision: 1600674 URL: http://svn.apache.org/r1600674 Log: Adding tests for fix for SLING-3646 Modified: sling/site/trunk/content/res/site.css Modified: sling/site/trunk/content/res/site.css URL: http://svn.apache.org/viewvc/sling/site/trunk/content/res/site.css?rev=1600674r1=1600673r2=1600674view=diff == --- sling/site/trunk/content/res/site.css (original) +++ sling/site/trunk/content/res/site.css Thu Jun 5 14:26:25 2014 @@ -58,7 +58,7 @@ a:hover { } img { -width: 100%; +max-width: 100%; border: solid 1px #EEE; margin-top: 0.5em; margin-bottom: 0.5em;
svn commit: r911437 - in /websites/staging/sling/trunk/content: ./ res/site.css
Author: buildbot Date: Thu Jun 5 14:26:36 2014 New Revision: 911437 Log: Staging update by buildbot for sling Modified: websites/staging/sling/trunk/content/ (props changed) websites/staging/sling/trunk/content/res/site.css Propchange: websites/staging/sling/trunk/content/ -- --- cms:source-revision (original) +++ cms:source-revision Thu Jun 5 14:26:36 2014 @@ -1 +1 @@ -1600496 +1600674 Modified: websites/staging/sling/trunk/content/res/site.css == --- websites/staging/sling/trunk/content/res/site.css (original) +++ websites/staging/sling/trunk/content/res/site.css Thu Jun 5 14:26:36 2014 @@ -58,7 +58,7 @@ a:hover { } img { -width: 100%; +max-width: 100%; border: solid 1px #EEE; margin-top: 0.5em; margin-bottom: 0.5em;
svn commit: r1600677 - in /sling/trunk/tooling/ide: eclipse-core/ eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/ eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/ eclipse-ui
Author: rombert Date: Thu Jun 5 14:56:58 2014 New Revision: 1600677 URL: http://svn.apache.org/r1600677 Log: SLING-3600 - Review strings for correctness and consistency Bulk string changes. Modified: sling/trunk/tooling/ide/eclipse-core/plugin.xml sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingLaunchpadBehaviour.java sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingLaunchpadLaunchConfigurationDelegate.java sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/ArchetypeParametersWizardPage.java sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/ChooseArchetypeWizardPage.java sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/NewSlingBundleWizard.java sling/trunk/tooling/ide/eclipse-ui/plugin.xml sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/actions/JcrNewNodeAction.java sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/actions/JcrNodeDeleteAction.java sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/actions/JcrNodeRenameAction.java sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/actions/NewNodeDialog.java sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/internal/ConnectionEditorSection.java sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/internal/ImportWizardPage.java sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/internal/InstallEditorSection.java sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/internal/ServersActionModeFiddlerActionDelegate.java sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/nav/model/TolerantXMLTokenizer.java sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/propertyPages/SlingProjectPropertyPage.java sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/NewNodeWizard.java sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/NewNodeWizardPage.java sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/wizards/SetupServerWizardPage.java Modified: sling/trunk/tooling/ide/eclipse-core/plugin.xml URL: http://svn.apache.org/viewvc/sling/trunk/tooling/ide/eclipse-core/plugin.xml?rev=1600677r1=1600676r2=1600677view=diff == --- sling/trunk/tooling/ide/eclipse-core/plugin.xml (original) +++ sling/trunk/tooling/ide/eclipse-core/plugin.xml Thu Jun 5 14:56:58 2014 @@ -76,8 +76,8 @@ extension point=org.eclipse.wst.server.core.runtimeTypes runtimeType id=org.apache.sling.ide.launchpadRuntimeType - name=Sling Launchpad (runtime name) - description=Sling Launchpad (runtime description) + name=Sling Runtime + description=A Sling-compatible runtime which contains the Felix Web Console and a JCR WebDAV remoting entry point. vendor=Sling version=1.0 class=org.apache.sling.ide.eclipse.core.internal.SlingLaunchpadRuntime @@ -90,8 +90,8 @@ extension point=org.eclipse.wst.server.core.serverTypes serverType id=org.apache.sling.ide.launchpadServer - name=External Sling Launchpad (server name) - description=External Sling Launchpad (server description) + name=Sling Server (external) + description=A Sling server whose lifecycle is controlled independently from Eclipse. supportsRemoteHosts=true runtime=true startTimeout=3 Modified: sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingLaunchpadBehaviour.java URL: http://svn.apache.org/viewvc/sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingLaunchpadBehaviour.java?rev=1600677r1=1600676r2=1600677view=diff == --- sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingLaunchpadBehaviour.java (original) +++ sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingLaunchpadBehaviour.java Thu Jun 5 14:56:58 2014 @@ -118,7 +118,7 @@ public class SlingLaunchpadBehaviour ext setServerState(IServer.STATE_STARTED); } else { setServerState(IServer.STATE_STOPPED); -String message = Unable to connect to Sling Lanchpad. Please make sure a Launchpad instance is running ; +String message = Unable to connect to the Server. Please make sure a server instance is running ; if (result != null) { message += ( + result.toString() + ); } @@ -277,7 +277,7 @@ public class
svn commit: r1600675 - /sling/trunk/tooling/ide/api/src/org/apache/sling/ide/serialization/SerializationKindManager.java
Author: rombert Date: Thu Jun 5 14:56:20 2014 New Revision: 1600675 URL: http://svn.apache.org/r1600675 Log: Fix warnings in SerializationKindManager Modified: sling/trunk/tooling/ide/api/src/org/apache/sling/ide/serialization/SerializationKindManager.java Modified: sling/trunk/tooling/ide/api/src/org/apache/sling/ide/serialization/SerializationKindManager.java URL: http://svn.apache.org/viewvc/sling/trunk/tooling/ide/api/src/org/apache/sling/ide/serialization/SerializationKindManager.java?rev=1600675r1=1600674r2=1600675view=diff == --- sling/trunk/tooling/ide/api/src/org/apache/sling/ide/serialization/SerializationKindManager.java (original) +++ sling/trunk/tooling/ide/api/src/org/apache/sling/ide/serialization/SerializationKindManager.java Thu Jun 5 14:56:20 2014 @@ -16,11 +16,9 @@ */ package org.apache.sling.ide.serialization; -import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; -import java.util.Map; import java.util.Set; import javax.jcr.nodetype.NodeType; @@ -28,9 +26,6 @@ import javax.jcr.nodetype.NodeType; import org.apache.sling.ide.transport.NodeTypeRegistry; import org.apache.sling.ide.transport.Repository; import org.apache.sling.ide.transport.RepositoryException; -import org.apache.sling.ide.transport.ResourceProxy; -import org.apache.sling.ide.transport.Result; -import org.apache.sling.ide.util.PathUtil; /** * The ttSerializationKindManager/tt is a helper class which implements common logic dealing with how to serialize @@ -49,8 +44,8 @@ public class SerializationKindManager { ListNodeType nodeTypes = repository.getNodeTypeRegistry().getNodeTypes(); // detect node types which have an nt:file or nt:folder parent in the hierarchy -for (Iterator it = nodeTypes.iterator(); it.hasNext();) { -final NodeType nt = (NodeType) it.next(); +for (IteratorNodeType it = nodeTypes.iterator(); it.hasNext();) { +final NodeType nt = it.next(); final String nodeType = nt.getName(); SerializationKind serializationKind = getSerializationKind(nodeType, repository.getNodeTypeRegistry()); if (serializationKind == null) {
svn commit: r1600678 - in /sling/trunk/contrib/scripting/thymeleaf: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/sling/ src/main/java/org/apac
Author: olli Date: Thu Jun 5 15:12:09 2014 New Revision: 1600678 URL: http://svn.apache.org/r1600678 Log: SLING-3649 add initial version of Apache Sling Scripting Thymeleaf Added: sling/trunk/contrib/scripting/thymeleaf/ sling/trunk/contrib/scripting/thymeleaf/README.md sling/trunk/contrib/scripting/thymeleaf/pom.xml sling/trunk/contrib/scripting/thymeleaf/src/ sling/trunk/contrib/scripting/thymeleaf/src/main/ sling/trunk/contrib/scripting/thymeleaf/src/main/java/ sling/trunk/contrib/scripting/thymeleaf/src/main/java/org/ sling/trunk/contrib/scripting/thymeleaf/src/main/java/org/apache/ sling/trunk/contrib/scripting/thymeleaf/src/main/java/org/apache/sling/ sling/trunk/contrib/scripting/thymeleaf/src/main/java/org/apache/sling/scripting/ sling/trunk/contrib/scripting/thymeleaf/src/main/java/org/apache/sling/scripting/thymeleaf/ sling/trunk/contrib/scripting/thymeleaf/src/main/java/org/apache/sling/scripting/thymeleaf/SlingContext.java sling/trunk/contrib/scripting/thymeleaf/src/main/java/org/apache/sling/scripting/thymeleaf/SlingMessageResolver.java sling/trunk/contrib/scripting/thymeleaf/src/main/java/org/apache/sling/scripting/thymeleaf/SlingResourceResolver.java sling/trunk/contrib/scripting/thymeleaf/src/main/java/org/apache/sling/scripting/thymeleaf/SlingTemplateResolver.java sling/trunk/contrib/scripting/thymeleaf/src/main/java/org/apache/sling/scripting/thymeleaf/ThymeleafScriptEngine.java sling/trunk/contrib/scripting/thymeleaf/src/main/java/org/apache/sling/scripting/thymeleaf/ThymeleafScriptEngineFactory.java sling/trunk/contrib/scripting/thymeleaf/src/main/java/org/thymeleaf/ sling/trunk/contrib/scripting/thymeleaf/src/main/java/org/thymeleaf/templateparser/ sling/trunk/contrib/scripting/thymeleaf/src/main/java/org/thymeleaf/templateparser/html/ sling/trunk/contrib/scripting/thymeleaf/src/main/java/org/thymeleaf/templateparser/html/AbstractHtmlTemplateParser.java (with props) sling/trunk/contrib/scripting/thymeleaf/src/main/resources/ sling/trunk/contrib/scripting/thymeleaf/src/main/resources/OSGI-INF/ sling/trunk/contrib/scripting/thymeleaf/src/main/resources/OSGI-INF/metatype/ sling/trunk/contrib/scripting/thymeleaf/src/main/resources/OSGI-INF/metatype/metatype.properties Added: sling/trunk/contrib/scripting/thymeleaf/README.md URL: http://svn.apache.org/viewvc/sling/trunk/contrib/scripting/thymeleaf/README.md?rev=1600678view=auto == --- sling/trunk/contrib/scripting/thymeleaf/README.md (added) +++ sling/trunk/contrib/scripting/thymeleaf/README.md Thu Jun 5 15:12:09 2014 @@ -0,0 +1,7 @@ +Apache Sling Scripting Thymeleaf + + +scripting engine for Thymeleaf templates + +* http://www.thymeleaf.org +* https://github.com/thymeleaf/thymeleaf Added: sling/trunk/contrib/scripting/thymeleaf/pom.xml URL: http://svn.apache.org/viewvc/sling/trunk/contrib/scripting/thymeleaf/pom.xml?rev=1600678view=auto == --- sling/trunk/contrib/scripting/thymeleaf/pom.xml (added) +++ sling/trunk/contrib/scripting/thymeleaf/pom.xml Thu Jun 5 15:12:09 2014 @@ -0,0 +1,167 @@ +?xml version=1.0 encoding=UTF-8? +!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +License); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +-- +project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; + + modelVersion4.0.0/modelVersion + + parent +groupIdorg.apache.sling/groupId +artifactIdsling/artifactId +version20-SNAPSHOT/version +relativePath../../../parent/pom.xml/relativePath + /parent + + artifactIdorg.apache.sling.scripting.thymeleaf/artifactId + version0.0.1-SNAPSHOT/version + packagingbundle/packaging + + nameApache Sling Scripting Thymeleaf/name + descriptionApache Sling Scripting Thymeleaf/description + + properties +project.build.sourceEncodingUTF-8/project.build.sourceEncoding +project.reporting.outputEncodingUTF-8/project.reporting.outputEncoding +
svn commit: r1600759 - /sling/trunk/tooling/ide/impl-vlt/src/org/apache/sling/ide/jcr/RepositoryUtils.java
Author: rombert Date: Thu Jun 5 20:57:37 2014 New Revision: 1600759 URL: http://svn.apache.org/r1600759 Log: SLING-3647 - No repository found at ... URL scheme http not supported. only Since the RepositoryProvider is not thread-safe, explicitly synchronize access to it. This potentially fixes the bug, but it remains to be validated. Modified: sling/trunk/tooling/ide/impl-vlt/src/org/apache/sling/ide/jcr/RepositoryUtils.java Modified: sling/trunk/tooling/ide/impl-vlt/src/org/apache/sling/ide/jcr/RepositoryUtils.java URL: http://svn.apache.org/viewvc/sling/trunk/tooling/ide/impl-vlt/src/org/apache/sling/ide/jcr/RepositoryUtils.java?rev=1600759r1=1600758r2=1600759view=diff == --- sling/trunk/tooling/ide/impl-vlt/src/org/apache/sling/ide/jcr/RepositoryUtils.java (original) +++ sling/trunk/tooling/ide/impl-vlt/src/org/apache/sling/ide/jcr/RepositoryUtils.java Thu Jun 5 20:57:37 2014 @@ -31,36 +31,43 @@ import org.apache.sling.ide.transport.Re public abstract class RepositoryUtils { private static final RepositoryProvider REPOSITORY_PROVIDER = new RepositoryProvider(); +private static final Object SYNC = new Object(); private static final String[] WEBDAV_URL_LOCATIONS = new String[] { server/-/jcr:root, crx/-/jcr:root }; public static Repository getRepository(RepositoryInfo repositoryInfo) throws RepositoryException { - -return REPOSITORY_PROVIDER.getRepository(getRepositoryAddress(repositoryInfo)); +synchronized (SYNC) { +return REPOSITORY_PROVIDER.getRepository(getRepositoryAddress(repositoryInfo)); +} } public static RepositoryAddress getRepositoryAddress(RepositoryInfo repositoryInfo) { StringBuilder errors = new StringBuilder(); for (String webDavUrlLocation : WEBDAV_URL_LOCATIONS) { -Session session = null; -try { -// TODO proper error handling + +Session session = null; String url = repositoryInfo.getUrl() + webDavUrlLocation; -RepositoryAddress address = new RepositoryAddress(url); -Repository repository = REPOSITORY_PROVIDER.getRepository(address); -// TODO - this can be costly performance-wise ; we should cache this information -session = repository.login(new SimpleCredentials(repositoryInfo.getUsername(), repositoryInfo -.getPassword().toCharArray())); -return address; -} catch (URISyntaxException e) { -throw new RuntimeException(e); -} catch (RepositoryException e) { -errors.append(webDavUrlLocation).append( : ).append(e.getMessage()).append('\n'); -continue; -} finally { -if (session != null) { -session.logout(); +try { +// TODO proper error handling +RepositoryAddress address = new RepositoryAddress(url); +Repository repository; +synchronized (SYNC) { +repository = REPOSITORY_PROVIDER.getRepository(address); +} + +// TODO - this can be costly performance-wise ; we should cache this information +session = repository.login(new SimpleCredentials(repositoryInfo.getUsername(), repositoryInfo +.getPassword().toCharArray())); +return address; +} catch (URISyntaxException e) { +throw new RuntimeException(e); +} catch (RepositoryException e) { +errors.append(url).append( : ).append(e.getMessage()).append('\n'); +continue; +} finally { +if (session != null) { +session.logout(); +} } -} } errors.deleteCharAt(errors.length() - 1);