Re: Debugging JavaScript esp files

2010-10-17 Thread Sandro Boehme

Hi Felix,

thanks for the feedback.
The Swing debugger GUI doesn't seem to work in this case as it cannot 
open e.g. the explorer.esp file. It says:

Syntax error (.../explorer.esp#83)
This refers to the line containing only form action=# which is 
correct in my opinion.


I also tried the Eclipse IDE for JavaScript Web Developers from 
http://www.eclipse.org/downloads/ as it contains debugging support for 
Rhino (http://wiki.eclipse.org/JSDT/Debug). But it doesn't work out of 
the box. Even though it is based on JPDA I guess there needs to be 
something Rhino specific installed on the serverside.


Best,

Sandro

Am 16.10.10 20:22, schrieb Felix Meschberger:

Hi Sandro,

The best solution (which I once considered working on a long time ago
but never got around to implement) is to have Rhino debugging support in
Eclipse.

But for now, you may set the
org.apache.sling.scripting.javascript.debug framework property (e.g.
in the sling.properties file) to true. When this property is set to true
Rhino will launch the Swing debugger GUI (on the server system) once the
Rhino ScriptEngineFactory is started.

Regards
Felix


On 16.10.2010 15:36, Sandro Boehme wrote:

Hello,

I'm trying to get into the Sling Explorer and I'm wondering how (or if)
you guys debug these esp scripts? While the Eclipse debugger stops in
jsp files it doesn't stop in esp files as they don't contain Java code.
Is there a special JSR-223 debugger plugin or some trick I don't know of?

Best,

Sandro







Re: Debugging JavaScript esp files

2010-10-17 Thread Sandro Boehme

Hi Felix,

that was fast. I'm impressed.
Thanks for the tutorial. I can connect too but the debugger also doesn't 
stop at my breakpoint like in your case.


Best,

Sandro

PS: Just in case somebody else want to follow: The export in step 5 is 
org.mozilla.javascript.debug.



Am 17.10.10 23:00, schrieb Felix Meschberger:

Hi,

On 17.10.2010 20:34, Justin Edelson wrote:

On Sun, Oct 17, 2010 at 2:28 PM, Felix Meschbergerfmesc...@gmail.com  wrote:

Hi,

On 17.10.2010 16:05, Sandro Boehme wrote:

Hi Felix,

thanks for the feedback.
The Swing debugger GUI doesn't seem to work in this case as it cannot
open e.g. the explorer.esp file. It says:
Syntax error (.../explorer.esp#83)
This refers to the line containing only form action=# which is
correct in my opinion.


I would expect the line to be correct, but I must admit to not have used
this for quite some time, so ... this may really not properly work
(unfortunately).



I also tried the Eclipse IDE for JavaScript Web Developers from
http://www.eclipse.org/downloads/ as it contains debugging support for
Rhino (http://wiki.eclipse.org/JSDT/Debug). But it doesn't work out of
the box. Even though it is based on JPDA I guess there needs to be
something Rhino specific installed on the serverside.


Sounds interesting. Would be exactly what I had in mind ;-) Will
investigate.


It'd be better if this page wasn't blank:
http://wiki.eclipse.org/JSDT/Debug/Embedding_Rhino_Debugger


Yes, well, I got it sort of working with a bit hacking 

1. deploy two JSDT bundles into Sling:
org.eclipse.wst.jsdt.debug.rhino.debugger
org.eclipse.wst.jsdt.debug.transport
(ignore for now that these bundles use Require-Bundle
 and export internals ...)
2. upgrade Sling Rhino reference to 1.7R2
3. inside Sling add a dependency to the
 org.eclipse.wst.jsdt.debug.rhino.debugger project checked
 out from Eclipse CVS
4. In the SlingContextFactory constructor instantiate a RhinoDebugger
 with a connector string (e.g.
 transport=socket,suspend=n,address=9000), register it as a
 listener and start the RhinoDebugger
5. Export org.mozilla.javascript.debugger package and add an
 optional import to org.eclipse.wst.jsdt.debug.rhino.debugger in
 the pom.xml
6. build and install the Sling Javascript bundle

Now you can connect to this Debugger with Eclipse ... And yes, I can
connect but I cannot yet cope with filenames...

I create a project and a folder linked to a WebDAV mounted Sling folder
and can then set breakpoints. The problem is, that Eclipse seems to
prefix all script names with the project and folder name and thus is not
able to match the names of executed scripts to apply break points ...

Regards
Felix



Justin


Regards
Felix



Best,

Sandro

Am 16.10.10 20:22, schrieb Felix Meschberger:

Hi Sandro,

The best solution (which I once considered working on a long time ago
but never got around to implement) is to have Rhino debugging support in
Eclipse.

But for now, you may set the
org.apache.sling.scripting.javascript.debug framework property (e.g.
in the sling.properties file) to true. When this property is set to true
Rhino will launch the Swing debugger GUI (on the server system) once the
Rhino ScriptEngineFactory is started.

Regards
Felix


On 16.10.2010 15:36, Sandro Boehme wrote:

Hello,

I'm trying to get into the Sling Explorer and I'm wondering how (or if)
you guys debug these esp scripts? While the Eclipse debugger stops in
jsp files it doesn't stop in esp files as they don't contain Java code.
Is there a special JSR-223 debugger plugin or some trick I don't know
of?

Best,

Sandro
















Re: Debugging JavaScript esp files

2010-10-18 Thread Sandro Boehme

Hi Felix,

after diving into the topic I got the following understanding. Please 
correct me if I'm wrong.
o In the Eclipse preferences one needs to map *.esp files to the 
JavaScript content type.

o Now its possible to set a breakpoint in the esp file.
o Next one needs to load the esp script file in the Breakpoints view.
o Starting the debugger now calls new 
...jsdt.debug.internal.rhino.jsdi.VirtualMachineImpl() which sends a 
scripts command request [1] to the 
...jsdt.debug.internal.rhino.debugger.RequestHandler on the server side. 
That handler calls 
...jsdt.debug.internal.rhino.debugger.RhinoDebuggerImpl.getScriptIds(). 
The only location that sets the script id's is the 
handleCompilationDone() method of RhinoDebuggerImpl. I only see that 
indirectly called by 
oas.scripting.javascript.helper.SlingGlobal.require() and .execIdCall(). 
As the latter is a method from org.mozilla.javascript.IdFunctionCall 
there are too many possible callers and I cannot easily find out if the 
trigger to load the JavaScript files is already there somewhere.


I guess we only need to trigger the handleCompilationDone() methode 
somewhere in Sling but I don't know enough about Sling to decide where 
that would fit in or what to configure to make it fit. Maybe it could be 
triggered during 
...scripting.javascript.internal.RhinoJavaScriptEngine.eval(). Do you 
have an idea?


Best,

Sandro

[1] - http://wiki.eclipse.org/JSDT/Debug/Rhino_Debug_Wire_Protocol#scripts


Am 18.10.10 02:58, schrieb Sandro Boehme:

Hi Felix,

that was fast. I'm impressed.
Thanks for the tutorial. I can connect too but the debugger also doesn't
stop at my breakpoint like in your case.

Best,

Sandro

PS: Just in case somebody else want to follow: The export in step 5 is
org.mozilla.javascript.debug.


Am 17.10.10 23:00, schrieb Felix Meschberger:

Hi,

On 17.10.2010 20:34, Justin Edelson wrote:

On Sun, Oct 17, 2010 at 2:28 PM, Felix
Meschbergerfmesc...@gmail.com wrote:

Hi,

On 17.10.2010 16:05, Sandro Boehme wrote:

Hi Felix,

thanks for the feedback.
The Swing debugger GUI doesn't seem to work in this case as it cannot
open e.g. the explorer.esp file. It says:
Syntax error (.../explorer.esp#83)
This refers to the line containing only form action=# which is
correct in my opinion.


I would expect the line to be correct, but I must admit to not have
used
this for quite some time, so ... this may really not properly work
(unfortunately).



I also tried the Eclipse IDE for JavaScript Web Developers from
http://www.eclipse.org/downloads/ as it contains debugging support for
Rhino (http://wiki.eclipse.org/JSDT/Debug). But it doesn't work out of
the box. Even though it is based on JPDA I guess there needs to be
something Rhino specific installed on the serverside.


Sounds interesting. Would be exactly what I had in mind ;-) Will
investigate.


It'd be better if this page wasn't blank:
http://wiki.eclipse.org/JSDT/Debug/Embedding_Rhino_Debugger


Yes, well, I got it sort of working with a bit hacking 

1. deploy two JSDT bundles into Sling:
org.eclipse.wst.jsdt.debug.rhino.debugger
org.eclipse.wst.jsdt.debug.transport
(ignore for now that these bundles use Require-Bundle
and export internals ...)
2. upgrade Sling Rhino reference to 1.7R2
3. inside Sling add a dependency to the
org.eclipse.wst.jsdt.debug.rhino.debugger project checked
out from Eclipse CVS
4. In the SlingContextFactory constructor instantiate a RhinoDebugger
with a connector string (e.g.
transport=socket,suspend=n,address=9000), register it as a
listener and start the RhinoDebugger
5. Export org.mozilla.javascript.debugger package and add an
optional import to org.eclipse.wst.jsdt.debug.rhino.debugger in
the pom.xml
6. build and install the Sling Javascript bundle

Now you can connect to this Debugger with Eclipse ... And yes, I can
connect but I cannot yet cope with filenames...

I create a project and a folder linked to a WebDAV mounted Sling folder
and can then set breakpoints. The problem is, that Eclipse seems to
prefix all script names with the project and folder name and thus is not
able to match the names of executed scripts to apply break points ...

Regards
Felix



Justin


Regards
Felix



Best,

Sandro

Am 16.10.10 20:22, schrieb Felix Meschberger:

Hi Sandro,

The best solution (which I once considered working on a long time ago
but never got around to implement) is to have Rhino debugging
support in
Eclipse.

But for now, you may set the
org.apache.sling.scripting.javascript.debug framework property
(e.g.
in the sling.properties file) to true. When this property is set
to true
Rhino will launch the Swing debugger GUI (on the server system)
once the
Rhino ScriptEngineFactory is started.

Regards
Felix


On 16.10.2010 15:36, Sandro Boehme wrote:

Hello,

I'm trying to get into the Sling Explorer and I'm wondering how
(or if)
you guys debug these esp scripts? While the Eclipse debugger
stops in
jsp files it doesn't stop in esp files as they don't contain Java
code

Re: Debugging JavaScript esp files

2010-10-19 Thread Sandro Boehme

Hi Felix,

Am 19.10.10 08:48, schrieb Felix Meschberger:
 o In the Eclipse preferences one needs to map *.esp files to the
 JavaScript content type.

 Yes. Likewise for *.ecma. Though I have issues setting breakpoints on
 *.esp files because on my box Eclipse tells it cannot resolve the line
 number to set the breakpoint on.
I had the same problem first. But after adding *.esp to the JavaScript 
content type and then opening the esp file with the JavaScript editor it 
worked without problems.



I cannot easily find out if the
trigger to load the JavaScript files is already there somewhere.

I guess we only need to trigger the handleCompilationDone() methode
somewhere in Sling but I don't know enough about Sling to decide where
that would fit in or what to configure to make it fit. Maybe it could be
triggered during
...scripting.javascript.internal.RhinoJavaScriptEngine.eval(). Do you
have an idea?


Actually from my traces I see, that the Eclipse rhino.debugger bundle in
facts replies to the compilationDone event and informs the Eclipse
debugger about this.

This sounds good. What did you do to trigger the compilationDone event?
If that works I get some example scripts from the server and can then 
try to find a mapping for the paths.




Then the Eclipse debugger is probably supposed to send back breakpoints
for the script but fails to do so because of script path issues: Sling
reports script paths as they exist in Sling, e.g.
/apps/sling/nt/folder.html. Eclipse on the other hand (I am creating a
folder linking to a WebDAV mount of Sling) reports the script path as
the project IPath, that is prefixed with the project name and path to
the linked script folder.

In the end the Eclipse debugger is not able to match the script reported
from rhino.debugger in Sling with the script in Eclipse ...

I once debugged this and hacked the correct path into and in fact was
able to break a script and step through it. But we probably really need
some way of mapping the script paths ... I just didn't find out how to,
for example, set a prefix to cut off to get the actual script path from
the project's path.

Thanks for the details.

Best,

Sandro


Re: Debugging JavaScript esp files

2010-10-19 Thread Sandro Boehme

Am 19.10.10 13:41, schrieb Felix Meschberger:

Hi,

I cannot easily find out if the
trigger to load the JavaScript files is already there somewhere.

I guess we only need to trigger the handleCompilationDone() methode
somewhere in Sling but I don't know enough about Sling to decide where
that would fit in or what to configure to make it fit. Maybe it could be
triggered during
...scripting.javascript.internal.RhinoJavaScriptEngine.eval(). Do you
have an idea?


Actually from my traces I see, that the Eclipse rhino.debugger bundle in
facts replies to the compilationDone event and informs the Eclipse
debugger about this.

This sounds good. What did you do to trigger the compilationDone event?
If that works I get some example scripts from the server and can then
try to find a mapping for the paths.


I wrote a simple /apps/nt/folder/html.esp script and then requested a
folder from Sling. This causes the html.esp script to be loaded and thus
the compilationDone event is sent and handled.

I did not have to do anything else.
Ah, I thought the compilationDone event should also get triggered if the 
bundle containing the script is deployed normally. But ok, I understand. 
The trigger is the update to WebDav.


Best,

Sandro


Re: Debugging JavaScript esp files

2010-10-19 Thread Sandro Boehme

Hi Felix,

Am 19.10.10 15:28, schrieb Felix Meschberger:

Hi,

On 19.10.2010 14:21, Sandro Boehme wrote:

Am 19.10.10 13:41, schrieb Felix Meschberger:

Hi,

I cannot easily find out if the
trigger to load the JavaScript files is already there somewhere.

I guess we only need to trigger the handleCompilationDone() methode
somewhere in Sling but I don't know enough about Sling to decide where
that would fit in or what to configure to make it fit. Maybe it
could be
triggered during
...scripting.javascript.internal.RhinoJavaScriptEngine.eval(). Do you
have an idea?


Actually from my traces I see, that the Eclipse rhino.debugger
bundle in
facts replies to the compilationDone event and informs the Eclipse
debugger about this.

This sounds good. What did you do to trigger the compilationDone event?
If that works I get some example scripts from the server and can then
try to find a mapping for the paths.


I wrote a simple /apps/nt/folder/html.esp script and then requested a
folder from Sling. This causes the html.esp script to be loaded and thus
the compilationDone event is sent and handled.

I did not have to do anything else.

Ah, I thought the compilationDone event should also get triggered if the
bundle containing the script is deployed normally. But ok, I understand.
The trigger is the update to WebDav.


No, the triger is the actual execution of the script: Rhino first
compiles the script into an AST and the executes that. Once the script
has been compiled into the AST (a by-product could in fact be writing a
Java Class File) the compilationDone event is fired (IIRC).
Yes of course. I guess I didn't really read This causes the html.esp 
script to be loaded and thus the compilationDone event is sent and 
handled. in the first place :-/


Best,

Sandro


cannot run the launchpad

2010-10-19 Thread Sandro Boehme

Hello,

since quite some time I'm trying to get the launchpad running in Jetty.
I build sling on a clean checkout from SVN without errors but the 
launchpad doesn't start as it is missing the Emma classes at runtime 
(see output below).

Can you tell me where I have to add the dependency to emma?

Best,

Sandro

Sandros-MacBook:builder sboehme$ mvn jetty:run
Listening for transport dt_socket at address: 30303
[INFO] Scanning for projects...
[INFO] 


[INFO] Building Apache Sling Launchpad Application Builder
[INFO]task-segment: [jetty:run]
[INFO] 


[INFO] Preparing jetty:run
[INFO] [enforcer:enforce {execution: enforce-java}]
[INFO] [groovy:execute {execution: save-bundle-metadata}]
[INFO] [launchpad:prepare-package {execution: prepare-package-war}]
[INFO] [launchpad:prepare-package {execution: prepare-package-jar}]
[INFO] Unpacking 
/Users/sboehme/maven_local_repo/org/apache/sling/org.apache.sling.launchpad.base/2.2.1-SNAPSHOT/org.apache.sling.launchpad.base-2.2.1-SNAPSHOT-app.jar 
to


/Users/sboehme/Documents/workspaces/slingtrunk/launchpad/builder/target/classes
[INFO] Setting property: classpath.resource.loader.class = 
'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.

[INFO] Setting property: velocimacro.messages.on = 'false'.
[INFO] Setting property: resource.loader = 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound = 'false'.
[INFO] [remote-resources:process {execution: default}]
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 
/Users/sboehme/Documents/workspaces/slingtrunk/launchpad/builder/src/main/resources

[INFO] Copying 3 resources
[INFO] [antrun:run {execution: default}]
[INFO] Executing tasks
 [echo]  WARNING (SLING-443/SLING-1782) 
**
 [echo] On most platforms, you'll get OutOfMemoryErrors when 
building unless you set
 [echo] on 32bit platforms: MAVEN_OPTS=-Xmx256M 
-XX:MaxPermSize=256M, see SLING-443
 [echo] on 64bit platforms: MAVEN_OPTS=-Xmx512M 
-XX:MaxPermSize=512M, see SLING-1782
 [echo] 
**

[INFO] Executed tasks
[INFO] [compiler:compile {execution: default-compile}]
[INFO] No sources to compile
[INFO] [resources:testResources {execution: default-testResources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 
/Users/sboehme/Documents/workspaces/slingtrunk/launchpad/builder/src/test/resources

[INFO] Copying 3 resources
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] No sources to compile
[INFO] [jetty:run {execution: default-cli}]
[INFO] Configuring Jetty for project: Apache Sling Launchpad Application 
Builder
[INFO] Webapp source directory = 
/Users/sboehme/Documents/workspaces/slingtrunk/launchpad/builder/target/org.apache.sling.launchpad-6-SNAPSHOT

[INFO] Reload Mechanic: automatic
[INFO] Classes = 
/Users/sboehme/Documents/workspaces/slingtrunk/launchpad/builder/target/classes
2010-10-19 18:33:02.452::INFO:  Logging to STDERR via 
org.mortbay.log.StdErrLog

[INFO] Context path = /
[INFO] Tmp directory =  determined at runtime
[INFO] Web defaults = org/mortbay/jetty/webapp/webdefault.xml
[INFO] Web overrides =  none
[INFO] Adding overlay: 
jar:file:/Users/sboehme/maven_local_repo/org/apache/sling/org.apache.sling.launchpad.base/2.2.1-SNAPSHOT/org.apache.sling.launchpad.base-2.2.1-SNAPSHOT-webapp.war!/
[INFO] web.xml file = 
/Users/sboehme/Documents/workspaces/slingtrunk/launchpad/builder/target/org.apache.sling.launchpad-6-SNAPSHOT/WEB-INF/web.xml
[INFO] Webapp directory = 
/Users/sboehme/Documents/workspaces/slingtrunk/launchpad/builder/target/org.apache.sling.launchpad-6-SNAPSHOT

[INFO] Starting jetty 6.1.20 ...
2010-10-19 18:33:02.476::INFO:  jetty-6.1.20
2010-10-19 18:33:02.673::INFO:  No Transaction manager found - if your 
webapp requires one, please configure one.
2010-10-19 18:33:03.162::WARN:  failed sling: 
java.lang.NoClassDefFoundError: com/vladium/emma/rt/RT
2010-10-19 18:33:03.162::WARN:  failed 
org.mortbay.jetty.plugin.jetty6pluginwebappcont...@9946e0{/,file:/Users/sboehme/Documents/workspaces/slingtrunk/launchpad/builder/target/org.apache.sling.launchpad-6-SNAPSHOT/;jar:file:/Users/sboehme/maven_local_repo/org/apache/sling/org.apache.sling.launchpad.base/2.2.1-SNAPSHOT/org.apache.sling.launchpad.base-2.2.1-SNAPSHOT-webapp.war!/;}: 
java.lang.NoClassDefFoundError: com/vladium/emma/rt/RT
2010-10-19 18:33:03.162::WARN:  failed contexthandlercollect...@8be01: 
java.lang.NoClassDefFoundError: com/vladium/emma/rt/RT
2010-10-19 18:33:03.163::WARN:  failed handlercollect...@1f24c4a: 
java.lang.NoClassDefFoundError: com/vladium/emma/rt/RT

2010-10-19 

Re: Making emma stuff optional?

2010-10-19 Thread Sandro Boehme
Thanks a lot Justin! It also fixes the problem I wrote about in the 
other mail. I can now run the launchpad again.


Best,

Sandro

Am 19.10.10 19:28, schrieb Justin Edelson:

done in r1024330.

Justin

On 10/19/10 11:43 AM, Carsten Ziegeler wrote:

Hi,

can we make the emma stuff optional? Currently the file coverage.em is
created in the root of each module (which is not in svn:ignore atm - no
problem with that we can just add it) and an additional artifact -emma
is created, which we don't want to release/deploy.

So I think this should be turned off by default.

Regards
Carsten







Re: Debugging JavaScript esp files

2010-10-20 Thread Sandro Boehme

Hi Felix,
Am 19.10.10 13:41, schrieb Felix Meschberger:

Hi,

On 19.10.2010 13:20, Sandro Boehme wrote:

Hi Felix,

Am 19.10.10 08:48, schrieb Felix Meschberger:

o In the Eclipse preferences one needs to map *.esp files to the
JavaScript content type.


Yes. Likewise for *.ecma. Though I have issues setting breakpoints on
*.esp files because on my box Eclipse tells it cannot resolve the line
number to set the breakpoint on.

I had the same problem first. But after adding *.esp to the JavaScript
content type and then opening the esp file with the JavaScript editor it
worked without problems.


I cannot easily find out if the
trigger to load the JavaScript files is already there somewhere.

I guess we only need to trigger the handleCompilationDone() methode
somewhere in Sling but I don't know enough about Sling to decide where
that would fit in or what to configure to make it fit. Maybe it could be
triggered during
...scripting.javascript.internal.RhinoJavaScriptEngine.eval(). Do you
have an idea?


Actually from my traces I see, that the Eclipse rhino.debugger bundle in
facts replies to the compilationDone event and informs the Eclipse
debugger about this.

This sounds good. What did you do to trigger the compilationDone event?
If that works I get some example scripts from the server and can then
try to find a mapping for the paths.


I wrote a simple /apps/nt/folder/html.esp script and then requested a
folder from Sling. This causes the html.esp script to be loaded and thus
the compilationDone event is sent and handled.

I did not have to do anything else.
I tried to load the script with and without the 
org.apache.sling.scripting.javascript.debug property being enabled 
(though this should not make a difference). But the compilationDone 
event is not triggered. Do you have an idea what might be different in 
your environment?


Best,

Sandro



Regards
Felix






Then the Eclipse debugger is probably supposed to send back breakpoints
for the script but fails to do so because of script path issues: Sling
reports script paths as they exist in Sling, e.g.
/apps/sling/nt/folder.html. Eclipse on the other hand (I am creating a
folder linking to a WebDAV mount of Sling) reports the script path as
the project IPath, that is prefixed with the project name and path to
the linked script folder.

In the end the Eclipse debugger is not able to match the script reported
from rhino.debugger in Sling with the script in Eclipse ...

I once debugged this and hacked the correct path into and in fact was
able to break a script and step through it. But we probably really need
some way of mapping the script paths ... I just didn't find out how to,
for example, set a prefix to cut off to get the actual script path from
the project's path.

Thanks for the details.

Best,

Sandro







Re: Debugging JavaScript esp files

2010-10-20 Thread Sandro Boehme

Hi Felix,

Am 17.10.10 20:28, schrieb Felix Meschberger:

Hi,

On 17.10.2010 16:05, Sandro Boehme wrote:

Hi Felix,

thanks for the feedback.
The Swing debugger GUI doesn't seem to work in this case as it cannot
open e.g. the explorer.esp file. It says:
Syntax error (.../explorer.esp#83)
This refers to the line containing only form action=# which is
correct in my opinion.


I would expect the line to be correct, but I must admit to not have used
this for quite some time, so ... this may really not properly work
(unfortunately).
it does actually work in my environment too. I was just expecting that I 
have to open the esp file using the menu of the Swing client and then 
have to set a breakpoint there. But that results in the error I 
described above. I didn't know that the script loads automatically into 
the Swing GUI as soon as it is accessed and loaded on the webserver.


Best,

Sandro



Am 16.10.10 20:22, schrieb Felix Meschberger:

Hi Sandro,

The best solution (which I once considered working on a long time ago
but never got around to implement) is to have Rhino debugging support in
Eclipse.

But for now, you may set the
org.apache.sling.scripting.javascript.debug framework property (e.g.
in the sling.properties file) to true. When this property is set to true
Rhino will launch the Swing debugger GUI (on the server system) once the
Rhino ScriptEngineFactory is started.

Regards
Felix


On 16.10.2010 15:36, Sandro Boehme wrote:

Hello,

I'm trying to get into the Sling Explorer and I'm wondering how (or if)
you guys debug these esp scripts? While the Eclipse debugger stops in
jsp files it doesn't stop in esp files as they don't contain Java code.
Is there a special JSR-223 debugger plugin or some trick I don't know
of?

Best,

Sandro












Re: Debugging JavaScript esp files

2010-10-22 Thread Sandro Boehme

Hi Felix,


event is not triggered. Do you have an idea what might be different in
your environment?
right now I'm on a good way to find out why the compilationDone event is 
not triggered so there is no need for you to invest time in that right now.


Best,

Sandro


Re: Debugging JavaScript esp files

2010-10-22 Thread Sandro Boehme

Hi Felix,

compilationDone is now triggered in my environment.
At some point I saw that the compilationDone event is triggered for Dim. 
This gave me a chance to find out how this is all suppose to work.


o Problem one:
I added the new JSDT-based debugger to the listener of the global 
ContextFactory instead of the current instance.


o Problem two:
The org.apache.sling.scripting.javascript.debug property had to be 
disabled as otherwise first the JSDT-based debugger specifies itself in 
the setDebugger() method of a single context. And after that the 
Rhino-based debugger overwrites this with its own instance. Thus the 
event was always triggered on the Rhino-based debugger.
For some reason the Sling debug property was actually not deactivated 
when I thought it was.


I will now try to find a way to set an activated breakpoint on the JS files.

Best,

Sandro

Am 22.10.10 16:18, schrieb Felix Meschberger:

Hi Sandro,

On 22.10.2010 16:15, Sandro Boehme wrote:

Hi Felix,


event is not triggered. Do you have an idea what might be different in
your environment?

right now I'm on a good way to find out why the compilationDone event is
not triggered so there is no need for you to invest time in that right now.


Cool. Thanks for the info.

Regards
Felix



Best,

Sandro







[PROPOSAL] Sling JCRBrowser contribution to Apache Sling

2014-09-29 Thread Sandro Boehme

Hello,

at the adaptTo() conference I had the impression that the Apache Sling 
community might be interested in the contribution of the Sling 
JCRBrowser [1,2] to Apache Sling.
The Sling JCRBrowser is an editor for Sling resources that is build on 
top of the Apache Sling API.
I will work on that in any case in the months to come according to the 
roadmap I pointed out in my talk [3]. If there is interest in the 
contribution I would change the namespace to Apache Sling. I would also 
take the opportunity to rename the Sling JCRBrowser to Sedi the Sling 
Editor. This changes would take place at GitHub prior submitting the 
code to a Jira issue.
In case the contribution is accepted I will continue to work on the tool 
at GitHub and send SVN patches as Jira tickets to Sling.
Of course I would be proud to directly develop for it as a Sling 
committer if the Sling community decides that this is appropriate.
As I said in my talk [3] I might add some commercial add ons to the 
Sling JCRBrowser / Sedi later on to be downloaded separately. This is 
why it is important to be able to point users to such a website from 
Sling. But judging from other Apache projects [4] I assume this is 
probably not a problem.

I'm looking forward to your feedback!

[1] - https://github.com/sandroboehme/jcrbrowser
[2] - http://www.jcrbrowser.org/sling/website/
[3] - 
http://adapt.to/content/dam/adaptto/production/presentations/2014/adaptTo2014-The-Sling-JCRBrowser-Sandro-Boehme.pdf/_jcr_content/renditions/original.media_file.download_attachment.file/adaptTo2014-The-Sling-JCRBrowser-Sandro-Boehme.pdf

[4] - https://www.google.de/search?q=site%3Aapache.org+commercial

Best,

Sandro


Re: [PROPOSAL] Sling JCRBrowser contribution to Apache Sling

2014-09-29 Thread Sandro Boehme

I will work on that in any case in the months to come according to
the roadmap I pointed out in my talk [3]. If there is interest in the


To put that right: I will not only work on that in the months to come
but I will maintain it in the long run. It's just that I can put more
work in it in the next months.
I'm curious about your feedback.

Best,

Sandro


Sling content editor tool needed?

2014-10-01 Thread Sandro Boehme

Hello,

I write this in response to my previous contribution proposal:
http://permalink.gmane.org/gmane.comp.apache.sling.devel/47292

To provide Apache Sling with a content editor like the JCRBrowser I 
would like to know what is needed to contribute the JCRBrowser to Sling. 
I could for example understand if more features are needed.

Or is the Sling JCRBrowser not needed at all?

What do you think?

Best,

Sandro



Am 29.09.14 18:47, schrieb Sandro Boehme:
 Hello,

 at the adaptTo() conference I had the impression that the Apache Sling
 community might be interested in the contribution of the Sling
 JCRBrowser [1,2] to Apache Sling.
 The Sling JCRBrowser is an editor for Sling resources that is build on
 top of the Apache Sling API.
 I will work on that in any case in the months to come according to the
 roadmap I pointed out in my talk [3]. If there is interest in the
 contribution I would change the namespace to Apache Sling. I would also
 take the opportunity to rename the Sling JCRBrowser to Sedi the Sling
 Editor. This changes would take place at GitHub prior submitting the
 code to a Jira issue.
 In case the contribution is accepted I will continue to work on the tool
 at GitHub and send SVN patches as Jira tickets to Sling.
 Of course I would be proud to directly develop for it as a Sling
 committer if the Sling community decides that this is appropriate.
 As I said in my talk [3] I might add some commercial add ons to the
 Sling JCRBrowser / Sedi later on to be downloaded separately. This is
 why it is important to be able to point users to such a website from
 Sling. But judging from other Apache projects [4] I assume this is
 probably not a problem.
 I'm looking forward to your feedback!

 [1] - https://github.com/sandroboehme/jcrbrowser
 [2] - http://www.jcrbrowser.org/sling/website/
 [3] -
 
http://adapt.to/content/dam/adaptto/production/presentations/2014/adaptTo2014-The-Sling-JCRBrowser-Sandro-Boehme.pdf/_jcr_content/renditions/original.media_file.download_attachment.file/adaptTo2014-The-Sling-JCRBrowser-Sandro-Boehme.pdf 



 [4] - https://www.google.de/search?q=site%3Aapache.org+commercial

 Best,

 Sandro




Re: Sling content editor tool needed?

2014-10-01 Thread Sandro Boehme

Hi Bertrand,

Am 01.10.14 14:43, schrieb Bertrand Delacretaz:

Hi Sandro,

On Wed, Oct 1, 2014 at 2:36 PM, Sandro Boehme sandro.boe...@gmx.de wrote:

...To provide Apache Sling with a content editor like the JCRBrowser I would
like to know what is needed to contribute the JCRBrowser to Sling. I could
for example understand if more features are needed...


IIUC your JCRBrowser is read-only at the moment?
beside showing content the Sling JCRBrowser can rename nodes and delete 
single nodes and a list of selected nodes.



If yes adding create/update/delete functionality would be nice of
course, but I'm in favor of accepting your contribution in its present
state so that you can benefit from this community's feedback to evolve
it.

As you're not a committer for now you'd need to submit patches to
expand it, but that's the best way to become a committer, by showing
us how you work and communicate based on a real project.

I'm absolutely fine with submitting patches.



So IMO we should accept this contribution now (in contrib - not core
for now) - what do others think?

-Bertrand



Best,

Sandro


Re: [PROPOSAL] Sling JCRBrowser contribution to Apache Sling

2014-10-01 Thread Sandro Boehme

Hi Carsten,

I'm really glad that there is interest in the Sling JCRBrowser!

If I understand your question correctly you ask if there are bigger
changes needed or just a few adjustments for changing the name 'Sling
JCRBrowser'. The changes would include name in the POM, the package of
the two Java classes, the name of one class and the folder names of
scripts and resources.

If you question was how the JCRBrowser is basically working:
As you know, the JCRBrowser consists of the tree at the left and the
properties at the right.

For the tree on the left the JSTree library is used. It wants a URL to a 
JSON that contains the data for the child nodes. This URL points to a

Sling resource with a 'jcrbrowser.nodes' selector and a 'json'
extension. This way the JSPs [1] render the JSON for the resource that 
is consumed by the JSTree library.

A lesson learned for me was, that it is ok to use a JSP for rendering
JSON if it is small. But for bigger and more complex ones I would work
with plain Java classes for example.
For the deletion and renaming of nodes I use jQuery Ajax calls to the 
Sling POST servlet.


The properties list on the right is rendered [2] using JSTL and the
currentNode variable of Sling.
The html.jsp is registered for the 'jcrbrowser' selector relatively to
the default servlet. And for not getting overruled by servlets
registered by paths and by other resources that are using the
'jcrbrowser' selector I use a ResourceDecorator [3].

I personally don't need to have the other attempts dropped. But I
understand that you might want to clean up.

[1] -
https://github.com/sandroboehme/jcrbrowser/tree/master/jcrbrowser/src/main/resources/SLING-INF/libs/sling/servlet/default/jcrbrowser
[2] -
https://github.com/sandroboehme/jcrbrowser/blob/master/jcrbrowser/src/main/resources/SLING-INF/libs/sling/servlet/default/jcrbrowser/html.jsp:176
[3] -
https://github.com/sandroboehme/jcrbrowser/blob/master/jcrbrowser/src/main/java/org/sboehme/jcrbrowser/JCRBrowserSelectorResourceDecorator.java

Best,

Sandro
Am 01.10.14 14:44, schrieb Carsten Ziegeler:

Hi Sandro,

thanks for your contribution, really appreciated. We had several attempts
to get a nice resource based browser in Sling but so far, it seems all of
them failed more or less. In the end usually due to lack of
resources/interest. I understand that in your case this would be different
which looks promising to me.

Now, obviously as stated by you, the name would need to be changed. I
haven't look into the implementation yet, so I can't tell whether that
would need to be changed or adjusted. Maybe you can briefly summarize how
it works today?

I think this would also mean that we drop the other attempts.

Regards
Carsten

2014-09-29 22:40 GMT+02:00 Sandro Boehme sandro.boe...@gmx.de:


I will work on that in any case in the months to come according to

the roadmap I pointed out in my talk [3]. If there is interest in the

  To put that right: I will not only work on that in the months to come

but I will maintain it in the long run. It's just that I can put more
work in it in the next months.
I'm curious about your feedback.

Best,

Sandro









Re: Sling content editor tool needed?

2014-10-01 Thread Sandro Boehme

Hi Dominik,

thanks for your feedback! Please see my comments inline:

Am 01.10.14 15:17, schrieb Dominik Süß:

Hi everyone,

here my 2 cents about changes that I would like to see (had a short chat
with Sandro at adaptTo() about that):
* rename it and get rid of JCR in the name since it effectively is a
resourceTreeBrowser
As I wrote in my original proposal I would like to rename the JCRBrowser 
based on your hint at adaptTo(). I would like to keep it simple and name 
it Sling Editor and to have a real name I thought about Sedi but it is 
in use and the domains are taken. This is why I prefer Sledi now. It 
is harder to pronounce but still uses the first chars of 'Sling Editor'. 
But I'm still open for other suggestions.



* make sure to be compatible with all ResourceProviders through CRUD API
(and blend out operations not available for ResourceProviders not
supporting it)
For changing content I use the Sling POST servlet. I think this is 
compatible with the ResourceProviders right?



* get rid of the Selectorbased ResourceDecorator pattern for the browser
but implement a ResourceProvider which does the decorationion to make sure
code can be properly secured for production instances and does not impact
rendering of 3rd code at all.
You are right, the selector could not be used in the application anymore 
because this would call the Sling JCRBrowser.


I will find out how ResourceProvider/-Resolver work to change the tool 
accordingly.


Best,

Sandro



If all of those points are met I guess this could really be something
useful (especially when not basing on commercial varations that provide a
browser) which can be included without having to worry that it actually
interfers with the application.

Cheers
Dominik

On Wed, Oct 1, 2014 at 3:06 PM, Sandro Boehme sandro.boe...@gmx.de wrote:


Hi Bertrand,

Am 01.10.14 14:43, schrieb Bertrand Delacretaz:


Hi Sandro,

On Wed, Oct 1, 2014 at 2:36 PM, Sandro Boehme sandro.boe...@gmx.de
wrote:


...To provide Apache Sling with a content editor like the JCRBrowser I
would
like to know what is needed to contribute the JCRBrowser to Sling. I
could
for example understand if more features are needed...



IIUC your JCRBrowser is read-only at the moment?


beside showing content the Sling JCRBrowser can rename nodes and delete
single nodes and a list of selected nodes.

  If yes adding create/update/delete functionality would be nice of

course, but I'm in favor of accepting your contribution in its present
state so that you can benefit from this community's feedback to evolve
it.

As you're not a committer for now you'd need to submit patches to
expand it, but that's the best way to become a committer, by showing
us how you work and communicate based on a real project.


I'm absolutely fine with submitting patches.



So IMO we should accept this contribution now (in contrib - not core
for now) - what do others think?

-Bertrand



Best,

Sandro







Re: Sling content editor tool needed?

2014-10-01 Thread Sandro Boehme

Wonderful!
Yes, I will do the renaming at my codebase and then attaching the code 
to the Jira issue. This also makes it easier for me to send the patches 
as the names are equal.


Best,

Sandro

Am 01.10.14 17:22, schrieb Carsten Ziegeler:

+1 to accept the contribution

I guess we can sort out all technical issues once the contribution is done.
However, I think the renaming should be done before so we can vote on a
renamed source code base

Carsten

2014-10-01 16:24 GMT+02:00 Sandro Boehme sandro.boe...@gmx.de:


Hi Dominik,

thanks for your feedback! Please see my comments inline:

Am 01.10.14 15:17, schrieb Dominik Süß:


Hi everyone,

here my 2 cents about changes that I would like to see (had a short chat
with Sandro at adaptTo() about that):
* rename it and get rid of JCR in the name since it effectively is a
resourceTreeBrowser


As I wrote in my original proposal I would like to rename the JCRBrowser
based on your hint at adaptTo(). I would like to keep it simple and name it
Sling Editor and to have a real name I thought about Sedi but it is in
use and the domains are taken. This is why I prefer Sledi now. It is
harder to pronounce but still uses the first chars of 'Sling Editor'. But
I'm still open for other suggestions.

  * make sure to be compatible with all ResourceProviders through CRUD API

(and blend out operations not available for ResourceProviders not
supporting it)


For changing content I use the Sling POST servlet. I think this is
compatible with the ResourceProviders right?

  * get rid of the Selectorbased ResourceDecorator pattern for the browser

but implement a ResourceProvider which does the decorationion to make sure
code can be properly secured for production instances and does not impact
rendering of 3rd code at all.


You are right, the selector could not be used in the application anymore
because this would call the Sling JCRBrowser.

I will find out how ResourceProvider/-Resolver work to change the tool
accordingly.

Best,

Sandro




If all of those points are met I guess this could really be something
useful (especially when not basing on commercial varations that provide a
browser) which can be included without having to worry that it actually
interfers with the application.

Cheers
Dominik

On Wed, Oct 1, 2014 at 3:06 PM, Sandro Boehme sandro.boe...@gmx.de
wrote:

  Hi Bertrand,


Am 01.10.14 14:43, schrieb Bertrand Delacretaz:

  Hi Sandro,


On Wed, Oct 1, 2014 at 2:36 PM, Sandro Boehme sandro.boe...@gmx.de
wrote:

  ...To provide Apache Sling with a content editor like the JCRBrowser I

would
like to know what is needed to contribute the JCRBrowser to Sling. I
could
for example understand if more features are needed...



IIUC your JCRBrowser is read-only at the moment?

  beside showing content the Sling JCRBrowser can rename nodes and delete

single nodes and a list of selected nodes.

   If yes adding create/update/delete functionality would be nice of


course, but I'm in favor of accepting your contribution in its present
state so that you can benefit from this community's feedback to evolve
it.

As you're not a committer for now you'd need to submit patches to
expand it, but that's the best way to become a committer, by showing
us how you work and communicate based on a real project.

  I'm absolutely fine with submitting patches.



  So IMO we should accept this contribution now (in contrib - not core

for now) - what do others think?

-Bertrand


  Best,


Sandro













Re: Sling content editor tool needed?

2014-10-01 Thread Sandro Boehme
Ok, there might be script editors or something like that. This is why I 
actually like Sling Content Editor as it is more specific than Sling 
Editor.
The question is just, how to name the packages and folders. Sling Health 
Checks uses oas.hc [1] as package name and Sling Testing Tools uses 
oas.testing.tools [2].
I guess I should go for oas.contenteditor even if it is a bit lengthy. 
Because oas.ce is not really descriptive.


[1] - 
http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/samples/src/main/java/org/apache/sling/hc/
[2] - 
http://svn.apache.org/repos/asf/sling/trunk/testing/tools/src/main/java/org/apache/sling/testing/tools/


Best,

Sandro

Am 01.10.14 17:24, schrieb Bertrand Delacretaz:

On Wed, Oct 1, 2014 at 4:24 PM, Sandro Boehme sandro.boe...@gmx.de wrote:

...This is why I prefer Sledi now. It is harder to
pronounce but still uses the first chars of 'Sling Editor'. But I'm still
open for other suggestions


For other modules we have opted for plain descriptive names like
Sling Models, Sling Health Checks, Sling Testing Tools etc., so
if we want to keep this pattern (which I like) we might just go for
Sling Content Editor.

-Bertrand





Re: Sling content editor tool needed?

2014-10-01 Thread Sandro Boehme

I'm absolutely fine with that.

Am 01.10.14 15:20, schrieb Bertrand Delacretaz:

On Wed, Oct 1, 2014 at 3:17 PM, Robert Munteanu romb...@apache.org wrote:

...+1 for accepting this in contrib. To be clear, this would mean it
would not replace the current Sling Explorer from the launchpad
imediately...


Agreed, no need to delete any code right now, we'll just let software
darwinism do its job.

-Bertrand





Re: Sling content editor tool needed?

2014-10-03 Thread Sandro Boehme

Hi,

Am 01.10.14 17:24, schrieb Bertrand Delacretaz:

On Wed, Oct 1, 2014 at 4:24 PM, Sandro Boehme sandro.boe...@gmx.de wrote:

...This is why I prefer Sledi now. It is harder to
pronounce but still uses the first chars of 'Sling Editor'. But I'm still
open for other suggestions


For other modules we have opted for plain descriptive names like
Sling Models, Sling Health Checks, Sling Testing Tools etc., so
if we want to keep this pattern (which I like) we might just go for
Sling Content Editor.

-Bertrand



after reading about resources in Sling I have the impression that the 
term Content is more used in Sling for JCR content while Resource 
would be the equivalent that abstracts from storage.
If that is correct the Sling Content Editor would again refer to a JCR 
term and I would prefer to change the name to Sling Resource Editor.
Or are the terms Content and Resource really used interchangeable in 
Sling?


Best,

Sandro


Re: UnsupportedOperationException: JcrNodeResourceMetadata is locked

2014-10-08 Thread Sandro Boehme
Sorry for the noise. I posted that to the wrong list. It is re-posted 
to the users list now.


Best,
Sandro

Am Wed Oct  8 15:39:19 2014 schrieb Sandro Boehme:

Hello,

when I call a resource using my custom ResourceProvider [1] I get a
server error (500) saying java.lang.UnsupportedOperationException:
JcrNodeResourceMetadata is locked [3]. At the moment I don't see a
way to get around that and it would be great if someone has a hint on
what to do.

In my ResEditorResourceProvider.java:61 [1] I return a resource that I
get from a ResourceResolver. While resolving, the
'ResourceDecoratorTracker.decorate(Resource)' method
'result.getResourceMetadata().lock()' is called and after I returned
my resource 'ResourceResolverImpl.getAbsoluteResourceInternal(String
path, boolean isResolve)' calls
'resource.getResourceMetadata().setResolutionPath(path)' which
triggers the exception. You can see that in the stack trace [3].

++ Background ++
I'm working on a custom ResourceProvider [1] for the Sling Resource
Editor [2] that returns a wrapped resource for every Sling resource.
This wrapped resource will later get the resource type for the
Resource Editor set. That way the Resource Editor script would get
called for all resources.

[1] -
https://github.com/sandroboehme/resourceeditor/blob/master/src/main/java/org/apache/sling/reseditor/ResEditorResourceProvider.java

[2] - https://issues.apache.org/jira/browse/SLING-4001
[3] -
java.lang.UnsupportedOperationException: JcrNodeResourceMetadata is
locked
at
org.apache.sling.api.resource.ResourceMetadata.checkReadOnly(ResourceMetadata.java:310)

at
org.apache.sling.api.resource.ResourceMetadata.put(ResourceMetadata.java:322)

at
org.apache.sling.api.resource.ResourceMetadata.setResolutionPath(ResourceMetadata.java:254)

at
org.apache.sling.resourceresolver.impl.ResourceResolverImpl.getAbsoluteResourceInternal(ResourceResolverImpl.java:955)

at
org.apache.sling.resourceresolver.impl.ResourceResolverImpl.resolveInternal(ResourceResolverImpl.java:810)

at
org.apache.sling.resourceresolver.impl.ResourceResolverImpl.resolveInternal(ResourceResolverImpl.java:327)

at
org.apache.sling.resourceresolver.impl.ResourceResolverImpl.resolve(ResourceResolverImpl.java:225)

at
org.apache.sling.engine.impl.request.RequestData.initResource(RequestData.java:223)

at
org.apache.sling.engine.impl.SlingRequestProcessorImpl.doProcessRequest(SlingRequestProcessorImpl.java:142)

at
org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:217)


Thanks!

Sandro






UnsupportedOperationException: JcrNodeResourceMetadata is locked

2014-10-08 Thread Sandro Boehme

Hello,

when I call a resource using my custom ResourceProvider [1] I get a 
server error (500) saying java.lang.UnsupportedOperationException: 
JcrNodeResourceMetadata is locked [3]. At the moment I don't see a way 
to get around that and it would be great if someone has a hint on what 
to do.


In my ResEditorResourceProvider.java:61 [1] I return a resource that I 
get from a ResourceResolver. While resolving, the 
'ResourceDecoratorTracker.decorate(Resource)' method 
'result.getResourceMetadata().lock()' is called and after I returned my 
resource 'ResourceResolverImpl.getAbsoluteResourceInternal(String path, 
boolean isResolve)' calls 
'resource.getResourceMetadata().setResolutionPath(path)' which triggers 
the exception. You can see that in the stack trace [3].


++ Background ++
I'm working on a custom ResourceProvider [1] for the Sling Resource 
Editor [2] that returns a wrapped resource for every Sling resource. 
This wrapped resource will later get the resource type for the Resource 
Editor set. That way the Resource Editor script would get called for all 
resources.


[1] - 
https://github.com/sandroboehme/resourceeditor/blob/master/src/main/java/org/apache/sling/reseditor/ResEditorResourceProvider.java

[2] - https://issues.apache.org/jira/browse/SLING-4001
[3] -
java.lang.UnsupportedOperationException: JcrNodeResourceMetadata is locked
	at 
org.apache.sling.api.resource.ResourceMetadata.checkReadOnly(ResourceMetadata.java:310)
	at 
org.apache.sling.api.resource.ResourceMetadata.put(ResourceMetadata.java:322)
	at 
org.apache.sling.api.resource.ResourceMetadata.setResolutionPath(ResourceMetadata.java:254)
	at 
org.apache.sling.resourceresolver.impl.ResourceResolverImpl.getAbsoluteResourceInternal(ResourceResolverImpl.java:955)
	at 
org.apache.sling.resourceresolver.impl.ResourceResolverImpl.resolveInternal(ResourceResolverImpl.java:810)
	at 
org.apache.sling.resourceresolver.impl.ResourceResolverImpl.resolveInternal(ResourceResolverImpl.java:327)
	at 
org.apache.sling.resourceresolver.impl.ResourceResolverImpl.resolve(ResourceResolverImpl.java:225)
	at 
org.apache.sling.engine.impl.request.RequestData.initResource(RequestData.java:223)
	at 
org.apache.sling.engine.impl.SlingRequestProcessorImpl.doProcessRequest(SlingRequestProcessorImpl.java:142)
	at 
org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:217)


Thanks!

Sandro


Re: Sling content editor tool needed?

2014-10-12 Thread Sandro Boehme

Hi Dominik and others,

now as some time passed I can tell about results and more concrete 
things. Please see my comments inline:


Am 01.10.14 15:17, schrieb Dominik Süß:

Hi everyone,

here my 2 cents about changes that I would like to see (had a short chat
with Sandro at adaptTo() about that):
* rename it and get rid of JCR in the name since it effectively is a
resourceTreeBrowser
The JCRBrowser is renamed to Apache Sling Resource Editor. See the 
contribution ticket [1] and the latest source code at GitHub [2]



* make sure to be compatible with all ResourceProviders through CRUD API
(and blend out operations not available for ResourceProviders not
supporting it)
From reading the docs I think the Sling POST servlet that I use for 
nodes is operating on the Resource of the request.

For reading the nodes I use the Resource API as well.
But for reading properties I check if the resource is adaptable to a 
node. If it is, I use the JCR API for reading. If it isn't I adapt to a 
ValueMap and show its keys and values.

For changing properties I plan to use the Sling POST servlet as well.
I guess this is the best possible compatibility right?



* get rid of the Selectorbased ResourceDecorator pattern for the browser
but implement a ResourceProvider which does the decorationion to make sure
code can be properly secured for production instances and does not impact
rendering of 3rd code at all.
The code is changed now at GitHub [3] to use the ResourceProvider. This 
way the Sling Resource Editor does not depend on a selector and instead 
uses the root path element of the ResourceProvider. A URL looks like 
this now:

http://localhost:8080/reseditor/libs/sling/servlet/default.html
To secure it I guess one use the 'ResourceAccessSecurity'. Even though I 
still have to use a resource decorator.


I didn't overwrite the resource type in the resource wrapper that I use 
in the resource provider. Because then for example after every node in 
the tree the same type would show up and I couldn't distinguish between 
them anymore.
This is why I just added a marker [4] to the resources that went through 
my resource provider and I still use a resource decorator [5] to set the 
resource type depending if this marker is found. By doing it in the 
resource decorator the original resource types are preserved when 
accessing them in the JSP.




If all of those points are met I guess this could really be something
useful (especially when not basing on commercial varations that provide a
browser) which can be included without having to worry that it actually
interfers with the application.
I guess this way it doesn't interfere with an other application in the 
same Sling instance.


[1] - https://issues.apache.org/jira/browse/SLING-4001
[2] - https://github.com/sandroboehme/resourceeditor
[3] - 
https://github.com/sandroboehme/resourceeditor/tree/master/src/main/java/org/apache/sling/reseditor/resource
[4] - line 23 in 
https://github.com/sandroboehme/resourceeditor/blob/master/src/main/java/org/apache/sling/reseditor/resource/ResourceTypeResourceWrapper.java 

[5] - line 73 in 
https://github.com/sandroboehme/resourceeditor/blob/master/src/main/java/org/apache/sling/reseditor/resource/ResourceProviderBasedResourceDecorator.java 



Best,

Sandro


integrating a JavaScript library in a Sling project that doesn't have a public Java API

2014-10-24 Thread Sandro Boehme

Hello,

in the Sling Resource-Editor I would like to integrate the JavaScript 
JSNodeTypes library that doesn't have a public Java API. But the user 
should still be able to use OSGi to easily install the tool.


The problem is, when using the maven-bundle-plugin the Bnd tool won't 
automatically find the dependency to that library when looking for Java 
import statements and I cannot manually add a 'Import-Package' statement 
as there is no package I can use.


There is one thing to note: The JSNodeTypes library is created by 
myself. This means if there is a solution that needs changes in that 
library I could do that. E.g. I could create an empty Java package in 
JSNodeTypes that I can use in an 'Import-Package' statement.


But isn't there a better solution?

Thanks,

Sandro


Re: integrating a JavaScript library in a Sling project that doesn't have a public Java API

2014-10-24 Thread Sandro Boehme
Yay that sounds like the right path! Thanks Felix for the hint! I'm 
looking forward to David Bosschaerts pointers to use the 
Provide-/Require-Capability model!


 I am referring to the provider bundle at
 https://github.com/sandroboehme/jsNodeTypes. Is that correct ?
Yes, thats correct.

Thanks,

Sandro

Am 24.10.14 12:45, schrieb Felix Meschberger:

Hi

I am a bit confused, sorry.

I am referring to the provider bundle at
https://github.com/sandroboehme/jsNodeTypes. Is that correct ?

Also having SLING-4001 in mind, I might come to the core of the
problem: You want to deploy an application which depends on the
functionality of the jsNodeTypes bundle. So you need a way to
indicate to OBR that if you application bundle is deployed, the
jsNodeTypes bundle must be installed as well.

Correct, Require-Bundle used to be the only solution here, though
cranky but feasible.

Nowadays we do have a more flexible Provide-/Require-Capability
model: The jsNodeTypes would Provide-Capability — the jsNodeTypes
feature — and your application would Require-Capability this
jsNodeTypes feature.

I have copied David Bosschaert who can certainly share how this
mechanism could be leveraged in this use case. Whether an existing
capability can be reused or whether you might want to define a custom
capability.


Regards Felix

[1] https://issues.apache.org/jira/browse/SLING-4001


Am 24.10.2014 um 11:44 schrieb Sandro Boehme
sandro.boe...@gmx.de:

Hello,

in the Sling Resource-Editor I would like to integrate the
JavaScript JSNodeTypes library that doesn't have a public Java API.
But the user should still be able to use OSGi to easily install the
tool.

The problem is, when using the maven-bundle-plugin the Bnd tool
won't automatically find the dependency to that library when
looking for Java import statements and I cannot manually add a
'Import-Package' statement as there is no package I can use.

There is one thing to note: The JSNodeTypes library is created by
myself. This means if there is a solution that needs changes in
that library I could do that. E.g. I could create an empty Java
package in JSNodeTypes that I can use in an 'Import-Package'
statement.

But isn't there a better solution?

Thanks,

Sandro






build a Sling OSGi bundle with dependencies located in an OSGi Bundle Repository

2014-10-24 Thread Sandro Boehme

Hello,

in the Sling Resource Editor I have dependencies to libraries that are 
located in an OBR. To build it with maven and install it to a Sling 
instance I deployed it before, using the OSGi Repository page in the 
console.
But of course it would be better to use one command at the command line 
to build the project and install it to Sling.

Does someone have an idea/hint/pointer on how to do that?

Thanks in advance,

Sandro


Re: integrating a JavaScript library in a Sling project that doesn't have a public Java API

2014-10-24 Thread Sandro Boehme

Hi David,

thanks for your detailed feedback! I will work on the generic 
capabilities/requirements model first as Felix and you suggested, as it 
looks like I can use

Require-Capability/
and
Provide-Capability/
as instructions in the configuration of the maven-bundle-plugin as seen here
http://maven-repository.com/artifact/io.fabric8/fabric8-project/1.1.0.Beta2/pom
.

Thanks,

Sandro

Am 24.10.14 14:00, schrieb David Bosschaert:

Hi Sandro,

There are a couple of things you could do here.

1. The generic capabilities/requirements model is certainly the most
elegant. This basically allows you to create any type of capability
(not just an export package or bundle name). Then in the consumer you
can depend on it.

Generic capabilities are organized in namespaces, so for example you
could use a namespace for all your JS library bundles (e.g.
org.apache.sling.js) and then as value have jsNodeTypes for the bundle
that contains that.

So for example you an add in your bundle:
Provide-Capability: org.apache.sling.js;
org.apache.sling.js=jsNodeTypes;version:Version=1.0.0

Then on the requiring side you can require this dependency as follows:
Require-Capability: org.apache.sling.js;
filter:=((org.apache.sling.js=jsNodeTypes)(version=1.0)(!(version=2.0)))

You can find more examples for this in the OSGi specs
(http://www.osgi.org/Specifications)

2. An alternative approach, which is less elegant, but definitely also
works is using a 'fake' package. For example you could have your
bundle that contains jsNodeTypes export a package
'org.apache.sling.static.js.jsNodeTypes' and then import that as if it
was a normal package. It's a bit of a hack, but it works and was often
used before the Provide/Require-Capability model was part of OSGi

Hope this helps,

David

On 24 October 2014 12:31, Sandro Boehme sandro.boe...@gmx.de wrote:

Yay that sounds like the right path! Thanks Felix for the hint! I'm looking
forward to David Bosschaerts pointers to use the Provide-/Require-Capability
model!


I am referring to the provider bundle at
https://github.com/sandroboehme/jsNodeTypes. Is that correct ?

Yes, thats correct.

Thanks,

Sandro

Am 24.10.14 12:45, schrieb Felix Meschberger:


Hi

I am a bit confused, sorry.

I am referring to the provider bundle at
https://github.com/sandroboehme/jsNodeTypes. Is that correct ?

Also having SLING-4001 in mind, I might come to the core of the
problem: You want to deploy an application which depends on the
functionality of the jsNodeTypes bundle. So you need a way to
indicate to OBR that if you application bundle is deployed, the
jsNodeTypes bundle must be installed as well.

Correct, Require-Bundle used to be the only solution here, though
cranky but feasible.

Nowadays we do have a more flexible Provide-/Require-Capability
model: The jsNodeTypes would Provide-Capability — the jsNodeTypes
feature — and your application would Require-Capability this
jsNodeTypes feature.

I have copied David Bosschaert who can certainly share how this
mechanism could be leveraged in this use case. Whether an existing
capability can be reused or whether you might want to define a custom
capability.


Regards Felix

[1] https://issues.apache.org/jira/browse/SLING-4001


Am 24.10.2014 um 11:44 schrieb Sandro Boehme
sandro.boe...@gmx.de:

Hello,

in the Sling Resource-Editor I would like to integrate the
JavaScript JSNodeTypes library that doesn't have a public Java API.
But the user should still be able to use OSGi to easily install the
tool.

The problem is, when using the maven-bundle-plugin the Bnd tool
won't automatically find the dependency to that library when
looking for Java import statements and I cannot manually add a
'Import-Package' statement as there is no package I can use.

There is one thing to note: The JSNodeTypes library is created by
myself. This means if there is a solution that needs changes in
that library I could do that. E.g. I could create an empty Java
package in JSNodeTypes that I can use in an 'Import-Package'
statement.

But isn't there a better solution?

Thanks,

Sandro











Re: build a Sling OSGi bundle with dependencies located in an OSGi Bundle Repository

2014-10-24 Thread Sandro Boehme

Hi Bertrand,

you mean I should add the libraries as usual Maven dependencies? AFAIK 
the maven-bundle-plugin should create the right import package.


The dependencies are from a Spring OBR. If I remember correctly I could 
get the JSTL libraries only there as bundles. But that was some time ago 
and they are now also available from maven central as bundles.

I will try that.
But I'm not sure if all transitive dependencies of the project are 
installed to the running Sling instance together with the project. I 
will see.

Thanks for your input Bertrand!

Best,

Sandro


Am 24.10.14 14:57, schrieb Bertrand Delacretaz:

Hi Sandro,

On Fri, Oct 24, 2014 at 2:03 PM, Sandro Boehme sandro.boe...@gmx.de wrote:

...in the Sling Resource Editor I have dependencies to libraries that are
located in an OBR. To build it with maven and install it to a Sling instance
I deployed it before, using the OSGi Repository page in the console


Aren't those dependencies in Maven Central? If not, could they be added?

-Bertrand





Re: integrating a JavaScript library in a Sling project that doesn't have a public Java API

2014-10-27 Thread Sandro Boehme

Hello again,

sadly it didn't work using the capabilities/requirements model as the 
OBR doesn't support the require-capability header [1].

But using a fake package it works as expected.

[1] - 
http://mail-archives.apache.org/mod_mbox/felix-users/201410.mbox/%3CetPan.544e6915.643c9869.30b7%40Endofunctor.local%3E


Thanks again,

Sandro

Am 24.10.14 14:33, schrieb Sandro Boehme:

Hi David,

thanks for your detailed feedback! I will work on the generic
capabilities/requirements model first as Felix and you suggested, as it
looks like I can use
Require-Capability/
and
Provide-Capability/
as instructions in the configuration of the maven-bundle-plugin as seen
here
http://maven-repository.com/artifact/io.fabric8/fabric8-project/1.1.0.Beta2/pom

.

Thanks,

Sandro

Am 24.10.14 14:00, schrieb David Bosschaert:

Hi Sandro,

There are a couple of things you could do here.

1. The generic capabilities/requirements model is certainly the most
elegant. This basically allows you to create any type of capability
(not just an export package or bundle name). Then in the consumer you
can depend on it.

Generic capabilities are organized in namespaces, so for example you
could use a namespace for all your JS library bundles (e.g.
org.apache.sling.js) and then as value have jsNodeTypes for the bundle
that contains that.

So for example you an add in your bundle:
Provide-Capability: org.apache.sling.js;
org.apache.sling.js=jsNodeTypes;version:Version=1.0.0

Then on the requiring side you can require this dependency as follows:
Require-Capability: org.apache.sling.js;
filter:=((org.apache.sling.js=jsNodeTypes)(version=1.0)(!(version=2.0)))


You can find more examples for this in the OSGi specs
(http://www.osgi.org/Specifications)

2. An alternative approach, which is less elegant, but definitely also
works is using a 'fake' package. For example you could have your
bundle that contains jsNodeTypes export a package
'org.apache.sling.static.js.jsNodeTypes' and then import that as if it
was a normal package. It's a bit of a hack, but it works and was often
used before the Provide/Require-Capability model was part of OSGi

Hope this helps,

David

On 24 October 2014 12:31, Sandro Boehme sandro.boe...@gmx.de wrote:

Yay that sounds like the right path! Thanks Felix for the hint! I'm
looking
forward to David Bosschaerts pointers to use the
Provide-/Require-Capability
model!


I am referring to the provider bundle at
https://github.com/sandroboehme/jsNodeTypes. Is that correct ?

Yes, thats correct.

Thanks,

Sandro

Am 24.10.14 12:45, schrieb Felix Meschberger:


Hi

I am a bit confused, sorry.

I am referring to the provider bundle at
https://github.com/sandroboehme/jsNodeTypes. Is that correct ?

Also having SLING-4001 in mind, I might come to the core of the
problem: You want to deploy an application which depends on the
functionality of the jsNodeTypes bundle. So you need a way to
indicate to OBR that if you application bundle is deployed, the
jsNodeTypes bundle must be installed as well.

Correct, Require-Bundle used to be the only solution here, though
cranky but feasible.

Nowadays we do have a more flexible Provide-/Require-Capability
model: The jsNodeTypes would Provide-Capability — the jsNodeTypes
feature — and your application would Require-Capability this
jsNodeTypes feature.

I have copied David Bosschaert who can certainly share how this
mechanism could be leveraged in this use case. Whether an existing
capability can be reused or whether you might want to define a custom
capability.


Regards Felix

[1] https://issues.apache.org/jira/browse/SLING-4001


Am 24.10.2014 um 11:44 schrieb Sandro Boehme
sandro.boe...@gmx.de:

Hello,

in the Sling Resource-Editor I would like to integrate the
JavaScript JSNodeTypes library that doesn't have a public Java API.
But the user should still be able to use OSGi to easily install the
tool.

The problem is, when using the maven-bundle-plugin the Bnd tool
won't automatically find the dependency to that library when
looking for Java import statements and I cannot manually add a
'Import-Package' statement as there is no package I can use.

There is one thing to note: The JSNodeTypes library is created by
myself. This means if there is a solution that needs changes in
that library I could do that. E.g. I could create an empty Java
package in JSNodeTypes that I can use in an 'Import-Package'
statement.

But isn't there a better solution?

Thanks,

Sandro














Sling Resource Editor :: first patch

2014-11-12 Thread Sandro Boehme

Hello,

does somebody have the time to commit my first patch [1] for my Sling 
Resource Editor contribution [2]?


[1] - https://issues.apache.org/jira/browse/SLING-4141
[2] - https://issues.apache.org/jira/browse/SLING-4001

Best Sandro

BTW: I god nice issue numbers, right? ;-)


Re: Sling Resource Editor :: first patch

2014-11-12 Thread Sandro Boehme

Hi Robert,

thanks for thinking about committing the patch.

The patch is not self contained because AFAIK the SVN patch format does 
not have information about deleted files. Only about deleted file 
content. I would appreciate it if somebody has a workaround for that.


I don't see a way to easily split the patch into smaller ones.
The only way I see would be to send the first patch e.g. containing the 
first 6 commits up to the first directory structure change. Then someone 
would need to commit it. After that I can update my svn working 
directory. Only after 'svn up' I can create a diff for the next patch 
and so on.
If someone is willing to commit the patches I would create them one 
after another. But that would take quite some time.


If it's just about being easier to review then one could also have a 
look at the commit history and its diffs over at the GitHub project [1] 
starting at the commit 'fix for #5' (c822fc8) from the 7th of october. I 
think this would be quite convenient to review.


(Of course the third option would be to commit it myself... ;-)  )

[1] - https://github.com/sandroboehme/resourceeditor/commits/master

Best,

Sandro

Am 12.11.14 14:05, schrieb Robert Munteanu:

Hi Sandro,

On Wed, 2014-11-12 at 13:39 +0100, Sandro Boehme wrote:

Hello,

does somebody have the time to commit my first patch [1] for my Sling
Resource Editor contribution [2]?


I planned to look at it at some point - no promise that I will find the
time to do that :-) - but since you asked on the list ...

I personally prefer patches to be smaller and self-contained and be
linked to individual Jira issues. Your issue contains a list of
improvements and I think the patch is quite large - 613k .

I would suggest to split these into multiple, smaller patches. If you
have large, noisy, changes like renames or moves or splitting of trees,
make them as separate patches so the rest are easier to review.

Cheers,

Robert



[1] - https://issues.apache.org/jira/browse/SLING-4141
[2] - https://issues.apache.org/jira/browse/SLING-4001

Best Sandro

BTW: I god nice issue numbers, right? ;-)


Maybe you'll get SLING-, fingers crossed :-)







Re: Sling Resource Editor :: first patch

2014-11-15 Thread Sandro Boehme

Hi Robert,

I got it wrong. Or course a simple split would work. Even though initial 
commits may overlap which leads to the new add-node dialog changes to be 
hidden in the patch for the restructuring of the folders.

But for reviewing it's probably easier.
I splitted the patch up into smaller ones and created sub-tasks for them.

Thanks,

Sandro

Am 12.11.14 23:04, schrieb Sandro Boehme:

Hi Robert,

thanks for thinking about committing the patch.

The patch is not self contained because AFAIK the SVN patch format does
not have information about deleted files. Only about deleted file
content. I would appreciate it if somebody has a workaround for that.

I don't see a way to easily split the patch into smaller ones.
The only way I see would be to send the first patch e.g. containing the
first 6 commits up to the first directory structure change. Then someone
would need to commit it. After that I can update my svn working
directory. Only after 'svn up' I can create a diff for the next patch
and so on.
If someone is willing to commit the patches I would create them one
after another. But that would take quite some time.

If it's just about being easier to review then one could also have a
look at the commit history and its diffs over at the GitHub project [1]
starting at the commit 'fix for #5' (c822fc8) from the 7th of october. I
think this would be quite convenient to review.

(Of course the third option would be to commit it myself... ;-)  )

[1] - https://github.com/sandroboehme/resourceeditor/commits/master

Best,

Sandro

Am 12.11.14 14:05, schrieb Robert Munteanu:

Hi Sandro,

On Wed, 2014-11-12 at 13:39 +0100, Sandro Boehme wrote:

Hello,

does somebody have the time to commit my first patch [1] for my Sling
Resource Editor contribution [2]?


I planned to look at it at some point - no promise that I will find the
time to do that :-) - but since you asked on the list ...

I personally prefer patches to be smaller and self-contained and be
linked to individual Jira issues. Your issue contains a list of
improvements and I think the patch is quite large - 613k .

I would suggest to split these into multiple, smaller patches. If you
have large, noisy, changes like renames or moves or splitting of trees,
make them as separate patches so the rest are easier to review.

Cheers,

Robert



[1] - https://issues.apache.org/jira/browse/SLING-4141
[2] - https://issues.apache.org/jira/browse/SLING-4001

Best Sandro

BTW: I god nice issue numbers, right? ;-)


Maybe you'll get SLING-, fingers crossed :-)










Sling Resource Editor code update

2014-12-11 Thread Sandro Boehme

Hello,

a new version of the resource editor is available.
I'm looking forward to any feedback.

++ Features ++
It contains two cheat sheet info sections and an improved add node dialog.
The dialog makes it easier now to create new nodes by offering short 
cuts and by  providing the applicable node names, node types and node 
name / node type combinations. It will show a warning if you enter a 
Sling resource type even though this property is not allowed on the 
resulting node.
I added a new background image as well, as the licensing information of 
the old one turned out to be inconsistent. This fixes SLING-4205.


++ Installation ++
To try it out you can add the following OBR to your repository
http://www.jcrbrowser.org/sling/obr/repository.xml
and install the Apache Sling Resource Editor 
(org.apache.sling.resource-editor) from the OSGi Repository in the Sling 
Web Console.

You then find the Resource Editor at:
http://localhost:8080/reseditor/.html

++ Patch ++
It would be good if someone could commit the pending patch
SLING-4215 [1]. After that I would update my SVN workspace and create 
the patch for this code update.


++ Dependency to the JSNodeTypes library ++
I order to calculate the applicable node types I made a big update to my 
JSNodeTypes library which I would now like to contribute as well.
If that is part of Sling after the contribution, no dependencies 
external to Sling are needed anymore to run the Resource Editor.


++ Roadmap ++
Next (before/after some holidays) I plan to integrate feedback if 
possible and then work on tests for the Resource Editor. After that I 
will continue with CRUD features and editors for properties.


[1] - https://issues.apache.org/jira/browse/SLING-4215

Best,

Sandro


[PROPOSAL] JSNodeTypes contribution

2014-12-11 Thread Sandro Boehme

Hello,

I would like to offer the JSNodeTypes library to Apache Sling as a 
contribution.

It provides a JavaScript API for JCR node types.
I use it in the new code update of the Sling Resource Editor at the Add 
Node dialog to provide:

o the applicable node names
o the applicable node types
o the applicable node name / node type combinations and
o a warning if a resource type is entered even though the chosen node 
type does not allow for it.

Here you find a demo of the full API and all background information:
http://www.jcrbrowser.org/sling/libs/jsnodetypes/content/documentation.html

This library is Apache 2 licensed and plain JavaScript and Java. It is 
39kB and does not contain dependencies external to Sling. To replace the 
Gson dependency with oa.sling.commons.json most of the Java runtime code 
has been rewritten.

Of course I'm committed to maintain this library.
What do you think?

Best,

Sandro


Re: Sling Resource Editor code update

2014-12-11 Thread Sandro Boehme

Hi Julian,

everything is fine. Thanks for committing Julian!

Cheers,

Sandro

Am Thu Dec 11 16:47:50 2014 schrieb Julian Sedding:

Hi Sandro

I have committed your patch in SLING-4215. Can you please check that
everything is ok now? Thanks.

Regards
Julian


On Thu, Dec 11, 2014 at 4:20 PM, Sandro Boehme sandro.boe...@gmx.de wrote:

Hello,

a new version of the resource editor is available.
I'm looking forward to any feedback.

++ Features ++
It contains two cheat sheet info sections and an improved add node dialog.
The dialog makes it easier now to create new nodes by offering short cuts
and by  providing the applicable node names, node types and node name / node
type combinations. It will show a warning if you enter a Sling resource type
even though this property is not allowed on the resulting node.
I added a new background image as well, as the licensing information of the
old one turned out to be inconsistent. This fixes SLING-4205.

++ Installation ++
To try it out you can add the following OBR to your repository
http://www.jcrbrowser.org/sling/obr/repository.xml
and install the Apache Sling Resource Editor
(org.apache.sling.resource-editor) from the OSGi Repository in the Sling Web
Console.
You then find the Resource Editor at:
http://localhost:8080/reseditor/.html

++ Patch ++
It would be good if someone could commit the pending patch
SLING-4215 [1]. After that I would update my SVN workspace and create the
patch for this code update.

++ Dependency to the JSNodeTypes library ++
I order to calculate the applicable node types I made a big update to my
JSNodeTypes library which I would now like to contribute as well.
If that is part of Sling after the contribution, no dependencies external to
Sling are needed anymore to run the Resource Editor.

++ Roadmap ++
Next (before/after some holidays) I plan to integrate feedback if possible
and then work on tests for the Resource Editor. After that I will continue
with CRUD features and editors for properties.

[1] - https://issues.apache.org/jira/browse/SLING-4215

Best,

Sandro







Re: Sling Resource Editor code update

2014-12-11 Thread Sandro Boehme
As the previous patch (SLING-4215) is committed by Julian I created a 
new one in SLING-4239 [1] that contains the features I described in this 
email. It includes the patch command that worked for me as the patch 
contains binary data. I would be glad if someone could commit it.


[1] - https://issues.apache.org/jira/browse/SLING-4239

Thanks,

Sandro

Am 11.12.14 16:20, schrieb Sandro Boehme:

Hello,

a new version of the resource editor is available.
I'm looking forward to any feedback.

++ Features ++
It contains two cheat sheet info sections and an improved add node dialog.
The dialog makes it easier now to create new nodes by offering short
cuts and by  providing the applicable node names, node types and node
name / node type combinations. It will show a warning if you enter a
Sling resource type even though this property is not allowed on the
resulting node.
I added a new background image as well, as the licensing information of
the old one turned out to be inconsistent. This fixes SLING-4205.

++ Installation ++
To try it out you can add the following OBR to your repository
http://www.jcrbrowser.org/sling/obr/repository.xml
and install the Apache Sling Resource Editor
(org.apache.sling.resource-editor) from the OSGi Repository in the Sling
Web Console.
You then find the Resource Editor at:
http://localhost:8080/reseditor/.html

++ Patch ++
It would be good if someone could commit the pending patch
SLING-4215 [1]. After that I would update my SVN workspace and create
the patch for this code update.

++ Dependency to the JSNodeTypes library ++
I order to calculate the applicable node types I made a big update to my
JSNodeTypes library which I would now like to contribute as well.
If that is part of Sling after the contribution, no dependencies
external to Sling are needed anymore to run the Resource Editor.

++ Roadmap ++
Next (before/after some holidays) I plan to integrate feedback if
possible and then work on tests for the Resource Editor. After that I
will continue with CRUD features and editors for properties.

[1] - https://issues.apache.org/jira/browse/SLING-4215

Best,

Sandro





Re: [PROPOSAL] JSNodeTypes contribution

2014-12-18 Thread Sandro Boehme

Am 18.12.14 14:02, schrieb Bertrand Delacretaz:

Hi Sandro,

On Thu, Dec 11, 2014 at 4:25 PM, Sandro Boehme sandro.boe...@gmx.de wrote:

...Here you find a demo of the full API and all background information:
http://www.jcrbrowser.org/sling/libs/jsnodetypes/content/documentation.html


I think it's interesting, I support accepting this donation as it is
used in your editor. Thanks for this!

Note that we'd need to go via the IP clearance process as we did for the editor.

-Bertrand


Hi Bertrand,

I'm glad to read that.
The IP clearance should be simpler as the iCLA is already there and 
there are no runtime dependencies external to Sling including no 
external frontend libraries (no JQuery, no images,...).
I will be on vacation to pursue my hobby from the 27'th of december 
until the 10th of january.


Thanks,

Sandro


Re: Please welcome Sandro Boehme, Sling committer!

2014-12-29 Thread Sandro Boehme

Am 29.12.14 um 13:45 schrieb Carsten Ziegeler:

Congrats and keep up the good work!


+1 :) and welcome, Sandro!

Carsten


Hi,

thanks for your trust and the welcome! I'm proud to be elected as a 
Apache Sling committer!
As an introduction, I'm working for the German company inovex GmbH 
(www.inovex.de) for 14 years now. Quite a few years ago I was working 
with a custom CMS and later found out about Jackrabbit and JSR-170. 
During that time I started to love the concept of the JCR and in 2006 
quickly built the JCRBrowser - a read only tool based on Eclipse. It 
then evolved to a read/write tool based on Eclipse. But as my job is 
being a web developer I always wanted to progress as fast as with web 
based projects. Thats why I decided to switch to a web based 
architecture. As part of my job I came across different web based 
frameworks and at one point I noticed Sling that seemed to be a perfect 
fit for the JCRBrowser. This is why I ended up to rewrite it for Sling 
as the Sling Resource Editor [1] and enhanced it as a contributor.
Currently I'm on vacation engaging my hobby to fly wingsuit in skydiving 
(subtile hint for interested wingsuit sponsors ;-)  ) and I'm looking 
forward to enhance the Resource Editor after it during my parental leave 
with my wonderful 4 month old son.


[1] - https://issues.apache.org/jira/browse/SLING-4001

All the best from Spain,

Sandro


Re: [PROPOSAL] JSNodeTypes contribution :: IP clearance needed?

2015-01-27 Thread Sandro Boehme

Hello again,

while I think the JSNodeTypes contribution is useful I would also like 
to have it in Sling to not need an OBR to install the Resource Editor.


Now that I'm a Committer in the meantime and I have written the 
JSNodeTypes library solely on my own the question is if the IP clearance 
process is still needed.


What do you think?

Best,

Sandro


Am 18.12.14 um 14:02 schrieb Bertrand Delacretaz:

Hi Sandro,

On Thu, Dec 11, 2014 at 4:25 PM, Sandro Boehme sandro.boe...@gmx.de wrote:

...Here you find a demo of the full API and all background information:
http://www.jcrbrowser.org/sling/libs/jsnodetypes/content/documentation.html


I think it's interesting, I support accepting this donation as it is
used in your editor. Thanks for this!

Note that we'd need to go via the IP clearance process as we did for the editor.

-Bertrand





Re: [PROPOSAL] JSNodeTypes contribution :: IP clearance needed?

2015-01-28 Thread Sandro Boehme

Hi Bertrand,

thanks for your feedback, that sounds good!
If there are no objections I would commit it with SLING-4364 in the folder
/contrib/commons/js/nodetypes
with the Sling parent pom,
the ArtifactId org.apache.sling.commons.js.nodetypes
and the version 1.0.SNAPSHOT.
Does that fit in the general structure?

Best,

Sandro

Am 27.01.15 um 17:29 schrieb Bertrand Delacretaz:

Hi Sandro,

On Tue, Jan 27, 2015 at 4:51 PM, Sandro Boehme sandro.boe...@gmx.de wrote:

...Now that I'm a Committer in the meantime and I have written the JSNodeTypes
library solely on my own the question is if the IP clearance process is
still needed


IMO it's not needed in this case, committing code that you wrote
yourself is covered by your iCLA.

I suggest that you wait 24 hours for possible objections, and if
there's none go ahead and commit.

-Bertrand





Re: License question

2015-03-22 Thread Sandro Boehme

Hi Ian,

this helps a big deal! Thanks for diving into that issue and for your 
comprehensive and insightful feedback!


Please see my feedback inline.

Am 20.03.15 um 10:08 schrieb Ian Boston:

Hi Sandro,
The artistic license defines the term Package to be the package of
software to which the license is applied. Since its applied to npm, that
Package is npm and not any package that npm happens to distribute.
Further, this is clarified in the npm license towards the end of the
license text with


Data published to the npm registry is not part of npm itself, and is the
sole property of the publisher. While every effort is made to ensure
accountability, there is absolutely no guarantee, warrantee, or assertion
expressed or implied as to the quality, fitness for a specific purpose, or
lack of malice in any given npm package. Packages downloaded through the
npm registry are independently licensed and are not covered by this license.


The last line of that paragraph clearly states any package distributed by
npm is covered by its own license and not the artistic license used by npm.
This is logical as it would be a nightmare trying to relicense software
under the Artistic License that had been already licensed under one of the
100s of other licenses. For a start, no one would agree to that, as they
would need to hand over copyright of the code to do it. I have been through
an such a licensing exercise outside Apache.

Have you seen something else that says that npm inc takes ownership of the
code and redistributes under its own license ?


Yeah, at the website npm is talking about packages when it means the 
packages it manages. But now I understand that npm itself is a package 
as well and this is what the license is about.
The line you quote makes that clear as well and no, I didn't see 
something else that says that npm takes ownership of the code and 
redistributes it under its own license.
As I wrote I thought it is at least a bit unusual and as I wrote to 
LEGAL I didn't find a place at the registration or upload process where 
a package owner would agree to that.

Now it all makes sense! :-)



Using npm in a build process is the same as using any software in a build.
Apache licenses source, not binaries, and a restrictive license on a build
process does not deny anyone access to the source.

Ah ok thats interesting I didn't know that.



Putting a javascript file inside Sling source code, where the license on
the source code is restrictive w.r.t the Apache License is not ok, as it
would mean redistributing a restrictive license in the source code. eg
jQuery is MIT licensed and presents no issues.

Thats clear.
The licenses of the packages in the npm registry I've seen were all 
Apache compatible. Most of them are MIT and I've also seen Apache 2 
licensed packages. The convenient thing with npm is, that it has a 
package ('nlf') that lists the licenses of the installed packages. Even 
with a specific depth of transitive dependencies.




Referencing an external library by URL pointing to a CDN is a grey area in
the license is not A2 compatible and probably falls into the same category
as the MySQL JDBC driver which is LGPL and therefore allows runtime linking
via the javax.jdbc API.
I don't think I need to point to a CDN but it is good to know that it's 
not Apache2 compatible.



So (imho) you can use npm, but only as a build tool, you can't extend it
and redistribute it in an Apache project.

btw, IANAL, but I think this is what Jim was saying in

http://mail-archives.apache.org/mod_mbox/www-legal-discuss/201503.mbox/%3cjira.12779077.1425391746000.66030.1425407704...@atlassian.jira%3E
Yeah, I think so as well. I was just worried, that the npm relicenses 
the packages and wanted to make sure that I don't create a copyright 
issue. I'm happy to read that this is not the case.


Thanks again!

Best,

Sandro



Best Regards
Ian

On 19 March 2015 at 13:21, Sandro Boehme sandro.boe...@gmx.de wrote:


NPM is the package manager for many frontend libraries. It is comparable
to Maven with Maven Central.

The problem is, that it is a bit (at least) unusual as the npm license
applies terms on which a npm package (not npm itself) can be copied,
modified, distributed, and/or redistributed additional to the license of
the package itself. See one of the first sentences here:
https://www.npmjs.com/policies/npm-license.

While npm is not checked in it is configured to be used at build time.

I'm not 100% sure if I distribute the packages by having them in the
bundle / standalone jar / war and pointing to them e.g. with
script type=text/javascript src=path-to-package.js/script or if
this is linking. For details see [1].

I also don't see where a package owner (e.g. jQuery) agrees on the npm
terms that will also apply to their package when uploading the package to
the npm server.

As I didn't got any more infos from legal [2], [3] I will contact the npm
team to clarify and get an authorized

Re: License question

2015-03-19 Thread Sandro Boehme
NPM is the package manager for many frontend libraries. It is comparable 
to Maven with Maven Central.


The problem is, that it is a bit (at least) unusual as the npm license 
applies terms on which a npm package (not npm itself) can be copied, 
modified, distributed, and/or redistributed additional to the license 
of the package itself. See one of the first sentences here: 
https://www.npmjs.com/policies/npm-license.


While npm is not checked in it is configured to be used at build time.

I'm not 100% sure if I distribute the packages by having them in the 
bundle / standalone jar / war and pointing to them e.g. with
script type=text/javascript src=path-to-package.js/script or 
if this is linking. For details see [1].


I also don't see where a package owner (e.g. jQuery) agrees on the npm 
terms that will also apply to their package when uploading the package 
to the npm server.


As I didn't got any more infos from legal [2], [3] I will contact the 
npm team to clarify and get an authorized answer.


[1] - https://issues.apache.org/jira/browse/SLING-4463
[2] - https://issues.apache.org/jira/browse/LEGAL-217
[3] - 
http://mail-archives.apache.org/mod_mbox/www-legal-discuss/201503.mbox/%3c550215c3.3030...@gmx.de%3E


Best,

Sandro

Am 03.03.15 um 12:27 schrieb Justin Edelson:

I agree with Robert here, but it might be worthwhile to open an issue with
LEGAL. At minimum, that would get the question and answer documented.

Justin

On Tue, Mar 3, 2015 at 5:50 AM, Sandro Boehme sandro.boe...@gmx.de wrote:


Hi Robert,

yeah, that sounds good.
Yes, with the Frontend Maven Plugin I declare to use Node.js and npm. I
don't check it in.
The question now is just how to make sure everything is fine from the
legal perspective. It would be good if either someone from the Sling PMC
could say that it's fine the way I proposed to do it or I would like to
make sure that it's fine to open a legal issue at
https://issues.apache.org/jira/browse/LEGAL.

Best,

Sandro

Am 03.03.15 um 11:26 schrieb Robert Munteanu:

  Hi Sandro,


On Fri, 2015-02-27 at 22:20 +0100, Sandro Boehme wrote:


Hi,

in SLING-4463 [1] I have a question about a license for SLING-4462 [2].
Does someone has an idea on how to handle that or should I open a legal
issue [3]?

[1] - https://issues.apache.org/jira/browse/SLING-4463
[2] - https://issues.apache.org/jira/browse/SLING-4462
[3] - https://issues.apache.org/jira/browse/LEGAL



I'm not really familiar with the toolchain you're using so I might be
mistaken, but as long as the tools are not checked in to source control
and are not distributed we should be fine.

Robert












Documentation for the Sling Resource Editor

2015-03-30 Thread Sandro Boehme

Hi,

I would like to create online documentation for the Sling Resource 
Editor to get more users/contributors/committers for it.


Now I wonder if it's practical (and allowed for me) to add the docu at 
the public Sling website even though the decommissioning of the CMS is 
proposed.


Or if it's better to use the Confluence wiki. Can somebody tell me how 
to get write access if I should use the latter?


Best,

Sandro


Re: Documentation for the Sling Resource Editor

2015-03-31 Thread Sandro Boehme

Hi Bertrand and Robert,

thanks for your quick answers! I will use the website now for 
documentation. And thanks for configuring the access Bertrand!


Best,

Sandro

Am 31.03.15 um 10:56 schrieb Bertrand Delacretaz:

Hi Sandro,

On Mon, Mar 30, 2015 at 10:40 PM, Sandro Boehme sandro.boe...@gmx.de wrote:

...Or if it's better to use the Confluence wiki. Can somebody tell me how to
get write access if I should use the latter?...


Let us know your user ID there and we can hopefully give you access.

-Bertrand (who started to hate Confluence the day it stopped being a wiki)





Re: Documentation for the Sling Resource Editor

2015-03-31 Thread Sandro Boehme

Hi,

I understand now how to change a page with the CMS. But can someone 
please tell me how to create a new one?
I would like to add a link to a new page at 
'http://sling.apache.org/documentation/bundles.html'.
The idea is to have a link named Sling Resource Editor frontend under 
Content Presentation that links to the new page.


Do I have to create a
'https://svn.apache.org/repos/asf/sling/site/trunk/content/documentation/bundles/resource-editor.mdtext'
file in SVN and commit it there first?

Best,

Sandro

Am 30.03.15 um 23:07 schrieb Robert Munteanu:

Hi Sandro,

On Mon, Mar 30, 2015 at 11:40 PM, Sandro Boehme sandro.boe...@gmx.de wrote:

Hi,

I would like to create online documentation for the Sling Resource Editor to
get more users/contributors/committers for it.

Now I wonder if it's practical (and allowed for me) to add the docu at the
public Sling website even though the decommissioning of the CMS is proposed.


Yes, please add the docs to the Sling website. If we end up migrating
to a different system, we'll migrate everything anyway.

Cheers,

Robert



Or if it's better to use the Confluence wiki. Can somebody tell me how to
get write access if I should use the latter?

Best,

Sandro






Re: [VOTE] Accept the donation of the Hypermedia API Tools via SLING-4513

2015-03-27 Thread Sandro Boehme

+1

--

Sandro

Am 25.03.15 um 16:53 schrieb Andrei Dulvac:

Hello,

Following a recent discussion on this list, I'm starting a [VOTE] thread
regarding the donation of HApi (Hypermedia API tools).

Issue: SLING-4513
Github repo: https://github.com/dulvac/hapi
MD5 of archive: MD5 (hapi.tar.gz) = 5be02d98378d6dc177f6345887d6992d

Please cast your votes.

Thank you,
Andrei





Re: Documentation for the Sling Resource Editor

2015-03-31 Thread Sandro Boehme

Yeah, it worked well!
It's browsing the directory, then Edit this directory and then an 
input field that has to be submitted via the 'Return' key as there is no 
submit button.


The initial version is now online.

Are there any statistics about such pages?

Best,

Sandro

Am 31.03.15 um 18:10 schrieb Bertrand Delacretaz:

Hi,

On Tue, Mar 31, 2015 at 5:24 PM, Sandro Boehme sandro.boe...@gmx.de wrote:

...Do I have to create a
'https://svn.apache.org/repos/asf/sling/site/trunk/content/documentation/bundles/resource-editor.mdtext'
 file in SVN and commit it there first?...


I usually do it like this, but you could also use cms.apache.org, IIRC
it's edit directory there.

-Bertrand





License question

2015-02-27 Thread Sandro Boehme

Hi,

in SLING-4463 [1] I have a question about a license for SLING-4462 [2]. 
Does someone has an idea on how to handle that or should I open a legal 
issue [3]?


[1] - https://issues.apache.org/jira/browse/SLING-4463
[2] - https://issues.apache.org/jira/browse/SLING-4462
[3] - https://issues.apache.org/jira/browse/LEGAL

Best,

Sandro


Re: License question

2015-03-03 Thread Sandro Boehme

Hi Robert,

yeah, that sounds good.
Yes, with the Frontend Maven Plugin I declare to use Node.js and npm. I 
don't check it in.
The question now is just how to make sure everything is fine from the 
legal perspective. It would be good if either someone from the Sling PMC 
could say that it's fine the way I proposed to do it or I would like to 
make sure that it's fine to open a legal issue at 
https://issues.apache.org/jira/browse/LEGAL.


Best,

Sandro

Am 03.03.15 um 11:26 schrieb Robert Munteanu:

Hi Sandro,

On Fri, 2015-02-27 at 22:20 +0100, Sandro Boehme wrote:

Hi,

in SLING-4463 [1] I have a question about a license for SLING-4462 [2].
Does someone has an idea on how to handle that or should I open a legal
issue [3]?

[1] - https://issues.apache.org/jira/browse/SLING-4463
[2] - https://issues.apache.org/jira/browse/SLING-4462
[3] - https://issues.apache.org/jira/browse/LEGAL


I'm not really familiar with the toolchain you're using so I might be
mistaken, but as long as the tools are not checked in to source control
and are not distributed we should be fine.

Robert







Re: [VOTE] Release Apache Sling Tooling Support Install 1.0.2

2015-02-21 Thread Sandro Boehme

+1 (signatures and digests are good)

--

Sandro


Re: Simplified bundle deployment on OBR

2015-04-27 Thread Sandro Boehme

Hi,

Am 27.04.15 um 11:36 schrieb Bertrand Delacretaz:

Hi,

On Fri, Apr 24, 2015 at 4:33 PM, Robert Munteanu romb...@apache.org wrote:

...I just checking in a shell script at
tooling/releases/sync_obr_with_dist.sh [1] that can be used to update
the sling.xml OBR file when releasing bundles


Do we care about that OBR, is anyone using it?
Now as the Resource Editor only uses Sling dependencies it doesn't need 
it anymore. But I used it in the JCRBrowser as it makes the installation 
of 3rd party libs very convenient for the user and I guess non 
committers / users of Sling might find it very useful as well.


Best,

Sandro



-Bertrand





Re: Build failed in Jenkins: sling-trunk-1.6 #3256

2015-04-06 Thread Sandro Boehme

Hi,

somehow I managed to break the build of 'sling-trunk-1.6' by checking 
something in to 'contrib/explorers/resourceeditor'. From what I 
understand it should not have a dependency to that build, right?
It looks like an integration test of the Event Support project failed. 
But I cannot reproduce it.
The failsafe plugin version has been updated at a commit before but the 
build was blue.
Does someone have a pointer? The problem is, that I will probably have 
no or not a good internet connection during the next 8 days. I will do 
my best to fix it. I guess I will not commit short before a vacation again.


Best,

Sandro

Am 06.04.15 um 20:29 schrieb Apache Jenkins Server:

[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-failsafe-plugin:2.16:integration-test (default) 
on project org.apache.sling.event: Execution default of goal 
org.apache.maven.plugins:maven-failsafe-plugin:2.16:integration-test failed: 
The forked VM terminated without saying properly goodbye. VM crash or 
System.exit called ?
[ERROR] Command was/bin/sh -c cd 
https://builds.apache.org/job/sling-trunk-1.6/ws/trunk/bundles/extensions/event  
/home/jenkins/tools/java/jdk1.6.0_45-32/jre/bin/java -Xmx2048m -XX:MaxPermSize=512m -jar 
https://builds.apache.org/job/sling-trunk-1.6/ws/trunk/bundles/extensions/event/target/surefire/surefirebooter8966558270306960395.jar
 
https://builds.apache.org/job/sling-trunk-1.6/ws/trunk/bundles/extensions/event/target/surefire/surefire4336694494544216414tmp
 
https://builds.apache.org/job/sling-trunk-1.6/ws/trunk/bundles/extensions/event/target/surefire/surefire_23694121237566832733tmp




Re: Build failed in Jenkins: sling-trunk-1.6 #3256

2015-04-06 Thread Sandro Boehme

Hi,

I reverted my changes in 'r1671740' and hope it fixes the build.

Best,

Sandro

Am 06.04.15 um 22:14 schrieb Sandro Boehme:

Hi,

somehow I managed to break the build of 'sling-trunk-1.6' by checking
something in to 'contrib/explorers/resourceeditor'. From what I
understand it should not have a dependency to that build, right?
It looks like an integration test of the Event Support project failed.
But I cannot reproduce it.
The failsafe plugin version has been updated at a commit before but the
build was blue.
Does someone have a pointer? The problem is, that I will probably have
no or not a good internet connection during the next 8 days. I will do
my best to fix it. I guess I will not commit short before a vacation again.

Best,

Sandro

Am 06.04.15 um 20:29 schrieb Apache Jenkins Server:

[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-failsafe-plugin:2.16:integration-test
(default) on project org.apache.sling.event: Execution default of goal
org.apache.maven.plugins:maven-failsafe-plugin:2.16:integration-test
failed: The forked VM terminated without saying properly goodbye. VM
crash or System.exit called ?
[ERROR] Command was/bin/sh -c cd
https://builds.apache.org/job/sling-trunk-1.6/ws/trunk/bundles/extensions/event
 /home/jenkins/tools/java/jdk1.6.0_45-32/jre/bin/java -Xmx2048m
-XX:MaxPermSize=512m -jar
https://builds.apache.org/job/sling-trunk-1.6/ws/trunk/bundles/extensions/event/target/surefire/surefirebooter8966558270306960395.jar
https://builds.apache.org/job/sling-trunk-1.6/ws/trunk/bundles/extensions/event/target/surefire/surefire4336694494544216414tmp
https://builds.apache.org/job/sling-trunk-1.6/ws/trunk/bundles/extensions/event/target/surefire/surefire_23694121237566832733tmp








Re: Build failed in Jenkins: sling-trunk-1.6 #3256

2015-04-07 Thread Sandro Boehme

Hi,

ok the build is not broken anymore. Just in time to leave Germany to fly 
to Dubai in 2h :-).


Best,

Sandro

Am 07.04.15 um 06:59 schrieb Sandro Boehme:

Hi,

I reverted my changes in 'r1671740' and hope it fixes the build.

Best,

Sandro

Am 06.04.15 um 22:14 schrieb Sandro Boehme:

Hi,

somehow I managed to break the build of 'sling-trunk-1.6' by checking
something in to 'contrib/explorers/resourceeditor'. From what I
understand it should not have a dependency to that build, right?
It looks like an integration test of the Event Support project failed.
But I cannot reproduce it.
The failsafe plugin version has been updated at a commit before but the
build was blue.
Does someone have a pointer? The problem is, that I will probably have
no or not a good internet connection during the next 8 days. I will do
my best to fix it. I guess I will not commit short before a vacation
again.

Best,

Sandro

Am 06.04.15 um 20:29 schrieb Apache Jenkins Server:

[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-failsafe-plugin:2.16:integration-test
(default) on project org.apache.sling.event: Execution default of goal
org.apache.maven.plugins:maven-failsafe-plugin:2.16:integration-test
failed: The forked VM terminated without saying properly goodbye. VM
crash or System.exit called ?
[ERROR] Command was/bin/sh -c cd
https://builds.apache.org/job/sling-trunk-1.6/ws/trunk/bundles/extensions/event

 /home/jenkins/tools/java/jdk1.6.0_45-32/jre/bin/java -Xmx2048m
-XX:MaxPermSize=512m -jar
https://builds.apache.org/job/sling-trunk-1.6/ws/trunk/bundles/extensions/event/target/surefire/surefirebooter8966558270306960395.jar

https://builds.apache.org/job/sling-trunk-1.6/ws/trunk/bundles/extensions/event/target/surefire/surefire4336694494544216414tmp

https://builds.apache.org/job/sling-trunk-1.6/ws/trunk/bundles/extensions/event/target/surefire/surefire_23694121237566832733tmp












Re: Documentation for the Sling Resource Editor

2015-04-03 Thread Sandro Boehme

Thanks for the info Bertrand, thats good to know!

Am 01.04.15 um 10:09 schrieb Bertrand Delacretaz:

On Tue, Mar 31, 2015 at 10:27 PM, Sandro Boehme sandro.boe...@gmx.de wrote:
 ...Are there any statistics about such pages?...

No, we haven't set that up - http://jackrabbit.apache.org/ is using
Google Analytics for example, along with
http://jackrabbit.apache.org/privacy-policy.html to be open about it.

-Bertrand





Re: Moving to servlet 3 as the base?

2015-06-25 Thread Sandro Boehme

Am 25.06.15 um 18:17 schrieb Carsten Ziegeler:

Hi,

right now, Sling in theory runs on servet 2.4 and we have to do some
ugly tricks to support 2.4/2.5 and 3.x.
I think 3.0 is now out long enough that we could upgrade and require
3.0 as the base and get rid of all the special handling.

WDYT?

Carsten



+1
It would be useful for the Resource Editor.

Best,
Sandro


Errorpage for the Sling Resource Editor

2015-07-02 Thread Sandro Boehme

Hello,

for the Resource Editor's [1] property page I would like to switch the 
addition and update of the properties from being ajax calls to be 
regular page requests. But on an error a new an plain error page is 
rendered while I would like to get my Resource Editor page [4] rendered 
with the error data as request attributes that I can use to show the 
error there.
The Resource Editor uses a Resource Provider [2], that wraps the 
resources to add a resource type marker. Based on that marker the 
ResourceProviderBasedResourceDecorator [3] changes the resource type of 
a resource that leads to the JSP [4] to be rendered.


I checked the errorhandling page [5] for Sling but couldn't get it 
working with that information.


Any hint is much appreciated!

Best,

Sandro


[1] - https://sling.apache.org/documentation/bundles/resource-editor.html
- contrib/explorers/resourceeditor/README

[2] - 
http://svn.apache.org/viewvc/sling/trunk/contrib/explorers/resourceeditor/src/main/java/org/apache/sling/reseditor/resource/


[3] - 
http://svn.apache.org/viewvc/sling/trunk/contrib/explorers/resourceeditor/src/main/java/org/apache/sling/reseditor/resource/ResourceProviderBasedResourceDecorator.java?view=markup


[4] - 
http://svn.apache.org/viewvc/sling/trunk/contrib/explorers/resourceeditor/src/main/resources/SLING-INF/libs/sling/resource-editor/html.jsp?view=markup


[5] - 
https://sling.apache.org/documentation/the-sling-engine/errorhandling.html


Re: Errorpage for the Sling Resource Editor

2015-07-06 Thread Sandro Boehme

Hallo again,

to be more concrete, I've added a Throwable.jsp and a 500.jsp to

contrib/explorers/resourceeditor/src/main/resources/SLING-INF/libs/sling/resource-editor/errorhandler

and

contrib/explorers/resourceeditor/src/main/resources/SLING-INF/libs/sling/resource-editor

but still the default white error page shows up with the 500 status.
Does someone have an idea what's wrong with the configuration and how I 
can show an error page for the resource editor?


Best,

Sandro

Am 02.07.15 um 10:19 schrieb Sandro Boehme:

Hello,

for the Resource Editor's [1] property page I would like to switch the
addition and update of the properties from being ajax calls to be
regular page requests. But on an error a new an plain error page is
rendered while I would like to get my Resource Editor page [4] rendered
with the error data as request attributes that I can use to show the
error there.
The Resource Editor uses a Resource Provider [2], that wraps the
resources to add a resource type marker. Based on that marker the
ResourceProviderBasedResourceDecorator [3] changes the resource type of
a resource that leads to the JSP [4] to be rendered.

I checked the errorhandling page [5] for Sling but couldn't get it
working with that information.

Any hint is much appreciated!

Best,

Sandro


[1] - https://sling.apache.org/documentation/bundles/resource-editor.html
 - contrib/explorers/resourceeditor/README

[2] -
http://svn.apache.org/viewvc/sling/trunk/contrib/explorers/resourceeditor/src/main/java/org/apache/sling/reseditor/resource/


[3] -
http://svn.apache.org/viewvc/sling/trunk/contrib/explorers/resourceeditor/src/main/java/org/apache/sling/reseditor/resource/ResourceProviderBasedResourceDecorator.java?view=markup


[4] -
http://svn.apache.org/viewvc/sling/trunk/contrib/explorers/resourceeditor/src/main/resources/SLING-INF/libs/sling/resource-editor/html.jsp?view=markup


[5] -
https://sling.apache.org/documentation/the-sling-engine/errorhandling.html





Re: Errorpage for the Sling Resource Editor

2015-07-06 Thread Sandro Boehme

Hi Bertrand,

Am 06.07.15 um 11:16 schrieb Bertrand Delacretaz:

Hi Sandro,

On Mon, Jul 6, 2015 at 10:07 AM, Sandro Boehme sandro.boe...@gmx.de wrote:

to be more concrete, I've added a Throwable.jsp and a 500.jsp to

contrib/explorers/resourceeditor/src/main/resources/SLING-INF/libs/sling/resource-editor/errorhandler...


AFAIK those will only apply to resources of type
sling/resource-editor/errorhandler


and
contrib/explorers/resourceeditor/src/main/resources/SLING-INF/libs/sling/resource-editor


Those should apply if a Throwable is thrown or sendResult(500) is
called while processing a resource of the sling/resource-editor type.
yes, the resource type is sling/resource-editor. Thanks for your 
infos, it's good to know that this files should apply.




If you want to debug, grepping the DEBUG logs for candidate lists
which scripts/servlets are considered, and debugging the
SlingServletResolver.handleError method should help as well.
The processing flow does not seem to go through this method as the 
debugger does not stop there.
I debugged from the SlingPostServlet on and saw that 
AbstractPostOperation.run() line 144

set the error:

} catch (Exception e) {

log.error(Exception during response processing., e);
response.setError(e);
 }

and AbstractPostResponse:prepare() line 296
rendered the error page:
if (getError() != null) {
setStatus(500, getError().toString());
setTitle(Error while processing  + path);
 }
...
But I don't see something that decides when an error page should be shown.
It looks like there is no simple answer so if there is no quick idea on 
what I could try I would have a look at the integration tests for custom 
error pages and/or would start from plain vanilla error page examples.


Thanks,

Sandro




-Bertrand





Re: Errorpage for the Sling Resource Editor

2015-07-06 Thread Sandro Boehme

Hi Bertrand,

Am 06.07.15 um 14:25 schrieb Bertrand Delacretaz:

Hi Sandro,

On Mon, Jul 6, 2015 at 2:00 PM, Sandro Boehme sandro.boe...@gmx.de wrote:

Am 06.07.15 um 11:16 schrieb Bertrand Delacretaz:

...debugging the
SlingServletResolver.handleError method should help as well


The processing flow does not seem to go through this method as the debugger
does not stop there


The below example works for me, comparing with what you are doing might help?

There are integration tests for this in ErrorHandlingTest [1] but they
dont seem to test the resource-specific error handlers - if you can
add some tests for that while investigating that would be great, of
course.

I'd be happy if I could do that.



$ curl -u admin:admin -Fsling:resourceType=xyz http://localhost:8080/apps/xyz
...
 titleContent created /apps/xyz/title
...
$ echo '% if(true) throw new IllegalStateException(this cannot
work); %'  /tmp/xyz.jsp
$ curl -u admin:admin -T/tmp/xyz.jsp http://localhost:8080/apps/xyz/xyz.jsp
$ echo 'This is the custom error handler'  /tmp/IllegalStateException.jsp
$ curl -u admin:admin -T /tmp/IllegalStateException.jsp
http://localhost:8080/apps/xyz/IllegalStateException.jsp
$ curl http://localhost:8080/apps/xyz.html
This is the custom error handler
Yeah, it works for me as well! Thanks for this error page example it 
runs through the handleError() methods as you wrote.
I'll use the time between some family celebrations to compare with my 
code and let you and the list (archive) know about the results.


Thanks again!

Sandro




-Bertrand

[1] 
https://svn.apache.org/repos/asf/sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/resolver/errorhandler/ErrorHandlingTest.java





Re: Errorpage for the Sling Resource Editor

2015-07-06 Thread Sandro Boehme

Am 06.07.15 um 15:20 schrieb Sandro Boehme:

Hi Bertrand,

Am 06.07.15 um 14:25 schrieb Bertrand Delacretaz:

Hi Sandro,

On Mon, Jul 6, 2015 at 2:00 PM, Sandro Boehme sandro.boe...@gmx.de
wrote:

Am 06.07.15 um 11:16 schrieb Bertrand Delacretaz:

...debugging the
SlingServletResolver.handleError method should help as well


The processing flow does not seem to go through this method as the
debugger
does not stop there


The below example works for me, comparing with what you are doing
might help?

There are integration tests for this in ErrorHandlingTest [1] but they
dont seem to test the resource-specific error handlers - if you can
add some tests for that while investigating that would be great, of
course.

I'd be happy if I could do that.



$ curl -u admin:admin -Fsling:resourceType=xyz
http://localhost:8080/apps/xyz
...
 titleContent created /apps/xyz/title
...
$ echo '% if(true) throw new IllegalStateException(this cannot
work); %'  /tmp/xyz.jsp
$ curl -u admin:admin -T/tmp/xyz.jsp
http://localhost:8080/apps/xyz/xyz.jsp
$ echo 'This is the custom error handler' 
/tmp/IllegalStateException.jsp
$ curl -u admin:admin -T /tmp/IllegalStateException.jsp
http://localhost:8080/apps/xyz/IllegalStateException.jsp
$ curl http://localhost:8080/apps/xyz.html
This is the custom error handler

Yeah, it works for me as well! Thanks for this error page example it
runs through the handleError() methods as you wrote.
I'll use the time between some family celebrations to compare with my
code and let you and the list (archive) know about the results.
As a quick check I've added your error handler jsp to the resource 
folder and added the throw statement to my page. It works and shows the 
custom error page! Next I will check for the right exception and 
resource type in my case.


Best,

Sandro



automatic recompilation of tag files

2015-05-23 Thread Sandro Boehme

Hello,

for the Sling Resource Editor's [1] properties page I would like to 
create reusable Tag Files for the different property types. Right now I 
have a basic one working for string properties.
But I need to 'mvn install...' it for every change. Is there a way to 
get them recompiled automatically like with the FsResourceProvider for 
usual JSP's?
I've mounted the META-INF folder with the tld and the 
/tags/string-editor.tag files from the file system like the JSP's. But I 
suspect they are actually delivered to the server with the bundle jar 
which will not be updated on every Tag File update.


Does someone know a way to see the Tag File changes equally fast at the 
server as the JSP changes?



[1] - https://sling.apache.org/documentation/bundles/resource-editor.html

Thanks in advance for any hints!

Sandro


Re: Errorpage for the Sling Resource Editor

2015-07-14 Thread Sandro Boehme

Hello again,

sadly it worked only by mistake before.
I want to have an error jsp that is shown on all errors of the Sling 
post servlet and that displays the according error message.


I thought, that the Throwable.jsp placed below the node for the resource 
type is what I wanted but it worked only by accident as I created a NPE 
that lead to this page.



Based on Bertrands example I would like to show what I mean:

1.The container node for the resource type
$ curl -u admin:admin -Fsling:resourceType=posterror 
http://localhost:8080/apps/posterror



2. The html form
$ echo 'htmlbodyform method=post 	input type=hidden 
name=:sendError value=true input type=text name=aProperty 
input type=submit /form/body/html'  /tmp/posterror.jsp


$ curl -u admin:admin -T/tmp/posterror.jsp 
http://localhost:8080/apps/posterror/posterror.jsp



3. The general error handler that I would like to show up because the 
post of the HTML form in the step before is not unauthenticated.

$ echo 'This is a general error handler'  /tmp/Throwable.jsp

$ curl -u admin:admin -T /tmp/Throwable.jsp 
http://localhost:8080/apps/posterror/Throwable.jsp



4. The form whose submit should lead to the rendering of the 
Throwable.jsp. How can I make that happen? Is that a bug or is there an 
other way to do that?

$ curl http://localhost:8080/apps/posterror.html


5. If I create a 500.jsp like this it gets rendered instead of the 
Throwable.jsp. Why is that the case as I would have expected it to be a 
401 Unauthorized error?


$ echo 'Error 500: 
%=request.getAttribute(javax.servlet.error.message)%, Exception: 
%=request.getAttribute(javax.servlet.error.exception)%'  /tmp/500.jsp
$ curl -u admin:admin -T /tmp/500.jsp 
http://localhost:8080/apps/posterror/500.jsp



6. Deleting the 500.jsp for debugging reasons
$ curl -u admin:admin -F:operation=delete 
http://localhost:8080/apps/posterror/500.jsp



Help is much appreciated!

Thanks,

Sandro


Am 08.07.15 um 22:01 schrieb Sandro Boehme:

Yeah! I've found the solution.
I've just have to send :sendError=true with the post request.

The only documentation I've found is the javadoc [1].
I think I could add the information about that parameter at the Special
Parameters paragraph of the manipulating content page [2] like:
:sendError
Setting this parameter to true (case insensitive) allows to use custom
error handling as described in the Errorhandling documentation [3]
If there is no veto I would do that.

There is already a test case for that:
ErrorHandlingTest.test_errorhandling_POST_operation_SlingPostServlet()
It sends a post to /apps/testNode and seem to use the resource type for
the resolution of the error handler.

[1] -
https://sling.apache.org/apidocs/sling7/org/apache/sling/servlets/post/SlingPostConstants.html#RP_SEND_ERROR


[2] -
http://sling.apache.org/documentation/bundles/manipulating-content-the-slingpostservlet-servlets-post.html#special-parameters


[3] -
https://sling.apache.org/documentation/the-sling-engine/errorhandling.html

Best,

Sandro

Am 06.07.15 um 16:00 schrieb Sandro Boehme:

Am 06.07.15 um 15:20 schrieb Sandro Boehme:

Hi Bertrand,

Am 06.07.15 um 14:25 schrieb Bertrand Delacretaz:

Hi Sandro,

On Mon, Jul 6, 2015 at 2:00 PM, Sandro Boehme sandro.boe...@gmx.de
wrote:

Am 06.07.15 um 11:16 schrieb Bertrand Delacretaz:

...debugging the
SlingServletResolver.handleError method should help as well


The processing flow does not seem to go through this method as the
debugger
does not stop there


The below example works for me, comparing with what you are doing
might help?

There are integration tests for this in ErrorHandlingTest [1] but they
dont seem to test the resource-specific error handlers - if you can
add some tests for that while investigating that would be great, of
course.

I'd be happy if I could do that.



$ curl -u admin:admin -Fsling:resourceType=xyz
http://localhost:8080/apps/xyz
...
 titleContent created /apps/xyz/title
...
$ echo '% if(true) throw new IllegalStateException(this cannot
work); %'  /tmp/xyz.jsp
$ curl -u admin:admin -T/tmp/xyz.jsp
http://localhost:8080/apps/xyz/xyz.jsp
$ echo 'This is the custom error handler' 
/tmp/IllegalStateException.jsp
$ curl -u admin:admin -T /tmp/IllegalStateException.jsp
http://localhost:8080/apps/xyz/IllegalStateException.jsp
$ curl http://localhost:8080/apps/xyz.html
This is the custom error handler

Yeah, it works for me as well! Thanks for this error page example it
runs through the handleError() methods as you wrote.
I'll use the time between some family celebrations to compare with my
code and let you and the list (archive) know about the results.

As a quick check I've added your error handler jsp to the resource
folder and added the throw statement to my page. It works and shows the
custom error page! Next I will check for the right exception and
resource type in my case.

Best,

Sandro









Re: [VOTE] accept the donation of sling pipes tracked in SLING-5134

2015-10-23 Thread Sandro Boehme

Hi Nicolas,

I've configured my email client to display conversations as a thread as 
long as people "answer" to an email and I can imagine that it's the same 
for other people as well. To stop this vote thread as Carsten suggested 
it would be better to write a new email with a new subject to 
dev@sling.apache.org. This way your email would be more prominent in the 
mailing list and people would recognize your donation offer.

You will have my +1 in any case!

Best,

Sandro

Am 23.10.15 um 13:56 schrieb Nicolas Peltier:

bump

On 17 Oct 2015, at 10:54, Nicolas Peltier  wrote:

Hi,

fixed the test issue for both java version (i should say nashorn versions) 
thanks to Robert’s patch.
new version is attached, shasum is fdf8052425fa6a66199f8fd5bec8bf6f420983b1, 
please vote

Nicolas


On 15 Oct 2015, at 14:42, Nicolas Peltier  wrote:

yes, closing this thread now, will resend a vote once it’s fixed. Sorry about 
that.

Nicolas

On 15 Oct 2015, at 14:34, Carsten Ziegeler  wrote:

Can we maybe stop this vote thread, resolve the issues and then start a
clean vote thread? Otherwise tracking this is very hard.

Thanks
Carsten
--
Carsten Ziegeler
Adobe Research Switzerland
cziege...@apache.org










Re: New Sling Sitebuilder proof of concept demo video

2015-10-08 Thread Sandro Boehme

Am 07.10.15 um 15:17 schrieb Robert Munteanu:

And as one person asked on site here at the adaptTo(): The license is
of
course planned to be the Apache license.


Yup, I am always curious about licensing :-)

Same for me :-).



I think you have solved some interesting problems and it can be a good
starting point for Sling-based applications, so it would be a nice
addition to Sling.
Thanks for the feedback Robert! I'm glad that the response the 
sitebuilder poc gets is so good. Not only here but also from personal 
talks at the adaptTo() and other occasions.


Due to a time consuming hobby and the time that I would like to spend 
with my small family I'm currently searching for an additional way to 
really get it going and work on that.


One idea is to work as a Junior AEM freelancer and use the time between 
the projects to work on the Sitebuilder. Even if that means I would need 
to quit an actually good job at inovex GmbH. If anyone knows about 
projects that fit please let me know.


Best,

Sandro



Robert


The Jericho parser that I included uses the EPL and the LGPL license.
And to not needing the restrictions Apache expects when using an EPL
licensed project I asked if we can get the Jericho parser Apache
licensed and the response was positive which I'm happy about.

Best,

Sandro


Am 28.09.15 um 10:09 schrieb Bertrand Delacretaz:

Hi Sandro,

On Fri, Sep 25, 2015 at 1:08 AM, Sandro Boehme <
sandro.boe...@gmx.de> wrote:

...To see it in action and get an understanding of how it works I
created a
demo video...


The concepts look interesting, can we see the code or test a live
version somewhere?

-Bertrand










Re: Errorpage for the Sling Resource Editor

2015-07-08 Thread Sandro Boehme

Yeah! I've found the solution.
I've just have to send :sendError=true with the post request.

The only documentation I've found is the javadoc [1].
I think I could add the information about that parameter at the Special 
Parameters paragraph of the manipulating content page [2] like:

:sendError
Setting this parameter to true (case insensitive) allows to use custom 
error handling as described in the Errorhandling documentation [3]

If there is no veto I would do that.

There is already a test case for that:
ErrorHandlingTest.test_errorhandling_POST_operation_SlingPostServlet()
It sends a post to /apps/testNode and seem to use the resource type for 
the resolution of the error handler.


[1] - 
https://sling.apache.org/apidocs/sling7/org/apache/sling/servlets/post/SlingPostConstants.html#RP_SEND_ERROR


[2] - 
http://sling.apache.org/documentation/bundles/manipulating-content-the-slingpostservlet-servlets-post.html#special-parameters


[3] - 
https://sling.apache.org/documentation/the-sling-engine/errorhandling.html


Best,

Sandro

Am 06.07.15 um 16:00 schrieb Sandro Boehme:

Am 06.07.15 um 15:20 schrieb Sandro Boehme:

Hi Bertrand,

Am 06.07.15 um 14:25 schrieb Bertrand Delacretaz:

Hi Sandro,

On Mon, Jul 6, 2015 at 2:00 PM, Sandro Boehme sandro.boe...@gmx.de
wrote:

Am 06.07.15 um 11:16 schrieb Bertrand Delacretaz:

...debugging the
SlingServletResolver.handleError method should help as well


The processing flow does not seem to go through this method as the
debugger
does not stop there


The below example works for me, comparing with what you are doing
might help?

There are integration tests for this in ErrorHandlingTest [1] but they
dont seem to test the resource-specific error handlers - if you can
add some tests for that while investigating that would be great, of
course.

I'd be happy if I could do that.



$ curl -u admin:admin -Fsling:resourceType=xyz
http://localhost:8080/apps/xyz
...
 titleContent created /apps/xyz/title
...
$ echo '% if(true) throw new IllegalStateException(this cannot
work); %'  /tmp/xyz.jsp
$ curl -u admin:admin -T/tmp/xyz.jsp
http://localhost:8080/apps/xyz/xyz.jsp
$ echo 'This is the custom error handler' 
/tmp/IllegalStateException.jsp
$ curl -u admin:admin -T /tmp/IllegalStateException.jsp
http://localhost:8080/apps/xyz/IllegalStateException.jsp
$ curl http://localhost:8080/apps/xyz.html
This is the custom error handler

Yeah, it works for me as well! Thanks for this error page example it
runs through the handleError() methods as you wrote.
I'll use the time between some family celebrations to compare with my
code and let you and the list (archive) know about the results.

As a quick check I've added your error handler jsp to the resource
folder and added the throw statement to my page. It works and shows the
custom error page! Next I will check for the right exception and
resource type in my case.

Best,

Sandro






Re: New Sling Sitebuilder proof of concept demo video

2015-09-27 Thread Sandro Boehme

Hello again,

in the next days I'm at the adaptTo() conference in Berlin. I'm still 
hoping the Sitebuilder is generally of interest. If somebody want to 
talk about that I would be happy to meet you!

Here [1] is a picture of me to find me.


Best,

Sandro

[1] - 
https://scontent-frt3-1.xx.fbcdn.net/hphotos-xfa1/t31.0-0/p180x540/1900197_10203938203841788_8275678222473695468_o.jpg



Am 26.09.15 um 21:15 schrieb Sandro Boehme:

Hello again,

I hope the Sitebuilder is of any interest.

Let me tell you what I personally like the most about it:

o Nested Frontend Components

o Being able to change the page with the Page Editor and with an
external editor interchangeably.

o The Frontend Components needing only a minimum amount of requirements.
Static HTML only needs a component CSS class and a component type
attribute.
And components that use repository content only additionally need the
component JSP tag or the JavaScript client library to load the component
resource data.

o The component JSP tag provides an own scope for proper isolation.

o Having a generic editor for the repository content. It should still
not be too hard to make it possible for component developers to provide
own editors for their content.

o Being able to mangage the component resource for the component
developers. They don't need to create, move or delete it. If the
component is moved to or from a script included with 
it's resource that delivers the content of the component is moved from
one parent resource to the other. (Does not yet work for nested
components but should not be hard to do.)

o At no time having any preview code in the final script that would need
to be removed before deployment.

I noted a lot to do's that have to be done until it's a releasable
version. Beside a general cleanup, error handling, avoiding page
refreshs and so on I would also like to make it possible to create
Sightly based components.

Best,

Sandro


Am 25.09.15 um 01:08 schrieb Sandro Boehme:

Hello,

as announced in my adaptTo() 2014 talk I worked on creating a CMS. What
I've got now is a proof of concept for a Sling Sitebuilder and a
frontend component API.

To see it in action and get an understanding of how it works I created a
demo video that you can find here (available in 0,5-1,5 hours):
https://vimeo.com/140369433
It gets more and more into the details so you might not need to see the
complete video.

My basic questions are:
o Is such a Sitebuilder actually something you and people you know want?
o Do you see special technical risks?
o Are you willing to cooperate on a Sling implementation or do you know
of people who are willing to?
o Do you know of a product that would benefit from the Sitebuilder and
whose company would want to collaborate on that in some way?

Thanks for any feedback!

Best,

Sandro








Re: New Sling Sitebuilder proof of concept demo video

2015-09-28 Thread Sandro Boehme

Hi Bertrand,

I'm glad you like it!

Yeah, the closing titles scrolled though way too quickly at the end.
Here are the GitHub links:
https://github.com/sandroboehme/sitebuilder
https://github.com/sandroboehme/car_rental

And as one person asked on site here at the adaptTo(): The license is of 
course planned to be the Apache license.
The Jericho parser that I included uses the EPL and the LGPL license. 
And to not needing the restrictions Apache expects when using an EPL 
licensed project I asked if we can get the Jericho parser Apache 
licensed and the response was positive which I'm happy about.


Best,

Sandro


Am 28.09.15 um 10:09 schrieb Bertrand Delacretaz:

Hi Sandro,

On Fri, Sep 25, 2015 at 1:08 AM, Sandro Boehme <sandro.boe...@gmx.de> wrote:

...To see it in action and get an understanding of how it works I created a
demo video...


The concepts look interesting, can we see the code or test a live
version somewhere?

-Bertrand





Re: New Sling Sitebuilder proof of concept demo video

2015-09-26 Thread Sandro Boehme

Hello again,

I hope the Sitebuilder is of any interest.

Let me tell you what I personally like the most about it:

o Nested Frontend Components

o Being able to change the page with the Page Editor and with an 
external editor interchangeably.


o The Frontend Components needing only a minimum amount of requirements.
Static HTML only needs a component CSS class and a component type 
attribute.
And components that use repository content only additionally need the 
component JSP tag or the JavaScript client library to load the component 
resource data.


o The component JSP tag provides an own scope for proper isolation.

o Having a generic editor for the repository content. It should still 
not be too hard to make it possible for component developers to provide 
own editors for their content.


o Being able to mangage the component resource for the component 
developers. They don't need to create, move or delete it. If the 
component is moved to or from a script included with  
it's resource that delivers the content of the component is moved from 
one parent resource to the other. (Does not yet work for nested 
components but should not be hard to do.)


o At no time having any preview code in the final script that would need 
to be removed before deployment.


I noted a lot to do's that have to be done until it's a releasable 
version. Beside a general cleanup, error handling, avoiding page 
refreshs and so on I would also like to make it possible to create 
Sightly based components.


Best,

Sandro


Am 25.09.15 um 01:08 schrieb Sandro Boehme:

Hello,

as announced in my adaptTo() 2014 talk I worked on creating a CMS. What
I've got now is a proof of concept for a Sling Sitebuilder and a
frontend component API.

To see it in action and get an understanding of how it works I created a
demo video that you can find here (available in 0,5-1,5 hours):
https://vimeo.com/140369433
It gets more and more into the details so you might not need to see the
complete video.

My basic questions are:
o Is such a Sitebuilder actually something you and people you know want?
o Do you see special technical risks?
o Are you willing to cooperate on a Sling implementation or do you know
of people who are willing to?
o Do you know of a product that would benefit from the Sitebuilder and
whose company would want to collaborate on that in some way?

Thanks for any feedback!

Best,

Sandro





New Sling Sitebuilder proof of concept demo video

2015-09-24 Thread Sandro Boehme

Hello,

as announced in my adaptTo() 2014 talk I worked on creating a CMS. What 
I've got now is a proof of concept for a Sling Sitebuilder and a 
frontend component API.


To see it in action and get an understanding of how it works I created a 
demo video that you can find here (available in 0,5-1,5 hours):

https://vimeo.com/140369433
It gets more and more into the details so you might not need to see the 
complete video.


My basic questions are:
o Is such a Sitebuilder actually something you and people you know want?
o Do you see special technical risks?
o Are you willing to cooperate on a Sling implementation or do you know 
of people who are willing to?
o Do you know of a product that would benefit from the Sitebuilder and 
whose company would want to collaborate on that in some way?


Thanks for any feedback!

Best,

Sandro


Requirements for a small Apache Sling CMS

2016-01-13 Thread Sandro Boehme

Hello,

I'm still working on the Sitebuilder CMS that I think has lot's of 
potential.


You are the core users and developers target group as you have excellent 
know how of developing Sling and using Sling based CMSs. This is why I 
would like to introduce you to more details of the (in my opinion) 
innovative initiative and ask you for your valuable feedback in this survey.


The survey contains the introduction and 20 questions and takes around 
10-20 minues to complete.


Here
https://de.surveymonkey.com/r/WL7S2PJ
you can find out more and support the initiative with your information!

Thanks a lot!

Sandro



Re: Worthwhile to create a Sling CMS?

2016-01-19 Thread Sandro Boehme

Hi Ruben,

Am 19.01.16 um 18:19 schrieb Ruben Reusser:

for what it's worth, it would be really nice to have an inline editing
experience, maybe like

https://slate.adobe.com/welcome/

Yes, I agree.
It should be possible for frontend components that are shown on the live 
page to have dependencies to other packages like inline editors. I did 
some test with the JSPM API [1] and it looks like it is feasible to 
download and install the dependencies and its transitive dependencies on 
the fly.


To use that in the page editor for editing content more changes are 
needed but I think it should not be too hard and I agree that it would 
be a nice thing to have.


Best,

Sandro

[1] - https://github.com/jspm/jspm-cli/blob/master/docs/api.md


Re: Worthwhile to create a Sling CMS?

2016-01-21 Thread Sandro Boehme
I recognized I accidently answered privately to Ondrej by hitting 
'reply'. So here is my answer to him from two days ago:


Hi Ondrej,

Am 19.01.16 um 15:49 schrieb Ondrej Florian:

Having yet another CMS for 'normal' people like Wix may not be worthwhile.
I think it is not like Wix as it is Open Source. But of course this is 
more important for developers than for users as long as Wix can provide 
enough reusable elements for the users.



HOWEVER, going into verticals may be much more interesting.

I absolutely agree.


I personally think the Sling could be great data integration platform.
- imagine modeling SAP or SF data as resources...
- being able to 'mix' those resources into a web pages or reports
- build forms / workflows
Yes, that should certainly not be too hard to do. In the Sitebuilder poc 
demo [1] I moved simple text fields to the page, gave them an HTML name 
and the Sling POST servlet created the according node property. This way 
the page editor didn't have to do much.
I also agree that it would integrate well into Java (-affine) 
architectures as it fits skill wise.



...this also takes you very close to document/knowledge management :-)

Yes, this is probably right.

Thanks,

Sandro

[1] - https://vimeo.com/140369433



Sling CMS / component framework

2016-01-22 Thread Sandro Boehme

Hello Sling developers,

thanks again for your feedback on my last question (Would you use the 
CMS or do you know someone who would?). It was very good to have! It 
made me recognize that interest in a Sling CMS is limited (showcase for 
Sling and use cases of Ondrej).


This is why I would be more than happy if you can tell me if it would be 
useful in the phase before. When it can not yet be used as a CMS without 
a developer as there are no components at the marketplace.
This is the phase when it has to be useful for developers that create 
individual websites based on a web framework (like Sling).
I think that it would be useful for them, to have a frontend component 
framework on top of Sling that adds only minimum overhead and also 
provides tooling to actually (re-)use the components on a page and share 
them (for free or for sale) at the marketplace.


++ The Page Editor is not needed ++
o Also with an other editor other code can be added to the page and the 
component can be moved around and deleted without problems. For adding a 
component without the Page Editor one has to make sure that its id is 
unique at the page. This will be easier after the implementation allows 
to use textual ids (not done yet).


o One can work on a page with the Page Editor tool and the IDE or 
texteditor interchangeably.


++ Page Editor ++
The wysiwyg Page Editor allows to move frontend components from a 
toolbar to a page and to move them around on a page. If there are nested 
pages it can also move components from page to page while managing the 
uniqueness of the component id. The icons (move, delete, edit) and other 
HTML, CSS and JavaScript code is not persistent at the page it is added 
to the page at runtime instead. This way no preview code has to be 
removed later on.
The Page Editor also contains a universal editor for the component 
content. There the user can enter the content in child resources and 
properties that the component needs.


++ HTML frontend component API ++
To have a HTML component that needs no data access only three simple 
changes need to be made to the HTML block:

1. Additional "component" css class.
2. Additional "data-component-type='component-type-name'"
3. Additional "data-component-id='1234'"

++ JavaScript frontent component API ++
To use JavaScript to access the content of the component the previous 
changes need to be made and the JavaScript API can be used to read the 
component content the user entered via JSON from the server.


++ JSP API ++
The component code can be wrapped with a custom tag that provides the 
page context attribute "componentResource". It is the root that contains 
the content the user entered for the component and can be used in JSP 
based components.


++ Sightly API ++
It is still work in progress and current tests make me confident that 
the API will also be straightforward.


++ page structure ++
The usual resource (super) type script resolution process and the 
include mechanisms are used to reuse pages. Components are also used for 
structuring and nesting components within a page. A css class 
"container" within a component defines a placeholder to drop other 
nested components.


++ frontend dependency management ++
This is work in progress. It should be possible to optionally define 
frontend packages (like jQuery, Bootstrap,...) as component dependencies 
in a package.json (similar to npm) and get these dependencies including 
their transitive dependencies resolved, downloaded and installed on the 
fly. Current tests show that it's possible using JSPM.


++ bundle dependencies ++
It should be possible to define OSGi bundles in the package.json as 
dependencies as well. That is still part of the backlog.



Does that motivate you to use it and to you know of others who would use it?

Thanks for reading,

Sandro


Re: Worthwhile to create a Sling CMS?

2016-01-19 Thread Sandro Boehme

Am 19.01.16 um 14:35 schrieb Bertrand Delacretaz:

Hi Sandro,

On Tue, Jan 19, 2016 at 2:25 PM, Sandro Boehme <sandro.boe...@gmx.de> wrote:

...It would help me a big deal if some of you could tell me if they would use
this kind of CMS or if the know people who would use it as that validates
(or invalidates) my effort!..


I don't need to host a CMS myself these days, so wouldn't use that,
but I think a Sling-based CMS would be a great showcase of what Sling
can do.

-Bertrand



Thanks for your feedback Bertrand! Would you use it and maybe develop 
components for it if it would be available immediately as a service in 
the web (e.g. like Wix)? What CMS would you personally use instead? Or 
what other superior offering is there in your opinion?


Best,

Sandro


Worthwhile to create a Sling CMS?

2016-01-19 Thread Sandro Boehme

Hello,

I personally think there is a market and demand for a small Sling CMS 
that is a website builder which assembles frontend components from an 
open marketplace.


It would help me a big deal if some of you could tell me if they would 
use this kind of CMS or if the know people who would use it as that 
validates (or invalidates) my effort!


It should be as simple and straightforward as a typical website builder 
for composing a page from the frontend components. At the same time the 
barrier to develop these components should be as low as possible and 
developers should be able to sell components to allow a thriving 
marketplace for users to choose components from.


When researching to see if there is something comparable I didn't found 
anything. The closest were Wix, LightCMS, Hippo (marketplace planned), 
Liferay and Nuxeo. But they all have an enterprise edition which raises 
the barrier for many users and developers to use the CMS and makes the 
distribution of the CMS harder. If you know something else that matches 
my goals better I would really like to know it!


For me it seems obvious to go that route but I'm certainly biased :-). 
This is why your opinion is very important to me!


If you would like to know more about this initiative you will find more 
(technical) information at the introduction page of the survey here: 
https://de.surveymonkey.com/r/WL7S2PJ
Of course if you don't have the time you don't need to fill the 
questionnaire and you can just read the first page.


Any feedback is much appreciated!

Thanks,

Sandro


Re: Worthwhile to create a Sling CMS?

2016-01-19 Thread Sandro Boehme

Hi Bertrand,

Am 19.01.16 um 15:16 schrieb Bertrand Delacretaz:

... but my personal needs in terms of CMS are extremely
limited these days. When my friends look for websites/CMS I usually
steer them to wordpress.com to be able to get out of the way as soon

:-D yeah I understand.


as possible. And I use that as well for my own blog, for historical
reasons and with no need for something better at the moment.
I agree and used Wordpress for the web shop of my wife (wingsuit.de) as 
well.
And then there are were cases where I would like to have small changes 
or update things. But with Wordpress being developed in PHP it doesn't 
really motivate me to do that let alone having fun doing it. Also for 
experimental blogs or business ideas I would love to have a very helpful 
CMS written in Java so I can have a more individual result.




So my use cases are atypical, I'm not a good customer for such a
thing. But as I said, very interested in having concrete examples of
how to use Sling.
Yeah, if it turns out, that the Sitebuilder has not enough value for 
users or developers to use, I'm happy to provide it as a showcase.


Thanks a lot for your feedback!

Sandro



-Bertrand





Re: Worthwhile to create a Sling CMS?

2016-01-19 Thread Sandro Boehme

Am 19.01.16 um 16:20 schrieb Peter Hunsberger:

We use a sorta open source CMS called dotCMS.  Rather obscure, but meets
many of our needs, among which is scaling to support 400 authors and
somewhere over 900 web sites.  As we scale to more users we'd like to start
to decompose that into distributed components:

- authoring
- indexing (Elastic Seach in our case)
- publishing
- caching (Redis in our case)
- content distribution
- workflow management
- authorization, authentication

Basically, having each function run in Docker containers that can be
instantiated as needed.  Our needs are likely way different than what
you're aiming at, but to the extent you can meet them you may end up with a
pretty flexible solution?
Yes, I'm not aiming at distributed components and more for small to 
medium websites. There is no separated authoring and publishing instance 
for example. But I can imagine that this can be done using Slings 
discovery API later on.


Best,

Sandro


Re: sling attic / cleanup

2016-10-19 Thread Sandro Boehme

Hello,

I'm still working on the Sitebuilder [1] and the resource editor and 
need the js module for that.

Please keep it.

Thanks!

Sandro


2) We scheduled contrib/jcr/js for removal, but it's indirectly
referenced from contrib/explorers/resourceeditor.

So we either keep both or move both to the attic.

For 1) I suggest we keep the three modules. If at least one dev thinks
they should stay, it's enough for me.

I am not sure at all what to do about 2) though.

Robert



[1] - https://github.com/sandroboehme/sitebuilder


Re: sling attic / cleanup (Sitebuilder, Resource Editor)

2016-10-20 Thread Sandro Boehme

Hey Bertrand,

Am 20.10.16 um 09:12 schrieb Bertrand Delacretaz:

Hi Sandro,

On Wed, Oct 19, 2016 at 11:15 PM, Sandro Boehme <sandro.boe...@gmx.de> wrote:

...I'm still working on the Sitebuilder [1] and the resource editor and need
the js module for that...


ok, good to hear from you! No problem keeping those modules out of the attic.

-Bertrand


glad to read that. Some background and direction:
In the mean time I have one part time day a week where I can mostly work 
on it. My goal is to be able to use the Sitebuilder and Resource Editor 
for own websites. I will keep the Sitebuilder at GitHub and I guess I 
should rename it to not call it "Sling Sitebuilder" and only 
"Sitebuilder". But I would keep "sling" in the package name for now to 
avoid another refactoring.


Best,
Sandro



mountByFS does not work

2016-11-12 Thread Sandro Boehme

Hello,

in my case a FS mount (-Dsling.mountByFS=true) does not work.
The configMgr of the web console shows that the mount is there and 
FileMonitor.check() detects the change and sends the event.
My question is: Who is the receiver of the event? I understand that it's 
the event of the FsResourceProvider but what code listens to the change 
and (in my case) doesn't promote it.


Thanks,

Sandro


trunk build does not work // was: mountByFS does not work

2016-11-14 Thread Sandro Boehme

Hi Robert,


It took me a while to get the trunk to build. I had to disable the
Rat
checks and update the dependency to org.apache.sling.jcr.base
version
2.4.3-SNAPSHOT in org.apache.sling.jcr.oak.server.
Why isn't there a build job anymore for trunk? Should I build Sling
differently than described at the website [1]?


The context as is at [2]. Basically, the big 'trunk' jobs were too slow
and flaky. Now we have many small jobs, with none of them slow and a
couple of them flaky :-)

But the reactor build should work nonetheless.

I currently can't build it due to repository.apache.org timeouts, can
you post any errors that you get?

Thanks,

Robert


[2]: https://cwiki.apache.org/confluence/display/SLING/Sling+Jenkins+Se
tup


The dependency to oasling.jcr.base 2.4.x has been changed by Julian in 
the meantime to prepare for the oak.server-1.1.2 release.

So I could build the trunk a few minutes ago.
But the server doesn't seem to start completely. When accessing 
http://localhost:8080 I get an HTTP 503 saying

"Problem accessing /. Reason:
AuthenticationSupport service missing. Cannot authenticate request."
138 bundles are available and active.

The error log shows me this error:
14.11.2016 21:30:58.119 *ERROR* [OsgiInstallerImpl] 
org.apache.sling.jcr.oak.server.internal.OakSlingRepositoryManager 
start: Uncaught Throwable trying to access Repository, calling 
stopRepository()
java.lang.AbstractMethodError: 
org.apache.sling.jcr.base.AbstractSlingRepositoryManager.getLoginAdminWhitelist()Lorg/apache/sling/jcr/base/LoginAdminWhitelist;
	at 
org.apache.sling.jcr.base.AbstractSlingRepository2.loginAdministrative(AbstractSlingRepository2.java:373)
	at 
org.apache.sling.jcr.base.internal.loader.Loader.getSession(Loader.java:326)
	at 
org.apache.sling.jcr.base.internal.loader.Loader.registerNamespaces(Loader.java:213)
	at 
org.apache.sling.jcr.base.internal.loader.Loader.registerBundleInternal(Loader.java:225)
	at 
org.apache.sling.jcr.base.internal.loader.Loader.registerBundle(Loader.java:158)

at 
org.apache.sling.jcr.base.internal.loader.Loader.(Loader.java:75)
	at 
org.apache.sling.jcr.base.AbstractSlingRepositoryManager.start(AbstractSlingRepositoryManager.java:371)

...

Any advice would be much appreciated!

Best,
Sandro


Re: mountByFS does not work

2016-11-27 Thread Sandro Boehme

Am 19.11.16 um 21:58 schrieb Sandro Boehme:

Am 13.11.16 um 15:16 schrieb Carsten Ziegeler:
> Sandro Boehme wrote
>>>> in my case a FS mount (-Dsling.mountByFS=true) does not work.
>>>> The configMgr of the web console shows that the mount is there and
>>>> FileMonitor.check() detects the change and sends the event.
>>>> My question is: Who is the receiver of the event? I understand that
>>>> it's
>>>> the event of the FsResourceProvider but what code listens to the
>>>> change
>>>> and (in my case) doesn't promote it.
>>>>
>>> The scripting jsp should listen to the events you mention above, but
>>> now
>>> the scripting is not using event admin anymore but uses the
>>> ResourceChangeListener and therefore it never gets the event.
>>>
>>> The problem is that we need to update the fsresource bundle to use the
>>> resource resolver observation api. I'll try to take care of it.
>>
>> Ah. Thanks a lot!
>>
> I've updated the fsresource bundle (SLING-6279) but didn't test it so
> far :)
> So if you want to give it a try...
Thanks again. I did and it didn't work for me but I can imagine that the
reason is something else. I will check it as soon as I have time for
that and send the feedback here.


Hi Carsten,

sadly it doesn't work for me.
If after restart I first change the JSP and then refresh the page the 
change is visible. But subsequent changes are not detected anymore.
I tried without the reactor build and then with it and always changed 
the version of org.apache.sling.scripting.jsp to 2.2.1.SNAPSHOT in 
provisioning/scripting.txt.

fsresource is already set to 1.1.5-SNAPSHOT.
In FileMonitor.sendEvents() 
ObservationReporter.getObserverConfigurations() always returns an empty 
list. In an other configuration there were configurations returned but 
'config.matches(monitorable.path)' always returns false so 
reporter.reportChanges() is never called.

JspScriptEngineFactory.onChange() also seems to be never called.

Help would be much appreciated!

Best,

Sandro



Re: trunk build does not work // was: mountByFS does not work

2016-11-27 Thread Sandro Boehme

Am 19.11.16 um 21:56 schrieb Sandro Boehme:

Am 17.11.16 um 23:22 schrieb Robert Munteanu:

On Thu, 2016-11-17 at 14:53 +0100, Julian Sedding wrote:

Hi Sandro

You are right. However, the full build on Jenkins failed too often.
Partly due to issues or flaky tests in Sling, partly due to e.g.
infrastructure issues. This made the Jenkins builds almost useless,
because chances were that it weren't your changes that made the build
fail.

Therefore Robert added configurations to run each module
independently
on Jenkins. That gives us a better overview of which modules are ok
and which ones aren't. However, we lost the full build in the
process.
Maybe we could add it back and run it once every night. WDYT, Robert?


First of all, I think that I should update the documentation :-) With
all the SNAPSHOTs being deployed by the Jenkins jobs the only command
that should be used to build Sling after the SVN checkout is

$ cd launchpad/builder
$ mvn -U clean install

which matches to a large degree what the Jenkins jobs do. There should
be absolutely no need to perform a full reactor build - which takes
time, and is not always stable - to get a launchpad.

Then I'd like to understand exactly why the reactor build fails, as it
should not, at least not when the individual module builds are working.

Robert

Hi Robert,

thanks a lot for the hint! Your magic commands make the build of the
server very quick. That makes my work with Sling a lot easier and that
would be true for everybody who reads it at the Sling website.

I guess that if I change a Sling Maven project and 'mvn install' it the
generated artifact is supposed to be picked up at Maven install phase of
the builder.

Best,

Sandro





Regards
Julian



On Wed, Nov 16, 2016 at 10:02 PM, Sandro Boehme <sandro.boe...@gmx.de

wrote:

According to our Jenkins job

  https://builds.apache.org/job/sling-launchpad-builder-1.8/

the launchpad should work without issues.

A couple of additional questions:

- what Java version do you use for building and running Sling?
- what happens if you try to build the project with "-U", to
force
updating the snapshots? The command would then be mvn -U clean
verify

Robert


According to the "Getting and Building Sling" page [1] I just did
"svn co
...", "mvn clean install" (-DskipTests) and "java -jar ..." and
expected to
be able to build and use Sling. But if we don't have a Jenkins job
that does
the same a committer will probably more easily overlook if he
breaks the
build for people who are trying out Sling. But I guess you know
that and I
have the feeling that I miss something here.

I use Java 8. I didn't try -U but Julians changes fixed the problem
for me.


[1] -
http://sling.apache.org/documentation/development/getting-and-build
ing-sling.html

Best,

Sandro








When trying to get Carstens changes to work I saw that I had to change 
the version for scripting.jsp in the launchpad provisioning. I also 
recognized that it doesn't contain a lot of snapshot versions so the 
server will not load the bundle versions that are checked out at trunk 
from SVN. How do you guys work to make sure you get the latest trunk 
running in the server? Is there a launchpad version somewhere that 
compiles the latest snapshots to the standalone jar? I still feel like I 
miss something obvious.

Best,

Sandro


Re: Launchpad stable and launchpad unstable

2016-11-28 Thread Sandro Boehme

- the launchpad maintained in trunk should always be the "stable" launchpad, 
referencing only released dependencies of the sling bundles and oft the integration tests 
project
If I checkout and build the latest trunk I would expect that the built 
projects are available at the runtime of the server. This way I can set 
breakpoints in the debugger, examine the inner workings and maybe 
provide an improvement.
If the launchpad provides only stable versions I would always first have 
to switch to the snapshot versions using the script and I currently I 
can't do that, right?


Best,

Sandro

PS: Thanks Bertrand for pointing me to this discussion!



Re: mountByFS does not work

2016-11-27 Thread Sandro Boehme

Am 27.11.16 um 23:27 schrieb Sandro Boehme:

Am 19.11.16 um 21:58 schrieb Sandro Boehme:

Am 13.11.16 um 15:16 schrieb Carsten Ziegeler:
> Sandro Boehme wrote
>>>> in my case a FS mount (-Dsling.mountByFS=true) does not work.
>>>> The configMgr of the web console shows that the mount is there and
>>>> FileMonitor.check() detects the change and sends the event.
>>>> My question is: Who is the receiver of the event? I understand that
>>>> it's
>>>> the event of the FsResourceProvider but what code listens to the
>>>> change
>>>> and (in my case) doesn't promote it.
>>>>
>>> The scripting jsp should listen to the events you mention above, but
>>> now
>>> the scripting is not using event admin anymore but uses the
>>> ResourceChangeListener and therefore it never gets the event.
>>>
>>> The problem is that we need to update the fsresource bundle to use
the
>>> resource resolver observation api. I'll try to take care of it.
>>
>> Ah. Thanks a lot!
>>
> I've updated the fsresource bundle (SLING-6279) but didn't test it so
> far :)
> So if you want to give it a try...
Thanks again. I did and it didn't work for me but I can imagine that the
reason is something else. I will check it as soon as I have time for
that and send the feedback here.


Hi Carsten,

sadly it doesn't work for me.
If after restart I first change the JSP and then refresh the page the
change is visible. But subsequent changes are not detected anymore.
I tried without the reactor build and then with it and always changed
the version of org.apache.sling.scripting.jsp to 2.2.1.SNAPSHOT in
provisioning/scripting.txt.
fsresource is already set to 1.1.5-SNAPSHOT.
In FileMonitor.sendEvents()
ObservationReporter.getObserverConfigurations() always returns an empty
list. In an other configuration there were configurations returned but
'config.matches(monitorable.path)' always returns false so
reporter.reportChanges() is never called.
JspScriptEngineFactory.onChange() also seems to be never called.

Help would be much appreciated!

Best,

Sandro


Ok, in one case it works and both methods are called. I'll compare, why 
it doesn't work in the other occasion.


Best,
Sandro


Re: trunk build does not work // was: mountByFS does not work

2016-11-16 Thread Sandro Boehme

According to our Jenkins job

  https://builds.apache.org/job/sling-launchpad-builder-1.8/

the launchpad should work without issues.

A couple of additional questions:

- what Java version do you use for building and running Sling?
- what happens if you try to build the project with "-U", to force
updating the snapshots? The command would then be mvn -U clean verify

Robert
According to the "Getting and Building Sling" page [1] I just did "svn 
co ...", "mvn clean install" (-DskipTests) and "java -jar ..." and 
expected to be able to build and use Sling. But if we don't have a 
Jenkins job that does the same a committer will probably more easily 
overlook if he breaks the build for people who are trying out Sling. But 
I guess you know that and I have the feeling that I miss something here.


I use Java 8. I didn't try -U but Julians changes fixed the problem for me.


[1] - 
http://sling.apache.org/documentation/development/getting-and-building-sling.html


Best,

Sandro


Re: trunk build does not work // was: mountByFS does not work

2016-11-16 Thread Sandro Boehme

Hi Julian,

thanks for the changes! It works for me as well now.

Best,

Sandro

Am 16.11.16 um 13:29 schrieb Julian Sedding:

Hi Sandro

I have committed my changes to these modules and run the full build
multiple times. So I expect that you should be able to run a
successful trunk build now.

Regards
Julian


On Wed, Nov 16, 2016 at 1:18 PM, Robert Munteanu <romb...@apache.org> wrote:

On Tue, 2016-11-15 at 15:51 +0100, Sandro Boehme wrote:

Hi Julian,

thanks for your feedback!

Am 15.11.16 um 10:47 schrieb Julian Sedding:

Hi Sandro

org/apache/sling/jcr/base/LoginAdminWhitelist looks like your
checkout
or snapshots on your machine are not quite up to date. I removed
the


I'am at the latest trunk, did 'mvn clean ...' and created a new
sling
home with the '-c' option at server startup. What else do I have to
do
to be up to date?


method AbstractSlingRepositoryManager.getLoginAdminWhitelist(), so
maybe you need to first build a local snapshot of bundles/jcr/base
and
then try building bundles/jcr/oak-server again.


What version of jcr/base is compatible with which version of jcr/oak-
server?



Sorry for the inconvenience. I should soon be done with refactoring
these modules.


Does that mean there is nothing I can do right now?


According to our Jenkins job

  https://builds.apache.org/job/sling-launchpad-builder-1.8/

the launchpad should work without issues.

A couple of additional questions:

- what Java version do you use for building and running Sling?
- what happens if you try to build the project with "-U", to force
updating the snapshots? The command would then be mvn -U clean verify

Robert



Best,

Sandro



Regards
Julian


On Mon, Nov 14, 2016 at 9:50 PM, Sandro Boehme <sandro.boehme@gmx.d
e> wrote:

Hi Robert,


It took me a while to get the trunk to build. I had to
disable the
Rat
checks and update the dependency to org.apache.sling.jcr.base
version
2.4.3-SNAPSHOT in org.apache.sling.jcr.oak.server.
Why isn't there a build job anymore for trunk? Should I build
Sling
differently than described at the website [1]?



The context as is at [2]. Basically, the big 'trunk' jobs were
too slow
and flaky. Now we have many small jobs, with none of them slow
and a
couple of them flaky :-)

But the reactor build should work nonetheless.

I currently can't build it due to repository.apache.org
timeouts, can
you post any errors that you get?

Thanks,

Robert


[2]: https://cwiki.apache.org/confluence/display/SLING/Sling+Je
nkins+Se
tup



The dependency to oasling.jcr.base 2.4.x has been changed by
Julian in the
meantime to prepare for the oak.server-1.1.2 release.
So I could build the trunk a few minutes ago.
But the server doesn't seem to start completely. When accessing
http://localhost:8080 I get an HTTP 503 saying
"Problem accessing /. Reason:
AuthenticationSupport service missing. Cannot authenticate
request."
138 bundles are available and active.

The error log shows me this error:
14.11.2016 21:30:58.119 *ERROR* [OsgiInstallerImpl]
org.apache.sling.jcr.oak.server.internal.OakSlingRepositoryManage
r start:
Uncaught Throwable trying to access Repository, calling
stopRepository()
java.lang.AbstractMethodError:
org.apache.sling.jcr.base.AbstractSlingRepositoryManager.getLogin
AdminWhitelist()Lorg/apache/sling/jcr/base/LoginAdminWhitelist;
at
org.apache.sling.jcr.base.AbstractSlingRepository2.loginAdministr
ative(AbstractSlingRepository2.java:373)
at
org.apache.sling.jcr.base.internal.loader.Loader.getSession(Loade
r.java:326)
at
org.apache.sling.jcr.base.internal.loader.Loader.registerNamespac
es(Loader.java:213)
at
org.apache.sling.jcr.base.internal.loader.Loader.registerBundleIn
ternal(Loader.java:225)
at
org.apache.sling.jcr.base.internal.loader.Loader.registerBundle(L
oader.java:158)
at
org.apache.sling.jcr.base.internal.loader.Loader.(Loader.ja
va:75)
at
org.apache.sling.jcr.base.AbstractSlingRepositoryManager.start(Ab
stractSlingRepositoryManager.java:371)
...

Any advice would be much appreciated!

Best,
Sandro











Re: trunk build does not work // was: mountByFS does not work

2016-11-15 Thread Sandro Boehme

Hi Julian,

thanks for your feedback!

Am 15.11.16 um 10:47 schrieb Julian Sedding:

Hi Sandro

org/apache/sling/jcr/base/LoginAdminWhitelist looks like your checkout
or snapshots on your machine are not quite up to date. I removed the
I'am at the latest trunk, did 'mvn clean ...' and created a new sling 
home with the '-c' option at server startup. What else do I have to do 
to be up to date?



method AbstractSlingRepositoryManager.getLoginAdminWhitelist(), so
maybe you need to first build a local snapshot of bundles/jcr/base and
then try building bundles/jcr/oak-server again.

What version of jcr/base is compatible with which version of jcr/oak-server?



Sorry for the inconvenience. I should soon be done with refactoring
these modules.

Does that mean there is nothing I can do right now?

Best,

Sandro



Regards
Julian


On Mon, Nov 14, 2016 at 9:50 PM, Sandro Boehme <sandro.boe...@gmx.de> wrote:

Hi Robert,


It took me a while to get the trunk to build. I had to disable the
Rat
checks and update the dependency to org.apache.sling.jcr.base
version
2.4.3-SNAPSHOT in org.apache.sling.jcr.oak.server.
Why isn't there a build job anymore for trunk? Should I build Sling
differently than described at the website [1]?



The context as is at [2]. Basically, the big 'trunk' jobs were too slow
and flaky. Now we have many small jobs, with none of them slow and a
couple of them flaky :-)

But the reactor build should work nonetheless.

I currently can't build it due to repository.apache.org timeouts, can
you post any errors that you get?

Thanks,

Robert


[2]: https://cwiki.apache.org/confluence/display/SLING/Sling+Jenkins+Se
tup



The dependency to oasling.jcr.base 2.4.x has been changed by Julian in the
meantime to prepare for the oak.server-1.1.2 release.
So I could build the trunk a few minutes ago.
But the server doesn't seem to start completely. When accessing
http://localhost:8080 I get an HTTP 503 saying
"Problem accessing /. Reason:
AuthenticationSupport service missing. Cannot authenticate request."
138 bundles are available and active.

The error log shows me this error:
14.11.2016 21:30:58.119 *ERROR* [OsgiInstallerImpl]
org.apache.sling.jcr.oak.server.internal.OakSlingRepositoryManager start:
Uncaught Throwable trying to access Repository, calling stopRepository()
java.lang.AbstractMethodError:
org.apache.sling.jcr.base.AbstractSlingRepositoryManager.getLoginAdminWhitelist()Lorg/apache/sling/jcr/base/LoginAdminWhitelist;
at
org.apache.sling.jcr.base.AbstractSlingRepository2.loginAdministrative(AbstractSlingRepository2.java:373)
at
org.apache.sling.jcr.base.internal.loader.Loader.getSession(Loader.java:326)
at
org.apache.sling.jcr.base.internal.loader.Loader.registerNamespaces(Loader.java:213)
at
org.apache.sling.jcr.base.internal.loader.Loader.registerBundleInternal(Loader.java:225)
at
org.apache.sling.jcr.base.internal.loader.Loader.registerBundle(Loader.java:158)
at
org.apache.sling.jcr.base.internal.loader.Loader.(Loader.java:75)
at
org.apache.sling.jcr.base.AbstractSlingRepositoryManager.start(AbstractSlingRepositoryManager.java:371)
...

Any advice would be much appreciated!

Best,
Sandro






Re: trunk build does not work // was: mountByFS does not work

2016-11-17 Thread Sandro Boehme

Hi Julian,

I like the idea of individual Jenkins jobs for the reasons you pointed out!
If we would have a "nightly" build (whatever time that would be) we 
could link it at the Getting and building Sling page. We could write 
there that in case the build does currently not work (e.g. because there 
is some bigger work in progress or a plain oversight) they could have a 
look at what revision actually does work and use that.
People who would stop trying Sling because of a non working build and 
who would not ask at the mailing list would then have a chance to get 
the build working anyways.

WDYT?

Best,

Sandro

Am 17.11.16 um 14:53 schrieb Julian Sedding:

Hi Sandro

You are right. However, the full build on Jenkins failed too often.
Partly due to issues or flaky tests in Sling, partly due to e.g.
infrastructure issues. This made the Jenkins builds almost useless,
because chances were that it weren't your changes that made the build
fail.

Therefore Robert added configurations to run each module independently
on Jenkins. That gives us a better overview of which modules are ok
and which ones aren't. However, we lost the full build in the process.
Maybe we could add it back and run it once every night. WDYT, Robert?

Regards
Julian



On Wed, Nov 16, 2016 at 10:02 PM, Sandro Boehme <sandro.boe...@gmx.de> wrote:

According to our Jenkins job

  https://builds.apache.org/job/sling-launchpad-builder-1.8/

the launchpad should work without issues.

A couple of additional questions:

- what Java version do you use for building and running Sling?
- what happens if you try to build the project with "-U", to force
updating the snapshots? The command would then be mvn -U clean verify

Robert


According to the "Getting and Building Sling" page [1] I just did "svn co
...", "mvn clean install" (-DskipTests) and "java -jar ..." and expected to
be able to build and use Sling. But if we don't have a Jenkins job that does
the same a committer will probably more easily overlook if he breaks the
build for people who are trying out Sling. But I guess you know that and I
have the feeling that I miss something here.

I use Java 8. I didn't try -U but Julians changes fixed the problem for me.


[1] -
http://sling.apache.org/documentation/development/getting-and-building-sling.html

Best,

Sandro






Re: trunk build does not work // was: mountByFS does not work

2016-11-18 Thread Sandro Boehme

Am 17.11.16 um 23:22 schrieb Robert Munteanu:

On Thu, 2016-11-17 at 14:53 +0100, Julian Sedding wrote:

Hi Sandro

You are right. However, the full build on Jenkins failed too often.
Partly due to issues or flaky tests in Sling, partly due to e.g.
infrastructure issues. This made the Jenkins builds almost useless,
because chances were that it weren't your changes that made the build
fail.

Therefore Robert added configurations to run each module
independently
on Jenkins. That gives us a better overview of which modules are ok
and which ones aren't. However, we lost the full build in the
process.
Maybe we could add it back and run it once every night. WDYT, Robert?


First of all, I think that I should update the documentation :-) With
all the SNAPSHOTs being deployed by the Jenkins jobs the only command
that should be used to build Sling after the SVN checkout is

$ cd launchpad/builder
$ mvn -U clean install

which matches to a large degree what the Jenkins jobs do. There should
be absolutely no need to perform a full reactor build - which takes
time, and is not always stable - to get a launchpad.

Then I'd like to understand exactly why the reactor build fails, as it
should not, at least not when the individual module builds are working.

Robert

I don't know exactly why the reactor build failed.

In the next days I will have a look on that to find out what's the 
difference between the reactor build and the launchpad build. But of 
course a quick and stable build sounds very very good to me!


Best,

Sandro






Regards
Julian



On Wed, Nov 16, 2016 at 10:02 PM, Sandro Boehme <sandro.boe...@gmx.de

wrote:

According to our Jenkins job

  https://builds.apache.org/job/sling-launchpad-builder-1.8/

the launchpad should work without issues.

A couple of additional questions:

- what Java version do you use for building and running Sling?
- what happens if you try to build the project with "-U", to
force
updating the snapshots? The command would then be mvn -U clean
verify

Robert


According to the "Getting and Building Sling" page [1] I just did
"svn co
...", "mvn clean install" (-DskipTests) and "java -jar ..." and
expected to
be able to build and use Sling. But if we don't have a Jenkins job
that does
the same a committer will probably more easily overlook if he
breaks the
build for people who are trying out Sling. But I guess you know
that and I
have the feeling that I miss something here.

I use Java 8. I didn't try -U but Julians changes fixed the problem
for me.


[1] -
http://sling.apache.org/documentation/development/getting-and-build
ing-sling.html

Best,

Sandro







Re: mountByFS does not work

2016-11-13 Thread Sandro Boehme

The problem is that we need to update the fsresource bundle to use the
resource resolver observation api. I'll try to take care of it.


Ah. Thanks a lot!


I've updated the fsresource bundle (SLING-6279) but didn't test it so far :)
So if you want to give it a try...


Thanks for updating Carsten!

It took me a while to get the trunk to build. I had to disable the Rat 
checks and update the dependency to org.apache.sling.jcr.base version 
2.4.3-SNAPSHOT in org.apache.sling.jcr.oak.server.
Why isn't there a build job anymore for trunk? Should I build Sling 
differently than described at the website [1]?


Now when I access http://localhost:8080/ I get the error 
"AuthenticationSupport service missing. Cannot authenticate request.". I 
will have a look at it again at an other day and may ask for support later.

But of course if you have a hint already I would be happy about any advice.

[1] - 
http://sling.apache.org/documentation/development/getting-and-building-sling.html


Best,

Sandro



Re: mountByFS does not work

2016-11-13 Thread Sandro Boehme

in my case a FS mount (-Dsling.mountByFS=true) does not work.
The configMgr of the web console shows that the mount is there and
FileMonitor.check() detects the change and sends the event.
My question is: Who is the receiver of the event? I understand that it's
the event of the FsResourceProvider but what code listens to the change
and (in my case) doesn't promote it.


The scripting jsp should listen to the events you mention above, but now
the scripting is not using event admin anymore but uses the
ResourceChangeListener and therefore it never gets the event.

The problem is that we need to update the fsresource bundle to use the
resource resolver observation api. I'll try to take care of it.


Ah. Thanks a lot!

Best,

Sandro


Re: trunk build does not work // was: mountByFS does not work

2016-11-19 Thread Sandro Boehme

Am 17.11.16 um 23:22 schrieb Robert Munteanu:

On Thu, 2016-11-17 at 14:53 +0100, Julian Sedding wrote:

Hi Sandro

You are right. However, the full build on Jenkins failed too often.
Partly due to issues or flaky tests in Sling, partly due to e.g.
infrastructure issues. This made the Jenkins builds almost useless,
because chances were that it weren't your changes that made the build
fail.

Therefore Robert added configurations to run each module
independently
on Jenkins. That gives us a better overview of which modules are ok
and which ones aren't. However, we lost the full build in the
process.
Maybe we could add it back and run it once every night. WDYT, Robert?


First of all, I think that I should update the documentation :-) With
all the SNAPSHOTs being deployed by the Jenkins jobs the only command
that should be used to build Sling after the SVN checkout is

$ cd launchpad/builder
$ mvn -U clean install

which matches to a large degree what the Jenkins jobs do. There should
be absolutely no need to perform a full reactor build - which takes
time, and is not always stable - to get a launchpad.

Then I'd like to understand exactly why the reactor build fails, as it
should not, at least not when the individual module builds are working.

Robert

Hi Robert,

thanks a lot for the hint! Your magic commands make the build of the 
server very quick. That makes my work with Sling a lot easier and that 
would be true for everybody who reads it at the Sling website.


I guess that if I change a Sling Maven project and 'mvn install' it the 
generated artifact is supposed to be picked up at Maven install phase of 
the builder.


Best,

Sandro





Regards
Julian



On Wed, Nov 16, 2016 at 10:02 PM, Sandro Boehme <sandro.boe...@gmx.de

wrote:

According to our Jenkins job

  https://builds.apache.org/job/sling-launchpad-builder-1.8/

the launchpad should work without issues.

A couple of additional questions:

- what Java version do you use for building and running Sling?
- what happens if you try to build the project with "-U", to
force
updating the snapshots? The command would then be mvn -U clean
verify

Robert


According to the "Getting and Building Sling" page [1] I just did
"svn co
...", "mvn clean install" (-DskipTests) and "java -jar ..." and
expected to
be able to build and use Sling. But if we don't have a Jenkins job
that does
the same a committer will probably more easily overlook if he
breaks the
build for people who are trying out Sling. But I guess you know
that and I
have the feeling that I miss something here.

I use Java 8. I didn't try -U but Julians changes fixed the problem
for me.


[1] -
http://sling.apache.org/documentation/development/getting-and-build
ing-sling.html

Best,

Sandro







Re: mountByFS does not work

2016-11-19 Thread Sandro Boehme

Am 13.11.16 um 15:16 schrieb Carsten Ziegeler:

Sandro Boehme wrote

in my case a FS mount (-Dsling.mountByFS=true) does not work.
The configMgr of the web console shows that the mount is there and
FileMonitor.check() detects the change and sends the event.
My question is: Who is the receiver of the event? I understand that it's
the event of the FsResourceProvider but what code listens to the change
and (in my case) doesn't promote it.


The scripting jsp should listen to the events you mention above, but now
the scripting is not using event admin anymore but uses the
ResourceChangeListener and therefore it never gets the event.

The problem is that we need to update the fsresource bundle to use the
resource resolver observation api. I'll try to take care of it.


Ah. Thanks a lot!


I've updated the fsresource bundle (SLING-6279) but didn't test it so far :)
So if you want to give it a try...
Thanks again. I did and it didn't work for me but I can imagine that the 
reason is something else. I will check it as soon as I have time for 
that and send the feedback here.


Best,

Sandro



Regards

 Carsten





java.lang.AbstractMethodError: org.apache.sling.jcr.base.AbstractSlingRepositoryManager.getLoginAdminWhitelist() - trunk build does not work // was: mountByFS does not work

2016-11-14 Thread Sandro Boehme

Am 14.11.16 um 23:02 schrieb Robert Munteanu:

On Mon, 2016-11-14 at 21:50 +0100, Sandro Boehme wrote:

Hi Robert,


It took me a while to get the trunk to build. I had to disable
the
Rat
checks and update the dependency to org.apache.sling.jcr.base
version
2.4.3-SNAPSHOT in org.apache.sling.jcr.oak.server.
Why isn't there a build job anymore for trunk? Should I build
Sling
differently than described at the website [1]?


The context as is at [2]. Basically, the big 'trunk' jobs were too
slow
and flaky. Now we have many small jobs, with none of them slow and
a
couple of them flaky :-)

But the reactor build should work nonetheless.

I currently can't build it due to repository.apache.org timeouts,
can
you post any errors that you get?

Thanks,

Robert


[2]: https://cwiki.apache.org/confluence/display/SLING/Sling+Jenkin
s+Se
tup


The dependency to oasling.jcr.base 2.4.x has been changed by Julian
in
the meantime to prepare for the oak.server-1.1.2 release.
So I could build the trunk a few minutes ago.
But the server doesn't seem to start completely. When accessing
http://localhost:8080 I get an HTTP 503 saying
"Problem accessing /. Reason:
AuthenticationSupport service missing. Cannot authenticate request."
138 bundles are available and active.

The error log shows me this error:
14.11.2016 21:30:58.119 *ERROR* [OsgiInstallerImpl]
org.apache.sling.jcr.oak.server.internal.OakSlingRepositoryManager
start: Uncaught Throwable trying to access Repository, calling
stopRepository()
java.lang.AbstractMethodError:
org.apache.sling.jcr.base.AbstractSlingRepositoryManager.getLoginAdmi
nWhitelist()Lorg/apache/sling/jcr/base/LoginAdminWhitelist;


(snip)

Seems like a mismatch between bundle versions. I think that this
class/config was moved to oak-server recently. Just to be sure, can you
navigate to launchpad/builder and:

- remove any existing 'sling' directory
- run `mvn clean verify`
- run `java -jar target/org.apache.sling.launchpad-9-SNAPSHOT.jar`

Robert



I have created new home folders with the -c option already. I followed 
your instructions anyways but I get the same error.
BTW: org.apache.sling.launchpad.SmokeIT fails with the same error 
(...AuthenticationSupport service missing...).


I agree that it might be a config error. The following bundles are 
active as seen in /system/console/bundles:

- org.apache.sling.auth.core 1.3.20
- org.apache.sling.jcr.oak.server 1.1.1.SNAPSHOT
- org.apache.sling.jcr.base 2.4.1.SNAPSHOT
I also switched to org.apache.sling.jcr.oak.server 1.1.3.SNAPSHOT by 
changing /launchpad/builder/src/main/provisioning/oak.txt. But the error 
is still there.


Best,

Sandro


Re: sling releases - deploy to OBR?

2016-11-01 Thread Sandro Boehme
I personally used it as good as possible but also recognized that 
bundles were not available so I had to put it in my own OBR at some point.
If I'm the only one it may not pay off to support it and I would be fine 
be remove the OBR support.


Best,

Sandro

Am 01.11.16 um 08:24 schrieb Bertrand Delacretaz:

On Mon, Oct 31, 2016 at 11:09 PM, Stefan Seifert  wrote:

...do we still support OBR as deployment target? or should we just remove
it from our relase management process...


I suggest removing it, and if someone complains we can re-add.

As you mention, many recent releases haven't been added there, so it's
out of sync anyway.

-Bertrand





Re: Launchpad stable and launchpad unstable

2016-11-29 Thread Sandro Boehme

Hi Bertrand,

Am 29.11.16 um 13:25 schrieb Bertrand Delacretaz:

Hi Sandro,

On Mon, Nov 28, 2016 at 11:45 PM, Sandro Boehme <sandro.boe...@gmx.de> wrote:

...If I checkout and build the latest trunk I would expect that the built
projects are available at the runtime of the server. This way I can set
breakpoints in the debugger, examine the inner workings and maybe provide an
improvement


Yes, as a Sling developer that's what you want, and also for testing
the whole thing in automated tests.

OTOH for Sling to be always release ready we need a launchpad that
refers only to released modules, so we need both.

I agree that we need both!


...If the launchpad provides only stable versions I would always first have to
switch to the snapshot versions using the script and I currently I can't do
that, right?...


The launchpad/builder/set-sling-snapshots.sh script should allow you
to do that but when I wrote it it didn't fully work, see comments
inside.

-Bertrand



I tried it with the current trunk and http://localhost:8080/ returned a 
503 with 'AuthenticationSupport service missing. Cannot authenticate 
request.'



'mvn dependency:resolve | grep org.apache.sling | grep -v SNAPSHOT' 
returned:


[INFO] 
org.apache.sling:org.apache.sling.commons.scheduler:jar:2.5.2:provided
[INFO] 
org.apache.sling:org.apache.sling.repoinit.parser:jar:1.1.0:provided
[INFO] 
org.apache.sling:org.apache.sling.commons.classloader:jar:1.3.6:provided

[INFO]org.apache.sling:org.apache.sling.xss:jar:1.0.16:provided
[INFO] 
org.apache.sling:org.apache.sling.provisioning.model:jar:1.7.0:provided

[INFO]org.apache.sling:org.apache.sling.commons.mime:jar:2.1.10:provided
[INFO]org.apache.sling:org.apache.sling.event.dea:jar:1.1.0:provided
[INFO]org.apache.sling:org.apache.sling.auth.core:jar:1.3.22:provided

When I look in the /logs/error.log after startup I see exceptions like
'java.lang.NoClassDefFoundError: javax/jcr/RepositoryException'

I feel like I'm always just complaining but I'm afraid it would take way 
too much time to understand how the launchpad translates the txt files 
into installed Maven artifacts. Let alone fixing something there. OTOH I 
think the aspect I've mentioned in my last email is not unimportant.


Best,

Sandro


  1   2   3   >