-
Start AEM in debug mode with specific Run mode(s).
java -Xmx512m -jar cq-author-p4502.jar -Dsling.run.modes=author,local -debug 30303
-
Start AEM in debug mode with specific Run mode(s) and admin password set.
java -Xmx1024m -jar cq-author-p4502.jar -Dadmin.password=admin -debug 30303
java -Xmx1024m -jar cq-author-p4502.jar -nointeractive -debug 30303
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Using Google Core Library and Java 8 | |
public Map<String, Object> transformDictionary(Dictionary<String, Object> props) { | |
Iterator<String> keysIter = Iterators.forEnumeration(props.keys()); | |
return Maps.toMap(keysIter, props::get); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@include file="/libs/foundation/global.jsp"%><% | |
%><%@page session="false" contentType="text/html; charset=utf-8" | |
pageEncoding="UTF-8" | |
import="com.day.cq.dam.api.Asset, | |
com.day.cq.search.PredicateGroup, | |
com.day.cq.search.Query, | |
com.day.cq.search.QueryBuilder, | |
com.day.cq.search.result.Hit, | |
com.day.cq.search.result.SearchResult"%> | |
<%@ page import="org.apache.sling.api.resource.Resource" %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aemdir=/Users/hemanth/Projects/AEM_6_2_Instance/author | |
today="$(date +'%Y-%m-%d-%H-%M-%S')" | |
compactdir="$aemdir/help" | |
crxdir="$aemdir/crx-quickstart" | |
oakrun="$compactdir/oak-run-*.jar" | |
logfile="$compactdir/compact-log-$today.log" | |
echo "" > $logfile | |
echo "Compaction directory: ${compactdir}..." | tee -a $logfile | |
echo "Quickstart directory: ${crxdir}..." | tee -a $logfile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Generally AEM project can be created/structured leveraging Lazybones using the below command: | |
$ lazybones create aem-multimodule-project <project-directory-name> | |
Occationally, the above command fails to the project creation. | |
Unexpected failure: Connection reset | |
Cannot create a new project when the template isn't locally cached or no version is specified | |
In order to resolve the above error, we have to tweek the above command with the addition of relase version. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
path=/etc/workflow/instances/server0 | |
type=cq:Workflow | |
1_property=status | |
1_property.value=COMPLETED | |
p.limit=-1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bs4 import BeautifulSoup | |
import urllib.request | |
a={} | |
a = set() | |
f = open("output.txt","w") | |
with open('url.txt') as lines: | |
for line in lines: | |
#print(''.join(['URL: ', line])) |
- Goto OSGi-Felix-Console, http://localhost:4502/system/console/slinglog
- Set Logger as "org.apache.jackrabbit.vault.packaging.impl"
- Log Level to "Debug"
- Log File "logs/packagemanager.log"
- Folder to look for logs cq-quickstart/logs
Reference: https://stackoverflow.com/a/50325299/4802007
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package custom; | |
import com.fasterxml.jackson.databind.JsonNode; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import com.fasterxml.jackson.databind.node.ArrayNode; | |
import com.fasterxml.jackson.databind.node.ObjectNode; | |
import com.fasterxml.jackson.databind.node.ValueNode; | |
import org.apache.commons.io.FileUtils; | |
import org.apache.commons.io.IOUtils; | |
import org.apache.commons.lang3.StringUtils; |
OlderNewer