Giter Club home page Giter Club logo

aem-htl-repl's Introduction

AEM HTL Read–Eval–Print Loop

A live code editing environment for HTL templates with optional server-side JavaScript logic, executed on an Adobe Experience Manager instance. This little tool is great for learning HTL and for experimenting with it, because the resulting output is displayed as you type.

Prerequisites

Adobe Experience Manager 6+, ideally running on port 4502 (if on a different port, adapt the instructions below).

Install

Based on what you feel most comfortable with, pick one of the two following methods.

Click Method

  1. Download the built package: com.adobe.granite.sightly.repl-1.0.4.zip
  2. On your running AEM instance, go to Package Manager, click on Upload Package, browse to the previously downloaded package, and hit OK.
  3. This will make a new package appear, called com.adobe.granite.sightly.repl-1.0.4.zip. Don't mind the missing dependencies, simply click the Install button and confirm.

Maven Method

  1. Checked-out this repository with Git clone.
  2. Build and install it with following command line instruction:
    mvn clean install content-package:install

Run

On your AEM instance, go to the following URL: /content/repl.html

aem-htl-repl's People

Contributors

gabrielwalt avatar olaf-otto avatar pvshum avatar raducotescu avatar tommaton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aem-htl-repl's Issues

Blank page on AEM 6.1

I'm using AEM 6.1 . When I installed package and run it I'm getting nothing. can someone help me on this

Update to content-package-maven plugin 0.0.24 to support latest maven / java versions

Currently, the packaging by the content package maven plugin may fail using java 1.8 + mvn 3.3.3:

[ERROR] Failed to execute goal com.day.jcr.vault:content-package-maven-plugin:0.0.20:package (default-package) on project com.adobe.granite.sightly.repl: Execution default-package of goal com.day.jcr.vault:content-package-maven-plugin:0.0.20:package failed: A required class was missing while executing com.day.jcr.vault:content-package-maven-plugin:0.0.20:package: org/slf4j/helpers/MarkerIgnoringBase
[ERROR] -----------------------------------------------------
[ERROR] realm =    extension>com.day.jcr.vault:content-package-maven-plugin:0.0.20
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/d:/repo/com/day/jcr/vault/content-package-maven-plugin/0.0.20/content-package-maven-plugin-0.0.20.jar
[ERROR] urls[1] = file:/d:/repo/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar
[ERROR] urls[2] = file:/d:/repo/org/codehaus/plexus/plexus-interpolation/1.11/plexus-interpolation-1.11.jar
[ERROR] urls[3] = file:/d:/repo/junit/junit/3.8.1/junit-3.8.1.jar
[ERROR] urls[4] = file:/d:/repo/org/apache/maven/maven-archiver/2.3/maven-archiver-2.3.jar
[ERROR] urls[5] = file:/d:/repo/org/codehaus/plexus/plexus-archiver/1.0-alpha-9/plexus-archiver-1.0-alpha-9.jar
[ERROR] urls[6] = file:/d:/repo/org/codehaus/plexus/plexus-io/1.0-alpha-1/plexus-io-1.0-alpha-1.jar
[ERROR] urls[7] = file:/d:/repo/org/codehaus/plexus/plexus-utils/1.4.9/plexus-utils-1.4.9.jar
[ERROR] urls[8] = file:/d:/repo/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
[ERROR] urls[9] = file:/d:/repo/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[10] = file:/d:/repo/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar
[ERROR] urls[11] = file:/d:/repo/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar
[ERROR] urls[12] = file:/d:/repo/commons-codec/commons-codec/1.2/commons-codec-1.2.jar
[ERROR] urls[13] = file:/d:/repo/org/codehaus/mojo/animal-sniffer-maven-plugin/1.8/animal-sniffer-maven-plugin-1.8.jar
[ERROR] urls[14] = file:/d:/repo/org/codehaus/mojo/animal-sniffer/1.8/animal-sniffer-1.8.jar
[ERROR] urls[15] = file:/d:/repo/org/ow2/asm/asm-all/4.0/asm-all-4.0.jar
[ERROR] urls[16] = file:/d:/repo/org/codehaus/mojo/java-boot-classpath-detector/1.8/java-boot-classpath-detector-1.8.jar
[ERROR] urls[17] = file:/d:/repo/org/apache/maven/reporting/maven-reporting-api/2.0.1/maven-reporting-api-2.0.1.jar
[ERROR] urls[18] = file:/d:/repo/org/apache/maven/doxia/doxia-sink-api/1.0-alpha-6/doxia-sink-api-1.0-alpha-6.jar
[ERROR] urls[19] = file:/d:/repo/commons-cli/commons-cli/1.0/commons-cli-1.0.jar
[ERROR] urls[20] = file:/d:/repo/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar
[ERROR] urls[21] = file:/d:/repo/org/apache/maven/shared/maven-common-artifact-filters/1.2/maven-common-artifact-filters-1.2.jar
[ERROR] urls[22] = file:/d:/repo/org/apache/maven/shared/maven-plugin-testing-harness/1.1/maven-plugin-testing-harness-1.1.jar
[ERROR] urls[23] = file:/d:/repo/org/apache/sling/org.apache.sling.commons.json/2.0.6/org.apache.sling.commons.json-2.0.6.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

This works, however, when using content-package-maven plugin 0.0.24. This currently is the latest version and should be configured explicitly IMO.

REPL does not work with AEM 6.1

Since AEM 6.1 uses the Sightly engine from Apache Sling, REPL needs to be adapted to read the generated Java classes from the new location.

install ends up with a zip instead of a jar

Hi,
I'm facing some time constraints and I haven't been able to verify this problem in detail but when I run an install from maven I always end up with a zip file and not wit a jar (and I'm not able to install the component as an OSGI bundle). Am I missing something (this component is not supposed to be installed as an OSGI bundle)?

Installing aem-sightly-repl\target\com.adobe.granite.sightly.repl-0.0.1-SNAPSHOT.zip to ...

thanks for letting met know,
Wim

Add favicon

Developers often use "Pin tab" feature in browser and this REPL is a tab I will probably never close. It would be nice to have favicon to distinguish REPL from other tabs without favicons.

AEM Package has Hobbes dependency

1.0.2 has a marked dependency on Hobbes package. I did not see how to obtain this dependency on the GH site (is this is a publicly available dependency?)

If its required the method for obtaining it should be clearly documented, if not it should be removed.

image

Allow the use of Java Use-API in the REPL

Though it is nice to prototype with JS, sometimes it is nicer to do it in Java. any plans on bringing in a (local to component) Logic.java file and allowing the use if Java Use in the REPL?

Build fails with check signature, not in GZIP format

Running the command
mvn clean install content-package:install

produces the following error and no package is built:
Failed to execute goal com.day.jcr.vault:content-package-maven-plugin:0.0.20:check-signature (default-check-signature) on project com.adobe.granite.sightly.repl: Failed to check signatures: Not in GZIP format

Is there anything else to try?

Exception thrown on AEM 6.2

Breaking exception thrown during evaluation of server-side JS:

  • Promise has completed with failure: Error: No resource found at path: /var/classes/sightly
 <div id="java" class="output-view editor hidden"
<h1>Error during include of component '/apps/repl/components/repl'</h1><h3>Error Message:</h3>
<pre>org.apache.sling.api.scripting.ScriptEvaluationException: org.apache.sling.scripting.sightly.SightlyException: Promise has completed with failure: Error: No resource found at path: /var/classes/sightly</pre><h3>Processing Info:</h3>
<table style='font-family: monospace'>
<tr><td>Page</td><td>=</td><td>/content/repl<td></tr><tr><td>Resource Path</td><td>=</td><td>/content/repl/jcr:content<td></tr><tr><td>Cell</td><td>=</td><td>repl<td></tr><tr><td>Cell Search Path</td><td>=</td><td>repl<td></tr><tr><td>Component Path</td><td>=</td><td>/apps/repl/components/repl<td></tr></table>
<h3>Sling Request Progress:</h3>
<pre>
      0 TIMER_START{Request Processing}
      0 COMMENT timer_end format is {&lt;elapsed msec&gt;,&lt;timer name&gt;} &lt;optional message&gt;
      0 LOG Method=GET, PathInfo=/content/repl.html
      0 TIMER_START{ResourceResolution}
      0 TIMER_END{0,ResourceResolution} URI=/content/repl.html resolves to Resource=JcrNodeResource, type=cq:Page, superType=null, path=/content/repl
      0 LOG Resource Path Info: SlingRequestPathInfo: path='/content/repl', selectorString='null', extension='html', suffix='null'
      0 TIMER_START{ServletResolution}
      0 TIMER_START{resolveServlet(/content/repl)}
      1 TIMER_END{1,resolveServlet(/content/repl)} Using servlet /libs/cq/Page/Page.jsp
      1 TIMER_END{1,ServletResolution} URI=/content/repl.html handled by Servlet=/libs/cq/Page/Page.jsp
      1 LOG Applying Requestfilters
      1 LOG Calling filter: com.adobe.granite.resourceresolverhelper.impl.ResourceResolverHelperImpl
      1 LOG Calling filter: org.apache.sling.bgservlets.impl.BackgroundServletStarterFilter
      1 LOG Calling filter: com.adobe.granite.rest.impl.servlet.ApiResourceFilter
      1 LOG Calling filter: org.apache.sling.i18n.impl.I18NFilter
      1 LOG Calling filter: com.adobe.granite.httpcache.impl.InnerCacheFilter
      1 LOG Calling filter: org.apache.sling.rewriter.impl.RewriterFilter
      1 LOG Calling filter: com.adobe.cq.mcm.campaign.servlets.CampaignCopyTracker
      1 LOG Calling filter: com.day.cq.wcm.core.impl.WCMRequestFilter
      1 LOG Calling filter: com.adobe.cq.history.impl.HistoryRequestFilter
      1 LOG Calling filter: com.adobe.granite.optout.impl.OptOutFilter
      1 LOG Calling filter: com.day.cq.wcm.foundation.forms.impl.FormsHandlingServlet
      1 LOG Calling filter: com.adobe.cq.social.commons.cors.CORSAuthenticationFilter
      1 LOG Calling filter: com.day.cq.analytics.provisioning.impl.UserAuthenticationRequestFilter
      1 LOG Calling filter: org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter
      1 LOG Calling filter: com.day.cq.wcm.mobile.core.impl.redirect.RedirectFilter
      1 LOG RedirectFilter did not redirect (not redirecting in author mode)
      1 LOG Calling filter: com.day.cq.wcm.core.impl.warp.TimeWarpFilter
      1 LOG Calling filter: com.day.cq.wcm.core.impl.AuthoringUIModeServiceImpl
      1 LOG Calling filter: org.apache.sling.security.impl.ContentDispositionFilter
      1 LOG Calling filter: com.adobe.granite.csrf.impl.CSRFFilter
      1 LOG Calling filter: com.adobe.granite.requests.logging.impl.RequestLoggerImpl
      1 LOG Calling filter: com.day.cq.dam.core.impl.servlet.ActivityRecordHandler
      1 LOG Calling filter: com.day.cq.dam.core.impl.assetlinkshare.AdhocAssetShareAuthHandler
      1 LOG Calling filter: com.adobe.cq.social.ugcbase.security.impl.SaferSlingPostServlet
      1 LOG Applying Componentfilters
      1 LOG Calling filter: com.day.cq.wcm.core.impl.WCMComponentFilter
      1 LOG Calling filter: com.day.cq.wcm.core.impl.WCMDebugFilter
      1 LOG Calling filter: com.day.cq.personalization.impl.TargetComponentFilter
      1 TIMER_START{/libs/cq/Page/Page.jsp#0}
      1 LOG Including resource JcrNodeResource, type=repl/components/repl, superType=null, path=/content/repl/jcr:content (SlingRequestPathInfo: path='/content/repl/jcr:content', selectorString='null', extension='html', suffix='null')
      1 TIMER_START{resolveServlet(/content/repl/jcr:content)}
      1 TIMER_END{0,resolveServlet(/content/repl/jcr:content)} Using servlet /apps/repl/components/repl/repl.html
      1 LOG Applying Includefilters
      1 LOG Calling filter: com.day.cq.wcm.core.impl.WCMDeveloperModeFilter
      1 LOG Calling filter: com.day.cq.wcm.core.impl.WCMComponentFilter
      1 LOG Calling filter: com.day.cq.wcm.core.impl.WCMDebugFilter
      1 LOG Calling filter: com.day.cq.personalization.impl.TargetComponentFilter
      1 TIMER_START{/apps/repl/components/repl/repl.html#1}
      3 LOG Found processor for post processing ProcessorConfiguration: {contentTypes=[text/html], order=-1, active=true, valid=true, processErrorResponse=true, pipeline=(generator=Config(type=htmlparser, config={}), transformers=(Config(type=linkchecker, config={}), Config(type=mobile, config=JcrPropertyMap [node=Node[NodeDelegate{tree=/libs/cq/config/rewriter/default/transformer-mobile: { jcr:primaryType = nt:unstructured, component-optional = true}}], values={jcr:primaryType=nt:unstructured, component-optional=true}]), Config(type=mobiledebug, config=JcrPropertyMap [node=Node[NodeDelegate{tree=/libs/cq/config/rewriter/default/transformer-mobiledebug: { jcr:primaryType = nt:unstructured, component-optional = true}}], values={jcr:primaryType=nt:unstructured, component-optional=true}]), Config(type=contentsync, config=JcrPropertyMap [node=Node[NodeDelegate{tree=/libs/cq/config/rewriter/default/transformer-contentsync: { jcr:primaryType = nt:unstructured, component-optional = true}}], values={jcr:primaryType=nt:unstructured, component-optional=true}]), serializer=Config(type=htmlwriter, config={}))}
     16 LOG SCRIPT ERROR: org.apache.sling.scripting.sightly.SightlyException: Promise has completed with failure: Error: No resource found at path: /var/classes/sightly
     16 TIMER_END{15,/apps/repl/components/repl/repl.html#1}
     18 TIMER_END{18,Request Processing} Dumping SlingRequestProgressTracker Entries
</pre>
<h3>Full Exception:</h3>
<pre>
org.apache.sling.api.scripting.ScriptEvaluationException: org.apache.sling.scripting.sightly.SightlyException: Promise has completed with failure: Error: No resource found at path: /var/classes/sightly

Note: I installed hobbes js 1.2.5 package to try to satisfy the AEM package dependency.

Missing Repo

Unfortunately, you cannot follow the instructions in the README for building the project with a vanilla maven setup as you will get a missing parent exception:

[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project com.adobe.granite:com.adobe.granite.sightly.repl:0.0.1-SNAPSHOT (/Users/dklco/git/aem-sightly-repl/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for com.adobe.granite:parent:32: Failure to find com.adobe:adobe:pom:6 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced @ com.adobe.granite:parent:32, /Users/dklco/.m2/repository/com/adobe/granite/parent/32/parent-32.pom, line 26, column 13 -> [Help 2]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

Would it be possible to just upload the package as a release artifact?

Aem pages are blank in edit mode (not seeing any side toggle bar) AEM 6.4.7

Got these in error.log

11.06.2020 09:55:25.328 WARN [0:0:0:0:0:0:0:1 [1591849525254] GET /libs/wcm/core/content/pageinfo.json HTTP/1.1] com.day.cq.wcm.core.impl.servlets.PageInfoServlet Configured provider com.adobe.cq.wcm.launches.impl.LaunchesInfoProvider not loaded for resource
"mypagepath"

11.06.2020 09:55:25.459 INFO [0:0:0:0:0:0:0:1 [1591849525458] GET /cmslibs/libs/cq/security/userinfo.json HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Resource /cmslibs/libs/cq/security/userinfo.json not found

11.06.2020 09:55:25.479 INFO [0:0:0:0:0:0:0:1 [1591849525472] GET /libs/wcm/core/content/components.1591849372838.json HTTP/1.1] com.day.cq.wcm.core.impl.components.ComponentServlet provided components.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.