svn commit: r1804141 - in /sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature: analyser/ analyser/impl/ scanner/ scanner/impl/
Author: cziegeler Date: Fri Aug 4 16:34:33 2017 New Revision: 1804141 URL: http://svn.apache.org/viewvc?rev=1804141&view=rev Log: Update descriptor classes to make them more usable Removed: sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/impl/ContainerDescriptorImpl.java Modified: sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/ApplicationDescriptor.java sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/ArtifactDescriptor.java sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/BundleDescriptor.java sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/ContainerDescriptor.java sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/Descriptor.java sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/FeatureDescriptor.java sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/Scanner.java sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/impl/ApplicationDescriptorImpl.java sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/impl/BundleDescriptorImpl.java sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/impl/CheckBundleExportsImports.java sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/impl/CheckRequirementsCapabilities.java sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/impl/FeatureDescriptorImpl.java sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/scanner/FrameworkScanner.java sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/scanner/impl/FelixFrameworkScanner.java Modified: sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/ApplicationDescriptor.java URL: http://svn.apache.org/viewvc/sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/ApplicationDescriptor.java?rev=1804141&r1=1804140&r2=1804141&view=diff == --- sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/ApplicationDescriptor.java (original) +++ sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/ApplicationDescriptor.java Fri Aug 4 16:34:33 2017 @@ -22,9 +22,9 @@ import org.apache.sling.feature.Applicat * Information about an application. * This is the aggregated information. */ -public interface ApplicationDescriptor extends ContainerDescriptor { +public abstract class ApplicationDescriptor extends ContainerDescriptor { -Application getApplication(); +public abstract Application getApplication(); -Descriptor getFrameworkDescriptor(); +public abstract BundleDescriptor getFrameworkDescriptor(); } \ No newline at end of file Modified: sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/ArtifactDescriptor.java URL: http://svn.apache.org/viewvc/sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/ArtifactDescriptor.java?rev=1804141&r1=1804140&r2=1804141&view=diff == --- sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/ArtifactDescriptor.java (original) +++ sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/ArtifactDescriptor.java Fri Aug 4 16:34:33 2017 @@ -16,31 +16,31 @@ */ package org.apache.sling.feature.analyser; -import org.apache.sling.feature.Artifact; - import java.io.File; import java.util.jar.Manifest; +import org.apache.sling.feature.Artifact; + /** * Information about an artifact */ -public interface ArtifactDescriptor extends Descriptor { +public abstract class ArtifactDescriptor extends Descriptor { /** * Get the artifact file * @return The artifact file */ -File getArtifactFile(); +public abstract File getArtifactFile(); /** * Get the artifact * @return The artifact */ -Artifact getArtifact(); +public abstract Artifact getArtifact(); /** * If the artifact has a manifest, return it * @return The manifest or {@code null} */ -Manifest getManifest(); +public abstract Manifest getManifest(); } \ No newline at end of file Modified: sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/BundleDescriptor.java URL:
svn commit: r1804135 - in /sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature: analyser/ContainerDescriptor.java analyser/Scanner.java scanner/ExtensionScanner.java
Author: cziegeler Date: Fri Aug 4 15:18:15 2017 New Revision: 1804135 URL: http://svn.apache.org/viewvc?rev=1804135&view=rev Log: Adjust ExtensionScanner interface Modified: sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/ContainerDescriptor.java sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/Scanner.java sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/scanner/ExtensionScanner.java Modified: sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/ContainerDescriptor.java URL: http://svn.apache.org/viewvc/sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/ContainerDescriptor.java?rev=1804135&r1=1804134&r2=1804135&view=diff == --- sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/ContainerDescriptor.java (original) +++ sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/ContainerDescriptor.java Fri Aug 4 15:18:15 2017 @@ -24,7 +24,23 @@ import java.util.Set; */ public interface ContainerDescriptor extends Descriptor { +/** + * Return a set of bundle descriptors. + * + * The requirements and capabilities of the returned bundles are + * available as an aggregate from {@link Descriptor#getCapabilities()}, + * {@link Descriptor#getRequirements()}, {@link Descriptor#getDynamicImportedPackages()} + * {@link Descriptor#getExportedPackages()} and {@link Descriptor#getImportedPackages()} + * @return The set of bundle descriptors (might be empty) + */ Set getBundleDescriptors(); +/** + * Return a set of artifact descriptors + * The requirements and capabilities of the returned artifacts are + * available as an aggregate from {@link Descriptor#getCapabilities()}, + * {@link Descriptor#getRequirements()}. + * @return The set of artifact descriptors (might be empty) + */ Set getArtifactDescriptors(); } \ No newline at end of file Modified: sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/Scanner.java URL: http://svn.apache.org/viewvc/sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/Scanner.java?rev=1804135&r1=1804134&r2=1804135&view=diff == --- sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/Scanner.java (original) +++ sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/Scanner.java Fri Aug 4 15:18:15 2017 @@ -27,7 +27,6 @@ import org.apache.sling.feature.Applicat import org.apache.sling.feature.Artifact; import org.apache.sling.feature.Bundles; import org.apache.sling.feature.Extension; -import org.apache.sling.feature.ExtensionType; import org.apache.sling.feature.Extensions; import org.apache.sling.feature.Feature; import org.apache.sling.feature.analyser.impl.ApplicationDescriptorImpl; @@ -178,26 +177,9 @@ public class Scanner { private void scan(final Extensions extensions, final ContainerDescriptorImpl desc) throws IOException { for(final Extension ext : extensions) { -final List infos; -if ( ext.getType() == ExtensionType.ARTIFACTS ) { -infos = new ArrayList<>(); -for(final Artifact artifact : ext.getArtifacts()) { -final ArtifactDescriptor artifactDesc = scan(artifact); -infos.add(artifactDesc); -desc.getArtifactDescriptors().add(artifactDesc); -// aggregate - desc.getRequirements().addAll(artifactDesc.getRequirements()); - desc.getCapabilities().addAll(artifactDesc.getCapabilities()); - desc.getExportedPackages().addAll(artifactDesc.getExportedPackages()); - desc.getImportedPackages().addAll(artifactDesc.getImportedPackages()); - desc.getDynamicImportedPackages().addAll(artifactDesc.getDynamicImportedPackages()); -} -} else { -infos = null; -} -Descriptor extDesc = null; +ContainerDescriptor extDesc = null; for(final ExtensionScanner scanner : this.extensionScanners) { -extDesc = scanner.scan(ext, infos, this.artifactManager); +extDesc = scanner.scan(ext, this, this.artifactManager); if ( extDesc != null ) { break; } @@ -211,11 +193,8 @@ public class Scanner { desc.getImportedPackages().addAll(extDesc.getImportedPackages()); desc.getDynamicImp
svn commit: r1804131 - /sling/trunk/contrib/extensions/security/pom.xml
Author: cziegeler Date: Fri Aug 4 14:53:00 2017 New Revision: 1804131 URL: http://svn.apache.org/viewvc?rev=1804131&view=rev Log: Remove duplicate configuration from pom Modified: sling/trunk/contrib/extensions/security/pom.xml Modified: sling/trunk/contrib/extensions/security/pom.xml URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/security/pom.xml?rev=1804131&r1=1804130&r2=1804131&view=diff == --- sling/trunk/contrib/extensions/security/pom.xml (original) +++ sling/trunk/contrib/extensions/security/pom.xml Fri Aug 4 14:53:00 2017 @@ -52,18 +52,8 @@ org.apache.felix maven-bundle-plugin true - - -scr-metadata - -manifest - - - -true -sling osgi.implementation;filter:="(&(osgi.implementation=osgi.http)(version=1.0))"
svn commit: r1804129 - /sling/site/trunk/content/documentation/bundles/scheduler-service-commons-scheduler.mdtext
Author: kwin Date: Fri Aug 4 14:26:30 2017 New Revision: 1804129 URL: http://svn.apache.org/viewvc?rev=1804129&view=rev Log: fix code formatting Modified: sling/site/trunk/content/documentation/bundles/scheduler-service-commons-scheduler.mdtext Modified: sling/site/trunk/content/documentation/bundles/scheduler-service-commons-scheduler.mdtext URL: http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/bundles/scheduler-service-commons-scheduler.mdtext?rev=1804129&r1=1804128&r2=1804129&view=diff == --- sling/site/trunk/content/documentation/bundles/scheduler-service-commons-scheduler.mdtext (original) +++ sling/site/trunk/content/documentation/bundles/scheduler-service-commons-scheduler.mdtext Fri Aug 4 14:26:30 2017 @@ -14,7 +14,7 @@ The following examples show you how to d The cron expression format is described in the [Quartz Cron Documentation](http://www.quartz-scheduler.org/documentation/quartz-2.x/tutorials/crontrigger.html#format) and requires either 6 or 7 fields separated by white space. The first field always indicates the second (not the minute). -The following job is executed every minute by setting *scheduler.expression* to the cron expression *"0 * * * * ?"*: +The following job is executed every minute by setting *scheduler.expression* to the cron expression `0 * * * * ?`: package sling.docu.examples;
svn commit: r1016397 - in /websites/staging/sling/trunk/content: ./ documentation/bundles/scheduler-service-commons-scheduler.html
Author: buildbot Date: Fri Aug 4 14:26:41 2017 New Revision: 1016397 Log: Staging update by buildbot for sling Modified: websites/staging/sling/trunk/content/ (props changed) websites/staging/sling/trunk/content/documentation/bundles/scheduler-service-commons-scheduler.html Propchange: websites/staging/sling/trunk/content/ -- --- cms:source-revision (original) +++ cms:source-revision Fri Aug 4 14:26:41 2017 @@ -1 +1 @@ -1804128 +1804129 Modified: websites/staging/sling/trunk/content/documentation/bundles/scheduler-service-commons-scheduler.html == --- websites/staging/sling/trunk/content/documentation/bundles/scheduler-service-commons-scheduler.html (original) +++ websites/staging/sling/trunk/content/documentation/bundles/scheduler-service-commons-scheduler.html Fri Aug 4 14:26:41 2017 @@ -124,7 +124,7 @@ The notion of Job used in this context i The following examples show you how to define and schedule a job by leveraging the whiteboard pattern. Scheduling with a cron expression¶ The cron expression format is described in the http://www.quartz-scheduler.org/documentation/quartz-2.x/tutorials/crontrigger.html#format";>Quartz Cron Documentation and requires either 6 or 7 fields separated by white space. The first field always indicates the second (not the minute). -The following job is executed every minute by setting scheduler.expression to the cron expression "0 * * ?": +The following job is executed every minute by setting scheduler.expression to the cron expression 0 * * * * ?: package sling.docu.examples; import org.slf4j.Logger; @@ -320,7 +320,7 @@ The notion of Job used in this context i } -Rev. 1804128 by kwin on Fri, 4 Aug 2017 14:24:25 + +Rev. 1804129 by kwin on Fri, 4 Aug 2017 14:26:30 + Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project
svn commit: r1016398 - /websites/production/sling/content/
Author: kwin Date: Fri Aug 4 14:27:18 2017 New Revision: 1016398 Log: Publishing svnmucc operation to sling site by kwin Added: websites/production/sling/content/ - copied from r1016397, websites/staging/sling/trunk/content/
svn commit: r1016395 - in /websites/staging/sling/trunk/content: ./ documentation/bundles/scheduler-service-commons-scheduler.html
Author: buildbot Date: Fri Aug 4 14:24:51 2017 New Revision: 1016395 Log: Staging update by buildbot for sling Modified: websites/staging/sling/trunk/content/ (props changed) websites/staging/sling/trunk/content/documentation/bundles/scheduler-service-commons-scheduler.html Propchange: websites/staging/sling/trunk/content/ -- --- cms:source-revision (original) +++ cms:source-revision Fri Aug 4 14:24:51 2017 @@ -1 +1 @@ -1804036 +1804128 Modified: websites/staging/sling/trunk/content/documentation/bundles/scheduler-service-commons-scheduler.html == --- websites/staging/sling/trunk/content/documentation/bundles/scheduler-service-commons-scheduler.html (original) +++ websites/staging/sling/trunk/content/documentation/bundles/scheduler-service-commons-scheduler.html Fri Aug 4 14:24:51 2017 @@ -123,6 +123,7 @@ The notion of Job used in this context i Examples of jobs that are scheduled by leveraging the whiteboard pattern¶ The following examples show you how to define and schedule a job by leveraging the whiteboard pattern. Scheduling with a cron expression¶ +The cron expression format is described in the http://www.quartz-scheduler.org/documentation/quartz-2.x/tutorials/crontrigger.html#format";>Quartz Cron Documentation and requires either 6 or 7 fields separated by white space. The first field always indicates the second (not the minute). The following job is executed every minute by setting scheduler.expression to the cron expression "0 * * ?": package sling.docu.examples; @@ -319,7 +320,7 @@ The notion of Job used in this context i } -Rev. 1688675 by kwin on Wed, 1 Jul 2015 15:58:22 + +Rev. 1804128 by kwin on Fri, 4 Aug 2017 14:24:25 + Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project
svn commit: r1804128 - /sling/site/trunk/content/documentation/bundles/scheduler-service-commons-scheduler.mdtext
Author: kwin Date: Fri Aug 4 14:24:25 2017 New Revision: 1804128 URL: http://svn.apache.org/viewvc?rev=1804128&view=rev Log: clarify scheduler.cron expression format Modified: sling/site/trunk/content/documentation/bundles/scheduler-service-commons-scheduler.mdtext Modified: sling/site/trunk/content/documentation/bundles/scheduler-service-commons-scheduler.mdtext URL: http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/bundles/scheduler-service-commons-scheduler.mdtext?rev=1804128&r1=1804127&r2=1804128&view=diff == --- sling/site/trunk/content/documentation/bundles/scheduler-service-commons-scheduler.mdtext (original) +++ sling/site/trunk/content/documentation/bundles/scheduler-service-commons-scheduler.mdtext Fri Aug 4 14:24:25 2017 @@ -10,7 +10,9 @@ The notion of Job used in this context i The following examples show you how to define and schedule a job by leveraging the whiteboard pattern. -### Scheduling with a cron expression +### Scheduling with a cron expression + +The cron expression format is described in the [Quartz Cron Documentation](http://www.quartz-scheduler.org/documentation/quartz-2.x/tutorials/crontrigger.html#format) and requires either 6 or 7 fields separated by white space. The first field always indicates the second (not the minute). The following job is executed every minute by setting *scheduler.expression* to the cron expression *"0 * * * * ?"*:
svn commit: r1804127 - /sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/Scanner.java
Author: cziegeler Date: Fri Aug 4 14:20:45 2017 New Revision: 1804127 URL: http://svn.apache.org/viewvc?rev=1804127&view=rev Log: Support container descriptor from extension scanner Modified: sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/Scanner.java Modified: sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/Scanner.java URL: http://svn.apache.org/viewvc/sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/Scanner.java?rev=1804127&r1=1804126&r2=1804127&view=diff == --- sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/Scanner.java (original) +++ sling/whiteboard/cziegeler/feature-analyser/src/main/java/org/apache/sling/feature/analyser/Scanner.java Fri Aug 4 14:20:45 2017 @@ -16,6 +16,13 @@ */ package org.apache.sling.feature.analyser; +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.ServiceLoader; + import org.apache.sling.feature.Application; import org.apache.sling.feature.Artifact; import org.apache.sling.feature.Bundles; @@ -33,13 +40,6 @@ import org.apache.sling.feature.scanner. import org.apache.sling.feature.support.ArtifactManager; import org.apache.sling.feature.support.ArtifactManagerConfig; -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.ServiceLoader; - /** * The scanner is a service that scans items and provides descriptions for these. * The following items can be scanned individually @@ -77,9 +77,9 @@ public class Scanner { final List frameworkScanners) throws IOException { this.artifactManager = ArtifactManager.getArtifactManager(amConfig); -this.artifactScanners = artifactScanners; -this.extensionScanners = extensionScanners; -this.frameworkScanners = frameworkScanners; +this.artifactScanners = artifactScanners == null ? getServices(ArtifactScanner.class) : artifactScanners; +this.extensionScanners = extensionScanners == null ? getServices(ExtensionScanner.class) : extensionScanners; +this.frameworkScanners = frameworkScanners == null ? getServices(FrameworkScanner.class) : frameworkScanners; } /** @@ -90,9 +90,7 @@ public class Scanner { */ public Scanner(final ArtifactManagerConfig amConfig) throws IOException { -this(amConfig, getServices(ArtifactScanner.class), -getServices(ExtensionScanner.class), -getServices(FrameworkScanner.class)); +this(amConfig, null, null, null); } /** @@ -212,6 +210,12 @@ public class Scanner { desc.getExportedPackages().addAll(extDesc.getExportedPackages()); desc.getImportedPackages().addAll(extDesc.getImportedPackages()); desc.getDynamicImportedPackages().addAll(extDesc.getDynamicImportedPackages()); + +if ( extDesc instanceof ContainerDescriptor ) { +final ContainerDescriptor cd = (ContainerDescriptor)extDesc; + desc.getArtifactDescriptors().addAll(cd.getArtifactDescriptors()); +desc.getBundleDescriptors().addAll(cd.getBundleDescriptors()); +} } }
svn commit: r1804120 - in /sling/trunk/tooling/maven/maven-sling-plugin/src/main/java/org/apache/sling/maven/bundlesupport: FsMountMojo.java FsUnMountMojo.java
Author: kwin Date: Fri Aug 4 13:38:33 2017 New Revision: 1804120 URL: http://svn.apache.org/viewvc?rev=1804120&view=rev Log: add since information (evaluated in the maven site) Modified: sling/trunk/tooling/maven/maven-sling-plugin/src/main/java/org/apache/sling/maven/bundlesupport/FsMountMojo.java sling/trunk/tooling/maven/maven-sling-plugin/src/main/java/org/apache/sling/maven/bundlesupport/FsUnMountMojo.java Modified: sling/trunk/tooling/maven/maven-sling-plugin/src/main/java/org/apache/sling/maven/bundlesupport/FsMountMojo.java URL: http://svn.apache.org/viewvc/sling/trunk/tooling/maven/maven-sling-plugin/src/main/java/org/apache/sling/maven/bundlesupport/FsMountMojo.java?rev=1804120&r1=1804119&r2=1804120&view=diff == --- sling/trunk/tooling/maven/maven-sling-plugin/src/main/java/org/apache/sling/maven/bundlesupport/FsMountMojo.java (original) +++ sling/trunk/tooling/maven/maven-sling-plugin/src/main/java/org/apache/sling/maven/bundlesupport/FsMountMojo.java Fri Aug 4 13:38:33 2017 @@ -51,6 +51,7 @@ import org.apache.sling.maven.bundlesupp /** * Creates OSGi configurations for the * https://sling.apache.org/documentation/bundles/accessing-filesystem-resources-extensions-fsresource.html";>Apache Sling File System Resource Provider. + * @since 2.2.0 */ @Mojo(name = "fsmount", requiresProject = true) public class FsMountMojo extends AbstractFsMountMojo { @@ -79,12 +80,14 @@ public class FsMountMojo extends Abstrac * * * This has precedence over the deprecated parameter {@link #usePut}. + * @since 2.3.0 */ @Parameter(property="sling.deploy.method", required = false, defaultValue = "WebConsole") private BundleDeploymentMethod deploymentMethod; /** * Deploy org.apache.sling.fsresource to Sling instance bundle when it is not deployed already. + * @since 2.3.0 */ @Parameter(required = false, defaultValue = "true") private boolean deployFsResourceBundle; @@ -122,6 +125,7 @@ public class FsMountMojo extends Abstrac * * * + * @since 2.3.0 */ @Parameter(required = false) private List deployFsResourceBundlePrerequisites; Modified: sling/trunk/tooling/maven/maven-sling-plugin/src/main/java/org/apache/sling/maven/bundlesupport/FsUnMountMojo.java URL: http://svn.apache.org/viewvc/sling/trunk/tooling/maven/maven-sling-plugin/src/main/java/org/apache/sling/maven/bundlesupport/FsUnMountMojo.java?rev=1804120&r1=1804119&r2=1804120&view=diff == --- sling/trunk/tooling/maven/maven-sling-plugin/src/main/java/org/apache/sling/maven/bundlesupport/FsUnMountMojo.java (original) +++ sling/trunk/tooling/maven/maven-sling-plugin/src/main/java/org/apache/sling/maven/bundlesupport/FsUnMountMojo.java Fri Aug 4 13:38:33 2017 @@ -27,6 +27,7 @@ import org.apache.sling.maven.bundlesupp /** * Removes OSGi configurations for the * https://sling.apache.org/documentation/bundles/accessing-filesystem-resources-extensions-fsresource.html";>Apache Sling File System Resource Provider. + * @since 2.2.0 */ @Mojo(name = "fsunmount", requiresProject = true) public class FsUnMountMojo extends AbstractFsMountMojo {
svn commit: r1804116 - /sling/trunk/bundles/extensions/event/resource/src/main/java/org/apache/sling/event/impl/jobs/JobImpl.java
Author: pauls Date: Fri Aug 4 12:54:08 2017 New Revision: 1804116 URL: http://svn.apache.org/viewvc?rev=1804116&view=rev Log: SLING-7027: Fix eta calculation for jobs and make sure we use the new eta on an updated. Modified: sling/trunk/bundles/extensions/event/resource/src/main/java/org/apache/sling/event/impl/jobs/JobImpl.java Modified: sling/trunk/bundles/extensions/event/resource/src/main/java/org/apache/sling/event/impl/jobs/JobImpl.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/resource/src/main/java/org/apache/sling/event/impl/jobs/JobImpl.java?rev=1804116&r1=1804115&r2=1804116&view=diff == --- sling/trunk/bundles/extensions/event/resource/src/main/java/org/apache/sling/event/impl/jobs/JobImpl.java (original) +++ sling/trunk/bundles/extensions/event/resource/src/main/java/org/apache/sling/event/impl/jobs/JobImpl.java Fri Aug 4 12:54:08 2017 @@ -278,7 +278,7 @@ public class JobImpl implements Job, Com final Calendar now = Calendar.getInstance(); final long elapsed = now.getTimeInMillis() - this.getProcessingStarted().getTimeInMillis(); -final long eta = elapsed * steps / step; +final long eta = System.currentTimeMillis() + (elapsed / current) * (steps - current); now.setTimeInMillis(eta); this.setProperty(Job.PROPERTY_JOB_PROGRESS_ETA, now); return new String[] {Job.PROPERTY_JOB_PROGRESS_STEP, Job.PROPERTY_JOB_PROGRESS_ETA}; @@ -291,7 +291,7 @@ public class JobImpl implements Job, Com final Date finishDate = new Date(System.currentTimeMillis() + eta * 1000); final Calendar finishCal = Calendar.getInstance(); finishCal.setTime(finishDate); -this.setProperty(Job.PROPERTY_JOB_PROGRESS_ETA, eta); +this.setProperty(Job.PROPERTY_JOB_PROGRESS_ETA, finishCal); } else { this.properties.remove(Job.PROPERTY_JOB_PROGRESS_ETA); }
Nexus: Staging Completed
Message from: https://repository.apache.orgDescription:Security 1.1.6Deployer properties:"userAgent" = "Apache-Maven/3.5.0 (Java 1.7.0_80; Mac OS X 10.12.6)""userId" = "cziegeler""ip" = "193.104.215.11"Details:The following artifacts have been staged/org/apache/sling/org.apache.sling.security/1.1.6/org.apache.sling.security-1.1.6.pom(SHA1: 04c06533d11e2285c6388122f8be4b798b4da5c9)/org/apache/sling/org.apache.sling.security/1.1.6/org.apache.sling.security-1.1.6-javadoc.jar.asc(SHA1: 8142740586061d528529621b5f0dc6716400d798)/org/apache/sling/org.apache.sling.security/1.1.6/org.apache.sling.security-1.1.6.pom.asc(SHA1: 8b6215f5740e10e250e408973f3188b4a378260a)/org/apache/sling/org.apache.sling.security/1.1.6/org.apache.sling.security-1.1.6-javadoc.jar(SHA1: 25ea04af3923bc46d8f7b12dc2b7d7f5e6bed3e3)/org/apache/sling/org.apache.sling.security/1.1.6/org.apache.sling.security-1.1.6-source-release.zip.asc(SHA1: 072c9d3e7df7be29dd05cca49f6bacceab575ebe)/org/apache/sling/org.apache.sling.security/1.1.6/org.apache.sling.security-1.1.6-sources.jar.asc(SHA1: d51f0d799fae9ab8544e229cedbcacebaf0eb54b)/org/apache/sling/org.apache.sling.security/1.1.6/org.apache.sling.security-1.1.6-sources.jar(SHA1: 2a7ccddd70c07f44592d138b3ace840a7cd69df1)/org/apache/sling/org.apache.sling.security/1.1.6/org.apache.sling.security-1.1.6.jar(SHA1: 7cefabae1ce8215b0bbd6da98e7051c90da4f2d7)/org/apache/sling/org.apache.sling.security/1.1.6/org.apache.sling.security-1.1.6-source-release.zip(SHA1: 1e471d821176f3adab75d45d806d1cdfcec654db)/org/apache/sling/org.apache.sling.security/1.1.6/org.apache.sling.security-1.1.6.jar.asc(SHA1: af29b273f661675ee6d3cb5ffbe37f5579cc9c7c)Action performed by Carsten Ziegeler (cziegeler)
svn commit: r1804114 - /sling/trunk/contrib/extensions/security/pom.xml
Author: cziegeler Date: Fri Aug 4 12:40:50 2017 New Revision: 1804114 URL: http://svn.apache.org/viewvc?rev=1804114&view=rev Log: [maven-release-plugin] prepare for next development iteration Modified: sling/trunk/contrib/extensions/security/pom.xml Modified: sling/trunk/contrib/extensions/security/pom.xml URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/security/pom.xml?rev=1804114&r1=1804113&r2=1804114&view=diff == --- sling/trunk/contrib/extensions/security/pom.xml (original) +++ sling/trunk/contrib/extensions/security/pom.xml Fri Aug 4 12:40:50 2017 @@ -28,7 +28,7 @@ org.apache.sling.security -1.1.6 +1.1.7-SNAPSHOT bundle Apache Sling Security @@ -37,9 +37,9 @@ - scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.security-1.1.6 - scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.security-1.1.6 - http://svn.apache.org/viewvc/sling/tags/org.apache.sling.security-1.1.6 + scm:svn:http://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/security + scm:svn:https://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/security + http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/security
svn commit: r1804113 - /sling/tags/org.apache.sling.security-1.1.6/
Author: cziegeler Date: Fri Aug 4 12:40:48 2017 New Revision: 1804113 URL: http://svn.apache.org/viewvc?rev=1804113&view=rev Log: [maven-release-plugin] copy for tag org.apache.sling.security-1.1.6 Added: sling/tags/org.apache.sling.security-1.1.6/ - copied from r1804112, sling/trunk/contrib/extensions/security/
svn commit: r1804112 - /sling/trunk/contrib/extensions/security/pom.xml
Author: cziegeler Date: Fri Aug 4 12:40:35 2017 New Revision: 1804112 URL: http://svn.apache.org/viewvc?rev=1804112&view=rev Log: [maven-release-plugin] prepare release org.apache.sling.security-1.1.6 Modified: sling/trunk/contrib/extensions/security/pom.xml Modified: sling/trunk/contrib/extensions/security/pom.xml URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/security/pom.xml?rev=1804112&r1=1804111&r2=1804112&view=diff == --- sling/trunk/contrib/extensions/security/pom.xml (original) +++ sling/trunk/contrib/extensions/security/pom.xml Fri Aug 4 12:40:35 2017 @@ -28,7 +28,7 @@ org.apache.sling.security -1.1.5-SNAPSHOT +1.1.6 bundle Apache Sling Security @@ -37,9 +37,9 @@ - scm:svn:http://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/security - scm:svn:https://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/security - http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/security + scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.security-1.1.6 + scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.security-1.1.6 + http://svn.apache.org/viewvc/sling/tags/org.apache.sling.security-1.1.6
svn commit: r1804109 - /sling/whiteboard/cziegeler/feature-modelconverter/src/main/java/org/apache/sling/feature/modelconverter/impl/Main.java
Author: cziegeler Date: Fri Aug 4 12:27:37 2017 New Revision: 1804109 URL: http://svn.apache.org/viewvc?rev=1804109&view=rev Log: Fix include of sling models Modified: sling/whiteboard/cziegeler/feature-modelconverter/src/main/java/org/apache/sling/feature/modelconverter/impl/Main.java Modified: sling/whiteboard/cziegeler/feature-modelconverter/src/main/java/org/apache/sling/feature/modelconverter/impl/Main.java URL: http://svn.apache.org/viewvc/sling/whiteboard/cziegeler/feature-modelconverter/src/main/java/org/apache/sling/feature/modelconverter/impl/Main.java?rev=1804109&r1=1804108&r2=1804109&view=diff == --- sling/whiteboard/cziegeler/feature-modelconverter/src/main/java/org/apache/sling/feature/modelconverter/impl/Main.java (original) +++ sling/whiteboard/cziegeler/feature-modelconverter/src/main/java/org/apache/sling/feature/modelconverter/impl/Main.java Fri Aug 4 12:27:37 2017 @@ -16,6 +16,19 @@ */ package org.apache.sling.feature.modelconverter.impl; +import java.io.File; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Enumeration; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + import org.apache.commons.cli.BasicParser; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; @@ -52,19 +65,6 @@ import org.osgi.framework.Constants; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.io.File; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Enumeration; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; - public class Main { private static Logger LOGGER; @@ -388,7 +388,13 @@ public class Main { final ArtifactManagerConfig cfg = new ArtifactManagerConfig(); final ArtifactManager mgr = ArtifactManager.getArtifactManager(cfg); -final ArtifactHandler handler = mgr.getArtifactHandler(a.toMvnUrl()); +final ArtifactId correctedId = new ArtifactId(a.getGroupId(), +a.getArtifactId(), +a.getVersion(), +"slingstart".equals(a.getType()) ? "slingfeature" : a.getClassifier(), +"txt"); + +final ArtifactHandler handler = mgr.getArtifactHandler(correctedId.toMvnUrl()); model = processModel(model, handler.getFile()); removeList.add(a);
svn commit: r1804107 - in /sling/whiteboard/cziegeler/feature/src: main/java/org/apache/sling/feature/ArtifactId.java test/java/org/apache/sling/feature/ArtifactIdTest.java
Author: cziegeler Date: Fri Aug 4 12:01:23 2017 New Revision: 1804107 URL: http://svn.apache.org/viewvc?rev=1804107&view=rev Log: Support versions with dots in qualifier Modified: sling/whiteboard/cziegeler/feature/src/main/java/org/apache/sling/feature/ArtifactId.java sling/whiteboard/cziegeler/feature/src/test/java/org/apache/sling/feature/ArtifactIdTest.java Modified: sling/whiteboard/cziegeler/feature/src/main/java/org/apache/sling/feature/ArtifactId.java URL: http://svn.apache.org/viewvc/sling/whiteboard/cziegeler/feature/src/main/java/org/apache/sling/feature/ArtifactId.java?rev=1804107&r1=1804106&r2=1804107&view=diff == --- sling/whiteboard/cziegeler/feature/src/main/java/org/apache/sling/feature/ArtifactId.java (original) +++ sling/whiteboard/cziegeler/feature/src/main/java/org/apache/sling/feature/ArtifactId.java Fri Aug 4 12:01:23 2017 @@ -260,6 +260,13 @@ public class ArtifactId implements Compa parts = newParts; } } +if ( parts.length >= 4 ) { +final int pos = parts[2].indexOf('-'); +if ( pos != -1 ) { +parts[3] = parts[2].substring(pos + 1) + "." + parts[3]; +parts[2] = parts[2].substring(0, pos); +} +} if ( parts.length > 4 ) { final StringBuilder sb = new StringBuilder(parts[3]); for(int i=4; ihttp://svn.apache.org/viewvc/sling/whiteboard/cziegeler/feature/src/test/java/org/apache/sling/feature/ArtifactIdTest.java?rev=1804107&r1=1804106&r2=1804107&view=diff == --- sling/whiteboard/cziegeler/feature/src/test/java/org/apache/sling/feature/ArtifactIdTest.java (original) +++ sling/whiteboard/cziegeler/feature/src/test/java/org/apache/sling/feature/ArtifactIdTest.java Fri Aug 4 12:01:23 2017 @@ -16,11 +16,11 @@ */ package org.apache.sling.feature; -import org.junit.Test; - import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; +import org.junit.Test; + public class ArtifactIdTest { private static final String G = "g"; @@ -103,4 +103,13 @@ public class ArtifactIdTest { assertEquals(2, v.getMicro()); assertEquals("SNAPSHOT", v.getQualifier()); } + +@Test +public void testStrangeVersions() { +final Version v = new ArtifactId(G, A, "3.0.3-20170712.062549-4", null, null).getOSGiVersion(); +assertEquals(3, v.getMajor()); +assertEquals(0, v.getMinor()); +assertEquals(3, v.getMicro()); +assertEquals("20170712_062549-4", v.getQualifier()); +} }
Nexus: Staging Completed
Message from: https://repository.apache.orgDescription:Apache Sling Parent 31Deployer properties:"userAgent" = "Apache-Maven/3.5.0 (Java 1.8.0_141; Mac OS X 10.12.6)""userId" = "kwin""ip" = "213.61.79.222"Details:The following artifacts have been staged/org/apache/sling/sling/31/sling-31.pom(SHA1: ec1724640ee66de9cf07fb59106992cdaf29df71)/org/apache/sling/sling/31/sling-31-source-release.zip(SHA1: 246db992bfbaecffa5f36f5b0ea5d79274516249)/org/apache/sling/sling/31/sling-31-source-release.zip.asc(SHA1: bd1797b07788b4cf1789f3b6acce0ca0827afb58)/org/apache/sling/sling/31/sling-31.pom.asc(SHA1: a283aed289860dbd01c839e603d6f97ece9f31c1)Action performed by Konrad Windszus (kwin)
svn commit: r1804103 - /sling/trunk/parent/pom.xml
Author: kwin Date: Fri Aug 4 11:46:36 2017 New Revision: 1804103 URL: http://svn.apache.org/viewvc?rev=1804103&view=rev Log: [maven-release-plugin] prepare release sling-31 Modified: sling/trunk/parent/pom.xml Modified: sling/trunk/parent/pom.xml URL: http://svn.apache.org/viewvc/sling/trunk/parent/pom.xml?rev=1804103&r1=1804102&r2=1804103&view=diff == --- sling/trunk/parent/pom.xml (original) +++ sling/trunk/parent/pom.xml Fri Aug 4 11:46:36 2017 @@ -28,7 +28,7 @@ org.apache.sling sling pom -31-SNAPSHOT +31 Apache Sling (Parent) The parent project for Apache Sling @@ -71,9 +71,9 @@ - scm:svn:http://svn.apache.org/repos/asf/sling/trunk/parent - scm:svn:https://svn.apache.org/repos/asf/sling/trunk/parent -http://svn.apache.org/viewvc/sling/trunk/parent + scm:svn:http://svn.apache.org/repos/asf/sling/tags/sling-31 + scm:svn:https://svn.apache.org/repos/asf/sling/tags/sling-31 +http://svn.apache.org/viewvc/sling/tags/sling-31
svn commit: r1804105 - /sling/trunk/parent/pom.xml
Author: kwin Date: Fri Aug 4 11:46:52 2017 New Revision: 1804105 URL: http://svn.apache.org/viewvc?rev=1804105&view=rev Log: [maven-release-plugin] prepare for next development iteration Modified: sling/trunk/parent/pom.xml Modified: sling/trunk/parent/pom.xml URL: http://svn.apache.org/viewvc/sling/trunk/parent/pom.xml?rev=1804105&r1=1804104&r2=1804105&view=diff == --- sling/trunk/parent/pom.xml (original) +++ sling/trunk/parent/pom.xml Fri Aug 4 11:46:52 2017 @@ -28,7 +28,7 @@ org.apache.sling sling pom -31 +32-SNAPSHOT Apache Sling (Parent) The parent project for Apache Sling @@ -71,9 +71,9 @@ - scm:svn:http://svn.apache.org/repos/asf/sling/tags/sling-31 - scm:svn:https://svn.apache.org/repos/asf/sling/tags/sling-31 -http://svn.apache.org/viewvc/sling/tags/sling-31 + scm:svn:http://svn.apache.org/repos/asf/sling/trunk/parent + scm:svn:https://svn.apache.org/repos/asf/sling/trunk/parent +http://svn.apache.org/viewvc/sling/trunk/parent
svn commit: r1804104 - /sling/tags/sling-31/
Author: kwin Date: Fri Aug 4 11:46:50 2017 New Revision: 1804104 URL: http://svn.apache.org/viewvc?rev=1804104&view=rev Log: [maven-release-plugin] copy for tag sling-31 Added: sling/tags/sling-31/ - copied from r1804103, sling/trunk/parent/
svn commit: r1804102 - in /sling/trunk/contrib/extensions/security: ./ src/main/java/org/apache/sling/security/impl/ src/main/resources/OSGI-INF/metatype/ src/test/java/org/apache/sling/security/impl/
Author: cziegeler Date: Fri Aug 4 11:28:45 2017 New Revision: 1804102 URL: http://svn.apache.org/viewvc?rev=1804102&view=rev Log: SLING-7030 : ReferrerFilter broken as legacy SCR Annotations are not processed. Apply modified patch from Dominique Jäggi Removed: sling/trunk/contrib/extensions/security/src/main/resources/OSGI-INF/metatype/metatype.properties Modified: sling/trunk/contrib/extensions/security/pom.xml sling/trunk/contrib/extensions/security/src/main/java/org/apache/sling/security/impl/ReferrerFilter.java sling/trunk/contrib/extensions/security/src/test/java/org/apache/sling/security/impl/ReferrerFilterTest.java Modified: sling/trunk/contrib/extensions/security/pom.xml URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/security/pom.xml?rev=1804102&r1=1804101&r2=1804102&view=diff == --- sling/trunk/contrib/extensions/security/pom.xml (original) +++ sling/trunk/contrib/extensions/security/pom.xml Fri Aug 4 11:28:45 2017 @@ -45,10 +45,6 @@ -org.apache.felix -maven-scr-plugin - - org.apache.sling maven-sling-plugin @@ -56,15 +52,18 @@ org.apache.felix maven-bundle-plugin true + + +scr-metadata + +manifest + + + +true sling - - org.apache.sling.commons.osgi;inline=org/apache/sling/commons/osgi/PropertiesUtil.* - - -org.apache.sling.security.impl - osgi.implementation;filter:="(&(osgi.implementation=osgi.http)(version=1.0))" @@ -90,33 +89,16 @@ provided -org.apache.felix -org.apache.felix.scr.annotations -provided - - org.apache.sling org.apache.sling.api 2.1.0 provided -org.apache.sling -org.apache.sling.commons.osgi -2.1.0 -provided - - org.slf4j slf4j-api -org.apache.commons -commons-lang3 -3.4 -provided - - org.apache.felix org.apache.felix.webconsole 3.1.0 Modified: sling/trunk/contrib/extensions/security/src/main/java/org/apache/sling/security/impl/ReferrerFilter.java URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/security/src/main/java/org/apache/sling/security/impl/ReferrerFilter.java?rev=1804102&r1=1804101&r2=1804102&view=diff == --- sling/trunk/contrib/extensions/security/src/main/java/org/apache/sling/security/impl/ReferrerFilter.java (original) +++ sling/trunk/contrib/extensions/security/src/main/java/org/apache/sling/security/impl/ReferrerFilter.java Fri Aug 4 11:28:45 2017 @@ -32,7 +32,6 @@ import java.util.Enumeration; import java.util.HashSet; import java.util.Hashtable; import java.util.List; -import java.util.Map; import java.util.Set; import java.util.regex.Pattern; @@ -45,29 +44,27 @@ import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.apache.felix.scr.annotations.Activate; -import org.apache.felix.scr.annotations.Component; -import org.apache.felix.scr.annotations.Deactivate; -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.Service; -import org.apache.sling.commons.osgi.PropertiesUtil; import org.osgi.framework.BundleContext; import org.osgi.framework.Constants; import org.osgi.framework.ServiceRegistration; +import org.osgi.service.component.annotations.Activate; +import org.osgi.service.component.annotations.Component; +import org.osgi.service.component.annotations.Deactivate; import org.osgi.service.http.whiteboard.HttpWhiteboardConstants; +import org.osgi.service.metatype.annotations.AttributeDefinition; +import org.osgi.service.metatype.annotations.Designate; +import org.osgi.service.metatype.annotations.ObjectClassDefinition; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -@Component(metatype=true, description="%referrer.description", -label="%referrer.nam
svn commit: r1804100 - /sling/trunk/parent/pom.xml
Author: kwin Date: Fri Aug 4 11:21:12 2017 New Revision: 1804100 URL: http://svn.apache.org/viewvc?rev=1804100&view=rev Log: SLING-6678 reference bndlib in the same version as being referenced from the maven-bundle-plugin 3.3.0 Modified: sling/trunk/parent/pom.xml Modified: sling/trunk/parent/pom.xml URL: http://svn.apache.org/viewvc/sling/trunk/parent/pom.xml?rev=1804100&r1=1804099&r2=1804100&view=diff == --- sling/trunk/parent/pom.xml (original) +++ sling/trunk/parent/pom.xml Fri Aug 4 11:21:12 2017 @@ -414,7 +414,7 @@ biz.aQute.bnd bnd-maven-plugin -3.2.0 +3.3.0 org.apache.maven.plugins @@ -1188,7 +1188,7 @@ biz.aQute.bnd biz.aQute.bndlib -3.2.0 +3.3.0 provided
svn commit: r1804099 - /sling/trunk/parent/pom.xml
Author: kwin Date: Fri Aug 4 11:19:27 2017 New Revision: 1804099 URL: http://svn.apache.org/viewvc?rev=1804099&view=rev Log: SLING-6746 remove the deprecated Felix scr annotations from plugin mgmt Modified: sling/trunk/parent/pom.xml Modified: sling/trunk/parent/pom.xml URL: http://svn.apache.org/viewvc/sling/trunk/parent/pom.xml?rev=1804099&r1=1804098&r2=1804099&view=diff == --- sling/trunk/parent/pom.xml (original) +++ sling/trunk/parent/pom.xml Fri Aug 4 11:19:27 2017 @@ -1183,14 +1183,6 @@ - - -org.apache.felix -org.apache.felix.scr.annotations -1.12.0 -provided - -
svn commit: r1804086 - /sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/m2e/internal/ContentPackageProjectConfigurator.java
Author: kwin Date: Fri Aug 4 09:47:32 2017 New Revision: 1804086 URL: http://svn.apache.org/viewvc?rev=1804086&view=rev Log: SLING-6190 only try to modify natures in case something new was really added Modified: sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/m2e/internal/ContentPackageProjectConfigurator.java Modified: sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/m2e/internal/ContentPackageProjectConfigurator.java URL: http://svn.apache.org/viewvc/sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/m2e/internal/ContentPackageProjectConfigurator.java?rev=1804086&r1=1804085&r2=1804086&view=diff == --- sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/m2e/internal/ContentPackageProjectConfigurator.java (original) +++ sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/m2e/internal/ContentPackageProjectConfigurator.java Fri Aug 4 09:47:32 2017 @@ -122,17 +122,22 @@ public class ContentPackageProjectConfig String[] oldNatureIds = description.getNatureIds(); Set newNatureIdSet = new TreeSet(); newNatureIdSet.addAll(Arrays.asList(oldNatureIds)); -newNatureIdSet.addAll(Arrays.asList(natureIdsToAdd)); -String[] newNatureIds = newNatureIdSet.toArray(new String[newNatureIdSet.size()]); -IStatus status = project.getWorkspace().validateNatureSet(newNatureIds); -// check the status and decide what to do -if (status.getCode() == IStatus.OK) { -description.setNatureIds(newNatureIds); -project.setDescription(description, IResource.KEEP_HISTORY, progressMonitor); +// check if there is a nature change really requested +if (newNatureIdSet.addAll(Arrays.asList(natureIdsToAdd))) { +String[] newNatureIds = newNatureIdSet.toArray(new String[newNatureIdSet.size()]); +IStatus status = project.getWorkspace().validateNatureSet(newNatureIds); +// check the status and decide what to do +if (status.getCode() == IStatus.OK) { +trace("Modifiying natures of project {1} to {0}", Arrays.toString(newNatureIds), project); +description.setNatureIds(newNatureIds); +project.setDescription(description, IResource.KEEP_HISTORY, progressMonitor); +} else { +StatusManager.getManager().handle(status, StatusManager.LOG|StatusManager.SHOW); +// add marker +addMarker(pomResource, "Could not add all necessary WTP natures: " + status.getMessage(), IMarker.SEVERITY_ERROR); +} } else { -StatusManager.getManager().handle(status, StatusManager.LOG|StatusManager.SHOW); -// add marker -addMarker(pomResource, "Could not add all necessary WTP natures: " + status.getMessage(), IMarker.SEVERITY_ERROR); +trace("Not modifiying natures of project {1} as required natures {0} are already set ", Arrays.toString(natureIdsToAdd), project); } }
svn commit: r1804084 - /sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/m2e/internal/ContentPackageProjectConfigurator.java
Author: kwin Date: Fri Aug 4 09:33:53 2017 New Revision: 1804084 URL: http://svn.apache.org/viewvc?rev=1804084&view=rev Log: SLING-6190 improve exposure of Status via the Eclipse default status handler Modified: sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/m2e/internal/ContentPackageProjectConfigurator.java Modified: sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/m2e/internal/ContentPackageProjectConfigurator.java URL: http://svn.apache.org/viewvc/sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/m2e/internal/ContentPackageProjectConfigurator.java?rev=1804084&r1=1804083&r2=1804084&view=diff == --- sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/m2e/internal/ContentPackageProjectConfigurator.java (original) +++ sling/trunk/tooling/ide/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/m2e/internal/ContentPackageProjectConfigurator.java Fri Aug 4 09:33:53 2017 @@ -42,6 +42,7 @@ import org.eclipse.jst.j2ee.web.project. import org.eclipse.jst.j2ee.web.project.facet.WebFacetInstallDataModelProvider; import org.eclipse.jst.j2ee.web.project.facet.WebFacetUtils; import org.eclipse.m2e.core.project.configurator.ProjectConfigurationRequest; +import org.eclipse.ui.statushandlers.StatusManager; import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory; import org.eclipse.wst.common.frameworks.datamodel.IDataModel; import org.eclipse.wst.common.project.facet.core.IFacetedProject; @@ -129,6 +130,7 @@ public class ContentPackageProjectConfig description.setNatureIds(newNatureIds); project.setDescription(description, IResource.KEEP_HISTORY, progressMonitor); } else { +StatusManager.getManager().handle(status, StatusManager.LOG|StatusManager.SHOW); // add marker addMarker(pomResource, "Could not add all necessary WTP natures: " + status.getMessage(), IMarker.SEVERITY_ERROR); }
svn commit: r1804073 - /sling/trunk/testing/http/clients/src/main/java/org/apache/sling/testing/clients/osgi/OsgiConsoleClient.java
Author: rombert Date: Fri Aug 4 07:40:20 2017 New Revision: 1804073 URL: http://svn.apache.org/viewvc?rev=1804073&view=rev Log: SLING-7029 - Extension - adding method to stop a bundle method to stop a bundle added. public void stopBundle(String symbolicName) Submitted-By: Andreea Dieaconu Closes #249 Modified: sling/trunk/testing/http/clients/src/main/java/org/apache/sling/testing/clients/osgi/OsgiConsoleClient.java Modified: sling/trunk/testing/http/clients/src/main/java/org/apache/sling/testing/clients/osgi/OsgiConsoleClient.java URL: http://svn.apache.org/viewvc/sling/trunk/testing/http/clients/src/main/java/org/apache/sling/testing/clients/osgi/OsgiConsoleClient.java?rev=1804073&r1=1804072&r2=1804073&view=diff == --- sling/trunk/testing/http/clients/src/main/java/org/apache/sling/testing/clients/osgi/OsgiConsoleClient.java (original) +++ sling/trunk/testing/http/clients/src/main/java/org/apache/sling/testing/clients/osgi/OsgiConsoleClient.java Fri Aug 4 07:40:20 2017 @@ -563,6 +563,18 @@ public class OsgiConsoleClient extends S LOG.info("Starting bundle {} via {}", symbolicName, path); this.doPost(path, FormEntityBuilder.create().addParameter("action", "start").build(), SC_OK); } + +/** + * Stop a bundle + * @param symbolicName the name of the bundle + * @throws ClientException + */ +public void stopBundle(String symbolicName) throws ClientException { +// To stop the bundle we POST action=stop to its URL +final String path = getBundlePath(symbolicName); +LOG.info("Stopping bundle {} via {}", symbolicName, path); +this.doPost(path, FormEntityBuilder.create().addParameter("action", "stop").build(), SC_OK); +} /** @@ -731,4 +743,4 @@ public class OsgiConsoleClient extends S return config; } } -} \ No newline at end of file +}