This module is part of the Apache Sling project.
This is a sample using Sling Models, Sling Query, Sling Scripting Thymeleaf, Sling Validation, Sling Commons Messaging (latest snapshot) and Sling Commons Messaging Mail (latest snapshot).
As it is using some snapshots it might be unstable from time to time, feel free to ask on our mailing list if unsure!
Additional features used in this sample:
org.apache.sling.samples.fling.internal.Activator
Sling-Bundle-Resources
in pom.xml
Sling-Initial-Content
in pom.xml
maven-sling-plugin
in pom.xml
There are two profiles to install this sample with Maven Sling Plugin into a running local Sling instance for convenience:
When using Sling Launchpad listening on port 8080
with default admin credentials run:
mvn clean install -P launchpad@localhost
When using Apache Karaf with Sling's Karaf Features or Sling's Karaf Distribution listening on port 8181
with default admin credentials run:
mvn clean install -P karaf@localhost
This will install initial content under /apps/fling
and /content/fling
.
Browse to http://localhost:8080/fling.html or http://localhost:8181/fling.html.
To install the sling-samples-fling
feature with dependencies on Apache Karaf run the commands below:
karaf@root()> feature:repo-add mvn:org.apache.sling/org.apache.sling.launchpad.karaf-features/0.1.1-SNAPSHOT/xml/features karaf@root()> feature:install sling-launchpad-oak-tar karaf@root()> feature:install sling-samples-fling karaf@root()> feature:install sling-auth-form²
For a more detailed user profile add some properties to an user³:
curl -u admin -FfirstName=Foo -FlastName=Bar http://localhost:8181/system/userManager/user/admin.update.json
/fling/auth
) need authentication.org.apache.sling.jcr.jackrabbit.usermanager
or feature sling-jcr-jackrabbit-security
to be installed