Commit 347df5dd authored by Ate Douma's avatar Ate Douma

TRIVIAL cleanup master

parent 0058b29d
/*.iml
/.idea
/target
\ No newline at end of file
This diff is collapsed.
Hippo CMS7 Project Archetype
Copyright 2010-2018 Hippo B.V., Amsterdam, The Netherlands (http://www.onehippo.com/)
This product includes software developed by:
Hippo B.V., Amsterdam, The Netherlands (http://www.onehippo.com/);
The Apache Software Foundation (http://www.apache.org/).
NOTICE: Only our own original work is licensed under the terms of the
Apache License Version 2.0. The licenses of some libraries might impose
different redistribution or general licensing terms than those stated in the
Apache License. Users and redistributors are hereby requested to verify these
conditions and agree upon them.
\ No newline at end of file
# This is not the branch you're looking for...
BloomReach only provides the git trees for the release tags of Hippo CMS, as explained on https://www.onehippo.org/about/open-source-release-policy.html
To checkout the code for a specific release tag, after cloning this repository, use the following:
## to show the available tags
git tag
## to checkout a specific tag
git checkout <tag name>
## to modify a project
If you want to make modifications to a project, for example to create a patch, create a new fork branch from the specific tag like this:
git checkout -b forked-<tag name> <tag name>
For the latter, also see the **Build from Source** documentation at https://www.onehippo.org/library/development/build-hippo-cms-from-scratch.html
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2010-2018 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.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-cms7-project</artifactId>
<version>29.4-SNAPSHOT</version>
</parent>
<name>Hippo CMS7 Project Archetype</name>
<description>This project enables you to start with a skeleton project
gluing together all the necessary components and compatible versions.
</description>
<artifactId>hippo-project-archetype</artifactId>
<version>12.3.0-SNAPSHOT</version>
<packaging>maven-archetype</packaging>
<properties>
<notice.project.name>Hippo CMS7 Project Archetype</notice.project.name>
<gettingstarted.app.groupId>org.onehippo.cms7.hst</gettingstarted.app.groupId>
<gettingstarted.app.artifactId>gettingstarted</gettingstarted.app.artifactId>
<gettingstarted.app.version>0.1.0</gettingstarted.app.version>
<gettingstarted.app.name>Getting Started</gettingstarted.app.name>
<maven.archetype.plugin.version>2.4</maven.archetype.plugin.version>
<maven.antrun.plugin.version>1.8</maven.antrun.plugin.version>
</properties>
<distributionManagement>
<repository>
<name>Hippo Maven 2 Repository</name>
<id>hippo-maven2</id>
<url>https://maven.onehippo.com/content/repositories/releases</url>
<uniqueVersion>false</uniqueVersion>
</repository>
<snapshotRepository>
<id>hippo-maven2-snapshots</id>
<name>Hippo Maven 2 Snapshots Repository</name>
<url>https://maven.onehippo.com/content/repositories/snapshots</url>
<uniqueVersion>false</uniqueVersion>
</snapshotRepository>
</distributionManagement>
<repositories>
<repository>
<id>hippo</id>
<name>Hippo Maven 2</name>
<url>https://maven.onehippo.com/maven2/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<updatePolicy>never</updatePolicy>
</releases>
</repository>
</repositories>
<scm>
<connection>scm:git:https://code.onehippo.org/cms-community/hippo-project-archetype.git</connection>
<developerConnection>scm:git:git@code.onehippo.org:cms-community/hippo-project-archetype.git</developerConnection>
<url>https://code.onehippo.org/cms-community/hippo-project-archetype</url>
</scm>
<build>
<defaultGoal>package</defaultGoal>
<extensions>
<extension>
<groupId>org.apache.maven.archetype</groupId>
<artifactId>archetype-packaging</artifactId>
<version>${maven.archetype.plugin.version}</version>
</extension>
</extensions>
<testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-archetype-plugin</artifactId>
<version>${maven.archetype.plugin.version}</version>
<extensions>true</extensions>
<configuration>
<skip>${skipITs}</skip>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.7</version>
<executions>
<execution>
<!-- copy the Getting Started app to target/gettingstarted in the install phase -->
<id>copy-resources</id>
<phase>install</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/gettingstarted</outputDirectory>
<resources>
<resource>
<directory>${project.build.directory}/test-classes/projects/gettingstarted/project/gettingstarted</directory>
</resource>
</resources>
<includeEmptyDirs>true</includeEmptyDirs>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>pedantic</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<inherited>false</inherited>
<configuration>
<excludes combine.children="append">
<!-- skip archetype resources itself (but should not contain 3rd party copyrighted/licensed content) -->
<exclude>src/**</exclude>
<exclude>sync-marker.txt</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<archetype-descriptor
xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd"
name="Hippo Project"
partial="false">
<requiredProperties>
<requiredProperty key="groupId">
<defaultValue>org.example</defaultValue>
</requiredProperty>
<requiredProperty key="artifactId">
<defaultValue>myhippoproject</defaultValue>
</requiredProperty>
<requiredProperty key="version">
<defaultValue>0.1.0-SNAPSHOT</defaultValue>
</requiredProperty>
<requiredProperty key="projectName">
<defaultValue>My Hippo Project</defaultValue>
</requiredProperty>
</requiredProperties>
<fileSets>
<fileSet filtered="false" encoding="UTF-8">
<directory>src/main/assembly</directory>
<includes>
<include>**/*.xml</include>
</includes>
<excludes>
<exclude>shared-lib-development-data-component.xml</exclude>
</excludes>
</fileSet>
<fileSet filtered="true" encoding="UTF-8">
<directory>src/main/assembly</directory>
<includes>
<include>shared-lib-development-data-component.xml</include>
</includes>
</fileSet>
<fileSet filtered="true" encoding="UTF-8">
<directory>conf</directory>
<includes>
<include>**/log*.xml</include>
</includes>
</fileSet>
<fileSet filtered="false" encoding="UTF-8">
<directory>conf</directory>
<includes>
<include>context.xml</include>
<include>**/*.properties</include>
</includes>
</fileSet>
<fileSet>
<directory/>
<includes>
<include>README.txt</include>
<include>BUILD</include>
<include>hippo-cms7-release-pom.xml</include>
</includes>
</fileSet>
<!-- repository-data module -->
<fileSet filtered="true" encoding="UTF-8">
<directory>repository-data</directory>
<includes>
<include>pom.xml</include>
<include>README.txt</include>
</includes>
</fileSet>
<!-- repository-data-config module -->
<fileSet filtered="true" encoding="UTF-8">
<directory>repository-data/application/src/main/resources</directory>
<includes>
<include>**/*.yaml</include>
<include>**/*.cnd</include>
<include>**/*.xml</include>
</includes>
</fileSet>
<fileSet filtered="true" encoding="UTF-8">
<directory>repository-data/application</directory>
<includes>
<include>pom.xml</include>
</includes>
</fileSet>
<!-- repository-data-content module -->
<fileSet filtered="true" encoding="UTF-8">
<directory>repository-data/development/src/main/resources</directory>
<includes>
<include>**/*.yaml</include>
<include>**/*.cnd</include>
<include>**/*.xml</include>
</includes>
</fileSet>
<fileSet filtered="true" encoding="UTF-8">
<directory>repository-data/development</directory>
<includes>
<include>pom.xml</include>
</includes>
</fileSet>
<!-- repository-data-webfiles module -->
<fileSet filtered="true" encoding="UTF-8">
<directory>repository-data/webfiles/src/main/resources</directory>
<includes>
<include>**/*.yaml</include>
</includes>
</fileSet>
<fileSet filtered="false" encoding="UTF-8">
<directory>repository-data/webfiles/src/main/resources/site</directory>
<includes>
<include>**/**</include>
</includes>
</fileSet>
<fileSet filtered="true" encoding="UTF-8">
<directory>repository-data/webfiles</directory>
<includes>
<include>pom.xml</include>
</includes>
</fileSet>
<!-- cms module -->
<fileSet filtered="true" encoding="UTF-8">
<directory>cms/src/main/webapp</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.css</include>
</includes>
</fileSet>
<fileSet filtered="false" encoding="UTF-8">
<directory>cms/src/main/webapp</directory>
<includes>
<include>**/*.png</include>
<include>**/*.jsp</include>
</includes>
</fileSet>
<fileSet filtered="true" encoding="UTF-8">
<directory>cms/src/main/resources</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
</fileSet>
<fileSet filtered="false" encoding="UTF-8">
<directory>cms/src/main/resources</directory>
<includes>
<include>**/*.png</include>
</includes>
</fileSet>
<fileSet encoding="UTF-8">
<directory>cms/src/main/resources</directory>
<includes>
<include>**/*.dtd</include>
</includes>
</fileSet>
<fileSet filtered="true" encoding="UTF-8">
<directory>cms</directory>
<includes>
<include>pom.xml</include>
</includes>
</fileSet>
<!-- site module -->
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>site/src/main/java</directory>
<includes>
<include>**/*.java</include>
<include>**/*.properties</include>
</includes>
</fileSet>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<!-- packaged part -->
<directory>site/src/main/resources</directory>
<includes>
<include>componentsinfo/**/*.properties</include>
</includes>
</fileSet>
<fileSet filtered="true" encoding="UTF-8">
<!-- non packaged part -->
<directory>site/src/main/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<excludes>
<exclude>componentsinfo/**/*.properties</exclude>
</excludes>
</fileSet>
<fileSet filtered="true" encoding="UTF-8">
<directory>site/src/main/webapp</directory>
<excludes>
<exclude>**/WEB-INF/jsp/errorpages/*.jsp</exclude>
</excludes>
<includes>
<include>**/README</include>
<include>**/*.jsp</include>
<include>**/*.jspf</include>
<include>**/*.tag</include>
<include>**/*.xml</include>
<include>**/*.properties</include>
<include>**/*.psml</include>
</includes>
</fileSet>
<fileSet filtered="false" encoding="UTF-8">
<directory>site</directory>
<includes>
<include>build.properties-sample</include>
</includes>
</fileSet>
<fileSet filtered="false" encoding="UTF-8">
<directory>site/src/main/webapp</directory>
<includes>
<include>**/WEB-INF/jsp/errorpages/*.jsp</include>
</includes>
</fileSet>
<fileSet filtered="true" encoding="UTF-8">
<directory>site/src/test/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
</fileSet>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>site/src/test/java</directory>
<includes>
<include>**/*.java</include>
<include>**/*.properties</include>
</includes>
</fileSet>
<fileSet filtered="true" encoding="UTF-8">
<directory>site</directory>
<includes>
<include>pom.xml</include>
</includes>
</fileSet>
<!-- essentials-->
<fileSet filtered="true" encoding="UTF-8">
<directory>essentials</directory>
<includes>
<include>pom.xml</include>
<include>src/main/webapp/WEB-INF/web.xml</include>
<include>src/main/resources/project-settings.xml</include>
</includes>
</fileSet>
</fileSets>
</archetype-descriptor>
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:
mvn clean verify
mvn -P cargo.run
By default this includes and bootstraps repository data from the repository-data/development module,
which is deployed by cargo to the Tomcat shared/lib.
If you want or need to start *without* bootstrapping the development data, for example when testing
against an existing repository, you can specify the *additional* Maven profile without-development-data to do so:
mvn -P cargo.run,without-development-data
This additional profile will modify the target location for the development module to the Tomcat temp/ folder so that
it won't be seen and picked up during the repository bootstrap process.
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/tomcat8x/logs
Building distributions
======================
To build Tomcat distribution tarballs:
mvn clean verify
mvn -P dist
or
mvn -P dist-with-development-data
The `dist` profile will produce in the /target directory a distribution tarball, containing the main deployable wars and
shared libraries.
The `dist-with-development-data` profile will produce a distribution-with-development-data tarball, also containing the
repository-data-development jar in the shared/lib directory. This kind of distribution is meant to be used for
deployments to development environments, for instance local deployments or deployments to a continuous integration (CI)
system. (Initially, this module contains only "author" and "editor" example users for use in testing. Other data must be
placed in this module explicitly by developers, for demo or testing purposes, etc.)
See also src/main/assembly/*.xml if you need to customize the distributions.
Using JRebel
============
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
./repository-data/application/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
#set( $dollar = '$' )
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}</artifactId>
<version>${version}</version>
</parent>
<artifactId>${artifactId}-cms</artifactId>
<packaging>war</packaging>
<name>${projectName} CMS</name>
<description>${projectName} CMS</description>
<dependencies>
<dependency>
<groupId>org.onehippo.cms7.hst.dependencies</groupId>
<artifactId>hst-repository-dependencies</artifactId>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.onehippo.cms7.hst.dependencies</groupId>
<artifactId>hst-cms-dependencies</artifactId>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-package-cms-dependencies</artifactId>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-addon-channel-manager-frontend</artifactId>
</dependency>
<dependency>
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-addon-channel-manager-repository</artifactId>
</dependency>
<dependency>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}-repository-data-application</artifactId>
<version>${dollar}{project.version}</version>
</dependency>
<dependency>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}-repository-data-webfiles</artifactId>
<version>${dollar}{project.version}</version>
</dependency>
<dependency>
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-plugin-gallerypicker</artifactId>
</dependency>
<dependency>
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-plugin-resourcebundle-editor</artifactId>
</dependency>
<dependency>
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-plugin-selections-addon-cms</artifactId>
</dependency>
<dependency>
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-plugin-selections-addon-repository</artifactId>
</dependency>
</dependencies>
<build>
<finalName>cms</finalName>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<Hippo-Release-Version>${hippo.release.version}</Hippo-Release-Version>
<Project-Version>${project.version}</Project-Version>
<Project-Build>${buildNumber}</Project-Build>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<configuration>
<configuration>
<type>runtime</type>
</configuration>
<container>
<type>remote</type>
</container>
</configuration>
</plugin>
<plugin>
<groupId>org.onehippo.cms.l10n</groupId>
<artifactId>hippo-cms-l10n-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
<!doctype html>
<%@ page isErrorPage="true" %>
<% response.setStatus(500); %>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>500 error</title>
</head>
<body>
<h1>Server error</h1>
<% out.println("<!-- An unexcepted error occurred. The name of the exception is:"); %>
<%= exception %>
<% out.println("-->"); %>
</body>
</html>
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0"
id="cms">
<!-- General configuration -->
<display-name>${projectName} CMS</display-name>
<description>${projectName} CMS</description>
<context-param>
<description>The address of the repository</description>
<param-name>repository-address</param-name>
<param-value>vm://</param-value>
</context-param>
<context-param>
<description>The (relative) location where to store files</description>
<param-name>repository-directory</param-name>
<param-value>WEB-INF/storage</param-value>
</context-param>
<context-param>
<description>The location of the repository configuration file. Unless the location
starts with file://, the location is retrieved from within the application package as
resource.
</description>
<param-name>repository-config</param-name>
<param-value>repository.xml</param-value>
</context-param>
<!--No concurrent logins-->
<filter>
<filter-name>ConcurrentLogin</filter-name>
<filter-class>org.hippoecm.frontend.plugins.login.ConcurrentLoginFilter</filter-class>
</filter>
<!--Default application-->
<filter>
<filter-name>CMS</filter-name>
<filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
<init-param>
<param-name>config</param-name>
<param-value>cms</param-value>