Jenkins build is still unstable: sling-launchpad-testing-9 #9

2017-09-18 Thread Apache Jenkins Server
See 



Build failed in Jenkins: sling-launchpad-testing-war-9 #9

2017-09-18 Thread Apache Jenkins Server
See 


--
[...truncated 19.53 KB...]
[INFO] Downloaded: 
https://repo.maven.apache.org/maven2/org/apache/sling/org.apache.sling.auth.core/1.4.0/org.apache.sling.auth.core-1.4.0.pom
 (8 KB at 401.0 KB/sec)
[INFO] Downloading: 
https://repo.maven.apache.org/maven2/org/apache/sling/org.apache.sling.commons.compiler/2.3.4/org.apache.sling.commons.compiler-2.3.4.pom
[INFO] Downloaded: 
https://repo.maven.apache.org/maven2/org/apache/sling/org.apache.sling.commons.compiler/2.3.4/org.apache.sling.commons.compiler-2.3.4.pom
 (5 KB at 164.5 KB/sec)
[INFO] Downloading: 
https://repo.maven.apache.org/maven2/org/apache/sling/org.apache.sling.fsresource/2.1.8/org.apache.sling.fsresource-2.1.8.pom
[INFO] Downloaded: 
https://repo.maven.apache.org/maven2/org/apache/sling/org.apache.sling.fsresource/2.1.8/org.apache.sling.fsresource-2.1.8.pom
 (8 KB at 371.7 KB/sec)
[INFO] Downloading: 
https://repo.maven.apache.org/maven2/org/apache/sling/org.apache.sling.jcr.contentparser/1.2.4/org.apache.sling.jcr.contentparser-1.2.4.pom
[INFO] Downloaded: 
https://repo.maven.apache.org/maven2/org/apache/sling/org.apache.sling.jcr.contentparser/1.2.4/org.apache.sling.jcr.contentparser-1.2.4.pom
 (6 KB at 55.4 KB/sec)
[INFO] Downloading: 
https://repo.maven.apache.org/maven2/org/apache/sling/org.apache.sling.jcr.resource/3.0.4/org.apache.sling.jcr.resource-3.0.4.pom
[WARNING] Failed to write tracking file 
/home/jenkins/jenkins-slave/maven-repositories/0/org/apache/sling/org.apache.sling.jcr.resource/3.0.4/org.apache.sling.jcr.resource-3.0.4.pom.lastUpdated
java.io.IOException: No space left on device
at java.base/java.io.RandomAccessFile.writeBytes(Native Method)
at java.base/java.io.RandomAccessFile.write(RandomAccessFile.java:544)
at 
org.eclipse.aether.internal.impl.TrackingFileManager.update(TrackingFileManager.java:129)
at 
org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.write(DefaultUpdateCheckManager.java:617)
at 
org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.touchArtifact(DefaultUpdateCheckManager.java:553)
at 
org.eclipse.aether.internal.impl.DefaultArtifactResolver.evaluateDownloads(DefaultArtifactResolver.java:645)
at 
org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:535)
at 
org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
at 
org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
at 
org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
at 
org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:267)
at 
org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:198)
at 
org.eclipse.aether.internal.impl.DefaultDependencyCollector.resolveCachedArtifactDescriptor(DefaultDependencyCollector.java:535)
at 
org.eclipse.aether.internal.impl.DefaultDependencyCollector.getArtifactDescriptorResult(DefaultDependencyCollector.java:519)
at 
org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:409)
at 
org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:363)
at 
org.eclipse.aether.internal.impl.DefaultDependencyCollector.process(DefaultDependencyCollector.java:351)
at 
org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:254)
at 
org.eclipse.aether.internal.impl.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:316)
at 
org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:172)
at 
org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:195)
at 
org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:127)
at 
org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:245)
at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:199)
at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
  

svn commit: r1808776 - in /sling/trunk/launchpad: integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/scripting/htl/ integration-tests/src/main/resources/integration-test

2017-09-18 Thread rombert
Author: rombert
Date: Mon Sep 18 20:39:57 2017
New Revision: 1808776

URL: http://svn.apache.org/viewvc?rev=1808776=rev
Log:
SLING-7133 - Add minimal HTL tests to launchpad/testing

Add a test which uses a Sling Model bean - passes with Java 8 but fails
with Java 9.

Added:

sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/htl/model.html

sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/models/

sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/models/DummyModel.java
Modified:

sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/scripting/htl/HtlTest.java
sling/trunk/launchpad/test-services/pom.xml

Modified: 
sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/scripting/htl/HtlTest.java
URL: 
http://svn.apache.org/viewvc/sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/scripting/htl/HtlTest.java?rev=1808776=1808775=1808776=diff
==
--- 
sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/scripting/htl/HtlTest.java
 (original)
+++ 
sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/scripting/htl/HtlTest.java
 Mon Sep 18 20:39:57 2017
@@ -53,6 +53,20 @@ public class HtlTest extends HttpTestBas
 
 String content = getContent(HTTP_BASE_URL + 
"/content/htl/java-use-bean.html", CONTENT_TYPE_DONTCARE, null, 200);
 
-assertTrue("Expected content to contain 'from-js-use-script'", 
content.contains("from-java-use-bean"));
+assertTrue("Expected content to contain 'from-java-use-script'", 
content.contains("from-java-use-bean"));
+}
+
+public void testScriptWithModelUseBean() throws IOException {
+
+testClient.mkdirs(HTTP_BASE_URL, "/apps/sling/test/htl/model");
+testClient.mkdirs(HTTP_BASE_URL, "/content/htl");
+
+testClient.upload(HTTP_BASE_URL + 
"/apps/sling/test/htl/model/model.html", 
getClass().getResourceAsStream("/integration-test/htl/model.html"));
+
+testClient.createNode(HTTP_BASE_URL + "/content/htl/model-use-bean", 
Collections.singletonMap("sling:resourceType", "sling/test/htl/model"));
+
+String content = getContent(HTTP_BASE_URL + 
"/content/htl/model-use-bean.html", CONTENT_TYPE_DONTCARE, null, 200);
+
+assertTrue("Expected content to contain 'from-sling-model'", 
content.contains("from-sling-model"));
 }
 }

Added: 
sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/htl/model.html
URL: 
http://svn.apache.org/viewvc/sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/htl/model.html?rev=1808776=auto
==
--- 
sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/htl/model.html
 (added)
+++ 
sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/htl/model.html
 Mon Sep 18 20:39:57 2017
@@ -0,0 +1,29 @@
+
+
+
+ 
+   Page with Model use-bean
+  
+  
+   
+   ${model.message}
+   
+  
+
\ No newline at end of file

Modified: sling/trunk/launchpad/test-services/pom.xml
URL: 
http://svn.apache.org/viewvc/sling/trunk/launchpad/test-services/pom.xml?rev=1808776=1808775=1808776=diff
==
--- sling/trunk/launchpad/test-services/pom.xml (original)
+++ sling/trunk/launchpad/test-services/pom.xml Mon Sep 18 20:39:57 2017
@@ -59,7 +59,8 @@
 *
 
 
-  org.apache.sling.launchpad.testservices.exported.*
+  org.apache.sling.launchpad.testservices.exported,
+  org.apache.sling.launchpad.testservices.models
 
 
 org.apache.sling.launchpad.testservices.*
@@ -81,6 +82,9 @@
 
 
org.apache.felix.utils;inline=org/apache/felix/utils/json/JSONWriter.class
 
+
+  org.apache.sling.launchpad.testservices.models
+
 
 
 
@@ -162,6 +166,11 @@
 
 
 org.apache.sling
+org.apache.sling.models.api
+1.3.6
+
+
+org.apache.sling
 org.apache.sling.junit.core
 1.0.26
 provided

Added: 

svn commit: r1808775 - in /sling/trunk/launchpad/integration-tests/src/main: java/org/apache/sling/launchpad/webapp/integrationtest/scripting/htl/ resources/integration-test/htl/

2017-09-18 Thread rombert
Author: rombert
Date: Mon Sep 18 20:39:45 2017
New Revision: 1808775

URL: http://svn.apache.org/viewvc?rev=1808775=rev
Log:
SLING-7133 - Add minimal HTL tests to launchpad/testing

Add first batch of tests - simple HTL scripts with JS and Java use

Added:

sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/scripting/htl/

sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/scripting/htl/HtlTest.java

sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/htl/

sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/htl/Bean.java

sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/htl/java.html

sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/htl/js.html

sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/htl/script.js

Added: 
sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/scripting/htl/HtlTest.java
URL: 
http://svn.apache.org/viewvc/sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/scripting/htl/HtlTest.java?rev=1808775=auto
==
--- 
sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/scripting/htl/HtlTest.java
 (added)
+++ 
sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/scripting/htl/HtlTest.java
 Mon Sep 18 20:39:45 2017
@@ -0,0 +1,58 @@
+/*
+ * 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.launchpad.webapp.integrationtest.scripting.htl;
+
+import java.io.IOException;
+import java.util.Collections;
+
+import org.apache.sling.commons.testing.integration.HttpTestBase;
+
+public class HtlTest extends HttpTestBase {
+
+protected void tearDown() throws IOException {
+testClient.delete(HTTP_BASE_URL + "/apps/sling/test/htl");
+testClient.delete(HTTP_BASE_URL + "/content/htl");
+}
+
+public void testScriptWithJsUseBean() throws IOException {
+
+testClient.mkdirs(HTTP_BASE_URL, "/apps/sling/test/htl/js");
+testClient.upload(HTTP_BASE_URL + "/apps/sling/test/htl/js/js.html", 
getClass().getResourceAsStream("/integration-test/htl/js.html"));
+testClient.upload(HTTP_BASE_URL + "/apps/sling/test/htl/js/script.js", 
getClass().getResourceAsStream("/integration-test/htl/script.js"));
+
+testClient.createNode(HTTP_BASE_URL + "/content/htl/js-use-bean", 
Collections.singletonMap("sling:resourceType", "sling/test/htl/js"));
+
+String content = getContent(HTTP_BASE_URL + 
"/content/htl/js-use-bean.html", CONTENT_TYPE_DONTCARE, null, 200);
+
+assertTrue("Expected content to contain 'from-js-use-script'", 
content.contains("from-js-use-script"));
+}
+
+public void testScriptWithJavaUseBean() throws IOException {
+
+testClient.mkdirs(HTTP_BASE_URL, "/apps/sling/test/htl/java");
+testClient.mkdirs(HTTP_BASE_URL, "/content/htl");
+
+testClient.upload(HTTP_BASE_URL + 
"/apps/sling/test/htl/java/java.html", 
getClass().getResourceAsStream("/integration-test/htl/java.html"));
+testClient.upload(HTTP_BASE_URL + 
"/apps/sling/test/htl/java/Bean.java", 
getClass().getResourceAsStream("/integration-test/htl/Bean.java"));
+
+testClient.createNode(HTTP_BASE_URL + "/content/htl/java-use-bean", 
Collections.singletonMap("sling:resourceType", "sling/test/htl/java"));
+
+String content = getContent(HTTP_BASE_URL + 
"/content/htl/java-use-bean.html", CONTENT_TYPE_DONTCARE, null, 200);
+
+assertTrue("Expected content to contain 'from-js-use-script'", 
content.contains("from-java-use-bean"));
+}
+}

Added: 
sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/htl/Bean.java
URL: 

svn commit: r1808765 - /sling/trunk/launchpad/builder/src/main/provisioning/sling.txt

2017-09-18 Thread rombert
Author: rombert
Date: Mon Sep 18 19:28:27 2017
New Revision: 1808765

URL: http://svn.apache.org/viewvc?rev=1808765=rev
Log:
Update to commons-lang 3.6

Modified:
sling/trunk/launchpad/builder/src/main/provisioning/sling.txt

Modified: sling/trunk/launchpad/builder/src/main/provisioning/sling.txt
URL: 
http://svn.apache.org/viewvc/sling/trunk/launchpad/builder/src/main/provisioning/sling.txt?rev=1808765=1808764=1808765=diff
==
--- sling/trunk/launchpad/builder/src/main/provisioning/sling.txt (original)
+++ sling/trunk/launchpad/builder/src/main/provisioning/sling.txt Mon Sep 18 
19:28:27 2017
@@ -29,7 +29,7 @@
 org.apache.commons/commons-collections4/4.1
 commons-codec/commons-codec/1.9
 commons-lang/commons-lang/2.6
-org.apache.commons/commons-lang3/3.5
+org.apache.commons/commons-lang3/3.6
 org.apache.commons/commons-math/2.2
 org.apache.geronimo.bundles/commons-httpclient/3.1_1
 org.apache.httpcomponents/httpcore-osgi/4.4.1




svn commit: r1808734 - in /sling/whiteboard/cziegeler/example: ./ sling/

2017-09-18 Thread pauls
Author: pauls
Date: Mon Sep 18 15:15:55 2017
New Revision: 1808734

URL: http://svn.apache.org/viewvc?rev=1808734=rev
Log:
Add a simple conversion of sling provisioning files to features as an example.

Added:
sling/whiteboard/cziegeler/example/
sling/whiteboard/cziegeler/example/sling/
sling/whiteboard/cziegeler/example/sling/boot.json
sling/whiteboard/cziegeler/example/sling/composum-console.json
sling/whiteboard/cziegeler/example/sling/launchpad.json
sling/whiteboard/cziegeler/example/sling/models-jacksonexporter.json
sling/whiteboard/cziegeler/example/sling/oak.json
sling/whiteboard/cziegeler/example/sling/repoinit.json
sling/whiteboard/cziegeler/example/sling/sling-event.json
sling/whiteboard/cziegeler/example/sling/sling-validation.json
sling/whiteboard/cziegeler/example/sling/sling.json
sling/whiteboard/cziegeler/example/sling/slingshot.json
sling/whiteboard/cziegeler/example/sling/standalone.json

Added: sling/whiteboard/cziegeler/example/sling/boot.json
URL: 
http://svn.apache.org/viewvc/sling/whiteboard/cziegeler/example/sling/boot.json?rev=1808734=auto
==
--- sling/whiteboard/cziegeler/example/sling/boot.json (added)
+++ sling/whiteboard/cziegeler/example/sling/boot.json Mon Sep 18 15:15:55 2017
@@ -0,0 +1 @@
+{"id":"generated/:boot/1.0.0","bundles":{"1":["org.apache.aries/org.apache.aries.util/1.1.3","org.apache.felix/org.apache.felix.configadmin/1.9.0-SNAPSHOT","org.apache.felix/org.apache.felix.eventadmin/1.4.10","org.apache.geronimo.specs/geronimo-atinject_1.0_spec/1.0","org.apache.sling/org.apache.sling.commons.log/5.0.2","org.apache.sling/org.apache.sling.commons.logservice/1.0.6","org.apache.sling/org.apache.sling.fragment.transaction/1.0.0","org.apache.sling/org.apache.sling.fragment.ws/1.0.2","org.apache.sling/org.apache.sling.fragment.xml/1.0.2","org.apache.sling/org.apache.sling.installer.core/3.8.10","org.apache.sling/org.apache.sling.installer.factory.configuration/1.1.2","org.apache.sling/org.apache.sling.installer.provider.file/1.1.0","org.apache.sling/org.apache.sling.javax.activation/0.1.0","org.apache.sling/org.apache.sling.launchpad.installer/1.2.2","org.apache.sling/org.apache.sling.settings/1.3.8","org.slf4j/jcl-over-slf4j/1.7.25","org.slf4j/log4j-over-slf4j/1.7.25","
 org.slf4j/slf4j-api/1.7.25"]}}

Added: sling/whiteboard/cziegeler/example/sling/composum-console.json
URL: 
http://svn.apache.org/viewvc/sling/whiteboard/cziegeler/example/sling/composum-console.json?rev=1808734=auto
==
--- sling/whiteboard/cziegeler/example/sling/composum-console.json (added)
+++ sling/whiteboard/cziegeler/example/sling/composum-console.json Mon Sep 18 
15:15:55 2017
@@ -0,0 +1 @@
+{"id":"generated/composum-console/1.0.0","bundles":{"20":["com.composum.sling.core/composum-sling-core-commons/1.8.2","com.composum.sling.core/composum-sling-core-config/1.8.2","com.composum.sling.core/composum-sling-core-console/1.8.2","com.composum.sling.core/composum-sling-core-jslibs/1.8.2","com.composum.sling.core/composum-sling-package-manager/1.8.2","com.composum.sling.core/composum-sling-user-management/1.8.2","org.apache.jackrabbit.vault/org.apache.jackrabbit.vault/3.1.30"]}}
\ No newline at end of file

Added: sling/whiteboard/cziegeler/example/sling/launchpad.json
URL: 
http://svn.apache.org/viewvc/sling/whiteboard/cziegeler/example/sling/launchpad.json?rev=1808734=auto
==
--- sling/whiteboard/cziegeler/example/sling/launchpad.json (added)
+++ sling/whiteboard/cziegeler/example/sling/launchpad.json Mon Sep 18 15:15:55 
2017
@@ -0,0 +1 @@
+{"id":"generated/:launchpad/1.0.0","framework-properties":{"localIndexDir":"${sling.home}/repository/index","repository.home":"${sling.home}/repository","sling.run.mode.install.options":"oak_tar,oak_mongo"}}
\ No newline at end of file

Added: sling/whiteboard/cziegeler/example/sling/models-jacksonexporter.json
URL: 
http://svn.apache.org/viewvc/sling/whiteboard/cziegeler/example/sling/models-jacksonexporter.json?rev=1808734=auto
==
--- sling/whiteboard/cziegeler/example/sling/models-jacksonexporter.json (added)
+++ sling/whiteboard/cziegeler/example/sling/models-jacksonexporter.json Mon 
Sep 18 15:15:55 2017
@@ -0,0 +1 @@
+{"id":"generated/models-jacksonexporter/1.0.0","bundles":{"20":["com.fasterxml.jackson.core/jackson-annotations/2.8.7","com.fasterxml.jackson.core/jackson-core/2.8.7","com.fasterxml.jackson.core/jackson-databind/2.8.7","org.apache.sling/org.apache.sling.models.jacksonexporter/1.0.6"]}}
\ No newline at end of file

Added: sling/whiteboard/cziegeler/example/sling/oak.json
URL: 
http://svn.apache.org/viewvc/sling/whiteboard/cziegeler/example/sling/oak.json?rev=1808734=auto

svn commit: r1808733 - /sling/whiteboard/cziegeler/feature-applicationbuilder/src/main/java/org/apache/sling/feature/applicationbuilder/impl/Main.java

2017-09-18 Thread pauls
Author: pauls
Date: Mon Sep 18 15:14:42 2017
New Revision: 1808733

URL: http://svn.apache.org/viewvc?rev=1808733=rev
Log:
Add launchpad api to applications in feature-applicationbuilder

Modified:

sling/whiteboard/cziegeler/feature-applicationbuilder/src/main/java/org/apache/sling/feature/applicationbuilder/impl/Main.java

Modified: 
sling/whiteboard/cziegeler/feature-applicationbuilder/src/main/java/org/apache/sling/feature/applicationbuilder/impl/Main.java
URL: 
http://svn.apache.org/viewvc/sling/whiteboard/cziegeler/feature-applicationbuilder/src/main/java/org/apache/sling/feature/applicationbuilder/impl/Main.java?rev=1808733=1808732=1808733=diff
==
--- 
sling/whiteboard/cziegeler/feature-applicationbuilder/src/main/java/org/apache/sling/feature/applicationbuilder/impl/Main.java
 (original)
+++ 
sling/whiteboard/cziegeler/feature-applicationbuilder/src/main/java/org/apache/sling/feature/applicationbuilder/impl/Main.java
 Mon Sep 18 15:14:42 2017
@@ -179,7 +179,7 @@ public class Main {
 }
 
 try {
-writeApplication(FeatureUtil.assembleApplication(null, am, files), 
output == null ? "application.json" : output);
+
writeApplication(buildApplication(FeatureUtil.assembleApplication(null, am, 
files)), output == null ? "application.json" : output);
 
 } catch ( final IOException ioe) {
 LOGGER.error("Unable to read feature/application files " + 
ioe.getMessage(), ioe);
@@ -187,6 +187,19 @@ public class Main {
 }
 }
 
+private static Application buildApplication(final Application app) {
+app.getBundles().add(1, new 
org.apache.sling.feature.Artifact(ArtifactId.fromMvnId("org.apache.sling/org.apache.sling.launchpad.api/1.2.0")));
+// sling.properties (TODO)
+if ( propsFile == null ) {
+
app.getFrameworkProperties().put("org.osgi.framework.bootdelegation", 
"sun.*,com.sun.*");
+} else {
+
+}
+// felix framework hard coded for now
+app.setFramework(FeatureUtil.getFelixFrameworkId(null));
+return app;
+}
+
 private static void writeApplication(final Application app, final String 
out) {
 LOGGER.info("Writing application...");
 final File file = new File(out);




svn commit: r1808732 - /sling/whiteboard/cziegeler/feature-applicationbuilder/pom.xml

2017-09-18 Thread pauls
Author: pauls
Date: Mon Sep 18 15:14:03 2017
New Revision: 1808732

URL: http://svn.apache.org/viewvc?rev=1808732=rev
Log:
Embed converter into applicationbuilder

Modified:
sling/whiteboard/cziegeler/feature-applicationbuilder/pom.xml

Modified: sling/whiteboard/cziegeler/feature-applicationbuilder/pom.xml
URL: 
http://svn.apache.org/viewvc/sling/whiteboard/cziegeler/feature-applicationbuilder/pom.xml?rev=1808732=1808731=1808732=diff
==
--- sling/whiteboard/cziegeler/feature-applicationbuilder/pom.xml (original)
+++ sling/whiteboard/cziegeler/feature-applicationbuilder/pom.xml Mon Sep 18 
15:14:03 2017
@@ -56,7 +56,7 @@
 
${project.build.directory}/classes
 false
 true
-
commons-cli,org.apache.sling.feature,org.apache.sling.feature.support,org.apache.sling.commons.johnzon,slf4j-api,slf4j-simple,osgi.core
+
commons-cli,org.apache.sling.feature,org.apache.sling.feature.support,org.apache.sling.commons.johnzon,slf4j-api,slf4j-simple,osgi.core,org.apache.felix.converter
 
 
 
@@ -112,6 +112,12 @@
 1.0.0
 provided
 
+
+org.apache.felix
+org.apache.felix.converter
+0.1.0-SNAPSHOT
+provided
+
   
 
junit




svn commit: r1018325 - /websites/production/sling/content/

2017-09-18 Thread justin
Author: justin
Date: Mon Sep 18 14:18:34 2017
New Revision: 1018325

Log:
Publishing svnmucc operation to sling site by justin

Added:
websites/production/sling/content/
  - copied from r1018324, websites/staging/sling/trunk/content/



svn commit: r1018324 - /websites/production/sling/content/

2017-09-18 Thread justin
Author: justin
Date: Mon Sep 18 14:15:11 2017
New Revision: 1018324

Log:
Publishing svnmucc operation to sling site by justin

Added:
websites/production/sling/content/
  - copied from r1018321, websites/staging/sling/trunk/content/



svn commit: r1018323 - in /websites/staging/sling/trunk/content: ./ documentation/bundles/models.html

2017-09-18 Thread buildbot
Author: buildbot
Date: Mon Sep 18 14:15:11 2017
New Revision: 1018323

Log:
Staging update by buildbot for sling

Modified:
websites/staging/sling/trunk/content/   (props changed)
websites/staging/sling/trunk/content/documentation/bundles/models.html

Propchange: websites/staging/sling/trunk/content/
--
--- cms:source-revision (original)
+++ cms:source-revision Mon Sep 18 14:15:11 2017
@@ -1 +1 @@
-1808719
+1808721

Modified: websites/staging/sling/trunk/content/documentation/bundles/models.html
==
--- websites/staging/sling/trunk/content/documentation/bundles/models.html 
(original)
+++ websites/staging/sling/trunk/content/documentation/bundles/models.html Mon 
Sep 18 14:15:11 2017
@@ -420,7 +420,7 @@ using the @Via annotation.
 
 
 
-See the Via Types section below for details on the 
included types for @Via.
+See the Via Types 
section below for details on the included types for @Via.
 Source
 If there is ambiguity where a given injection could be handled by more than 
one injector, the @Source annotation can be used to define which 
injector is responsible:
 @Model(adaptables=SlingHttpServletRequest.class)
@@ -844,8 +844,7 @@ model, exported as a java.lang.Str
 
 Custom Via Type
 Defining your own type for the @Via annotation is a two step 
process. The first step is to create a marker class implementing the 
@ViaProviderType annotation. This class can be entirely empty, 
e.g.
-:java
-public class MyCustomProviderType implements ViaProviderType {}
+public class MyCustomProviderType implements ViaProviderType {}
 
 
 
@@ -855,7 +854,7 @@ model, exported as a java.lang.Str
 getAdaptable() should return the new adaptable or 
ViaProvider.ORIGINAL to indicate that the original adaptable 
should be used.
 
   
-Rev. 1808719 by justin on Mon, 18 Sep 2017 14:08:16 +
+Rev. 1808721 by justin on Mon, 18 Sep 2017 14:15:00 +
   

 Apache Sling, Sling, Apache, the Apache feather logo, and the Apache 
Sling project




svn commit: r1808721 - /sling/site/trunk/content/documentation/bundles/models.mdtext

2017-09-18 Thread justin
Author: justin
Date: Mon Sep 18 14:15:00 2017
New Revision: 1808721

URL: http://svn.apache.org/viewvc?rev=1808721=rev
Log:
fix typos

Modified:
sling/site/trunk/content/documentation/bundles/models.mdtext

Modified: sling/site/trunk/content/documentation/bundles/models.mdtext
URL: 
http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/bundles/models.mdtext?rev=1808721=1808720=1808721=diff
==
--- sling/site/trunk/content/documentation/bundles/models.mdtext (original)
+++ sling/site/trunk/content/documentation/bundles/models.mdtext Mon Sep 18 
14:15:00 2017
@@ -281,7 +281,7 @@ A different strategy can be used to defi
 
 }
 
-See the [Via Types](#via-types) section below for details on the included 
types for `@Via`.
+See the [Via Types](#via-types-since-api-134implementation-140) section below 
for details on the included types for `@Via`.
 
 ## Source
 If there is ambiguity where a given injection could be handled by more than 
one injector, the `@Source` annotation can be used to define which injector is 
responsible:
@@ -552,7 +552,7 @@ As discussed in the [Via](#via) section
 
 Defining your own type for the `@Via` annotation is a two step process. The 
first step is to create a marker class implementing the `@ViaProviderType` 
annotation. This class can be entirely empty, e.g.
 
-:java
+::java
 public class MyCustomProviderType implements ViaProviderType {}
 
 The second step is to create an OSGi service implementing the `ViaProvider` 
interface. This interface defines two methods:




svn commit: r1018322 - /websites/production/sling/content/

2017-09-18 Thread justin
Author: justin
Date: Mon Sep 18 14:13:34 2017
New Revision: 1018322

Log:
Publishing svnmucc operation to sling site by justin

Added:
websites/production/sling/content/
  - copied from r1018321, websites/staging/sling/trunk/content/



svn commit: r1808719 - /sling/site/trunk/content/documentation/bundles/models.mdtext

2017-09-18 Thread justin
Author: justin
Date: Mon Sep 18 14:08:16 2017
New Revision: 1808719

URL: http://svn.apache.org/viewvc?rev=1808719=rev
Log:
update Sling Models documentation for new features

Modified:
sling/site/trunk/content/documentation/bundles/models.mdtext

Modified: sling/site/trunk/content/documentation/bundles/models.mdtext
URL: 
http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/bundles/models.mdtext?rev=1808719=1808718=1808719=diff
==
--- sling/site/trunk/content/documentation/bundles/models.mdtext (original)
+++ sling/site/trunk/content/documentation/bundles/models.mdtext Mon Sep 18 
14:08:16 2017
@@ -252,18 +252,37 @@ The `@PostConstruct` annotation can be u
 
 `@PostConstruct` methods in a super class will be invoked first.
 
+Since Sling Models Implementation 1.4.6, `@PostConstruct` methods may return a 
`false` boolean value in which case the model creation will fail without 
logging any exception
+(a message will be logged at the `DEBUG` level).
+
 ## Via 
-If the injection should be based on a JavaBean property of the adaptable, you 
can indicate this using the `@Via` annotation:
+In some cases, a different object should be used as the adaptable instead of 
the original adaptable. This can be done
+using the `@Via` annotation. By default, this can be done using a JavaBean 
property of the adaptable:
 
::java
@Model(adaptables=SlingHttpServletRequest.class)
public interface MyModel {
 
-   // will return 
request.getResource().adaptTo(ValueMap.class).get("propertyName", String.class)
+   // will return 
request.getResource().getValueMap().get("propertyName", String.class)
@Inject @Via("resource")
String getPropertyName();
} 
 
+
+A different strategy can be used to define the adaptable by specifying a 
`type` attribute:
+
+::java
+@Model(adaptables=Resource.class)
+public interface MyModel {
+
+   // will return 
resource.getChild("jcr:content").getValueMap().get("propertyName", String.class)
+@Inject @Via(value = "jcr:content", type = ChildResource.class)
+String getPropertyName();
+
+}
+
+See the [Via Types](#via-types) section below for details on the included 
types for `@Via`.
+
 ## Source
 If there is ambiguity where a given injection could be handled by more than 
one injector, the `@Source` annotation can be used to define which injector is 
responsible:
 
@@ -356,7 +375,7 @@ Injectors are invoked in order of their
 :   methods to call upon model option creation (only for model classes)
 
 `@Via`
-:   use a JavaBean property of the adaptable as the source of the injection
+:   change the adaptable as the source of the injection
 
 `@Default`
 :   set default values for a field or method
@@ -516,4 +535,27 @@ If you want to generate a bundle header
 
 
<_plugin>org.apache.sling.bnd.models.ModelsScannerPlugin;generatePackagesHeader=true
 
-
\ No newline at end of file
+
+
+# Via Types (Since API 1.3.4/Implementation 1.4.0)
+
+As discussed in the [Via](#via) section above, it is possible to select a 
different adaptable than the original value using the `@Via` annotation. The 
following standard types are provided (all types are in the package 
`org.apache.sling.models.annotations.via`)
+
+`@Via` type value | Description
+- | -- 
+`BeanProperty`  (default) | Uses a JavaBean property from the adaptable.
+`ChildResource`   | Uses a child resource from the adaptable, 
assuming the adaptable is a `Resource`.
+`ForcedResourceType`  | Creates a wrapped resource with the provided 
resource type. If the adaptable is a `SlingHttpServletRequest`, a wrapped 
request is created as well to contain the wrapped resource.
+`ResourceSuperType`   | Creates a wrapped resource with the resource 
type set to the adaptable's resource super type. If the adaptable is a 
`SlingHttpServletRequest`, a wrapped request is created as well to contain the 
wrapped resource.
+
+## Custom Via Type
+
+Defining your own type for the `@Via` annotation is a two step process. The 
first step is to create a marker class implementing the `@ViaProviderType` 
annotation. This class can be entirely empty, e.g.
+
+:java
+public class MyCustomProviderType implements ViaProviderType {}
+
+The second step is to create an OSGi service implementing the `ViaProvider` 
interface. This interface defines two methods:
+
+* `getType()` should return the marker class. 
+* `getAdaptable()` should return the new adaptable or `ViaProvider.ORIGINAL` 
to indicate that the original adaptable should be used.
\ No newline at end of file




svn commit: r1018320 - in /websites/staging/sling/trunk/content: ./ documentation/bundles/models.html

2017-09-18 Thread buildbot
Author: buildbot
Date: Mon Sep 18 14:08:40 2017
New Revision: 1018320

Log:
Staging update by buildbot for sling

Modified:
websites/staging/sling/trunk/content/   (props changed)
websites/staging/sling/trunk/content/documentation/bundles/models.html

Propchange: websites/staging/sling/trunk/content/
--
--- cms:source-revision (original)
+++ cms:source-revision Mon Sep 18 14:08:40 2017
@@ -1 +1 @@
-1808652
+1808719

Modified: websites/staging/sling/trunk/content/documentation/bundles/models.html
==
--- websites/staging/sling/trunk/content/documentation/bundles/models.html 
(original)
+++ websites/staging/sling/trunk/content/documentation/bundles/models.html Mon 
Sep 18 14:08:40 2017
@@ -149,6 +149,10 @@ h2:hover > .headerlink, h3:hover > .head
 Associating a 
Model Class with a Resource Type (since 1.3.0)
 Exporter Framework (since 
1.3.0)
 Registration of 
Sling Models classes via bnd plugin
+Via Types (Since API 
1.3.4/Implementation 1.4.0)
+Custom Via Type
+
+
 
 
 Many Sling projects want to be able to create model objects - POJOs which 
are automatically mapped from Sling objects, typically resources, but also 
request objects. Sometimes these POJOs need OSGi services as well.
@@ -389,18 +393,34 @@ strategy by using adding defaultIn
 
 
 @PostConstruct methods in a super class will be invoked 
first.
+Since Sling Models Implementation 1.4.6, @PostConstruct 
methods may return a false boolean value in which case the model 
creation will fail without logging any exception
+(a message will be logged at the DEBUG level).
 Via
-If the injection should be based on a JavaBean property of the adaptable, 
you can indicate this using the @Via annotation:
+In some cases, a different object should be used as the adaptable instead 
of the original adaptable. This can be done
+using the @Via annotation. By default, this can be done using a 
JavaBean property of the adaptable:
 @Model(adaptables=SlingHttpServletRequest.class)
 public interface MyModel {
 
-// will return 
request.getResource().adaptTo(ValueMap.class).get(propertyName, 
String.class)
+// will return 
request.getResource().getValueMap().get(propertyName, 
String.class)
 @Inject @Via(resource)
 String getPropertyName();
 }
 
 
 
+A different strategy can be used to define the adaptable by specifying a 
type attribute:
+@Model(adaptables=Resource.class)
+public interface MyModel {
+
+// will return 
resource.getChild(jcr:content).getValueMap().get(propertyName,
 String.class)
+@Inject @Via(value = jcr:content, type = ChildResource.class)
+String getPropertyName();
+
+}
+
+
+
+See the Via Types section below for details on the 
included types for @Via.
 Source
 If there is ambiguity where a given injection could be handled by more than 
one injector, the @Source annotation can be used to define which 
injector is responsible:
 @Model(adaptables=SlingHttpServletRequest.class)
@@ -507,7 +527,7 @@ strategy by using adding defaultIn
 @PostConstruct
 methods to call upon model option creation (only for model classes)
 @Via
-use a JavaBean property of the adaptable as the source of the 
injection
+change the adaptable as the source of the injection
 @Default
 set default values for a field or method
 @Path
@@ -793,8 +813,49 @@ model, exported as a java.lang.Str
 /configuration
 
 
+
+Via Types (Since API 
1.3.4/Implementation 1.4.0)
+As discussed in the Via section above, it is possible to 
select a different adaptable than the original value using the 
@Via annotation. The following standard types are provided (all 
types are in the package 
org.apache.sling.models.annotations.via)
+
+
+
+@Via type value
+Description
+
+
+
+
+BeanProperty  (default)
+Uses a JavaBean property from the adaptable.
+
+
+ChildResource
+Uses a child resource from the adaptable, assuming the adaptable is a 
Resource.
+
+
+ForcedResourceType
+Creates a wrapped resource with the provided resource type. If the 
adaptable is a SlingHttpServletRequest, a wrapped request is 
created as well to contain the wrapped resource.
+
+
+ResourceSuperType
+Creates a wrapped resource with the resource type set to the adaptable's 
resource super type. If the adaptable is a 
SlingHttpServletRequest, a wrapped request is created as well to 
contain the wrapped resource.
+
+
+
+Custom Via Type
+Defining your own type for the @Via annotation is a two step 
process. The first step is to create a marker class implementing the 
@ViaProviderType annotation. This class can be entirely empty, 
e.g.
+:java
+public class MyCustomProviderType implements ViaProviderType {}
+
+
+
+The second step is to create an OSGi service implementing the 
ViaProvider interface. This interface defines two methods:
+
+getType() should return the marker class. 
+getAdaptable() should return the new adaptable or 
ViaProvider.ORIGINAL to indicate 

svn commit: r1808699 - in /sling/trunk/bundles/extensions/models/impl/src: main/java/org/apache/sling/models/impl/ test/java/org/apache/sling/models/impl/ test/java/org/apache/sling/models/testmodels/

2017-09-18 Thread justin
Author: justin
Date: Mon Sep 18 13:18:04 2017
New Revision: 1808699

URL: http://svn.apache.org/viewvc?rev=1808699=rev
Log:
SLING-7124 - allow PostConstruct method to return a boolean to indicate a 
failure

Added:

sling/trunk/bundles/extensions/models/impl/src/test/java/org/apache/sling/models/testmodels/classes/FalsePostConstuctModel.java

sling/trunk/bundles/extensions/models/impl/src/test/java/org/apache/sling/models/testmodels/classes/TruePostConstuctModel.java
Modified:

sling/trunk/bundles/extensions/models/impl/src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java

sling/trunk/bundles/extensions/models/impl/src/main/java/org/apache/sling/models/impl/Result.java

sling/trunk/bundles/extensions/models/impl/src/test/java/org/apache/sling/models/impl/PostConstructTest.java

Modified: 
sling/trunk/bundles/extensions/models/impl/src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java
URL: 
http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/models/impl/src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java?rev=1808699=1808698=1808699=diff
==
--- 
sling/trunk/bundles/extensions/models/impl/src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java
 (original)
+++ 
sling/trunk/bundles/extensions/models/impl/src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java
 Mon Sep 18 13:18:04 2017
@@ -610,7 +610,7 @@ public class ModelAdapterFactory impleme
 
 final Map preparedValues = new 
HashMap<>(VALUE_PREPARERS_COUNT);
 
-final ModelType object;
+ModelType object;
 if (constructorToUse.getConstructor().getParameterTypes().length == 0) 
{
 // no parameters for constructor injection? instantiate it right 
away
 object = constructorToUse.getConstructor().newInstance();
@@ -656,7 +656,7 @@ public class ModelAdapterFactory impleme
 return new Result<>(missingElements);
 }
 try {
-invokePostConstruct(object);
+object = invokePostConstruct(object);
 } catch (InvocationTargetException e) {
 return new Result<>(new PostConstructException("Post-construct 
method has thrown an exception for model " + modelClass.getType(), 
e.getCause()));
 } catch (IllegalAccessException e) {
@@ -830,7 +830,7 @@ public class ModelAdapterFactory impleme
 return true;
 }
 
-private void invokePostConstruct(Object object) throws 
InvocationTargetException, IllegalAccessException {
+private  ModelType invokePostConstruct(ModelType object) throws 
InvocationTargetException, IllegalAccessException {
 Class clazz = object.getClass();
 List postConstructMethods = new ArrayList<>();
 while (clazz != null) {
@@ -849,13 +849,18 @@ public class ModelAdapterFactory impleme
 if (!accessible) {
 method.setAccessible(true);
 }
-method.invoke(object);
+Object result = method.invoke(object);
+if (result instanceof Boolean && !((Boolean) 
result).booleanValue()) {
+log.debug("PostConstruct method {}.{} returned false. 
Returning null model.", method.getDeclaringClass().getName(), method.getName());
+return null;
+}
 } finally {
 if (!accessible) {
 method.setAccessible(false);
 }
 }
 }
+return object;
 }
 
 private RuntimeException setField(InjectableField injectableField, Object 
createdObject, Object value) {

Modified: 
sling/trunk/bundles/extensions/models/impl/src/main/java/org/apache/sling/models/impl/Result.java
URL: 
http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/models/impl/src/main/java/org/apache/sling/models/impl/Result.java?rev=1808699=1808698=1808699=diff
==
--- 
sling/trunk/bundles/extensions/models/impl/src/main/java/org/apache/sling/models/impl/Result.java
 (original)
+++ 
sling/trunk/bundles/extensions/models/impl/src/main/java/org/apache/sling/models/impl/Result.java
 Mon Sep 18 13:18:04 2017
@@ -19,7 +19,6 @@
 package org.apache.sling.models.impl;
 
 import javax.annotation.Nonnull;
-
 /**
  * This class encapsulates a value of a generic class in case of success or the
  * {@link RuntimeException}s in case of an error. It is used because the
@@ -59,7 +58,7 @@ public class Result {
  */
 public @Nonnull RuntimeException getThrowable() {
 if (t == null) {
-throw new IllegalStateException("No throwable available");
+return new IllegalStateException("No throwable available");
 }
 return t;
 }
@@ -87,4 +86,5 @@ public class Result {
 return object != null;
 }
 
+
 }


svn commit: r1808690 - /sling/whiteboard/cziegeler/pom.xml

2017-09-18 Thread pauls
Author: pauls
Date: Mon Sep 18 12:32:19 2017
New Revision: 1808690

URL: http://svn.apache.org/viewvc?rev=1808690=rev
Log:
Add the application builder to the builder pom (for now)

Modified:
sling/whiteboard/cziegeler/pom.xml

Modified: sling/whiteboard/cziegeler/pom.xml
URL: 
http://svn.apache.org/viewvc/sling/whiteboard/cziegeler/pom.xml?rev=1808690=1808689=1808690=diff
==
--- sling/whiteboard/cziegeler/pom.xml (original)
+++ sling/whiteboard/cziegeler/pom.xml Mon Sep 18 12:32:19 2017
@@ -63,6 +63,7 @@
 feature-analyser
 feature-launcher
 feature-support   
+feature-applicationbuilder
 
 
 




svn commit: r1808677 - /sling/trunk/parent/pom.xml

2017-09-18 Thread kwin
Author: kwin
Date: Mon Sep 18 10:23:03 2017
New Revision: 1808677

URL: http://svn.apache.org/viewvc?rev=1808677=rev
Log:
SLING-7129 no longer set Bundle-RequiredExecutionEnvironment

get rid of the javaversion-maven-plugin

Modified:
sling/trunk/parent/pom.xml

Modified: sling/trunk/parent/pom.xml
URL: 
http://svn.apache.org/viewvc/sling/trunk/parent/pom.xml?rev=1808677=1808676=1808677=diff
==
--- sling/trunk/parent/pom.xml (original)
+++ sling/trunk/parent/pom.xml Mon Sep 18 10:23:03 2017
@@ -111,18 +111,6 @@
 
 
 
-
-org.apache.sling
-javaversion-maven-plugin
-1.0.0
-
-
-
-set-java-version
-
-
-
-
 
 
 org.apache.maven.plugins
@@ -351,7 +339,6 @@
 
 The Apache Software 
Foundation
 
${project.artifactId}
-
${sling.bree}
 
 
 
@@ -415,7 +402,7 @@
 
 
 org.codehaus.mojo.signature
-
java1${sling.animalSignatures.version}
+java1${sling.java.version}
 1.0