Commit 35747858 authored by Jeroen Hoffman's avatar Jeroen Hoffman

HIPPLUG-1481 fix for the example polldata XML imported into /polldemo, must be...

HIPPLUG-1481 fix for the example polldata XML imported into /polldemo, must be /polldata/{{ namespace}}.

Rename the new artifact "hippo-plugin-poll-essentials-demo-feature" in module "essentials-demo-feature"
parent a66db3e4
Running locally
===============
This project uses the Maven Cargo plugin to run Essentials, the CMS and site locally in Tomcat.
From the project root folder, execute:
How to generate a demo project for the Polls feature
----------------------------------------------------
mvn clean verify
mvn -P cargo.run
1) Generate a project from the archetype.
Access the Hippo Essentials at http://localhost:8080/essentials.
After your project is set up, access the CMS at http://localhost:8080/cms and the site at http://localhost:8080/site.
Logs are located in target/tomcat7x/logs
2) In essentials/pom.xml, add:
Building distribution
=====================
<dependency>
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-plugin-poll-essentials-demo-feature</artifactId>
<version>${hippo.plugin.poll.version}</version>
</dependency>
3) Build && run locally.
To build a Tomcat distribution tarball containing only deployable artifacts:
- With Essentials, set up with the default settings.
JSP for templating language is not supported for the Polls Demo feature.
mvn clean verify
mvn -P dist
- With Essentials, install Polls feature, then rebuild && run twice ((boarding, installing).
See also src/main/assembly/distribution.xml if you need to customize the distribution.
- With Essentials, install Polls Demo feature, then rebuild && run.
Using JRebel
============
4) Demo
Set the environment variable REBEL_HOME to the directory containing jrebel.jar.
Build with:
mvn clean verify -Djrebel
Start with:
mvn -P cargo.run -Djrebel
Best Practice for development
=============================
Use the option -Drepo.path=/some/path/to/repository during start up. This will avoid
your repository to be cleared when you do a mvn clean.
For example start your project with:
mvn -P cargo.run -Drepo.path=/home/usr/tmp/repo
or with jrebel:
mvn -P cargo.run -Drepo.path=/home/usr/tmp/repo -Djrebel
Hot deploy
==========
To hot deploy, redeploy or undeploy the CMS or site:
cd cms (or site)
mvn cargo:redeploy (or cargo:undeploy, or cargo:deploy)
Automatic Export
================
Automatic export of repository changes to the filesystem is turned on by default. To control this behavior, log into
http://localhost:8080/cms/console and press the "Enable/Disable Auto Export" button at the top right. To set this
as the default for your project edit the file
./bootstrap/configuration/src/main/resources/configuration/modules/autoexport-module.xml
Monitoring with JMX Console
===========================
You may run the following command:
jconsole
Now open the local process org.apache.catalina.startup.Bootstrap start
Visit http://localhost:8080/site/custompoll to see the custom poll directly in the site, or show it in the Channel
Manager preview. The standard poll component is first to be dragged onto a page (e.g. home) to become visible.
\ No newline at end of file
......@@ -6,12 +6,12 @@
<parent>
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-plugin-poll</artifactId>
<version>4.0.1-SNAPSHOT</version>
<version>4.1.0-SNAPSHOT</version>
</parent>
<name>Hippo Essentials Poll Plugin Demo</name>
<description>Hippo Essentials Poll Plugin Demo</description>
<artifactId>hippo-essentials-plugin-poll-demo</artifactId>
<artifactId>hippo-plugin-poll-essentials-demo-feature</artifactId>
<packaging>jar</packaging>
<properties>
......
<?xml version="1.0" encoding="UTF-8"?>
<instructions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.onehippo.org/essentials/instructions/instructions.xsd" xmlns="http://www.onehippo.org/essentials/instructions">
<instructions xmlns="http://www.onehippo.org/essentials/instructions">
<instructionSet>
<!-- load cnd -->
......@@ -14,30 +13,29 @@
<!-- group "freemarker" is used when that option is chosen in the general settings -->
<instructionSet group="freemarker">
<!-- custompoll.component.ftl created from contents of the standard template at
/hst:hst/hst:configurations/hst:default/hst:templates/poll.component.ftl plus some extra code to show the custom title -->
<freemarker action="copy" source="freemarker/custompoll.component.ftl" target="{{freemarkerRoot}}/{{namespace}}/custompoll.component.ftl"/>
<xml action="copy" source="freemarker/custompoll-template.xml" target="/hst:hst/hst:configurations/{{namespace}}/hst:templates"/>
</instructionSet>
<!-- group "jsp" is used when that option is chosen in the general settings -->
<instructionSet group="jsp">
<!-- TODO: create custompol.component.jsp also. Do the same for the jsp: -->
<!-- (this file was created from contents of the standard template at
/hst:hst/hst:configurations/hst:default/hst:templates/poll.component.ftl plus some extra code to show the custom title) -->
<!--<file action="copy" source="jsp/example.jsp" target="{{jspRoot}}/example.jsp"/>-->
<!--<xml action="copy" source="hst/example-template-jsp.xml" target="/hst:hst/hst:configurations/hst:default/hst:templates"/>-->
</instructionSet>
<!-- NOTE: there is no demo support for jsp -->
<!-- <instructionSet group="jsp"> -->
<!-- <file action="copy" source="jsp/example.jsp" target="{{jspRoot}}/example.jsp"/> -->
<!-- <xml action="copy" source="hst/example-template-jsp.xml" target="/hst:hst/hst:configurations/hst:default/hst:templates"/> -->
<!-- </instructionSet> -->
<!-- sample data -->
<instructionSet group="sampleData">
<!--<folder path="/content/documents/{{namespace}}/polls" template="xml/poll-folder.xml"/>-->
<xml action="copy" source="xml/content-custom-example-poll.xml" target="/content/documents/{{namespace}}/polls"/>
<xml action="copy" source="xml/custompoll-catalogitem.xml" target="/hst:hst/hst:configurations/{{namespace}}/hst:catalog/{{namespace}}-catalog"/>
<xml action="copy" source="xml/custompoll-page.xml" target="/hst:hst/hst:configurations/{{namespace}}/hst:pages"/>
<xml action="copy" source="xml/custompoll-sitemapitem.xml" target="/hst:hst/hst:configurations/{{namespace}}/hst:sitemap"/>
<xml action="copy" source="xml/custompoll-workspace-container.xml" target="/hst:hst/hst:configurations/{{namespace}}/hst:workspace/hst:containers"/>
<xml action="copy" source="xml/menu-item.xml" target="/hst:hst/hst:configurations/{{namespace}}/hst:workspace/hst:sitemenus/main"/>
<xml action="copy" source="xml/namespaceCustomDocument.xml" target="/hippo:namespaces/{{namespace}}"/>
<xml action="copy" source="xml/polldata-polldemo.xml" target="/"/>
<xml action="copy" source="xml/namespace-customPollDocument.xml" target="/hippo:namespaces/{{namespace}}"/>
<xml action="copy" source="xml/namespaced-polldata.xml" target="/polldata"/>
</instructionSet>
</instructions>
\ No newline at end of file
<essentials-simple-install-plugin
plugin-id="hippo-plugin-poll-essentials-demo-featureId"
has-sample-data="true">
</essentials-simple-install-plugin>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2016 Hippo B.V. (http://www.onehippo.com)
Copyright 2016-2017 Hippo B.V. (http://www.onehippo.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
......
<#--
Copyright 2016 Hippo B.V. (http://www.onehippo.com)
Copyright 2016-2017 Hippo B.V. (http://www.onehippo.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
......
{
"@type": "plugin",
"id": "hippo-essentials-plugin-poll-demoId",
"id": "hippo-plugin-poll-essentials-demoId",
"name": "Polls Demo",
"icon": "",
"introduction": "This plugin shows how you can extend the Poll plugin and use it in a custom document. NOTE: the Poll feature must be installed BEFORE this one for this feature to work.",
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2016 Hippo B.V. (http://www.onehippo.com)
Copyright 2016-2017 Hippo B.V. (http://www.onehippo.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2016 Hippo B.V. (http://www.onehippo.com)
Copyright 2016-2017 Hippo B.V. (http://www.onehippo.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2016 Hippo B.V. (http://www.onehippo.com)
Copyright 2016-2017 Hippo B.V. (http://www.onehippo.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2016 Hippo B.V. (http://www.onehippo.com)
Copyright 2016-2017 Hippo B.V. (http://www.onehippo.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2016 Hippo B.V. (http://www.onehippo.com)
Copyright 2016-2017 Hippo B.V. (http://www.onehippo.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2016 Hippo B.V. (http://www.onehippo.com)
Copyright 2016-2017 Hippo B.V. (http://www.onehippo.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
......@@ -14,7 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<sv:node xmlns:sv="http://www.jcp.org/jcr/sv/1.0" sv:name="polldemo">
<sv:node xmlns:sv="http://www.jcp.org/jcr/sv/1.0" sv:name="{{namespace}}">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>poll:polldata</sv:value>
</sv:property>
......
......@@ -162,7 +162,7 @@
<module>addon-cms</module>
<module>addon-repository</module>
<module>hst-client</module>
<module>hippo-essentials-plugin-poll-demo</module>
<module>essentials-demo-feature</module>
</modules>
</project>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment