Compare commits

...

44 Commits

Author SHA1 Message Date
alfresco-build
d040ceb60d [maven-release-plugin] prepare release alfresco-sdk-aggregator-3.0.0-beta-3 2016-09-05 14:35:25 +01:00
alfresco-build
a8db2ddde0 [maven-release-plugin] prepare for next development iteration 2016-09-05 14:25:15 +01:00
alfresco-build
c9d1878cb9 [maven-release-plugin] prepare release alfresco-sdk-aggregator-3.0.0-beta-3 2016-09-05 14:25:02 +01:00
Martin Bergljung
99c0a14220 Fix loading from META-INF in JAR, such as share-config-custom.xml, fix loading of resources such as /alfresco/test.html, #388 2016-08-26 09:12:17 +01:00
alfresco-build
6a1b09c102 [maven-release-plugin] prepare for next development iteration 2016-08-25 18:56:03 +01:00
alfresco-build
19d76702bd [maven-release-plugin] prepare release alfresco-sdk-aggregator-3.0.0-beta-2 2016-08-25 18:55:58 +01:00
Martin Bergljung
b88a0ae73b Removed the need for SDK version in RunMojo 2016-08-24 14:19:23 +01:00
alfresco-build
30d72ee6bd [maven-release-plugin] prepare for next development iteration 2016-08-22 11:35:10 +01:00
alfresco-build
75672bd2c4 [maven-release-plugin] prepare release alfresco-sdk-aggregator-3.0.0-beta-1 2016-08-22 11:35:00 +01:00
Ole Hejlskov
58843e516c Revert version after Bamboo failed 2016-08-22 12:28:48 +02:00
alfresco-build
db8c5e9cfd [maven-release-plugin] prepare release alfresco-sdk-aggregator-3.0.0-beta-1 2016-08-22 11:19:54 +01:00
alfresco-build
027ddb7df8 [maven-release-plugin] prepare for next development iteration 2016-08-22 11:09:33 +01:00
alfresco-build
9faf59972b [maven-release-plugin] prepare release alfresco-sdk-aggregator-3.0.0-beta-1 2016-08-22 11:09:29 +01:00
Ole Hejlskov
89566dc20b Don't hardcode a static copy of out dated h2 scripts 2016-08-22 11:57:27 +02:00
Ole Hejlskov
4bea907d8d Fix dynamic version for share-jar archetype as well 2016-08-22 11:53:59 +02:00
Martin Bergljung
89d4d7921a Fix dynamic setting of Alfresco Maven Plugin version 2016-08-22 10:52:04 +01:00
Martin Bergljung
c41d713643 For Solr data path on Windows machines 2016-08-22 10:08:27 +01:00
Martin Bergljung
a49c657441 Fixed content model to avoid confusion, remove property named property etc 2016-08-22 07:42:45 +01:00
Martin Bergljung
8968f8227b Fixed bug in share-jar project Alfresco Maven plugin config 2016-08-19 16:04:17 +01:00
Martin Bergljung
595a1c4cbc Fix mixup of module dependencies 2016-08-19 13:23:06 +01:00
Martin Bergljung
6bc23959b8 Added aikau.version prop and dependency so it can be brought in separately 2016-08-19 11:56:58 +01:00
Martin Bergljung
b84bcf798c Enterprise edition support, including license injection 2016-08-18 18:46:24 +01:00
Ole Hejlskov
38f69583d4 Bring back h2 support by copying them manually. Even though we have h2scripts from 5.1.e we don't have it for the older releases 2016-08-18 18:00:35 +02:00
Martin Bergljung
e997a33fc9 Fix h2 scripts for 5.0.[b|c], handle alfresco-platform or alfresco, clarify props docs 2016-08-18 13:49:41 +01:00
Martin Bergljung
07c06a2bbd Fixing hard-coded artifactId aio 2016-08-18 11:37:43 +01:00
Martin Bergljung
a724b3596e First take on supporting 4.2 in SDK 3, and fix WAR assembly 2016-08-18 09:41:42 +01:00
Martin Bergljung
d46fa394e7 Share JAR Maven Archetype for SKD 3.0 2016-08-16 15:56:37 +01:00
Martin Bergljung
101a04e309 Platform JAR Maven Archetype for SKD 3.0 2016-08-16 14:52:42 +01:00
Martin Bergljung
6eb8903562 AIO Maven Archetype for SKD 3.0 2016-08-16 11:06:24 +01:00
Martin Bergljung
4fca9989fd Added support for running version 5.0.x 2016-07-06 16:46:11 +01:00
Martin Bergljung
e8c1e19ecb Removed some params, changed module lists param names 2016-06-30 14:55:31 +01:00
Martin Bergljung
9ff222e8ed War assembly now handled by alfresco plugin, no need for war poms 2016-06-30 13:07:46 +01:00
Martin Bergljung
a05d69eac2 Removed context files for Share and Platform webapps, no longer needed, handled by jrebel 2016-06-27 15:47:16 +01:00
Martin Bergljung
e9fa82da5c Fixed refresh URL tomcat port default 2016-06-27 15:09:07 +01:00
Martin Bergljung
d2c6335869 Alfresco Maven plugin work for SDK 3 2016-06-23 12:38:59 +01:00
Ole Hejlskov
7c0ac3afb6 Remove AMP Mojo, we only need the archiver for the AMP assembly 2015-11-08 21:22:45 +01:00
Ole Hejlskov
2cbfd36041 Bump version to 3.0.0-SNAPSHOT 2015-11-06 21:23:23 +01:00
Ole Hejlskov
9faf5114f3 Initial attempt at a JAR runner mojo 2015-11-06 21:22:58 +01:00
Ole Hejlskov
27bcaa3daf Revert "Revert "DEVPLAT-338, Incorrect naming of AIO AMPs, #311""
This reverts commit b2afebed09.
2015-11-06 21:16:57 +01:00
Ole Hejlskov
8f29244d99 Changed my info for future reference. I no longer work with Magenta 2015-10-19 17:55:01 +02:00
Ole Hejlskov
87af573673 Updated README with 2.1.1 information 2015-10-19 17:15:50 +02:00
alfresco-build
d53184196b [maven-release-plugin] prepare for next development iteration 2015-10-19 11:20:20 +01:00
alfresco-build
4431863500 [maven-release-plugin] prepare release alfresco-sdk-aggregator-2.1.1 2015-10-19 11:20:15 +01:00
alfresco-build
d2e9b89720 [maven-release-plugin] prepare for next development iteration 2015-10-09 15:34:00 +01:00
196 changed files with 4096 additions and 4954 deletions

View File

@@ -6,6 +6,8 @@ This is the home of the Alfresco SDK. The Alfresco SDK is used by developers to
This project is released under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html). If you are an Enterprise customer check the [Support](#alfresco-enterprise-customers-and-partners-support) section.
## News
- 2015-10-19: SDK 2.1.1 released to Maven Central. Docs for [Community](http://docs.alfresco.com/community/concepts/alfresco-sdk-intro.html), [Enterprise](http://docs.alfresco.com/5.0/concepts/alfresco-sdk-intro.html), [Release notes](https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-sdk-aggregator/latest/github-report.html)
- 2015-05-20: SDK 2.1.0 released to Maven Central. Docs for [Community](http://docs.alfresco.com/community/concepts/alfresco-sdk-intro.html), [Enterprise](http://docs.alfresco.com/5.0/concepts/alfresco-sdk-intro.html), [Release notes](https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-sdk-aggregator/latest/github-report.html)
- 2014-12-23: SDK 2.0.0 release to Maven Central. [Docs](http://docs.alfresco.com/sdk2.0/concepts/alfresco-sdk-intro.html), [Release Notes](https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-sdk-aggregator/archive/2.0.0/github-report.htm)
- 2014-08-22: First SNAPSHOT of SDK 2.0.0 in the [OSS Sonatype Repository](https://oss.sonatype.org/content/repositories/snapshots/org/alfresco/maven/alfresco-sdk-parent/2.0.0-SNAPSHOT/)!
@@ -14,7 +16,7 @@ This project is released under the [Apache License, Version 2.0](http://www.apac
## User Getting Started
### Latest Documentation
To get started with Alfresco SDK 2.1 (latest) visit the offical Alfresco Documentation for:
To get started with Alfresco SDK 2.1.1 (latest) visit the offical Alfresco Documentation for:
- [Alfresco Community 5.0.d and above](http://docs.alfresco.com/community/concepts/alfresco-sdk-intro.html)
- [Alfresco Enterprise 5.0.1 and above](http://docs.alfresco.com/5.0/concepts/alfresco-sdk-intro.html)

View File

@@ -11,7 +11,7 @@
<parent>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-sdk-aggregator</artifactId>
<version>2.1.1-beta-3</version>
<version>3.0.0-beta-3</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<archetype-descriptor
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="All In One Archetype for Alfresco. Provides rapid development, IDE integration, and running embedded of Alfresco Repo, Share and Solr"
name="Alfresco All In One (AIO) Archetype."
xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<requiredProperties>
@@ -10,8 +10,16 @@
</requiredProperty>
</requiredProperties>
<modules>
<module id="repo-amp" dir="repo-amp" name="repo-amp">
<module id="${rootArtifactId}-platform-jar"
name="${rootArtifactId}-platform-jar"
dir="__rootArtifactId__-platform-jar">
<fileSets>
<fileSet filtered="false" packaged="false" encoding="UTF-8">
<directory>src/main/assembly</directory>
<includes>
<include>**/*.xml</include>
</includes>
</fileSet>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/main/java</directory>
<includes>
@@ -25,18 +33,20 @@
</includes>
</fileSet>
<fileSet encoding="UTF-8" filtered="false">
<directory>src/main/amp</directory>
<directory>src/main/resources</directory>
<includes>
<include>**</include>
</includes>
<excludes>
<exclude>**/*-context.xml</exclude>
<exclude>**/log4j.properties</exclude>
</excludes>
</fileSet>
<fileSet encoding="UTF-8" filtered="true" packaged="false">
<directory>src/main/amp</directory>
<directory>src/main/resources</directory>
<includes>
<include>**/*-context.xml</include>
<include>**/log4j.properties</include>
</includes>
</fileSet>
<fileSet encoding="UTF-8" filtered="false">
@@ -54,7 +64,9 @@
</fileSets>
</module>
<module id="share-amp" dir="share-amp" name="share-amp">
<module id="${rootArtifactId}-share-jar"
name="${rootArtifactId}-share-jar"
dir="__rootArtifactId__-share-jar" >
<fileSets>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/main/java</directory>
@@ -69,19 +81,19 @@
</includes>
</fileSet>
<fileSet filtered="true" packaged="false" encoding="UTF-8">
<directory>src/main/amp/config/alfresco/web-extension</directory>
<directory>src/main/resources/alfresco/web-extension</directory>
<includes>
<include>__artifactId__-slingshot-application-context.xml</include>
</includes>
</fileSet>
<fileSet filtered="true" packaged="false" encoding="UTF-8">
<directory>src/main/amp/config/alfresco/web-extension/site-data/extensions</directory>
<directory>src/main/resources/alfresco/web-extension/site-data/extensions</directory>
<includes>
<include>__artifactId__-example-widgets.xml</include>
</includes>
</fileSet>
<fileSet encoding="UTF-8" filtered="false">
<directory>src/main/amp</directory>
<directory>src/main/resources</directory>
<includes>
<include>**</include>
</includes>
@@ -96,91 +108,24 @@
<include>**</include>
</includes>
</fileSet>
<fileSet encoding="UTF-8" filtered="false">
<directory>src/main/resources</directory>
<includes>
<include>**</include>
</includes>
</fileSet>
</fileSets>
</module>
<module id="repo" dir="repo" name="repo">
<fileSets>
<fileSet encoding="UTF-8" filtered="false">
<directory>src/main/properties</directory>
<includes>
<include>**/*.properties</include>
</includes>
</fileSet>
<fileSet encoding="UTF-8" filtered="true">
<directory>src/main/resources/alfresco/extension</directory>
<includes>
<include>dev-log4j.properties</include>
</includes>
</fileSet>
<fileSet encoding="UTF-8" filtered="false">
<directory>src/main/resources</directory>
<includes>
<include>**</include>
</includes>
<excludes>
<exclude>**/dev-log4j.properties</exclude>
</excludes>
</fileSet>
</fileSets>
</module>
<module id="solr4" dir="solr-config" name="solr4" filtered="false">
</module>
<module id="share" dir="share" name="share" filtered="false">
<fileSets>
<fileSet encoding="UTF-8" filtered="false">
<directory>src/main/resources</directory>
<includes>
<include>**</include>
</includes>
</fileSet>
<fileSet filtered="true" packaged="false" encoding="UTF-8">
<directory>src/test/resources</directory>
<includes>
<include>**</include>
</includes>
</fileSet>
</fileSets>
</module>
<module id="runner" dir="runner" name="runner" filtered="false">
<fileSets>
<fileSet encoding="UTF-8" filtered="false">
<directory>tomcat</directory>
<includes>
<include>**</include>
</includes>
</fileSet>
<fileSet encoding="UTF-8" filtered="false">
<directory>test-ng</directory>
<includes>
<include>**</include>
</includes>
</fileSet>
<fileSet encoding="UTF-8" filtered="false">
<directory>src/main/webapp</directory>
<includes>
<include>**</include>
</includes>
</fileSet>
</fileSets>
</module>
</modules>
<fileSets>
<fileSet encoding="UTF-8">
<directory>src</directory>
<includes>
<include>**</include>
</includes>
</fileSet>
<fileSet encoding="UTF-8">
<directory></directory>
<includes>
<include>run.sh</include>
<include>run.bat</include>
<include>README.md</include>
</includes>
</fileSet>
</fileSets>

View File

@@ -0,0 +1,34 @@
# Alfresco AIO Project - SDK 3
This is an All-In-One (AIO) project for Alfresco SDK 3.0.
Run with `mvn clean install -DskipTests=true alfresco:run` or `./run.sh` and verify that it
* Runs the embedded Tomcat + H2 DB
* Runs Alfresco Platform (Repository)
* Runs Alfresco Solr4
* Runs Alfresco Share
* Packages both as JAR and AMP assembly for modules
# Few things to notice
* No parent pom
* No WAR projects, all handled by the Alfresco Maven Plugin
* No runner project - it's all in the Alfresco Maven Plugin
* Standard JAR packaging and layout
* Works seamlessly with Eclipse and IntelliJ IDEA
* JRebel for hot reloading, JRebel maven plugin for generating rebel.xml, agent usage: `MAVEN_OPTS=-Xms256m -Xmx1G -agentpath:/home/martin/apps/jrebel/lib/libjrebel64.so`
* AMP as an assembly
* [Configurable Run mojo](https://github.com/Alfresco/alfresco-sdk/blob/sdk-3.0/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/RunMojo.java) in the `alfresco-maven-plugin`
* No unit testing/functional tests just yet
* Resources loaded from META-INF
* Web Fragment (this includes a sample servlet configured via web fragment)
# TODO
* Abstract assembly into a dependency so we don't have to ship the assembly in the archetype
* Purge
* Functional/remote unit tests

View File

@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>
<artifactId>${artifactId}</artifactId>
<name>Alfresco Platform/Repository JAR Module</name>
<description>Platform/Repo JAR Module (to be included in the alfresco.war) - part of AIO - SDK 3
</description>
<packaging>jar</packaging>
<parent>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}</artifactId>
<version>${version}</version>
</parent>
<properties>
</properties>
<dependencies>
<!-- The main Alfresco Repo dependency for compiling Java code in src/main/java -->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-repository</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

View File

@@ -0,0 +1,27 @@
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd">
<id>build-amp-file</id>
<formats>
<format>amp</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<files>
<file>
<source>src/main/resources/alfresco/module/${project.artifactId}/module.properties</source>
<filtered>true</filtered>
</file>
</files>
<dependencySets>
<dependencySet>
<outputDirectory>lib</outputDirectory>
</dependencySet>
</dependencySets>
</assembly>

View File

@@ -1,7 +1,7 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.demoamp;
package ${package}.platformsample;
/**
* This class does nothing except dump some output to <i>system.out</i>.
@@ -13,6 +13,6 @@ public class Demo
{
public void init()
{
System.out.println("SDK Demo AMP class has been loaded");
System.out.println("Platform JAR Module class has been loaded");
}
}

View File

@@ -17,7 +17,7 @@ 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.
*/
package ${package}.demoamp;
package ${package}.platformsample;
import org.alfresco.repo.module.AbstractModuleComponent;
import org.alfresco.repo.nodelocator.NodeLocatorService;
@@ -55,7 +55,7 @@ public class DemoComponent extends AbstractModuleComponent {
@Override
protected void executeInternal() throws Throwable {
System.out.println("DemoComponent has been executed");
log.debug("Test debug logging. Congratulation your AMP is working");
log.debug("Test debug logging. Congratulation your JAR Module is working");
log.info("This is only for information purposed. Better remove me from the log in Production");
}

View File

@@ -17,7 +17,7 @@ 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.
*/
package ${package}.demoamp;
package ${package}.platformsample;
import org.springframework.extensions.webscripts.Cache;
import org.springframework.extensions.webscripts.DeclarativeWebScript;

View File

@@ -1,5 +1,5 @@
## This Alfresco Repo Configuration file should be used for custom properties that are introduced by this module.
## This Alfresco Platform Configuration file should be used for custom properties that are introduced by this module.
## Define default values for all properties here.
## System Administrators can override these values in environment specific configurations in
## alfresco/tomcat/shared/classes/alfresco-global.properties.
##
##

View File

@@ -10,7 +10,6 @@
<!-- The bootstrap-context.xml file is used for patch definitions, importers,
workflow, and loading custom content models. -->
<!-- Registration of new models -->
<bean id="${package}.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
<property name="models">
@@ -19,8 +18,23 @@
<value>alfresco/module/${project.artifactId}/model/workflow-model.xml</value>
</list>
</property>
<property name="labels">
<list>
<!-- Bootstrap Resource Bundles for the content model types, aspects, properties etc -->
<value>alfresco/module/${project.artifactId}/messages/content-model</value>
</list>
</property>
</bean>
<bean id="${package}.sampleprocess.workflowBootstrap" parent="workflowDeployer">
<property name="workflowDefinitions">
<list>
<props>
<prop key="engineId">activiti</prop>
<prop key="location">alfresco/module/${project.artifactId}/workflow/sample-process.bpmn20.xml</prop>
<prop key="mimetype">text/xml</prop>
</props>
</list>
</property>
</bean>
</beans>

View File

@@ -22,13 +22,13 @@
<beans>
<!-- A simple class that is initialized by Spring -->
<bean id="${package}.exampleBean" class="${package}.demoamp.Demo" init-method="init" />
<bean id="${package}.exampleBean" class="${package}.platformsample.Demo" init-method="init" />
<!-- A simple module component that will be executed once.
Note. this module component will only be executed once, and then there will be an entry for it in the Repo.
So doing for example $ mvn clean install -Prun twice will only execute this component the first time.
You need to remove /alf_data_dev for it to be executed again. -->
<bean id="${package}.exampleComponent" class="${package}.demoamp.DemoComponent" parent="module.baseComponent" >
<bean id="${package}.exampleComponent" class="${package}.platformsample.DemoComponent" parent="module.baseComponent" >
<property name="moduleId" value="${artifactId}" /> <!-- See module.properties -->
<property name="name" value="exampleComponent" />
<property name="description" value="A demonstration component" />

View File

@@ -20,8 +20,8 @@
limitations under the License.
-->
<beans>
<bean id="webscript.helloworld.get"
class="${package}.demoamp.HelloWorldWebScript"
<bean id="webscript.alfresco.tutorials.helloworld.get"
class="${package}.platformsample.HelloWorldWebScript"
parent="webscript">
</bean>
</beans>

View File

@@ -40,4 +40,4 @@
# those in the webapp's main log4j.properties.
#
#-----------------------------------------------------------------------
log4j.logger.${package}.demoamp.DemoComponent=debug
log4j.logger.${package}.platformsample.DemoComponent=debug

View File

@@ -0,0 +1,6 @@
# This file should contain content model labels
acme_contentModel.type.acme_document.title=ACME Document
acme_contentModel.aspect.acme_securityClassified.title=ACME Security Classified
acme_contentModel.property.acme_documentId.title=Document Id
acme_contentModel.property.acme_securityClassification.title=Security Classification

View File

@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8"?>
<model name="acme:contentModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!-- Optional meta-data about the model -->
<description>Sample Document Model</description>
<author>My Name</author>
<version>1.0</version>
<imports>
<!-- Import Alfresco Dictionary Definitions -->
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
<!-- Import Alfresco Content Domain Model Definitions -->
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
<!-- Import Alfresco System Model Definitions -->
<import uri="http://www.alfresco.org/model/system/1.0" prefix="sys"/>
</imports>
<!-- Custom namespace for the ACME company -->
<namespaces>
<namespace uri="http://www.acme.org/model/content/1.0" prefix="acme"/>
</namespaces>
<constraints>
<constraint name="acme:securityClassificationOptions" type="LIST">
<parameter name="allowedValues">
<list>
<value></value>
<!-- Empty for default search-->
<value>Public</value>
<value>Client Confidential</value>
<value>Company Confidential</value>
<value>Strictly Confidential</value>
</list>
</parameter>
</constraint>
</constraints>
<!-- ===============================================================================================================
Constraints, Types, and Aspects go here...
-->
<types>
<!--
ACME Enterprise-wide Document root type.
All other custom document types would extend this one.
-->
<type name="acme:document">
<title>Sample Document Type</title>
<parent>cm:content</parent>
<properties>
<property name="acme:documentId">
<title>Document Identification Number</title>
<type>d:text</type>
</property>
</properties>
<mandatory-aspects>
<aspect>acme:securityClassified</aspect>
</mandatory-aspects>
</type>
</types>
<aspects>
<!-- A document can have security classification applied and
faceted search is specifically enabled for best performance and we change
default index config to not tokenize the value. -->
<aspect name="acme:securityClassified">
<title>ACME Security Classified</title>
<description>Content has been security classified</description>
<properties>
<property name="acme:securityClassification">
<type>d:text</type>
<index enabled="true">
<atomic>true</atomic>
<stored>false</stored>
<tokenised>false</tokenised>
<facetable>true</facetable>
</index>
<constraints>
<constraint ref="acme:securityClassificationOptions"/>
</constraints>
</property>
</properties>
</aspect>
</aspects>
</model>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<model name="myw:workflowModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<model name="acmew:workflowModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!-- Optional meta-data about the model -->
<description>Workflow Model for Repo Extension X</description>
<description>Sample Workflow Model</description>
<author>My Name</author>
<version>1.0</version>
@@ -16,7 +16,7 @@
<!-- Custom namespace for your domain -->
<namespaces>
<namespace uri="http://www.mycompany.com/model/workflow/1.0" prefix="myw"/>
<namespace uri="http://www.acme.org/model/workflow/1.0" prefix="acmew"/>
</namespaces>
<!-- ===============================================================================================================

View File

@@ -24,7 +24,7 @@ module.id=${project.artifactId}
#module.aliases=myModule-123, my-module
module.title=${project.name}
module.description=${project.description}
module.version=${noSnapshotVersion}
module.version=${project.version}
# The following optional properties can be used to prevent the module from being added
# to inappropriate versions of the WAR file.

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn"
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"
xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema"
expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
<process id="my-process">
<startEvent id="start" />
<sequenceFlow id="flow1" sourceRef="start" targetRef="someTask" />
<userTask id="someTask" name="Activiti is awesome!" />
<sequenceFlow id="flow2" sourceRef="someTask" targetRef="end" />
<endEvent id="end" />
</process>
</definitions>

View File

@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>
<artifactId>${artifactId}</artifactId>
<name>Alfresco Share JAR Module</name>
<packaging>jar</packaging>
<description>Sample Share JAR Module (to be included in the share.war) - part of AIO - SDK 3</description>
<parent>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}</artifactId>
<version>${version}</version>
</parent>
<properties>
</properties>
<!-- Following dependencies are needed for compiling Java code in src/main/java;
<scope>provided</scope> is inherited for each of the following;
for more info, please refer to alfresco-platform-distribution POM -->
<dependencies>
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>${alfresco.share.war.artifactId}</artifactId>
<classifier>classes</classifier>
</dependency>
<dependency>
<groupId>org.alfresco.surf</groupId>
<artifactId>spring-surf-api</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,26 @@
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd">
<id>build-amp-file</id>
<formats>
<format>amp</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<files>
<file>
<source>${project.basedir}/src/main/resources/alfresco/module/${project.artifactId}/module.properties</source>
<filtered>true</filtered>
</file>
</files>
<dependencySets>
<dependencySet>
<outputDirectory>lib</outputDirectory>
</dependencySet>
</dependencySets>
</assembly>

View File

@@ -0,0 +1,420 @@
<!-- Share configuration related to this particular Share module extension, such as:
- Doclib action config
- Form config
- Aspect and Type config
- Advanced Search
Note. Any configuration related to the whole Share.war webapp
(i.e. not specific to this share extension) should be
placed in the environment specific config file:
alfresco/tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml
-->
<alfresco-config>
<!--================================================================================================================
Make custom types and aspects visible in "Change Type" and "Manage Aspects" actions.
This will also make them visible when creating rules.
(will be merged with out-of-the-box configured types and aspects)
=============================================================================================================-->
<config evaluator="string-compare" condition="DocumentLibrary">
<aspects>
<visible>
<aspect name="acme:securityClassified"/>
</visible>
<addable> <!-- defaults to visible config -->
</addable>
<removeable> <!-- defaults to visible config -->
</removeable>
</aspects>
<types>
<!-- Define the ACME base doc type as decedent from cm:content -->
<type name="cm:content">
<subtype name="acme:document"/>
</type>
</types>
</config>
<!--================================================================================================================
Advanced Search Forms for types
(search forms for aspects are not available)
=============================================================================================================-->
<config evaluator="string-compare" condition="AdvancedSearch" replace="true">
<advanced-search>
<forms>
<!-- Standard out-of-the-box types -->
<form labelId="search.form.label.cm_content" descriptionId="search.form.desc.cm_content">cm:content
</form>
<form labelId="search.form.label.cm_folder" descriptionId="search.form.desc.cm_folder">cm:folder</form>
<!-- Custom type -->
<form labelId="form.label.advancedsearch.acmeDocument"
descriptionId="form.description.advancedsearch.acmeDocument">acme:document
</form>
</forms>
</advanced-search>
</config>
<!--================================================================================================================
View, Edit, Create, and Search forms for custom types
The following form configurations for the custom types
have not been created from scratch. We have instead copied
out-of-the-box form configurations for cm:content and cm:folder
from the tomcat/webapps/share/WEB-INF/classes/alfresco/share-form-config.xml file
in a standard Alfresco installation (with the version matching)
and used them as a starting point.
=============================================================================================================-->
<!-- __________________________________ acme:document base type _________________________________________________-->
<!-- View and Edit forms for acme:document -->
<config evaluator="node-type" condition="acme:document">
<forms>
<!-- Default form configuration for the cm:content type -->
<form>
<field-visibility>
<show id="cm:name"/>
<show id="cm:title" force="true"/>
<show id="cm:description" force="true"/>
<show id="mimetype"/>
<show id="cm:author" force="true"/>
<show id="size" for-mode="view"/>
<show id="cm:creator" for-mode="view"/>
<show id="cm:created" for-mode="view"/>
<show id="cm:modifier" for-mode="view"/>
<show id="cm:modified" for-mode="view"/>
<!-- tags and categories -->
<show id="cm:taggable" for-mode="edit" force="true"/>
<show id="cm:categories"/>
<!-- cm:dublincore aspect -->
<show id="cm:publisher"/>
<show id="cm:contributor"/>
<show id="cm:type"/>
<show id="cm:identifier"/>
<show id="cm:dcsource"/>
<show id="cm:coverage"/>
<show id="cm:rights"/>
<show id="cm:subject"/>
<!-- cm:complianceable aspect -->
<show id="cm:removeAfter"/>
<!-- cm:effectivity aspect -->
<show id="cm:from"/>
<show id="cm:to"/>
<!-- cm:summarizable aspect -->
<show id="cm:summary"/>
<!-- cm:translatable aspect -->
<show id="cm:translations"/>
<!-- cm:localizable aspect -->
<show id="cm:locale"/>
<!-- cm:ownable aspect -->
<show id="cm:owner"/>
<!-- cm:attachable aspect -->
<show id="cm:attachments"/>
<!-- cm:emailed aspect -->
<show id="cm:originator"/>
<show id="cm:addressee"/>
<show id="cm:addressees"/>
<show id="cm:sentdate"/>
<show id="cm:subjectline"/>
<!-- exif:exif aspect -->
<show id="exif:dateTimeOriginal"/>
<show id="exif:pixelXDimension"/>
<show id="exif:pixelYDimension"/>
<show id="exif:exposureTime"/>
<show id="exif:fNumber"/>
<show id="exif:flash"/>
<show id="exif:focalLength"/>
<show id="exif:isoSpeedRatings"/>
<show id="exif:manufacturer"/>
<show id="exif:model"/>
<show id="exif:software"/>
<show id="exif:orientation"/>
<show id="exif:xResolution"/>
<show id="exif:yResolution"/>
<show id="exif:resolutionUnit"/>
<!-- audio:audio aspect -->
<show id="audio:album"/>
<show id="audio:artist"/>
<show id="audio:composer"/>
<show id="audio:engineer"/>
<show id="audio:genre"/>
<show id="audio:trackNumber"/>
<show id="audio:releaseDate"/>
<show id="audio:sampleRate"/>
<show id="audio:sampleType"/>
<show id="audio:channelType"/>
<show id="audio:compressor"/>
<!-- cm:indexControl aspect -->
<show id="cm:isIndexed"/>
<show id="cm:isContentIndexed"/>
<!-- cm:geographic aspect -->
<show id="cm:latitude"/>
<show id="cm:longitude"/>
<!-- surf:widget aspect -->
<show id="surf:widgetType"/>
<show id="surf:mid"/>
<show id="surf:label"/>
<!-- ACME custom props -->
<show id="acme:documentId" force="true"/>
<show id="acme:securityClassification"/>
</field-visibility>
<appearance>
<field id="cm:name">
<control>
<control-param name="maxLength">255</control-param>
</control>
</field>
<field id="cm:title">
<control template="/org/alfresco/components/form/controls/textfield.ftl"/>
</field>
<field id="cm:description">
<control>
<control-param name="activateLinks">true</control-param>
</control>
</field>
<set id="cm:content2cols" template="/org/alfresco/components/form/2-column-set.ftl"/>
<field set="cm:content2cols" id="mimetype">
<control template="/org/alfresco/components/form/controls/mimetype.ftl"/>
</field>
<field set="cm:content2cols" id="size">
<control template="/org/alfresco/components/form/controls/size.ftl"/>
</field>
<field set="cm:content2cols" id="cm:creator"/>
<field set="cm:content2cols" id="cm:created"/>
<field set="cm:content2cols" id="cm:modifier"/>
<field set="cm:content2cols" id="cm:modified"/>
<field id="cm:taggable">
<control>
<control-param name="compactMode">true</control-param>
<control-param name="params">aspect=cm:taggable</control-param>
<control-param name="createNewItemUri">/api/tag/workspace/SpacesStore</control-param>
<control-param name="createNewItemIcon">tag</control-param>
</control>
</field>
<field id="cm:categories">
<control>
<control-param name="compactMode">true</control-param>
</control>
</field>
<field id="cm:originator" read-only="true"/>
<field id="cm:addressee" read-only="true"/>
<field id="cm:addressees" read-only="true"/>
<field id="cm:sentdate" read-only="true"/>
<field id="cm:subjectline" read-only="true"/>
<!-- ACME Props appearance -->
<set id="acmeDocSet" appearance="bordered-panel" label-id="form.set.label.acme.document"/>
<field id="acme:documentId" label-id="form.field.label.acme.documentId" set="acmeDocSet">
<control template="/org/alfresco/components/form/controls/textfield.ftl"/>
</field>
<field id="acme:securityClassification" label-id="form.field.label.acme.securityClassification"
set="acmeDocSet"/>
</appearance>
</form>
<!-- Document Library pop-up Edit Metadata form -->
<form id="doclib-simple-metadata">
<field-visibility>
<show id="cm:name"/>
<show id="cm:title" force="true"/>
<show id="cm:description" force="true"/>
<!-- tags and categories -->
<show id="cm:taggable" for-mode="edit" force="true"/>
<show id="cm:categories"/>
<!-- ACME custom props -->
<show id="acme:documentId" force="true"/>
<show id="acme:securityClassification"/>
</field-visibility>
<edit-form template="../documentlibrary/forms/doclib-simple-metadata.ftl"/>
<appearance>
<field id="cm:name">
<control>
<control-param name="maxLength">255</control-param>
</control>
</field>
<field id="cm:title">
<control template="/org/alfresco/components/form/controls/textfield.ftl"/>
</field>
<field id="cm:description">
<control>
<control-param name="activateLinks">true</control-param>
</control>
</field>
<field id="cm:taggable">
<control>
<control-param name="compactMode">true</control-param>
<control-param name="params">aspect=cm:taggable</control-param>
<control-param name="createNewItemUri">/api/tag/workspace/SpacesStore</control-param>
<control-param name="createNewItemIcon">tag</control-param>
</control>
</field>
<field id="cm:categories">
<control>
<control-param name="compactMode">true</control-param>
</control>
</field>
<!-- ACME Props appearance -->
<set id="acmeDocSet" appearance="bordered-panel" label-id="form.set.label.acme.document"/>
<field id="acme:documentId" label-id="form.field.label.acme.documentId" set="acmeDocSet">
<control template="/org/alfresco/components/form/controls/textfield.ftl"/>
</field>
<field id="acme:securityClassification" label-id="form.field.label.acme.securityClassification"
set="acmeDocSet"/>
</appearance>
</form>
<!-- Document Library Inline Edit form -->
<form id="doclib-inline-edit">
<field-visibility>
<show id="cm:name"/>
<show id="cm:content" force="true"/>
<show id="cm:title" force="true"/>
<show id="cm:description" force="true"/>
<!-- ACME custom props -->
<show id="acme:documentId" force="true"/>
<show id="acme:securityClassification"/>
</field-visibility>
<appearance>
<field id="cm:name">
<control>
<control-param name="maxLength">255</control-param>
</control>
</field>
<field id="cm:title">
<control template="/org/alfresco/components/form/controls/textfield.ftl"/>
</field>
<field id="cm:content" label-id="">
<control>
<control-param name="editorAppearance">explorer</control-param>
<control-param name="forceEditor">true</control-param>
</control>
</field>
<!-- ACME Props appearance -->
<set id="acmeDocSet" appearance="bordered-panel" label-id="form.set.label.acme.document"/>
<field id="acme:documentId" label-id="form.field.label.acme.documentId" set="acmeDocSet">
<control template="/org/alfresco/components/form/controls/textfield.ftl"/>
</field>
<field id="acme:securityClassification" label-id="form.field.label.acme.securityClassification"
set="acmeDocSet"/>
</appearance>
</form>
</forms>
</config>
<!-- Create and search forms for acme:document -->
<config evaluator="model-type" condition="acme:document">
<forms>
<form>
<field-visibility>
<show id="cm:name"/>
<show id="cm:content" force="true"/>
<show id="cm:title" force="true"/>
<show id="cm:description" force="true"/>
<show id="mimetype"/>
<show id="app:editInline" force="true"/>
<!-- ACME custom props -->
<show id="acme:documentId" force="true"/>
<show id="acme:securityClassification"/>
</field-visibility>
<appearance>
<field id="cm:name">
<control>
<control-param name="maxLength">255</control-param>
</control>
</field>
<field id="cm:title">
<control template="/org/alfresco/components/form/controls/textfield.ftl"/>
</field>
<field id="cm:content" label-id="">
<control>
<control-param name="editorAppearance">explorer</control-param>
</control>
</field>
<field id="mimetype">
<control template="/org/alfresco/components/form/controls/hidden.ftl">
<control-param name="contextProperty">mimeType</control-param>
</control>
</field>
<field id="app:editInline">
<control template="/org/alfresco/components/form/controls/hidden.ftl">
<control-param name="contextProperty">editInline</control-param>
</control>
</field>
<!-- ACME Props appearance -->
<set id="acmeDocSet" appearance="bordered-panel" label-id="form.set.label.acme.document"/>
<field id="acme:documentId" label-id="form.field.label.acme.documentId" set="acmeDocSet">
<control template="/org/alfresco/components/form/controls/textfield.ftl"/>
</field>
<field id="acme:securityClassification" label-id="form.field.label.acme.securityClassification"
set="acmeDocSet"/>
</appearance>
</form>
<!-- Search form -->
<form id="search">
<field-visibility>
<show id="cm:name"/>
<show id="cm:title" force="true"/>
<show id="cm:description" force="true"/>
<show id="mimetype"/>
<show id="cm:modified"/>
<show id="cm:modifier"/>
<!-- ACME custom props -->
<show id="acme:documentId" force="true"/>
<show id="acme:securityClassification"/>
</field-visibility>
<appearance>
<field id="mimetype">
<control template="/org/alfresco/components/form/controls/mimetype.ftl"/>
</field>
<field id="cm:modifier">
<control>
<control-param name="forceEditable">true</control-param>
</control>
</field>
<field id="cm:modified">
<control template="/org/alfresco/components/form/controls/daterange.ftl"/>
</field>
<!-- ACME Props appearance -->
<set id="acmeDocSet" appearance="bordered-panel" label-id="form.set.label.acme.document"/>
<field id="acme:documentId" label-id="form.field.label.acme.documentId" set="acmeDocSet">
<control template="/org/alfresco/components/form/controls/textfield.ftl"/>
</field>
<field id="acme:securityClassification" label-id="form.field.label.acme.securityClassification"
set="acmeDocSet"/>
</appearance>
</form>
</forms>
</config>
</alfresco-config>

View File

@@ -24,7 +24,7 @@ module.id=${project.artifactId}
#module.aliases=myModule-123, my-module
module.title=${project.name}
module.description=${project.description}
module.version=${noSnapshotVersion}
module.version=${project.version}
# The following optional properties can be used to prevent the module from being added
# to inappropriate versions of the WAR file.

View File

@@ -0,0 +1,25 @@
# This file should contain messages and labels specific to this share extension
# Put here things like:
# Content Model Aspect and Type Labels
# Form field labels
# Doc lib Action labels and messages
# Doc Lib Action Forms labels
#
# Labels for custom types and aspects
# Used in "Manage Aspects" and "Change Type" dialogs
#
type.acme_document=ACME Document
aspect.acme_securityClassified=Security Classified
# View,Edit,Search,Create Form labels for types and aspects
#
form.set.label.acme.document= ACME Document Information
form.field.label.acme.documentId=ACME Document Id
form.field.label.acme.securityClassification=Security Classification
# Advanced Search Form labels (only for types)
#
form.label.advancedsearch.acmeDocument=ACME Documents
form.description.advancedsearch.acmeDocument=Search for any ACME Documents

View File

@@ -3,7 +3,7 @@ model.jsonModel = {
id: "SET_PAGE_TITLE",
name: "alfresco/header/SetTitle",
config: {
title: "This is a simple page"
title: "This is a sample HELLO page"
}
},
{
@@ -21,7 +21,7 @@ model.jsonModel = {
},
{
id: "DEMO_SIMPLE_MSG",
name: "example/widgets/TemplateWidget"
name: "tutorials/widgets/TemplateWidget"
}
]
}

View File

@@ -5,86 +5,328 @@
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${version}</version>
<name>Alfresco Repository and Share Quickstart with database and an embedded Tomcat runner.</name>
<description>This All-in-One project allows to manage all the components involved in Alfresco development (Repo, Share, Solr4, AMPs) in one project
</description>
<name>AIO - SDK 3.0 Beta</name>
<description>All-In-One (AIO) project for SDK 3.0</description>
<packaging>pom</packaging>
<parent>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-sdk-parent</artifactId>
<version>@@alfresco.sdk.parent.version@@</version>
</parent>
<!--
SDK properties have sensible defaults in the SDK parent,
but you can override the properties below to use another version.
For more available properties see the alfresco-sdk-parent POM.
-->
<properties>
<!-- The following are default values for data location, Alfresco Community version, and Records Management Module version.
Uncomment if you need to change (Note. current default version for Enterprise edition is @@alfresco.enterprise.default.version@@)
<alfresco.version>@@alfresco.community.default.version@@</alfresco.version>
<alfresco.rm.version>@@alfresco.rm.version@@</alfresco.rm.version>
<alfresco.data.location>/absolute/path/to/alf_data_dev</alfresco.data.location> -->
<!-- Alfresco Maven Plugin version to use -->
<alfresco.sdk.version>@@alfresco.sdk.parent.version@@</alfresco.sdk.version>
<!-- This control the root logging level for all apps uncomment and change, defaults to WARN
<app.log.root.level>WARN</app.log.root.level>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- Alfresco Data directory, which will contain:
Content Store (i.e. the files we upload)
Database (i.e. the metadata for the uploaded files)
Search index (i.e. the indexed content and metadata)
Configured in alfresco-global.properties with the 'dir.root' property.
-->
<alfresco.data.location>${session.executionRootDirectory}/alf_data_dev</alfresco.data.location>
<!-- Duplicated with alfresco.solrHome in the plugin, we need them out here to do filtering -->
<solr.home>${alfresco.data.location}/solr</solr.home>
<solr.model.dir>${solr.home}/alfrescoModels</solr.model.dir>
<solr.content.dir>${solr.home}/index</solr.content.dir>
<!-- Properties used in dependency declarations, you don't need to change these -->
<alfresco.groupId>org.alfresco</alfresco.groupId>
<alfresco.platform.war.artifactId>alfresco-platform</alfresco.platform.war.artifactId>
<alfresco.share.war.artifactId>share</alfresco.share.war.artifactId>
<!-- Alfresco Platform and Share webapp versions, these are the original Alfresco webapps that will be
customized and then deployed and run by the tomcat maven plugin when
executing for example $ mvn clean install alfresco:run -->
<alfresco.platform.version>5.2.a-EA</alfresco.platform.version>
<alfresco.share.version>5.1.g</alfresco.share.version>
<!-- Alfresco Surf version, if you change Share version you might need to change Surf version -->
<alfresco.surf.version>6.5</alfresco.surf.version>
<!-- Aikau framework version, it is released separately, so it can be useful to be able
to bring in newer versions with bug fixes etc -->
<aikau.version>1.0.82</aikau.version>
<!-- Alfresco Repo Database configuration.
By default it uses a flat file H2 database to be able to run embedded.
The H2 database implementation is brought in via the tomcat7-maven-plugin as a dependency.
The data files for the H2 database will be created in a relative path, such as alf_data_dev/h2_data/alf_dev,
see alfresco.db.url below.
For more information about the db parameters see:http://www.h2database.com/html/features.html
-->
<alfresco.db.name>alf_dev</alfresco.db.name>
<alfresco.db.username>alfresco</alfresco.db.username>
<alfresco.db.password>alfresco</alfresco.db.password>
<alfresco.db.params>AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=10000;MVCC=FALSE;LOCK_MODE=0
</alfresco.db.params>
<alfresco.db.url>jdbc:h2:${alfresco.data.location}/h2_data/${alfresco.db.name};${alfresco.db.params}
</alfresco.db.url>
<alfresco.db.datasource.class>org.h2.jdbcx.JdbcDataSource</alfresco.db.datasource.class>
<!-- Set the enviroment to use, this controls which properties will be picked in src/test/properties
for embedded run, defaults to the 'local' environment. See SDK Parent POM for more info.
<!-- JRebel Hot reloading of classpath stuff and web resource stuff -->
<jrebel.version>1.1.6</jrebel.version>
<!-- Environment to use, Alfresco Maven Plugin will copy alfresco-global.properties from this directory -->
<env>local</env>
-->
<!-- The Alfresco Share web application is accessible via this URL -->
<share.client.url>http://localhost:8080/share</share.client.url>
</properties>
<!-- Here we realize the connection with the Alfresco selected platform (e.g.version and edition) -->
<dependencyManagement>
<dependencies>
<!-- This will import the dependencyManagement for all artifacts in the selected Alfresco plaftorm
(see http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Importing_Dependencies)
NOTE: You still need to define dependencies in your POM, but you can omit version as it's enforced by this dependencyManagement.
NOTE: It defaults to the latest version this SDK pom has been tested with, but alfresco version can/should be overridden in your project's pom
-->
<!-- This will import the dependencyManagement for all artifacts in the selected Alfresco platform.
NOTE: You still need to define dependencies in your POM, but you can omit version as
it's enforced by this dependencyManagement.
NOTE: It defaults to the latest version this SDK pom has been tested with,
but alfresco version can/should be overridden in your project's pom
-->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-platform-distribution</artifactId>
<version>${alfresco.version}</version>
<version>${alfresco.platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- Redefine the following Share dependencies as they have different version numbers than platform.
They are defined in alfresco-platform-distribution... -->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>${alfresco.share.war.artifactId}</artifactId>
<version>${alfresco.share.version}</version>
<type>war</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>${alfresco.share.war.artifactId}</artifactId>
<version>${alfresco.share.version}</version>
<classifier>classes</classifier>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-web-framework-commons</artifactId>
<version>${alfresco.share.version}</version>
<classifier>classes</classifier>
<scope>provided</scope>
</dependency>
<!-- Redefine the following surf dependencies as they have no resolvable version in the
alfresco-platform-distribution artifact -->
<dependency>
<groupId>org.alfresco.surf</groupId>
<artifactId>spring-surf</artifactId>
<version>${alfresco.surf.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.alfresco.surf</groupId>
<artifactId>spring-surf-api</artifactId>
<version>${alfresco.surf.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<!-- Build an AMP if 3rd party libs are needed by the extensions -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>build-amp-file</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptor>src/main/assembly/amp.xml</descriptor>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.alfresco.maven.plugin</groupId>
<artifactId>alfresco-maven-plugin</artifactId>
<version>${alfresco.sdk.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<!-- Compress JavaScript files and store as *-min.js -->
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
</plugin>
<!--
The Alfresco Maven Plugin contains all the logic to run the extension
in an embedded Tomcat with the H2 database.
-->
<plugin>
<groupId>org.alfresco.maven.plugin</groupId>
<artifactId>alfresco-maven-plugin</artifactId>
<version>${alfresco.sdk.version}</version>
<configuration>
<!-- Default is to run with a Community edition, change to 'enterprise' if using Enterprise edition -->
<alfrescoEdition>community</alfrescoEdition>
<!-- We need the flat file H2 database to run the Repo -->
<enableH2>true</enableH2>
<!-- We always need the Platform/Repo webapp - alfresco.war -->
<enablePlatform>true</enablePlatform>
<!-- Enable Solr webapp so we can use search -->
<enableSolr>true</enableSolr>
<!-- We need Share webapp, so we got a UI for working with the Repo -->
<enableShare>true</enableShare>
<!--
JARs and AMPs that should be overlayed/applied to the Platform/Repository WAR
(i.e. alfresco.war)
-->
<platformModules>
<moduleDependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-share-services</artifactId>
<version>${alfresco.share.version}</version>
<type>amp</type>
</moduleDependency>
<!-- Bring in custom Modules -->
<moduleDependency>
<groupId>${project.groupId}</groupId>
<artifactId>${artifactId}-platform-jar</artifactId>
<version>${project.version}</version>
</moduleDependency>
</platformModules>
<!--
JARs and AMPs that should be overlayed/applied to the Share WAR (i.e. share.war)
-->
<shareModules>
<moduleDependency>
<!-- Bring in a newer version of Aikau, can coexist with older versions in the
WAR distribution, newest version is picked. -->
<groupId>${alfresco.groupId}</groupId>
<artifactId>aikau</artifactId>
<version>${aikau.version}</version>
</moduleDependency>
<!-- Bring in custom Modules -->
<moduleDependency>
<groupId>${project.groupId}</groupId>
<artifactId>${artifactId}-share-jar</artifactId>
<version>${project.version}</version>
</moduleDependency>
</shareModules>
</configuration>
</plugin>
<!-- Filter the test resource files in the AIO parent project, and do property substitutions.
We need this here to get it done before the Alfresco Maven Plugin run is executed. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.1</version>
<inherited>false</inherited> <!-- Run only for the AIO parent Project -->
<executions>
<execution>
<id>copy-and-filter-test-resources</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.testOutputDirectory}</outputDirectory>
<resources>
<testResource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
</testResource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<!-- Hot reloading with JRebel -->
<plugin>
<groupId>org.zeroturnaround</groupId>
<artifactId>jrebel-maven-plugin</artifactId>
<version>${jrebel.version}</version>
<executions>
<execution>
<id>generate-rebel-xml</id>
<phase>process-resources</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<!-- For more information about how to configure JRebel plugin see:
http://manuals.zeroturnaround.com/jrebel/standalone/maven.html#maven-rebel-xml -->
<classpath>
<fallback>all</fallback>
<resources>
<resource>
<!--
Empty resource element marks default configuration. By
default it is placed first in generated configuration.
-->
</resource>
</resources>
</classpath>
<!--
alwaysGenerate - default is false
If 'false' - rebel.xml is generated if timestamps of pom.xml and the current rebel.xml file are not equal.
If 'true' - rebel.xml will always be generated
-->
<alwaysGenerate>true</alwaysGenerate>
</configuration>
</plugin>
</plugins>
<resources>
<!-- Filter the resource files in all the sub-projects, and do property substitutions -->
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
<profiles>
<profile>
<!-- Invoke your build with -Prun to run the multimodule project and enable rapid dev mode in your IDE.
See 'run' profile in the sub modules pom.xml for further behavioral details.
-->
<id>run</id>
<properties>
<!-- While running in rapid dev mode with -Prun, we don't want amp web resources
to be added to the war, so we can load them directly from the AMP project (see
runner/tomcat/context-*.xml for more details) -->
<maven.alfresco.includeWebResources>false</maven.alfresco.includeWebResources>
</properties>
</profile>
</profiles>
<!--
Alfresco Maven Repositories
-->
<repositories>
<repository>
<id>alfresco-public</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
</repository>
<repository>
<id>alfresco-public-snapshots</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/public-snapshots</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>alfresco-plugin-public</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
</pluginRepository>
<pluginRepository>
<id>alfresco-plugin-public-snapshots</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/public-snapshots</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>

View File

@@ -1,64 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>
<artifactId>${artifactId}</artifactId>
<name>Alfresco Repository AMP Module</name>
<packaging>amp</packaging>
<description>This is a sample Alfresco repository AMP project, depended upon by the alfresco WAR aggregator</description>
<parent>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}</artifactId>
<version>${version}</version>
</parent>
<properties>
<!-- Property overrides are mostly done in parent pom -->
</properties>
<!-- Following dependencies are needed for compiling Java code in src/main/java;
<scope>provided</scope> is inherited for each of the following;
for more info, please refer to alfresco-platform-distribution POM -->
<dependencies>
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-repository</artifactId>
</dependency>
<!-- Uncomment if you are using RM (Records Management) module, brings in RM related classes -->
<!--
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-rm</artifactId>
<version>${alfresco.rm.version}</version>
<classifier>classes</classifier>
</dependency>
-->
</dependencies>
<profiles>
<!--
Brings in the extra Enterprise specific repository classes,
if the 'enterprise' profile has been activated, needs to be activated manually. -->
<profile>
<id>enterprise</id>
<dependencies>
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-enterprise-repository</artifactId>
<version>${alfresco.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
</profile>
<!-- If we are running in embedded Tomcat skip unit tests -->
<profile>
<id>run</id>
<properties>
<skipTests>true</skipTests>
</properties>
</profile>
</profiles>
</project>

View File

@@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<model name="myc:contentModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!-- Optional meta-data about the model -->
<description>Document Model for Repo Extension X</description>
<author>My Name</author>
<version>1.0</version>
<imports>
<!-- Import Alfresco Dictionary Definitions -->
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
<!-- Import Alfresco Content Domain Model Definitions -->
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
<!-- Import Alfresco System Model Definitions -->
<import uri="http://www.alfresco.org/model/system/1.0" prefix="sys"/>
</imports>
<!-- Custom namespace for your domain -->
<namespaces>
<namespace uri="http://www.mycompany.com/model/content/1.0" prefix="myc"/>
</namespaces>
<!-- ===============================================================================================================
Constraints, Types, and Aspects go here...
-->
</model>

View File

@@ -1,16 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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.
*/

View File

@@ -1,17 +0,0 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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.
-->
Test jsp. Change me!

View File

@@ -1,2 +0,0 @@
This folder (root in the AMP) gets mapped automagically in WEB-INF/licenses
in the war build

View File

@@ -1,16 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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.
*/

View File

@@ -1,86 +0,0 @@
#set($symbol_pound='#')
#set($symbol_dollar='$')
#set($symbol_escape='\' )
package ${package}.demoamp.test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import ${package}.demoamp.DemoComponent;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.apache.log4j.Logger;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import com.tradeshift.test.remote.Remote;
import com.tradeshift.test.remote.RemoteTestRunner;
/**
* A simple class demonstrating how to run out-of-container tests
* loading Alfresco application context.
*
* This class uses the RemoteTestRunner to try and connect to
* localhost:4578 and send the test name and method to be executed on
* a running Alfresco. One or more hostnames can be configured in the @Remote
* annotation.
*
* If there is no available remote server to run the test, it falls
* back on local running of JUnits.
*
* For proper functioning the test class file must match exactly
* the one deployed in the webapp (either via JRebel or static deployment)
* otherwise "incompatible magic value XXXXX" class error loading issues will arise.
*
* @author Gabriele Columbro
* @author Maurizio Pillitu
*
*/
@RunWith(RemoteTestRunner.class)
@Remote(runnerClass=SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:alfresco/application-context.xml")
public class DemoComponentTest {
private static final String ADMIN_USER_NAME = "admin";
static Logger log = Logger.getLogger(DemoComponentTest.class);
@Autowired
protected DemoComponent demoComponent;
@Autowired
@Qualifier("NodeService")
protected NodeService nodeService;
@Test
public void testWiring() {
assertNotNull(demoComponent);
}
@Test
public void testGetCompanyHome() {
AuthenticationUtil.setFullyAuthenticatedUser(ADMIN_USER_NAME);
NodeRef companyHome = demoComponent.getCompanyHome();
assertNotNull(companyHome);
String companyHomeName = (String) nodeService.getProperty(companyHome, ContentModel.PROP_NAME);
assertNotNull(companyHomeName);
assertEquals("Company Home", companyHomeName);
}
@Test
public void testChildNodesCount() {
AuthenticationUtil.setFullyAuthenticatedUser(ADMIN_USER_NAME);
NodeRef companyHome = demoComponent.getCompanyHome();
int childNodeCount = demoComponent.childNodesCount(companyHome);
assertNotNull(childNodeCount);
// There are 7 folders by default under Company Home
assertEquals(7, childNodeCount);
}
}

View File

@@ -1,46 +0,0 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You 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.
########################################################################################################################
# Alfresco configuration for running locally
#
# Configuration when running Tomcat embedded from Maven.
# This will create the alf_data_dev directory relative to Tomcat run folder.
# Property values from the POM but it can also be edited here.
########################################################################################################################
dir.root=${alfresco.data.location}
# Use Solr4 as that is used by default with Alfresco 5
index.subsystem.name=solr4
solr.host=localhost
solr.port=8080
solr.secureComms=none
# Fail or not when there are node integrity checker errors
integrity.failOnError=true
# Database connection properties
db.driver=${alfresco.db.datasource.class}
db.url=${alfresco.db.url}
db.username=${alfresco.db.username}
db.password=${alfresco.db.password}
db.pool.initial=10
db.pool.max=100
hibernate.dialect=org.hibernate.dialect.H2Dialect
# File servers related properties
# For local runs we disable CIFS and FTP
cifs.enabled=false
ftp.enabled=false

View File

@@ -1,23 +0,0 @@
# Overrides only log4j locations and add the test logging properties
# This gets merged with the main file
# Set root logger level to error
log4j.rootLogger=${app.log.root.level}, Console, File
###### Console appender definition #######
# All outputs currently set to be a ConsoleAppender.
log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout=org.apache.log4j.PatternLayout
# use log4j NDC to replace %x with tenant domain / username
log4j.appender.Console.layout.ConversionPattern=%d{ISO8601} %x %-5p [%c{3}] [%t] %m%n
#log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c] %m%n
###### File appender definition #######
log4j.appender.File=org.apache.log4j.DailyRollingFileAppender
log4j.appender.File.File=${app.log.dir}alfresco.log
log4j.appender.File.Append=true
log4j.appender.File.DatePattern='.'yyyy-MM-dd
log4j.appender.File.layout=org.apache.log4j.PatternLayout
log4j.appender.File.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c] %m%n

View File

@@ -1,184 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements. See the NOTICE file distributed with this work for additional
information regarding copyright ownership. The ASF licenses this file to
You 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>
<artifactId>${artifactId}</artifactId>
<name>Alfresco Repository WAR Aggregator</name>
<packaging>war</packaging>
<description>Alfresco Repository aggregator, installs your repository AMPs in the Alfresco WAR for aggregation and easy deployment purposes</description>
<parent>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}</artifactId>
<version>${version}</version>
</parent>
<properties>
<!-- During development we set log root level to Debug,
this will be applicable to the log configuration in
repo/src/main/resources/alfresco/extension/dev-log4j.properties,
such as DemoComponent logging. -->
<app.log.root.level>DEBUG</app.log.root.level>
</properties>
<dependencies>
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>${alfresco.repo.artifactId}</artifactId>
<version>${alfresco.version}</version>
<type>war</type>
</dependency>
<!-- Demonstrating the dependency / installation of the repo AMP developed in the 'repo-amp' module -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>repo-amp</artifactId>
<version>${project.version}</version>
<type>amp</type>
</dependency>
<!-- Uncomment if you are using SPP (SharePoint Protocol Support) for Online Edit etc -->
<!--
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-spp</artifactId>
<version>${alfresco.version}</version>
<type>amp</type>
</dependency>
-->
<!-- Uncomment if you are using the RM (Records Management) module. -->
<!--
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-rm</artifactId>
<version>${alfresco.rm.version}</version>
<type>amp</type>
</dependency>
-->
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<!-- Here is can control the order of overlay of your (WAR, AMP, etc.) dependencies
| NOTE: At least one WAR dependency must be uncompressed first
| NOTE: In order to have a dependency effectively added to the WAR you need to
| explicitly mention it in the overlay section.
| NOTE: First-win resource strategy is used by the WAR plugin
-->
<overlays>
<!-- Current project customizations. This is normally empty, since customizations come from the AMPs -->
<overlay/>
<!-- The Alfresco WAR -->
<overlay>
<groupId>${alfresco.groupId}</groupId>
<artifactId>${alfresco.repo.artifactId}</artifactId>
<type>war</type>
<!-- To allow inclusion of META-INF -->
<excludes/>
</overlay>
<!-- Add / sort your AMPs here -->
<overlay>
<groupId>${project.groupId}</groupId>
<artifactId>repo-amp</artifactId>
<type>amp</type>
</overlay>
<!-- Uncomment if you are using SPP -->
<!--
<overlay>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-spp</artifactId>
<type>amp</type>
</overlay>
-->
<!-- Uncomment if you are using RM -->
<!--
<overlay>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-rm</artifactId>
<type>amp</type>
</overlay>
-->
</overlays>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<!-- Overrides the run profile to disable securecomms and add rapid development configuration -->
<profile>
<id>run</id>
<build>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<executions>
<execution>
<id>prepare-exploded-war</id>
<goals>
<goal>exploded</goal>
</goals>
<phase>prepare-package</phase>
</execution>
<execution>
<id>default-war</id>
<configuration>
<webXml>${project.build.directory}/${project.build.finalName}-nossl/WEB-INF/web.xml</webXml>
</configuration>
</execution>
</executions>
</plugin>
<!-- Replaces web.xml where applicable, commenting out the security-constraints -->
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<executions>
<execution>
<id>disable-securecomms</id>
<phase>prepare-package</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<ignoreErrors>true</ignoreErrors>
<file>${project.build.directory}/${project.build.finalName}/WEB-INF/web.xml</file>
<outputDir>${project.build.directory}/${project.build.finalName}-nossl/WEB-INF/</outputDir>
<preserveDir>false</preserveDir>
<replacements>
<replacement>
<token><![CDATA[<!-- Toggle securecomms placeholder start -->]]></token>
<value><![CDATA[<!--]]></value>
</replacement>
<replacement>
<token><![CDATA[<!-- Toggle securecomms placeholder end -->]]></token>
<value><![CDATA[-->]]></value>
</replacement>
</replacements>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-rad</artifactId>
<version>${maven.alfresco.version}</version>
</dependency>
</dependencies>
</profile>
</profiles>
</project>

View File

@@ -1,6 +0,0 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
# You can add here custom log4j classes. This will be merged with the main log4j.properties
# See http://wiki.alfresco.com/wiki/Developing_an_Alfresco_Module#Best_Log4j_Configuration_Practices
log4j.logger.${package}.demoamp.DemoComponent=${app.log.root.level}

View File

@@ -3,13 +3,7 @@
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@echo off
set springloadedfile=%HOME%\.m2\repository\org\springframework\springloaded\@@springloaded.version@@\springloaded-@@springloaded.version@@.jar
set MAVEN_OPTS=-Xms256m -Xmx2G
if not exist %springloadedfile% (
mvn validate -Psetup
)
mvn clean install -DskipTests=true alfresco:run
set MAVEN_OPTS=-javaagent:"%springloadedfile%" -noverify -Xms256m -Xmx2G
mvn clean install -Prun -nsu
:: mvn install -Prun

View File

@@ -1,9 +1,3 @@
#!/bin/bash
# Downloads the spring-loaded lib if not existing and runs the full all-in-one
# (Alfresco + Share + Solr) using the runner project
springloadedfile=~/.m2/repository/org/springframework/springloaded/@@springloaded.version@@/springloaded-@@springloaded.version@@.jar
if [ ! -f $springloadedfile ]; then
mvn validate -Psetup
fi
MAVEN_OPTS="-javaagent:$springloadedfile -noverify -Xms256m -Xmx2G" mvn clean install -Prun
MAVEN_OPTS="-Xms256m -Xmx2G" mvn clean install -DskipTests=true alfresco:run

View File

@@ -1,421 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>
<artifactId>${artifactId}</artifactId>
<name>Alfresco, Share and Solr4 Tomcat Runner</name>
<packaging>pom</packaging>
<description>Alfresco, Share and Solr4 Tomcat Runner</description>
<parent>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}</artifactId>
<version>${version}</version>
</parent>
<profiles>
<profile>
<id>run</id>
<!-- TODO: figure out a way to define these properties in a parent POM, they are now also duplicated
in the solr-config/pom.xml -->
<properties>
<alfresco.solr.dir>${alfresco.data.location}/solr4</alfresco.solr.dir>
<alfresco.solr.home.dir>${alfresco.solr.dir}/config</alfresco.solr.home.dir>
<alfresco.solr.data.dir>${alfresco.solr.dir}/data</alfresco.solr.data.dir>
</properties>
<build>
<plugins>
<!-- Copy and filter webapp context files - output dir is runner/target/contexts -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-tomcat-resources</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/contexts</outputDirectory>
<resources>
<resource>
<directory>tomcat</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<!-- Run Tomcat 7 embedded with Alfresco.war and Share.war contexts.
The solr4.war is fetched directly from the Maven repo, it is not built like the other WARs.
Plugin version is picked up from alfresco-sdk-parent.pom pluginManagement definition,
which also brings in the H2 database lib -->
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<executions>
<execution>
<id>run-wars</id>
<goals>
<goal>run</goal>
</goals>
<phase>pre-integration-test</phase>
</execution>
</executions>
<configuration>
<ignorePackaging>true</ignorePackaging>
<!-- Make sure Catalina classes are picked up when we got virtual webapp contexts with classpaths -->
<useSeparateTomcatClassLoader>true</useSeparateTomcatClassLoader>
<path>/</path>
<systemProperties>
<solr.solr.home>${alfresco.solr.home.dir}</solr.solr.home>
</systemProperties>
<!-- Should this class loader delegate to the parent class loader before searching its
own repositories (i.e. the usual Java2 delegation model) -->
<!-- Prevent parent classloader delegation, each webapp loads.
If set to true then you will get a truckload of Solr logging as
the alf_data_dev/solr4/config/log4j-solr.properties file is not picked up.
This also fixes issues with the Google Guava Library, which this tomcat plugin uses
version 10.0.1 of but Solr uses 14.0.1 -->
<delegate>false</delegate>
<webapps>
<webapp>
<groupId>${project.groupId}</groupId>
<artifactId>repo</artifactId>
<version>${project.version}</version>
<type>war</type>
<!-- Make sure webapp is loaded with context and everything,
if set to 'false' then you will get 404 when trying to access the webapp from browser -->
<asWebapp>true</asWebapp>
<contextPath>/alfresco</contextPath>
<contextFile>${project.build.directory}/contexts/context-repo.xml</contextFile>
</webapp>
<webapp>
<groupId>${project.groupId}</groupId>
<artifactId>share</artifactId>
<version>${project.version}</version>
<type>war</type>
<asWebapp>true</asWebapp>
<contextPath>/share</contextPath>
<contextFile>${project.build.directory}/contexts/context-share.xml</contextFile>
</webapp>
<webapp>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-solr4</artifactId>
<version>${alfresco.version}</version>
<type>war</type>
<asWebapp>true</asWebapp>
<contextPath>/solr4</contextPath>
<contextFile>${project.build.directory}/contexts/context-solr.xml</contextFile>
</webapp>
</webapps>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!-- Runs Share User Interface regression tests using Alfresco Share PO (Page Object) vanilla Selenium / Webdrone (WebDriver wrapper).
NOTE: Assumes an already running Alfresco + Share at the default location ${share.client.url}
(e.g. by invoking:
$ mvn clean install -Prun,regression-testing
to run a specific test do:
$ mvn clean install -Prun,regression-testing -Dit.test=LoginPageTest
-->
<profile>
<id>regression-testing</id>
<properties>
<!-- Re-configure Tomcat 7 Plugin (see run profile) to fork so we can run tests in parallel -->
<!-- Note. the fork option does not fork a new JVM. Rather it is run in a thread created by the
Maven Launcher class (org.codehaus.plexus.classworlds.launcher.Launcher) that is invoked by the mvn command. -->
<maven.tomcat.fork>true</maven.tomcat.fork>
<!-- Make sure we are actually testing something -->
<skipTests>false</skipTests>
</properties>
<build>
<plugins>
<!-- Need to unpack the tests becuase of Jiras: -->
<!-- https://jira.codehaus.org/browse/SUREFIRE-997 -->
<!-- https://jira.codehaus.org/browse/SUREFIRE-1024 -->
<!-- Workaround for classloading issue in share-po (need to unpack it)-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>prepare-regression-test-resources</id>
<phase>pre-integration-test</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifact>${alfresco.groupId}:share-po:${alfresco.version}:jar:tests</artifact>
<outputDirectory>${project.build.directory}/testng-resources</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<suiteXmlFiles>
<!-- Smaller test suite for Share, essential stuff like Login, Navigation, DocLib, and Search -->
<!-- Currently using our own config to be able to comment out one test class
<suiteXmlFile>${project.build.directory}/testng-resources/testng-alfresco-share.xml</suiteXmlFile> -->
<suiteXmlFile>${project.basedir}/test-ng/testng-alfresco-share.xml</suiteXmlFile>
</suiteXmlFiles>
<testClassesDirectory>${project.build.directory}/testng-resources</testClassesDirectory>
<systemPropertyVariables>
<!-- Where is the Alfresco Share Webapp that we are testing -->
<share.target>${share.client.url}</share.target>
</systemPropertyVariables>
<!-- The out-of-the-box Alfresco Share PO test classes does not follow the *IT.java
naming convention, they use *Test.java, so need to add that -->
<includes>
<include>**/*Test.java</include>
</includes>
</configuration>
<executions>
<execution>
<id>regression-tests</id>
<phase>integration-test</phase>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
<execution>
<id>verify-tests</id>
<phase>verify</phase>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<!-- Bring in the Share Page Objects (PO) used in the regression tests -->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>share-po</artifactId>
<version>${alfresco.version}</version>
<scope>test</scope>
<!-- Exclude version 2.39.0 of selenium that does not work with latest FF browsers, we include
version 2.45 later on here in this profile -->
<exclusions>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
</exclusion>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Bring in the Share Page Object (PO) regression tests that comes with Alfresco.
These tests cover the Alfresco Share Web Application -->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>share-po</artifactId>
<version>${alfresco.version}</version>
<classifier>tests</classifier>
<scope>test</scope>
<!-- Exclude version 2.39.0 of selenium that does not work with latest FF browsers, we include
version 2.45 later on here in this profile -->
<exclusions>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
</exclusion>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Make sure we are running with newer selenium that works with newest FF (newer than 2.39.0) -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.45.0-alfresco</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>2.45.0-alfresco</version>
<exclusions>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>servlet-api-2.5</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Test NG is defined with test scope in share-po, so need it here too -->
<!-- Alfresco code creates a wrapper around Test NG -->
<dependency>
<groupId>org.alfresco.test</groupId>
<artifactId>alfresco-testng</artifactId>
<version>1.1</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</profile>
<!-- Runs functional domain specific tests using Alfresco Share PO (Page Object) vanilla Selenium / Webdrone (WebDriver wrapper).
NOTE: Assumes an already running Alfresco + Share at the default location ${share.client.url}
(e.g. by invoking:
$ mvn clean install -Prun,functional-testing
to run a specific test do:
$ mvn clean install -Prun,functional-testing -Dit.test=DemoPageTestIT
-->
<profile>
<id>functional-testing</id>
<properties>
<!-- Re-configure Tomcat 7 Plugin (see run profile) to fork so we can run tests in parallel -->
<!-- Note. the fork option does not fork a new JVM. Rather it is run in a thread created by the
Maven Launcher class (org.codehaus.plexus.classworlds.launcher.Launcher) that is invoked by the mvn command. -->
<maven.tomcat.fork>true</maven.tomcat.fork>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>${project.parent.basedir}/share-amp/target/test-classes/testng.xml</suiteXmlFile>
</suiteXmlFiles>
<testClassesDirectory>${project.parent.basedir}/share-amp/target/test-classes</testClassesDirectory>
<systemPropertyVariables>
<!-- Where is the Alfresco Share Webapp that we are testing -->
<share.target>${share.client.url}</share.target>
</systemPropertyVariables>
</configuration>
<executions>
<execution>
<id>functional-tests</id>
<phase>integration-test</phase>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
<execution>
<id>verify-tests</id>
<phase>verify</phase>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<!-- Bring in the Share Page Objects (PO) used in our functional tests.
Without it TestNG cannot load our test class when it uses page objects such as LoginPage -->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>share-po</artifactId>
<version>${alfresco.version}</version>
<scope>test</scope>
<!-- Exclude version 2.39.0 of selenium that does not work with latest FF browsers, we include
version 2.45 later on here in this profile -->
<exclusions>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
</exclusion>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Bring in the Share Page Object (PO) Tests that comes with Alfresco. It has
the org.alfresco.po.share.AbstractTest class that our custom tests extend.
Without it TestNG cannot load our test class -->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>share-po</artifactId>
<version>${alfresco.version}</version>
<classifier>tests</classifier>
<scope>test</scope>
<!-- Exclude version 2.39.0 of selenium that does not work with latest FF browsers, we include
version 2.45 later on here in this profile -->
<exclusions>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
</exclusion>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Make sure we are running with newer selenium that works with newest FF (newer than 2.39.0) -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.45.0-alfresco</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>2.45.0-alfresco</version>
<exclusions>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>servlet-api-2.5</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Test NG is defined with test scope in share-po, so need it here too -->
<!-- Alfresco code creates a wrapper around Test NG -->
<dependency>
<groupId>org.alfresco.test</groupId>
<artifactId>alfresco-testng</artifactId>
<version>1.1</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</profile>
</profiles>
</project>

View File

@@ -1,24 +0,0 @@
<html>
<head>
<title>Alfresco SDK @@alfresco.sdk.parent.version@@ - Running Alfresco ${alfresco.version}</title>
</head>
<body style="font: 13px/1.231 Open Sans,arial,helvetica,clean,sans-serif;">
<img alt="Maven Alfresco SDK" src="https://github.com/Alfresco/alfresco-sdk/raw/master/src/site/resources/img/alfresco-maven-logo.jpg">
<p>Congratulations, you are successfully running the <a href="https://artifacts.alfresco.com/nexus/content/groups/public/alfresco-sdk-aggregator/latest/archetypes/alfresco-allinone-archetype/index.html">All in One project from the <a href="https://artifacts.alfresco.com/nexus/content/groups/public/alfresco-sdk-aggregator/latest/index.html">Alfresco SDK @@alfresco.sdk.parent.version@@</a>, powered by <a href="http://maven.apache.org/">Apache Maven</a>!
<br/>
You can access the Alfresco components running embedded below:</p>
<ul>
<li><a href="/share">Alfresco Share</a></li>
<li><a href="/alfresco">Alfresco Repository</a></li>
<li><a href="/solr4">Alfresco Solr4</a></li>
</ul>
<p><b>Resources:</b></p>
<ul>
<li><a href="http://docs.alfresco.com">Alfresco Documentation</a></li>
<li><a href="https://support.alfresco.com">Alfresco Enterprise Support portal</a></li>
<li><a href="https://github.com/Alfresco/alfresco-sdk/fork">Fork and contribute to this SDK!</a></li>
<li><a href="https://issues.alfresco.com/jira/browse/ALF">Report an Alfresco issue</a></li>
<li><a href="https://github.com/Alfresco/alfresco-sdk/issues/new">Report an SDK issue</a></li>
</ul>
</body>
</html>

View File

@@ -1,79 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite thread-count="1" parallel="tests" preserve-order="true" verbose="6" name="Alfresco Share UI Basic Regression Test">
<groups>
<run>
<include name="unit"/>
<include name="alfresco-one"/>
<exclude name=".*Bug42"/>
<exclude name=".*Bug"/>
<exclude name="chromeOnly"/>
<exclude name="Hybrid"/>
<exclude name="download"/>
<exclude name="communityIssue"/>
</run>
</groups>
<test name="LoginPageTest">
<classes>
<class name="org.alfresco.po.share.LoginPageTest" />
</classes>
</test>
<test name="NavigationBarTest">
<classes>
<class name="org.alfresco.po.share.NavigationBarTest" />
</classes>
</test>
<test name="LiveSearchDropdownTest">
<classes>
<class name="org.alfresco.po.share.search.LiveSearchDropdownTest" />
</classes>
</test>
<test name="FacetedSearchResultsPageTest">
<classes>
<class name="org.alfresco.po.share.search.FacetedSearchResultsPageTest" />
</classes>
</test>
<test name="DocumentDetailsPageTest">
<classes>
<class name="org.alfresco.po.share.site.document.DocumentDetailsPageTest"/>
</classes>
</test>
<!-- TODO: fix this, currently does not work
<test name="DocumentLibraryPageTest">
<classes>
<class name="org.alfresco.po.share.site.document.DocumentLibraryPageTest"/>
</classes>
</test>
-->
<test name="FileDirectoryInfoTest">
<classes>
<class name="org.alfresco.po.share.site.document.FileDirectoryInfoTest">
<methods>
<!-- these currently take longer than 60 seconds for page rendering... -->
<exclude name="test107TagsForFolder" />
<exclude name="test114TagsForFile" />
</methods>
</class>
</classes>
</test>
<test name="FolderDetailsPageTest">
<classes>
<class name="org.alfresco.po.share.site.document.FolderDetailsPageTest"/>
</classes>
</test>
<test name="ManagePermissionsTest">
<classes>
<class name="org.alfresco.po.share.site.document.ManagePermissionsTest"/>
</classes>
</test>
<test name="InviteMembersPageTest">
<classes>
<class name="org.alfresco.po.share.site.InviteMembersPageTest" />
</classes>
</test>
<test name="SiteFinderPageTest">
<classes>
<class name="org.alfresco.po.share.site.SiteFinderPageTest" />
</classes>
</test>
</suite>

View File

@@ -1,42 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- ===================================================================================================================
This context file is used only in a development IDE for rapid development,
it is never released with the Alfresco.war
IMPORTANT: If an AMP or JAR extension is added to the Alfresco WAR,
then you need to add the paths below for this new extension.
=================================================================================================================-->
<!-- Pick up static resource files from ../repo/target/repo.
The Alfresco.war 5.0 does not have a webapp (it used to have Alfresco Explorer but not anymore)
that we will access, so this docBase might not be needed -->
<Context docBase="${project.parent.basedir}/alfresco-war/target/${project.build.finalName}">
<!-- Pick up static resource files from AMPs and other directories (this should not include docBase) -->
<Resources className="org.apache.naming.resources.VirtualDirContext"
extraResourcePaths="/=${project.parent.basedir}/repo-amp/target/repo-amp/web" />
<!-- IMPORTANT! The extraResourcePaths string need to be on one continues line, so if we add another Repo AMP,
it would look something like this:
<Resources className="org.apache.naming.resources.VirtualDirContext"
extraResourcePaths="/=${project.parent.basedir}/repo-amp/target/repo-amp/web,/=${project.parent.basedir}/component-a-repo/target/component-a-repo/web" />
-->
<!-- Configure where the Alfresco (alfresco.war) web application can load classes, test classes, and config files -->
<!-- Setup the virtual class path like this:
1) target/classes
2) target/${project.build.finalName}/config
3) target/test-classes
This way mvn compile can be invoked and all changes will be picked up
-->
<Loader className="org.apache.catalina.loader.VirtualWebappLoader"
searchVirtualFirst="true"
virtualClasspath="${project.parent.basedir}/repo-amp/target/classes;
${project.parent.basedir}/repo-amp/target/repo-amp/config;
${project.parent.basedir}/repo-amp/target/test-classes" />
<!-- Load from all directories, not just when the META-INF directory is found in exploded JAR -->
<JarScanner scanAllDirectories="true" />
</Context>

View File

@@ -1,42 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- ===================================================================================================================
This context file is used only in a development IDE for rapid development,
it is never released with the Share.war
IMPORTANT: If an AMP or JAR extension is added to the Share WAR,
then you need to add the paths below for this new extension.
=================================================================================================================-->
<Context>
<!-- Pick up static resource files from any Share extensions, being it a JAR or an AMP
(this should not include docBase) -->
<Resources className="org.apache.naming.resources.VirtualDirContext"
extraResourcePaths="/=${project.parent.basedir}/share-amp/target/share-amp/web" />
<!-- IMPORTANT! The extraResourcePaths string need to be on one continues line, so if we add another Share AMP,
it would look something like this:
<Resources className="org.apache.naming.resources.VirtualDirContext"
extraResourcePaths="/=${project.parent.basedir}/share-amp/target/share-amp/web,/=${project.parent.basedir}/component-a-share/target/component-a-share/web" />
-->
<!-- Configure where the Share (share.war) web application can load classes, config, and test classes (in that order) -->
<!-- Setup the virtual class path like this:
1) share-amp/target/classes
2) share-amp/target/${project.build.finalName}/config
3) share-amp/target/test-classes
4) Add other AMP paths here....
5) share/target/test-classes (loads the share-config-custom.xml used during test runs)
This way mvn compile can be invoked and all changes will be picked up
-->
<Loader className="org.apache.catalina.loader.VirtualWebappLoader"
searchVirtualFirst="true"
virtualClasspath="${project.parent.basedir}/share-amp/target/classes;
${project.parent.basedir}/share-amp/target/share-amp/config;
${project.parent.basedir}/share-amp/target/test-classes;
${project.parent.basedir}/share/target/test-classes" />
<!-- Load from all directories, not just when the META-INF directory is found in exploded JAR -->
<JarScanner scanAllDirectories="true" />
</Context>

View File

@@ -1,27 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Context>
<Environment name="solr/home" type="java.lang.String" value="${alfresco.solr.home.dir}/" override="true"/>
<Environment name="solr/model/dir" type="java.lang.String" value="${alfresco.solr.home.dir}/alfrescoModels/" override="true"/>
<Environment name="solr/content/dir" type="java.lang.String" value="${alfresco.solr.data.dir}/content/" override="true"/>
<!-- Pick up static resource files from any Solr extensions, being it a JAR or an AMP,
by default there are no extensions, just the standard Solr webapp files.
(this should not include docBase)-->
<Resources className="org.apache.naming.resources.VirtualDirContext"
extraResourcePaths="/=${project.parent.basedir}/runner/target/tomcat/webapps/alfresco-solr4" />
<!-- Configure where the Solr (solr4.war) web application can load classes, test classes, and config -->
<!-- Solr is not customized by default so just points to standard Solr classes. -->
<!-- Setup the virtual class path like this:
1) target/classes
3) target/test-classes
This way mvn compile can be invoked and all changes will be picked up-->
<Loader className="org.apache.catalina.loader.VirtualWebappLoader"
searchVirtualFirst="true"
virtualClasspath="${project.parent.basedir}/runner/target/tomcat/webapps/alfresco-solr4/WEB-INF/classes" />
<!-- Load from all directories, not just when the META-INF directory is found in exploded JAR -->
<JarScanner scanAllDirectories="true" />
</Context>

View File

@@ -1,107 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>
<artifactId>${artifactId}</artifactId>
<name>Alfresco Share AMP Module</name>
<packaging>amp</packaging>
<description>This is a sample Alfresco Share AMP project, depended upon by the share WAR module</description>
<parent>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}</artifactId>
<version>${version}</version>
</parent>
<!--
SDK properties have sensible defaults in the SDK parent,
but you can override the properties below to use another version.
For more available properties see the alfresco-sdk-parent POM.
-->
<properties>
<!-- Defines the target WAR artifactId to run this amp, only used with the -Pamp-to-war switch
Allowed values: alfresco | share. In this case it's configured to use OOTB share -->
<app.amp.client.war.artifactId>share</app.amp.client.war.artifactId>
<!-- Defines the log level used in log4j.properties -->
<app.log.root.level>WARN</app.log.root.level>
</properties>
<!-- Following dependencies are needed for compiling Java code in src/main/java;
<scope>provided</scope> is inherited for each of the following;
for more info, please refer to alfresco-platform-distribution POM -->
<dependencies>
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>share</artifactId>
<version>${alfresco.version}</version>
<classifier>classes</classifier>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.extensions.surf</groupId>
<artifactId>spring-surf-api</artifactId>
<scope>provided</scope>
</dependency>
<!--===============================================================
The following dependencies are needed to be able to compile the
custom functional tests that are based on Page Objects (PO)
===============================================================-->
<!-- Bring in the Share Page Objects (PO) used in our functional tests.
It contains page objects such as LoginPage -->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>share-po</artifactId>
<version>${alfresco.version}</version>
<scope>test</scope>
</dependency>
<!-- Bring in the Share Page Object (PO) Tests that comes with Alfresco. It has
the org.alfresco.po.share.AbstractTest class that our custom tests extend. -->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>share-po</artifactId>
<version>${alfresco.version}</version>
<classifier>tests</classifier>
<scope>test</scope>
<!-- Exclude version 2.39.0 of selenium that does not work with latest FF browsers, we include
version 2.45 later on here -->
<exclusions>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
</exclusion>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Bring in newer selenium version -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.45.0-alfresco</version>
<scope>test</scope>
</dependency>
<!-- Test NG is defined with test scope in share-po, so need it here too -->
<!-- Alfresco code creates a wrapper around Test NG -->
<dependency>
<groupId>org.alfresco.test</groupId>
<artifactId>alfresco-testng</artifactId>
<version>1.1</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>

View File

@@ -1,9 +0,0 @@
# This file should contain messages and labels specific to this share extension
# Put here things like:
# Content Model Aspect and Type Labels
# Form field labels
# Doc lib Action labels and messages
# Doc Lib Action Forms labels
#

View File

@@ -1,14 +0,0 @@
# Custom AMP to WAR location mappings
#
# The following property can be used to include the standard set of mappings.
# The contents of this file will override any defaults. The default is
# 'true', i.e. the default mappings will be augmented or modified by values in
# this file.
#
include.default=true
#
# Custom mappings. If 'include.default' is false, then this is the complete set.
#
/web=/

View File

@@ -1,14 +0,0 @@
<!-- Share configuration related to this particular Share module extension, such as:
- Doclib action config
- Form config
- Aspect and Type config
Note. Any configuration related to the whole Share.war webapp
(i.e. not specific to this share extension) should be
placed in the environment specific config:
alfresco-allinone/share/src/main/resources/alfresco/web-extension/share-config-custom.xml file
-->
<alfresco-config>
</alfresco-config>

View File

@@ -1,92 +0,0 @@
#set($symbol_pound='#')
#set($symbol_dollar='$')
#set($symbol_escape='\' )
/*
* Copyright (C) 2005-2015 Alfresco Software Limited.
* This file is part of Alfresco
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package ${package}.demoamp;
import ${package}.demoamp.po.DemoPage;
import org.alfresco.po.share.AbstractTest;
import org.alfresco.po.share.LoginPage;
import org.alfresco.po.share.PeopleFinderPage;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
/**
* Functional test that demonstrates how to write and
* extend an alfresco share page object.
* This test shows the interaction with page objects
* brought from share-po project along with newly created ones
* that are present in the Demo amp.
*
* @author Michael Suzuki
* @since 2.0.1
*/
public class DemoPageTestIT extends AbstractTest {
DemoPage page;
@BeforeClass(groups = {"alfresco-one"})
public void prepare() throws Exception {
// Navigate to share
drone.navigateTo(shareUrl + "/page/hdp/ws/simple-page");
// Reuse Alfresco Share login page object from share-po lib.
LoginPage loginPage = new LoginPage(drone);
loginPage.loginAs(username, password);
}
@BeforeMethod
public void loadPage() {
// Goto demo page
drone.navigateTo(shareUrl + "/page/hdp/ws/simple-page");
page = new DemoPage(drone);
}
@Test
public void findLogo() {
Assert.assertTrue(page.isSimpleLogoDisplayed());
}
@Test
public void messageIsDisplayed() {
page.render();
String msg = page.getMessage();
Assert.assertNotNull(msg);
Assert.assertEquals("Hello from i18n!", msg);
}
/**
* Example of test reusing methods in abstract share page objects.
*/
@Test
public void titleDisplayed() {
// Invoke render when ready to use page object.
page.render();
Assert.assertNotNull(page);
Assert.assertTrue(page.getTitle().contains("This is a simple page"));
}
/**
* Test that show how we are able to reuse share page objects
* objects in particular the navigation object.
*/
@Test
public void navigate() {
Assert.assertNotNull(page.getNav());
PeopleFinderPage peoppleFinderPage = page.getNav().selectPeople().render();
Assert.assertNotNull(peoppleFinderPage);
}
}

View File

@@ -1,88 +0,0 @@
#set($symbol_pound='#')
#set($symbol_dollar='$')
#set($symbol_escape='\' )
/*
* Copyright (C) 2005-2015 Alfresco Software Limited.
* This file is part of Alfresco
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package ${package}.demoamp.po;
import org.alfresco.po.share.SharePage;
import org.alfresco.webdrone.RenderTime;
import org.alfresco.webdrone.WebDrone;
import org.openqa.selenium.By;
import org.openqa.selenium.NoSuchElementException;
/**
* Demo of simple share page object that encapsulates the demo of simple page.
*
* @author Michael Suzuki
* @since 2.0.1
*/
public class DemoPage extends SharePage {
private By SIMPLE_DEMO_LOGO = By.id("DEMO_SIMPLE_LOGO");
private By SIMPLE_DEMO_MESSAGE = By.id("DEMO_SIMPLE_MSG");
public DemoPage(WebDrone drone) {
super(drone);
}
@SuppressWarnings("unchecked")
@Override
public DemoPage render() {
return render(new RenderTime(maxPageLoadingTime));
}
@SuppressWarnings("unchecked")
@Override
public DemoPage render(RenderTime timer) {
while (true) {
timer.start();
try {
if (isSimpleLogoDisplayed() && isMessageDisplayed()) {
break;
}
} catch (NoSuchElementException nse) {
} finally {
timer.end();
}
}
return this;
}
@SuppressWarnings("unchecked")
@Override
public DemoPage render(long time) {
return render(new RenderTime(time));
}
public boolean isSimpleLogoDisplayed() {
try {
return drone.find(SIMPLE_DEMO_LOGO).isDisplayed();
} catch (NoSuchElementException se) {
}
return false;
}
public boolean isMessageDisplayed() {
try {
return drone.find(SIMPLE_DEMO_MESSAGE).isDisplayed();
} catch (NoSuchElementException se) {
}
return false;
}
public String getMessage() {
return drone.find(SIMPLE_DEMO_MESSAGE).getText();
}
}

View File

@@ -1,12 +0,0 @@
#set($symbol_pound='#')
#set($symbol_dollar='$')
#set($symbol_escape='\' )
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Custom Share AMP Page Object Tests" parallel="false">
<test name="DemoPageTest">
<classes>
<class name="${package}.demoamp.DemoPageTestIT"/>
</classes>
</test>
</suite>

View File

@@ -1,88 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>
<artifactId>${artifactId}</artifactId>
<name>Alfresco Share WAR Aggregator</name>
<packaging>war</packaging>
<description>Alfresco Share aggregator, installs your Share AMPs in the Share WAR for aggregation and easy deployment purposes</description>
<parent>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}</artifactId>
<version>${version}</version>
</parent>
<properties>
<!-- Used in share-config-custom.xml when testing.
By default points to standard location (local) of Alfresco Repository -->
<alfresco.repo.url>http://localhost:8080/alfresco</alfresco.repo.url>
</properties>
<dependencies>
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>${alfresco.share.artifactId}</artifactId>
<version>${alfresco.version}</version>
<type>war</type>
</dependency>
<!-- Demonstrating the dependency / installation of the share AMP developed in the 'share-amp' module -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>share-amp</artifactId>
<version>${project.version}</version>
<type>amp</type>
</dependency>
<!-- Uncomment if you are using RM (Records Management) module -->
<!--
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-rm-share</artifactId>
<version>${alfresco.rm.version}</version>
<type>amp</type>
</dependency>
-->
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<!-- Here is can control the order of overlay of your (WAR, AMP, etc.) dependencies
| NOTE: At least one WAR dependency must be uncompressed first
| NOTE: In order to have a dependency effectively added to the WAR you need to
| explicitly mention it in the overlay section.
| NOTE: First-win resource strategy is used by the WAR plugin
-->
<overlays>
<!-- The current project customizations -->
<overlay/>
<!-- The Share WAR -->
<overlay>
<groupId>${alfresco.groupId}</groupId>
<artifactId>${alfresco.share.artifactId}</artifactId>
<type>war</type>
<!-- To allow inclusion of META-INF -->
<excludes/>
</overlay>
<!-- Add / sort your AMPs here -->
<overlay>
<groupId>${project.groupId}</groupId>
<artifactId>share-amp</artifactId>
<type>amp</type>
</overlay>
<!-- Uncomment if you are using RM module -->
<!--
<overlay>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-rm-share</artifactId>
<type>amp</type>
</overlay>
-->
</overlays>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@@ -1,119 +0,0 @@
<!-- Alfresco 5.0.d custom-slingshot-application-context.xml sample
Note. Any configuration related to a specific Share extension
(such as evaluator bean and message resource bean) should be
placed in the specific extension config file, such as for example
alfresco-allinone/share-amp/src/main/amp/config/alfresco/web-extension/custom-slingshot-application-context.xml
-->
<?xml version='1.0' encoding='UTF-8'?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:hz="http://www.hazelcast.com/schema/spring"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.hazelcast.com/schema/spring
http://www.hazelcast.com/schema/spring/hazelcast-spring-2.4.xsd">
<!--
Hazelcast distributed messaging configuration - Share web-tier cluster config (3.4.8 and 4.0.1)
- see http://www.hazelcast.com/docs.jsp
- and specifically http://www.hazelcast.com/docs/1.9.4/manual/single_html/#SpringIntegration
-->
<!-- Configure cluster to use either Multicast or direct TCP-IP messaging - multicast is default -->
<!-- Optionally specify network interfaces - server machines likely to have more than one interface -->
<!-- The messaging topic - the "name" is also used by the persister config below -->
<!--
<hz:topic id="topic" instance-ref="webframework.cluster.slingshot" name="slingshot-topic"/>
<hz:hazelcast id="webframework.cluster.slingshot">
<hz:config>
<hz:group name="slingshot" password="alfresco"/>
<hz:network port="5801" port-auto-increment="true">
<hz:join>
<hz:multicast enabled="true"
multicast-group="224.2.2.5"
multicast-port="54327"/>
<hz:tcp-ip enabled="false">
<hz:members></hz:members>
</hz:tcp-ip>
</hz:join>
<hz:interfaces enabled="false">
<hz:interface>192.168.1.*</hz:interface>
</hz:interfaces>
</hz:network>
</hz:config>
</hz:hazelcast>
<bean id="webframework.slingshot.persister.remote" class="org.alfresco.web.site.ClusterAwarePathStoreObjectPersister" parent="webframework.sitedata.persister.abstract">
<property name="store" ref="webframework.webapp.store.remote" />
<property name="pathPrefix"><value>alfresco/site-data/${objectTypeIds}</value></property>
<property name="hazelcastInstance" ref="webframework.cluster.slingshot" />
<property name="hazelcastTopicName"><value>slingshot-topic</value></property>
</bean>
<bean id="webframework.factory.requestcontext.servlet" class="org.alfresco.web.site.ClusterAwareRequestContextFactory" parent="webframework.factory.base">
<property name="linkBuilderFactory" ref="webframework.factory.linkbuilder.servlet" />
<property name="extensibilityModuleHandler" ref="webscripts.extensibility.handler" />
<property name="dependencyHandler" ref="dependency.handler" />
<property name="clusterObjectPersister" ref="webframework.slingshot.persister.remote" />
</bean>
-->
<!-- Legacy Share web-tier cluster config (3.4.7 and 4.0.0) -->
<!--
<bean id="webframework.slingshot.persister.remote" class="org.springframework.extensions.surf.persister.PathStoreObjectPersister" parent="webframework.sitedata.persister.abstract">
<property name="store" ref="webframework.webapp.store.remote" />
<property name="pathPrefix"><value>alfresco/site-data/${objectTypeIds}</value></property>
<property name="noncachableObjectTypes">
<set>
<value>page</value>
<value>component</value>
<value>configuration</value>
</set>
</property>
</bean>
-->
<!-- Override WebScripts searchpath - to include remote store -->
<!-- This enables remote component load via a central Alfresco server -->
<!--
<bean id="webframework.webscripts.store.alfresco.remote" parent="webframework.store.remote.abstract">
<property name="path"><value>alfresco/site-webscripts</value></property>
</bean>
<bean id="webframework.webscripts.searchpath" class="org.springframework.extensions.webscripts.SearchPath">
<property name="searchPath">
<list>
<ref bean="webframework.webscripts.store.alfresco.remote" />
<ref bean="webframework.webscripts.store.alfresco.custom" />
<ref bean="webframework.webscripts.store.alfresco.classpath" />
<ref bean="webframework.webscripts.store.classpath" />
<ref bean="webscripts.store.alfresco" />
<ref bean="webscripts.store" />
</list>
</property>
</bean>
-->
<!-- Override Templates and Scripts searchpath - to include remote store -->
<!-- This enables remote component load via a central Alfresco server -->
<!--
<bean id="webframework.templates.store.alfresco.remote" parent="webframework.store.remote.abstract">
<property name="path"><value>alfresco/templates</value></property>
</bean>
<bean id="webframework.templates.searchpath" class="org.springframework.extensions.webscripts.SearchPath">
<property name="searchPath">
<list>
<ref bean="webframework.templates.store.alfresco.remote" />
<ref bean="webframework.templates.store.alfresco.custom" />
<ref bean="webframework.webscripts.store.alfresco.custom" />
<ref bean="webframework.templates.store.alfresco.classpath" />
<ref bean="webframework.webscripts.store.alfresco.classpath" />
<ref bean="webframework.templates.store.classpath" />
<ref bean="webframework.webscripts.store.classpath" />
</list>
</property>
</bean>
-->
</beans>

View File

@@ -1,489 +0,0 @@
<!-- Alfresco 5.0.d share-config-custom.xml sample.
Note:
Any configuration related to a specific Share AMP extension
(such as doclib action config and form config)
should be added to that extension's custom config
(i.e. into the share-amp/src/main/resources/META-INF/share-config-custom.xml)
-->
<alfresco-config>
<!-- Global config section -->
<config replace="true">
<flags>
<!--
Developer debugging setting to turn on DEBUG mode for client scripts in the browser
-->
<client-debug>false</client-debug>
<!--
LOGGING can always be toggled at runtime when in DEBUG mode (Ctrl, Ctrl, Shift, Shift).
This flag automatically activates logging on page load.
-->
<client-debug-autologging>false</client-debug-autologging>
</flags>
</config>
<config evaluator="string-compare" condition="WebFramework">
<web-framework>
<!-- SpringSurf Autowire Runtime Settings -->
<!--
Developers can set mode to 'development' to disable; SpringSurf caches,
FreeMarker template caching and Rhino JavaScript compilation.
-->
<autowire>
<!-- Pick the mode: "production" or "development" -->
<mode>production</mode>
</autowire>
<!-- Allows extension modules with <auto-deploy> set to true to be automatically deployed -->
<module-deployment>
<mode>manual</mode>
<enable-auto-deploy-modules>true</enable-auto-deploy-modules>
</module-deployment>
</web-framework>
</config>
<!-- Disable the CSRF Token Filter -->
<!--
<config evaluator="string-compare" condition="CSRFPolicy" replace="true">
<filter/>
</config>
-->
<!--
To run the CSRF Token Filter behind 1 or more proxies that do not rewrite the Origin or Referere headers:
1. Copy the "CSRFPolicy" default config in share-security-config.xml and paste it into this file.
2. Replace the old config by setting the <config> element's "replace" attribute to "true" like below:
<config evaluator="string-compare" condition="CSRFPolicy" replace="true">
3. To every <action name="assertReferer"> element add the following child element
<param name="referer">http://www.proxy1.com/.*|http://www.proxy2.com/.*</param>
4. To every <action name="assertOrigin"> element add the following child element
<param name="origin">http://www.proxy1.com|http://www.proxy2.com</param>
-->
<!--
Remove the default wildcard setting and use instead a strict whitelist of the only domains that shall be allowed
to be used inside iframes (i.e. in the WebView dashlet on the dashboards)
-->
<!--
<config evaluator="string-compare" condition="IFramePolicy" replace="true">
<cross-domain>
<url>http://www.trusted-domain-1.com/</url>
<url>http://www.trusted-domain-2.com/</url>
</cross-domain>
</config>
-->
<!-- Turn off header that stops Share from being displayed in iframes on pages from other domains -->
<!--
<config evaluator="string-compare" condition="SecurityHeadersPolicy">
<headers>
<header>
<name>X-Frame-Options</name>
<enabled>false</enabled>
</header>
</headers>
</config>
-->
<!-- Prevent browser communication over HTTP (for HTTPS servers) -->
<!--
<config evaluator="string-compare" condition="SecurityHeadersPolicy">
<headers>
<header>
<name>Strict-Transport-Security</name>
<value>max-age=31536000</value>
</header>
</headers>
</config>
-->
<config evaluator="string-compare" condition="Replication">
<share-urls>
<!--
To discover a Repository Id, browse to the remote server's CMIS landing page at:
http://{server}:{port}/alfresco/service/cmis/index.html
The Repository Id field is found under the "CMIS Repository Information" expandable panel.
Example config entry:
<share-url repositoryId="622f9533-2a1e-48fe-af4e-ee9e41667ea4">http://new-york-office:8080/share/</share-url>
-->
</share-urls>
</config>
<!-- Document Library config section -->
<config evaluator="string-compare" condition="DocumentLibrary" replace="true">
<tree>
<!--
Whether the folder Tree component should enumerate child folders or not.
This is a relatively expensive operation, so should be set to "false" for Repositories with broad folder structures.
-->
<evaluate-child-folders>false</evaluate-child-folders>
<!--
Optionally limit the number of folders shown in treeview throughout Share.
-->
<maximum-folder-count>1000</maximum-folder-count>
<!--
Default timeout in milliseconds for folder Tree component to recieve response from Repository
-->
<timeout>7000</timeout>
</tree>
<!--
Used by the "Manage Aspects" action
For custom aspects, remember to also add the relevant i18n string(s)
cm_myaspect=My Aspect
-->
<aspects>
<!-- Aspects that a user can see -->
<visible>
<aspect name="cm:generalclassifiable" />
<aspect name="cm:complianceable" />
<aspect name="cm:dublincore" />
<aspect name="cm:effectivity" />
<aspect name="cm:summarizable" />
<aspect name="cm:versionable" />
<aspect name="cm:templatable" />
<aspect name="cm:emailed" />
<aspect name="emailserver:aliasable" />
<aspect name="cm:taggable" />
<aspect name="app:inlineeditable" />
<aspect name="cm:geographic" />
<aspect name="exif:exif" />
<aspect name="audio:audio" />
<aspect name="cm:indexControl" />
<aspect name="dp:restrictable" />
</visible>
<!-- Aspects that a user can add. Same as "visible" if left empty -->
<addable>
</addable>
<!-- Aspects that a user can remove. Same as "visible" if left empty -->
<removeable>
</removeable>
</aspects>
<!--
Used by the "Change Type" action
Define valid subtypes using the following example:
<type name="cm:content">
<subtype name="cm:mysubtype" />
</type>
Remember to also add the relevant i18n string(s):
cm_mysubtype=My SubType
-->
<types>
<type name="cm:content">
</type>
<type name="cm:folder">
</type>
<type name="trx:transferTarget">
<subtype name="trx:fileTransferTarget" />
</type>
</types>
<!--
If set, will present a WebDAV link for the current item on the Document and Folder details pages.
Also used to generate the "View in Alfresco Explorer" action for folders.
-->
<repository-url>http://localhost:8080/alfresco</repository-url>
<!--
Google Docs™ integration
-->
<google-docs>
<!--
Enable/disable the Google Docs UI integration (Extra types on Create Content menu, Google Docs actions).
-->
<enabled>false</enabled>
<!--
The mimetypes of documents Google Docs allows you to create via the Share interface.
The I18N label is created from the "type" attribute, e.g. google-docs.doc=Google Docs&trade; Document
-->
<creatable-types>
<creatable type="doc">application/vnd.openxmlformats-officedocument.wordprocessingml.document</creatable>
<creatable type="xls">application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</creatable>
<creatable type="ppt">application/vnd.ms-powerpoint</creatable>
</creatable-types>
</google-docs>
<!--
File upload configuration
-->
<file-upload>
<!--
Adobe Flash™
In certain environments, an HTTP request originating from Flash cannot be authenticated using an existing session.
See: http://bugs.adobe.com/jira/browse/FP-4830
For these cases, it is useful to disable the Flash-based uploader for Share Document Libraries.
-->
<adobe-flash-enabled>true</adobe-flash-enabled>
</file-upload>
</config>
<!-- Custom DocLibActions config section -->
<config evaluator="string-compare" condition="DocLibActions">
<actionGroups>
<actionGroup id="document-browse">
<!-- Simple Repo Actions -->
<!--
<action index="340" id="document-extract-metadata" />
<action index="350" id="document-increment-counter" />
-->
<!-- Dialog Repo Actions -->
<!--
<action index="360" id="document-transform" />
<action index="370" id="document-transform-image" />
<action index="380" id="document-execute-script" />
-->
</actionGroup>
</actionGroups>
</config>
<!-- Global folder picker config section -->
<config evaluator="string-compare" condition="GlobalFolder">
<siteTree>
<container type="cm:folder">
<!-- Use a specific label for this container type in the tree -->
<rootLabel>location.path.documents</rootLabel>
<!-- Use a specific uri to retreive the child nodes for this container type in the tree -->
<uri>slingshot/doclib/treenode/site/{site}/{container}{path}?children={evaluateChildFoldersSite}&amp;max={maximumFolderCountSite}</uri>
</container>
</siteTree>
</config>
<!-- Repository Library config section -->
<config evaluator="string-compare" condition="RepositoryLibrary" replace="true">
<!--
Root nodeRef or xpath expression for top-level folder.
e.g. alfresco://user/home, /app:company_home/st:sites/cm:site1
If using an xpath expression, ensure it is properly ISO9075 encoded here.
-->
<root-node>alfresco://company/home</root-node>
<tree>
<!--
Whether the folder Tree component should enumerate child folders or not.
This is a relatively expensive operation, so should be set to "false" for Repositories with broad folder structures.
-->
<evaluate-child-folders>false</evaluate-child-folders>
<!--
Optionally limit the number of folders shown in treeview throughout Share.
-->
<maximum-folder-count>500</maximum-folder-count>
</tree>
<!--
Whether the link to the Repository Library appears in the header component or not.
-->
<visible>true</visible>
</config>
<!-- Kerberos settings -->
<!-- To enable kerberos rename this condition to "Kerberos" -->
<config evaluator="string-compare" condition="KerberosDisabled" replace="true">
<kerberos>
<!--
Password for HTTP service account.
The account name *must* be built from the HTTP server name, in the format :
HTTP/<server_name>@<realm>
(NB this is because the web browser requests an ST for the
HTTP/<server_name> principal in the current realm, so if we're to decode
that ST, it has to match.)
-->
<password>secret</password>
<!--
Kerberos realm and KDC address.
-->
<realm>ALFRESCO.ORG</realm>
<!--
Service Principal Name to use on the repository tier.
This must be like: HTTP/host.name@REALM
-->
<endpoint-spn>HTTP/repository.server.com@ALFRESCO.ORG</endpoint-spn>
<!--
JAAS login configuration entry name.
-->
<config-entry>ShareHTTP</config-entry>
<!--
A Boolean which when true strips the @domain sufix from Kerberos authenticated usernames.
Use together with stripUsernameSuffix property in alfresco-global.properties file.
-->
<stripUserNameSuffix>true</stripUserNameSuffix>
</kerberos>
</config>
<!-- Uncomment and modify the URL to Activiti Admin Console if required. -->
<!--
<config evaluator="string-compare" condition="ActivitiAdmin" replace="true">
<activiti-admin-url>http://localhost:8080/alfresco/activiti-admin</activiti-admin-url>
</config>
-->
<config evaluator="string-compare" condition="Remote">
<remote>
<endpoint>
<id>alfresco-noauth</id>
<name>Alfresco - unauthenticated access</name>
<description>Access to Alfresco Repository WebScripts that do not require authentication</description>
<connector-id>alfresco</connector-id>
<endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
<identity>none</identity>
</endpoint>
<endpoint>
<id>alfresco</id>
<name>Alfresco - user access</name>
<description>Access to Alfresco Repository WebScripts that require user authentication</description>
<connector-id>alfresco</connector-id>
<endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
<identity>user</identity>
</endpoint>
<endpoint>
<id>alfresco-feed</id>
<name>Alfresco Feed</name>
<description>Alfresco Feed - supports basic HTTP authentication via the EndPointProxyServlet</description>
<connector-id>http</connector-id>
<endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
<basic-auth>true</basic-auth>
<identity>user</identity>
</endpoint>
<endpoint>
<id>alfresco-api</id>
<parent-id>alfresco</parent-id>
<name>Alfresco Public API - user access</name>
<description>Access to Alfresco Repository Public API that require user authentication.
This makes use of the authentication that is provided by parent 'alfresco' endpoint.</description>
<connector-id>alfresco</connector-id>
<endpoint-url>http://localhost:8080/alfresco/api</endpoint-url>
<identity>user</identity>
</endpoint>
</remote>
</config>
<!--
Overriding endpoints to reference an Alfresco server with external SSO enabled
NOTE: If utilising a load balancer between web-tier and repository cluster, the "sticky
sessions" feature of your load balancer must be used.
NOTE: If alfresco server location is not localhost:8080 then also combine changes from the
"example port config" section below.
*Optional* keystore contains SSL client certificate + trusted CAs.
Used to authenticate share to an external SSO system such as CAS
Remove the keystore section if not required i.e. for NTLM.
NOTE: For Kerberos SSO rename the "KerberosDisabled" condition above to "Kerberos"
NOTE: For external SSO, switch the endpoint connector to "alfrescoHeader" and set
the userHeader value to the name of the HTTP header that the external SSO
uses to provide the authenticated user name.
NOTE: For external SSO, Share now supports the "userIdPattern" mechanism as is available
on the repository config for External Authentication sub-system. Add the following
element to your "alfrescoHeader" connector config:
<userIdPattern>^ignore-(\w+)-ignore</userIdPattern>
This is an example, ensure the Id pattern matches your repository config.
NOTE: For external SSO, Share now supports stateless (no Http Session or sticky session)
connection to the repository when using the alfrescoHeader remote user connector.
e.g. You can change endpoint config to use the faster /service URL instead of the
/wcs URL if you are using External Authentication and then remove sticky session config
from your proxy between Share and Alfresco. Note that this is also faster because Share
will no longer call the /touch REST API before every remote call to the repository.
-->
<!--
<config evaluator="string-compare" condition="Remote">
<remote>
<keystore>
<path>alfresco/web-extension/alfresco-system.p12</path>
<type>pkcs12</type>
<password>alfresco-system</password>
</keystore>
<connector>
<id>alfrescoCookie</id>
<name>Alfresco Connector</name>
<description>Connects to an Alfresco instance using cookie-based authentication</description>
<class>org.alfresco.web.site.servlet.SlingshotAlfrescoConnector</class>
</connector>
<connector>
<id>alfrescoHeader</id>
<name>Alfresco Connector</name>
<description>Connects to an Alfresco instance using header and cookie-based authentication</description>
<class>org.alfresco.web.site.servlet.SlingshotAlfrescoConnector</class>
<userHeader>SsoUserHeader</userHeader>
</connector>
<endpoint>
<id>alfresco</id>
<name>Alfresco - user access</name>
<description>Access to Alfresco Repository WebScripts that require user authentication</description>
<connector-id>alfrescoCookie</connector-id>
<endpoint-url>http://localhost:8080/alfresco/wcs</endpoint-url>
<identity>user</identity>
<external-auth>true</external-auth>
</endpoint>
<endpoint>
<id>alfresco-feed</id>
<parent-id>alfresco</parent-id>
<name>Alfresco Feed</name>
<description>Alfresco Feed - supports basic HTTP authentication via the EndPointProxyServlet</description>
<connector-id>alfrescoHeader</connector-id>
<endpoint-url>http://localhost:8080/alfresco/wcs</endpoint-url>
<identity>user</identity>
<external-auth>true</external-auth>
</endpoint>
<endpoint>
<id>alfresco-api</id>
<parent-id>alfresco</parent-id>
<name>Alfresco Public API - user access</name>
<description>Access to Alfresco Repository Public API that require user authentication.
This makes use of the authentication that is provided by parent 'alfresco' endpoint.</description>
<connector-id>alfrescoHeader</connector-id>
<endpoint-url>http://localhost:8080/alfresco/api</endpoint-url>
<identity>user</identity>
<external-auth>true</external-auth>
</endpoint>
</remote>
</config>
-->
<!-- Cookie settings -->
<!-- To disable alfUsername2 cookie set enableCookie value to "false" -->
<!--
<plug-ins>
<element-readers>
<element-reader element-name="cookie" class="org.alfresco.web.config.cookie.CookieElementReader"/>
</element-readers>
</plug-ins>
<config evaluator="string-compare" condition="Cookie" replace="true">
<cookie>
<enableCookie>false</enableCookie>
<cookies-to-remove>
<cookie-to-remove>alfUsername3</cookie-to-remove>
<cookie-to-remove>alfLogin</cookie-to-remove>
</cookies-to-remove>
</cookie>
</config>
-->
</alfresco-config>

View File

@@ -1,47 +0,0 @@
# Set root logger level to error
log4j.rootLogger=error, Console, File
###### Console appender definition #######
# All outputs currently set to be a ConsoleAppender.
log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout=org.apache.log4j.PatternLayout
# use log4j NDC to replace %x with tenant domain / username
log4j.appender.Console.layout.ConversionPattern=%d{ISO8601} %x %-5p [%c{3}] [%t] %m%n
#log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c] %m%n
###### File appender definition #######
log4j.appender.File=org.apache.log4j.DailyRollingFileAppender
log4j.appender.File.File=${app.log.dir}share.log
log4j.appender.File.Append=true
log4j.appender.File.DatePattern='.'yyyy-MM-dd
log4j.appender.File.layout=org.apache.log4j.PatternLayout
log4j.appender.File.layout.ConversionPattern=%d{yyyy-MM-dd} %d{ABSOLUTE} %-5p [%c] [%t] %m%n
# Spring
log4j.logger.org.springframework=warn
# Turn off Spring remoting warnings that should really be info or debug.
log4j.logger.org.springframework.remoting.support=error
log4j.logger.org.springframework.util=error
# MyFaces
log4j.logger.org.apache.myfaces.util.DebugUtils=info
log4j.logger.org.apache.myfaces.el.VariableResolverImpl=error
log4j.logger.org.apache.myfaces.application.jsp.JspViewHandlerImpl=error
log4j.logger.org.apache.myfaces.taglib=error
# Alfresco
log4j.logger.org.alfresco=error
log4j.logger.org.alfresco.config=warn
log4j.logger.org.alfresco.config.JndiObjectFactoryBean=warn
log4j.logger.org.alfresco.web=info
# Web Framework
log4j.logger.org.springframework.extensions.webscripts=info
log4j.logger.org.springframework.extensions.webscripts.ScriptLogger=warn
log4j.logger.org.springframework.extensions.webscripts.ScriptDebugger=off
# Freemarker
# Note the freemarker.runtime logger is used to log non-fatal errors that are handled by Alfresco's retrying transaction handler
log4j.logger.freemarker.runtime=

View File

@@ -1,93 +0,0 @@
<alfresco-config>
<config evaluator="string-compare" condition="WebFramework">
<web-framework>
<autowire>
<!-- Changing this to 'development' currently breaks the Admin Console.
Instead we make a POST to clear Share dependency caches, see 'clear-caches-refresh-ws' profile. -->
<mode>production</mode> <!-- not really need in the long run, used for YUI - deprecate -->
</autowire>
<!--
We don't need to do this when we have the new refresh mojos in the Alfresco plug-in.
If resource caching has been disabled then all the dependency caches will be cleared
before processing the Aikau jsonModel request...
(i.e. this.dojoDependencyHandler.clearCaches() )
For more information see the Aikau source code: https://github.com/Alfresco/Aikau
-->
<disable-resource-caching>false</disable-resource-caching>
</web-framework>
</config>
<!-- Global config section -->
<config replace="true">
<flags>
<!--
Developer debugging setting to turn on DEBUG mode for client scripts in the browser
-->
<client-debug>true</client-debug>
<!--
LOGGING can always be toggled at runtime when in DEBUG mode (Ctrl, Ctrl, Shift, Shift).
This flag automatically activates logging on page load.
-->
<client-debug-autologging>false</client-debug-autologging>
</flags>
</config>
<!--
Disable CSRF completely for now
It seems Share has issues on 4.2.x with the embedded tomcat and CSRFPolicy
-->
<config evaluator="string-compare" condition="CSRFPolicy" replace="true">
<filter/>
</config>
<!--
Change so it is picked up from property where the Alfresco Repo Webapp is running
(e.g. http://localhost:8080/alfresco)
-->
<config evaluator="string-compare" condition="Remote">
<remote>
<endpoint>
<id>alfresco-noauth</id>
<name>Alfresco - unauthenticated access</name>
<description>Access to Alfresco Repository WebScripts that do not require authentication</description>
<connector-id>alfresco</connector-id>
<endpoint-url>${alfresco.repo.url}/s</endpoint-url>
<identity>none</identity>
</endpoint>
<endpoint>
<id>alfresco</id>
<name>Alfresco - user access</name>
<description>Access to Alfresco Repository WebScripts that require user authentication</description>
<connector-id>alfresco</connector-id>
<endpoint-url>${alfresco.repo.url}/s</endpoint-url>
<identity>user</identity>
</endpoint>
<endpoint>
<id>alfresco-feed</id>
<name>Alfresco Feed</name>
<description>Alfresco Feed - supports basic HTTP authentication via the EndPointProxyServlet</description>
<connector-id>http</connector-id>
<endpoint-url>${alfresco.repo.url}/s</endpoint-url>
<basic-auth>true</basic-auth>
<identity>user</identity>
</endpoint>
<endpoint>
<id>activiti-admin</id>
<name>Activiti Admin UI - user access</name>
<description>Access to Activiti Admin UI, that requires user authentication</description>
<connector-id>activiti-admin-connector</connector-id>
<endpoint-url>${alfresco.repo.url}/activiti-admin</endpoint-url>
<identity>user</identity>
</endpoint>
</remote>
</config>
</alfresco-config>

View File

@@ -1,52 +0,0 @@
# This file is copied from Alfresco Share 5.0.d
# Overrides tomcat/webapps/share/WEB-INF/classes/log4j,properties
# and sets new file location from property and log level from property.
#
# Set root logger level to error
log4j.rootLogger=${app.log.root.level}, Console, File
###### Console appender definition #######
# All outputs currently set to be a ConsoleAppender.
log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout=org.apache.log4j.PatternLayout
# use log4j NDC to replace %x with tenant domain / username
log4j.appender.Console.layout.ConversionPattern=%d{ISO8601} %x %-5p [%c{3}] [%t] %m%n
#log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c] %m%n
###### File appender definition #######
log4j.appender.File=org.apache.log4j.DailyRollingFileAppender
log4j.appender.File.File=${app.log.dir}alfresco.log
log4j.appender.File.Append=true
log4j.appender.File.DatePattern='.'yyyy-MM-dd
log4j.appender.File.layout=org.apache.log4j.PatternLayout
log4j.appender.File.layout.ConversionPattern=%d{yyyy-MM-dd} %d{ABSOLUTE} %-5p [%c] [%t] %m%n
# Spring
log4j.logger.org.springframework=warn
# Turn off Spring remoting warnings that should really be info or debug.
log4j.logger.org.springframework.remoting.support=error
log4j.logger.org.springframework.util=error
# MyFaces
log4j.logger.org.apache.myfaces.util.DebugUtils=info
log4j.logger.org.apache.myfaces.el.VariableResolverImpl=error
log4j.logger.org.apache.myfaces.application.jsp.JspViewHandlerImpl=error
log4j.logger.org.apache.myfaces.taglib=error
# Alfresco
log4j.logger.org.alfresco=error
log4j.logger.org.alfresco.config=warn
log4j.logger.org.alfresco.config.JndiObjectFactoryBean=warn
log4j.logger.org.alfresco.web=info
# Web Framework
log4j.logger.org.springframework.extensions.webscripts=info
log4j.logger.org.springframework.extensions.webscripts.ScriptLogger=warn
log4j.logger.org.springframework.extensions.webscripts.ScriptDebugger=off
# Freemarker
# Note the freemarker.runtime logger is used to log non-fatal errors that are handled by Alfresco's retrying transaction handler
log4j.logger.freemarker.runtime=

View File

@@ -1,129 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>
<artifactId>solr-config</artifactId>
<packaging>pom</packaging>
<name>Alfresco Solr 4 Configuration</name>
<description>Apache Solr 4 Configuration Customization</description>
<!-- Setup the parent extension project, which contain all the Alfresco Maven SDK stuff -->
<parent>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}</artifactId>
<version>${version}</version>
</parent>
<!-- Build Solr Configuration only when we run an embedded Tomcat (i.e. profile run is enabled).
We assume that there is no need to customize Apache Solr 4 itself. -->
<profiles>
<profile>
<id>run</id>
<properties>
<alfresco.solr.dir>${alfresco.data.location}/solr4</alfresco.solr.dir>
<alfresco.solr.home.dir>${alfresco.solr.dir}/config</alfresco.solr.home.dir>
<alfresco.solr.data.dir>${alfresco.solr.dir}/data</alfresco.solr.data.dir>
</properties>
<dependencies>
<!-- Download the default Solr4-config.zip Configuration files,
they will be updated so we can run locally over HTTP -->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-solr4</artifactId>
<version>${alfresco.version}</version>
<classifier>config</classifier>
<type>zip</type>
</dependency>
</dependencies>
<build>
<plugins>
<!-- Run goal unpack and unzip the content of the downloaded default solr-config.zip file into the
alfresco-maven-sdk2-test/alf_data_dev/solr4/config directory
(The solr-config.zip is brought in via the dependency section) -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-alfresco-config</id>
<goals>
<goal>unpack</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<outputDirectory>${alfresco.solr.home.dir}</outputDirectory>
<artifactItems>
<artifactItem>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-solr4</artifactId>
<version>${alfresco.version}</version>
<classifier>config</classifier>
<type>zip</type>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<!-- For windows paths, convert single \ to / for the ${alfresco.solr.data.dir} path,
by default it will be c:\bla\, we need forward slash or double backslash. -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>regexp-property</id>
<phase>generate-resources</phase>
<goals>
<goal>regex-property</goal>
</goals>
</execution>
</executions>
<configuration>
<name>solrDataDir</name>
<value>${alfresco.solr.data.dir}</value>
<regex>\\</regex>
<replacement>/</replacement>
<failIfNoMatch>false</failIfNoMatch>
</configuration>
</plugin>
<!-- Run the goal replace and update configuration files for the
Solr cores to reflect our build structure -->
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<executions>
<execution>
<id>setup-solr-config</id>
<phase>generate-resources</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<regex>false</regex>
<includes>
<include>${alfresco.solr.home.dir}/archive-SpacesStore/conf/solrcore.properties</include>
<include>${alfresco.solr.home.dir}/workspace-SpacesStore/conf/solrcore.properties</include>
</includes>
<replacements>
<replacement>
<token>@@ALFRESCO_SOLR4_DATA_DIR@@</token>
<value>${solrDataDir}/index</value>
</replacement>
</replacements>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

View File

@@ -37,11 +37,16 @@ share.host=localhost
share.port=8080
share.protocol=http
index.subsystem.name=solr4
solr.host=localhost
solr.port=8080
solr.secureComms=none
# Don't try and recover any index
index.recovery.mode=NONE
# As we run embedded, we set Lucene
# TODO: Find a better solution for indexing, as buildonly (embedded Lucene) is deprecated and going to be removed soon
index.subsystem.name=buildonly
#index.subsystem.name=buildonly
# These jobs seem to require Lucene (Unsupported Operation with Solr) so we disable them / set to future date
# See https://forums.alfresco.com/en/viewtopic.php?f=52&t=41597

View File

@@ -1,8 +1,5 @@
# This is a full override of Alfresco 4.2.b log4j.properties
# This file overwrites the alfresco.war log4j.properties
# Set root logger level to error
log4j.rootLogger=${app.log.root.level}, Console, File
log4j.rootLogger=error, Console, File
###### Console appender definition #######
@@ -16,11 +13,11 @@ log4j.appender.Console.layout.ConversionPattern=%d{ISO8601} %x %-5p [%c{3}] [%t]
###### File appender definition #######
log4j.appender.File=org.apache.log4j.DailyRollingFileAppender
log4j.appender.File.File=${app.log.dir}alfresco.log
log4j.appender.File.File=alfresco.log
log4j.appender.File.Append=true
log4j.appender.File.DatePattern='.'yyyy-MM-dd
log4j.appender.File.layout=org.apache.log4j.PatternLayout
log4j.appender.File.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c] %m%n
log4j.appender.File.layout.ConversionPattern=%d{yyyy-MM-dd} %d{ABSOLUTE} %-5p [%c] [%t] %m%n
###### Hibernate specific appender definition #######
#log4j.appender.file=org.apache.log4j.FileAppender
@@ -70,10 +67,10 @@ log4j.logger.org.hibernate.ps.PreparedStatementCache=info
# Alfresco
log4j.logger.org.alfresco=error
log4j.logger.org.alfresco.repo.admin=info
log4j.logger.org.alfresco.repo.transaction=warn
log4j.logger.org.alfresco.repo.cache.TransactionalCache=warn
log4j.logger.org.alfresco.repo.model.filefolder=warn
log4j.logger.org.alfresco.repo.tenant=info
log4j.logger.org.alfresco.repo.avm=info
log4j.logger.org.alfresco.config=warn
log4j.logger.org.alfresco.config.JndiObjectFactoryBean=warn
log4j.logger.org.alfresco.config.JBossEnabledWebApplicationContext=warn
@@ -89,23 +86,18 @@ log4j.logger.org.alfresco.web=info
#log4j.logger.org.alfresco.web.ui.repo.component.UIActions=debug
#log4j.logger.org.alfresco.web.ui.repo.tag.PageTag=debug
#log4j.logger.org.alfresco.web.bean.clipboard=debug
log4j.logger.org.alfresco.repo.webservice=info
log4j.logger.org.alfresco.service.descriptor.DescriptorService=info
#log4j.logger.org.alfresco.web.page=debug
log4j.logger.org.alfresco.repo.importer.ImporterBootstrap=error
#log4j.logger.org.alfresco.repo.importer.ImporterBootstrap=info
log4j.logger.org.alfresco.web.ui.common.Utils=error
#log4j.logger.org.alfresco.web.ui.common.Utils=info
log4j.logger.org.alfresco.repo.admin.patch.PatchExecuter=info
log4j.logger.org.alfresco.repo.domain.patch.ibatis.PatchDAOImpl=info
# Specific patches
log4j.logger.org.alfresco.repo.admin.patch.impl.DeploymentMigrationPatch=info
log4j.logger.org.alfresco.repo.version.VersionMigrator=info
log4j.logger.org.alfresco.repo.admin.patch.impl.ResetWCMToGroupBasedPermissionsPatch=info
log4j.logger.org.alfresco.repo.module.ModuleServiceImpl=info
log4j.logger.org.alfresco.repo.domain.schema.SchemaBootstrap=info
@@ -113,17 +105,17 @@ log4j.logger.org.alfresco.repo.admin.ConfigurationChecker=info
log4j.logger.org.alfresco.repo.node.index.AbstractReindexComponent=warn
log4j.logger.org.alfresco.repo.node.index.IndexTransactionTracker=warn
log4j.logger.org.alfresco.repo.node.index.FullIndexRecoveryComponent=info
log4j.logger.org.alfresco.repo.node.index.AVMFullIndexRecoveryComponent=info
log4j.logger.org.alfresco.util.OpenOfficeConnectionTester=info
log4j.logger.org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl=warn
log4j.logger.org.alfresco.repo.domain.hibernate.DirtySessionMethodInterceptor=warn
log4j.logger.org.alfresco.repo.transaction.RetryingTransactionHelper=warn
log4j.logger.org.alfresco.util.transaction.SpringAwareUserTransaction.trace=warn
log4j.logger.org.alfresco.util.AbstractTriggerBean=warn
log4j.logger.org.alfresco.enterprise.repo.cache.cluster.KeepAliveHeartbeatReceiver=info
log4j.logger.org.alfresco.enterprise.repo.cluster=info
log4j.logger.org.alfresco.repo.version.Version2ServiceImpl=warn
#log4j.logger.org.alfresco.web.app.DebugPhaseListener=debug
log4j.logger.org.alfresco.repo.node.db.NodeStringLengthWorker=info
log4j.logger.org.alfresco.repo.workflow=info
@@ -138,7 +130,7 @@ log4j.logger.org.alfresco.ftp.protocol=error
# WebDAV debugging
#log4j.logger.org.alfresco.webdav.protocol=debug
log4j.logger.org.alfresco.webdav.protocol=error
log4j.logger.org.alfresco.webdav.protocol=info
# NTLM servlet filters
#log4j.logger.org.alfresco.web.app.servlet.NTLMAuthenticationFilter=debug
@@ -154,9 +146,6 @@ log4j.logger.org.alfresco.fileserver=warn
# Repo filesystem debug logging
#log4j.logger.org.alfresco.filesys.repo.ContentDiskDriver=debug
# AVM filesystem debug logging
#log4j.logger.org.alfresco.filesys.avm.AVMDiskDriver=debug
# Integrity message threshold - if 'failOnViolation' is off, then WARNINGS are generated
log4j.logger.org.alfresco.repo.node.integrity=ERROR
@@ -172,18 +161,9 @@ log4j.logger.org.alfresco.repo.search.impl.lucene.fts.FullTextSearchIndexerImpl=
# log4j.logger.org.alfresco.repo.audit=DEBUG
# log4j.logger.org.alfresco.repo.audit.model=DEBUG
# Forms debugging
# log4j.logger.org.alfresco.web.forms=debug
# log4j.logger.org.chiba.xml.xforms=debug
log4j.logger.org.alfresco.web.forms.xforms.XFormsBean=error
log4j.logger.org.alfresco.web.forms.XSLTRenderingEngine=error
# Property sheet and modelling debugging
# change to error to hide the warnings about missing properties and associations
log4j.logger.alfresco.missingProperties=warn
log4j.logger.org.alfresco.web.ui.repo.component.property.UIChildAssociation=warn
log4j.logger.org.alfresco.web.ui.repo.component.property.UIAssociation=warn
#log4j.logger.org.alfresco.web.ui.repo.component.property=debug
# Dictionary/Model debugging
log4j.logger.org.alfresco.repo.dictionary=warn
@@ -211,7 +191,6 @@ log4j.logger.org.alfresco.repo.usage=info
log4j.logger.org.alfresco.module.vti=info
# Forms Engine
log4j.logger.org.alfresco.repo.forms=info
log4j.logger.org.alfresco.web.config.forms=info
log4j.logger.org.alfresco.web.scripts.forms=info
@@ -221,6 +200,8 @@ log4j.logger.org.alfresco.opencmis.AlfrescoCmisServiceInterceptor=error
log4j.logger.org.alfresco.cmis=error
log4j.logger.org.alfresco.cmis.dictionary=warn
log4j.logger.org.apache.chemistry.opencmis=info
log4j.logger.org.apache.chemistry.opencmis.server.impl.browser.CmisBrowserBindingServlet=OFF
log4j.logger.org.apache.chemistry.opencmis.server.impl.atompub.CmisAtomPubServlet=OFF
# IMAP
log4j.logger.org.alfresco.repo.imap=info
@@ -246,7 +227,13 @@ log4j.logger.org.alfresco.repo.jscript=error
log4j.logger.org.alfresco.repo.jscript.ScriptLogger=warn
log4j.logger.org.alfresco.repo.cmis.rest.CMISTest=info
log4j.logger.org.alfresco.repo.avm.actions=info
log4j.logger.org.alfresco.repo.domain.schema.script.ScriptBundleExecutorImpl=off
log4j.logger.org.alfresco.repo.domain.schema.script.ScriptExecutorImpl=info
log4j.logger.org.alfresco.repo.search.impl.solr.facet.SolrFacetServiceImpl=info
# Bulk Filesystem Import Tool
log4j.logger.org.alfresco.repo.bulkimport=warn
# Freemarker
# Note the freemarker.runtime logger is used to log non-fatal errors that are handled by Alfresco's retrying transaction handler
@@ -263,4 +250,15 @@ log4j.logger.org.apache.pdfbox.pdmodel.font.PDCIDFont=fatal
# no index support
log4j.logger.org.alfresco.repo.search.impl.noindex.NoIndexIndexer=fatal
log4j.logger.org.alfresco.repo.search.impl.noindex.NoIndexSearchService=fatal
log4j.logger.org.alfresco.demoamp.test=DEBUG
# lucene index warnings
log4j.logger.org.alfresco.repo.search.impl.lucene.index.IndexInfo=warn
# Warn about RMI socket bind retries.
log4j.logger.org.alfresco.util.remote.server.socket.HostConfigurableSocketFactory=warn
log4j.logger.org.alfresco.repo.usage.RepoUsageMonitor=info
# Authorization
log4j.logger.org.alfresco.enterprise.repo.authorization.AuthorizationService=info
log4j.logger.org.alfresco.enterprise.repo.authorization.AuthorizationsConsistencyMonitor=warn

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Context crossContext="true">
<Environment name="solr/home" type="java.lang.String" value="${solr.home}" override="true"/>
<Environment name="solr/model/dir" type="java.lang.String" value="${solr.model.dir}" override="true"/>
<Environment name="solr/content/dir" type="java.lang.String" value="${solr.content.dir}" override="true"/>
</Context>

View File

@@ -1,39 +0,0 @@
------
Alfresco All-in-One Archetype Advanced Usage
------
Gabriele Columbro
------
Aug 2014
------
All-in-One Archetype properties
In each of the modules of the archetype (as in the whole Alfresco SDK\x99) properties are configurable at many levels:
* as POM properties
* direclty in *.properties, particularly
* For the <<<repo>>> project
* <<<src/main/properties/<env>/alfresco-global.properties>>> (environment dependent <<<alfresco-global.properties>>> packaged in the WAR when running directly within the AMP project)
* For Alfresco/Share AMP projects
* <<<src/test/properties/<env>/alfresco-global.properties>>> (environment dependent <<<alfresco-global.properties>>> for test WAR run)
Build Environment (e.g. local, test, staging, prod) can be easily switched by setting the <<<<env>>>> property in your POM or
adding <<<-Denv=yourEnv>>> on the command line.
* Common properties
Archetype behavior can mostly be controlled directly in the POM, via common properties provided by the parent POM.
See {{{../../poms/alfresco-sdk-parent/sdk-properties.html} SDK properties reference}} for details.
Parent POM and behavior customization
To customize the behavior of your project, check out full set of the properties and plugin configurations defined in the
{{{./poms/alfresco-sdk-parent/index.html}single entry point parent POM}}.
One quick way to do that is to use the <<<maven-help-plugin:effective-pom>>> to analyze your POM at runtime.

View File

@@ -1,67 +0,0 @@
------
Building AMPs (Alfresco Module Packages) with Maven
------
Gabriele Columbro
------
Nov 2012
------
Introduction
The Alfresco All-in-One Archetype is a multi-module project,
leveraging Alfresco SDK\x99 powerful capabilities to customize and run the full Alfresco platform embedded and all it's components.
The archetype does not require additional download and provides a perfect starting point for full-blown Alfresco projects.
* Features
Amongst other features, this archetype provides support for:
* <<<amp>>> packaging support for your projects
* AMP Dependency management and overlay in an Alfresco Repository or Share WAR
* Embedded run in Tomcat and embedded H2 database of the full Alfresco suite, including Repository, Share, Solr
* Support for unit and integration testing and rapid development (using spring-loaded, see run.sh)
* Seamless IDE integration with Eclipse and Idea
How to create a project:
As of version 2.0-beta-3, you can create a project with the latest released archetype with the following command directly from Maven Central:
+---+
mvn archetype:generate -Dfilter=org.alfresco.maven.archetype:alfresco-allinone-archetype
+---+
For previous versions, you need to use the Alfresco Artifacts repository:
+---+
mvn archetype:generate -Dfilter=org.alfresco.maven.archetype:alfresco-allinone-archetype -DarchetypeCatalog=https://artifacts.alfresco.com/nexus/content/groups/public/archetype-catalog.xml
+---+
You should then:
[[1]] Select the <<<alfresco-allinone-archetype>>> version
[[2]] Specify the <<<groupId>>> and <<<artifactId>>> for the project you want to create
[[3]] (<Optionally>) Select Alfresco Version / Edition (current default is: Alfresco Community 5.0.c)
You can find new Alfresco All-in-One project ready to go in the <<<artifactId>>> folder.
Quickstart
Once your project is created:
* Enter the project folder and run <<<./run.sh>>> (you might need to <<<chmod u+x run.sh>>> to make it executable). This will setup the SDK and start Alfresco, Share and Solr in embedded mode.
* Wait for the startup of the webapps and then go <<<http://localhost:8080>>>.
* Import the projects in your favorite IDE (with Maven integration) and start developing right away.
Usage
Full instructions on how to use the Alfresco All in One archetype can be found on the {{{./usage.html}usage page}}, while
for more advanced use cases refer to the {{{./advanced-usage.html}advanced usage page}}

View File

@@ -1,85 +0,0 @@
------
Maven Alfresco All-in-One Archetype Usage
------
Gabriele Columbro
------
Sep 2013
------
Prerequisites
See {{{../../prerequisites.html} SDK Pre-Requisites}} to successfully run this archetype.
Project layout
The archetype generated multi-module project should look like:
+---+
pom.xml
|-> repo-amp
|-> repo
|-> share-amp
|-> share
|-> solr
|-> runner (a Tomcat embedded runner / integration test runner)
+---+
* Modules
The All-in-One Alfresco project is composed by the following modules:
* <<<repo-amp>>>: An Repository Tier AMP project, demonstrating sample project structure and demo component loading
* <<<repo>>>: An <<<alfresco.war>>> Repository Extension, overlaying the Alfresco WAR with custom resources / classes
and depending on the <<<amp>>> project
* <<<share-amp>>>: A Share Tier AMP project, demonstrating sample project structure and demo component loading
* <<<share>>>: A <<<share.war>>> extension, overlaying the Share WAR with the custom developed <<<share-amp>>>
* <<<solr>>>: An Alfresco <<<alfresco-*-*-solr.zip>>> overlay / customization to configure {{{http://solr.apache.org}Apache Solr}} cores properties
* <<<runner>>>: A Tomcat + H2 runner, capable of running all the aforementioned projects in embedded mode for demo / integration-testing purposes
Usage
The project provides support for typical development lifecycle use cases like
* Rapid development, in full IDE integration, and with hot classes reloading (using spring-loaded, check {{{../../prerequisites.html}prerequisites}}).
* AMP/WAR packaging
* AMP Unit testing and rapid development
* run embedded in Tomcat + H2 database.
(<<NOTE>>: this is not a {{{http://www.alfresco.com/services/subscription/supported-platforms/} supported stack}} so use <<only for development purposes>>)
* Integration testing
* AMP to WAR installation and overlay (embedding {{{http://wiki.alfresco.com/wiki/Module_Management_Tool}Alfresco Module Managment Tool}})
* release and distribution
for all the components of the Alfresco landscape. For more information, check the See the {{{./advanced-usage.html}advanced usage page}} page.
<<NOTE>>: AMPs produced with this project are fully compatible with Alfresco MMT,in fact the Maven Alfresco plugin - used to manage AMPs in this SDK - embeds the official Alfresco MMT to install depended AMPs.
Commands
<<<run.sh>>> will automatically set up the SDK and run the webapps embedded to enable rapid development
Additional common Maven lifecycle commands you want to run from the aggregator are:
* <<<mvn package>>>: Runs unit tests and packages all customized modules in their respective <<<$\{project.build.directory\}/$\{project.build.finalName\}.amp>>>
* <<<mvn install>>>: Like <<<mvn package>>> but also installs all modules in local Maven repository to be depended upon
* <<<mvn install -Dmaven.test.skip=true>>>: Like <<<mvn install>>> but skips unit tests
* <<<mvn install -Prun>>>: Like <<<mvn install>>> but also trigger the <<<runner>>> project to run Alfresco, Share, Solr and Web Quick Start in Jetty (with H2 embedded database)
* <<<mvn clean -Ppurge>>>: Removes DB, alf_data and log files
* Commands from from the <<<runner>>> project
* <<<mvn install -Prun'>>> or <<<'mvn integration-test -Prun'>>> to quickly run already packaged webapps

View File

@@ -1,49 +0,0 @@
<project>
<body>
<!-- <menu ref="parent" inherit="bottom"/> -->
<head>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '${gaTrackingId}']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<menu name="Alfresco All-in-One Archetype">
<item name="Introduction" href="index.html"/>
<item name="Usage" href="usage.html"/>
<item name="Advanced Usage" href="advanced-usage.html"/>
</menu>
<menu name="SDK components">
<item name="Maven Alfresco SDK" href="../../index.html" />
<item name="Alfresco AMP Archetype" href="../alfresco-amp-archetype/index.html" />
<item name="Share AMP Archetype" href="../share-amp-archetype/index.html" />
<item name="Alfresco All-in-One Archetype" href="./index.html" />
<item name="Maven Alfresco SDK Parent POM" href="../../poms/alfresco-sdk-parent/index.html" />
<item name="Alfresco Platform Distribution POM" href="https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-platform-distribution/latest/index.html" />
<item name="Maven Alfresco Plugin" href="../../plugins/alfresco-maven-plugin/index.html" />
</menu>
<menu name="Alfresco Documentation">
<item name="Official Maven Alfresco SDK docs" href="http://docs.alfresco.com/community/concepts/alfresco-sdk-intro.html" />
<item name="Maven Alfresco Wiki Documentation" href="http://wiki.alfresco.com/wiki/Maven_Alfresco_SDK" />
<item name="Alfresco with Maven for Dummies" href="https://wiki.alfresco.com/wiki/Maven_For_Dummies" />
<item name="Developer Access (Google Code)" href="http://code.google.com/p/maven-alfresco-archetypes/" />
<item name="Gabriele Columbro's blog" href="http://www.mindthegab.com/" />
<item name="Maurizio Pillitu's blog" href="http://www.session.it/" />
<item name="Carlo Sciolla's blog" href="http://skuro.tk/" />
<item name="Enterprise adoption" href="http://www.slideshare.net/guest67a9ba/maven-application-lifecycle-management-for-alfresco" />
</menu>
<!--<menu ref="reports"/>-->
</body>
</project>

View File

@@ -1,103 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${version}</version>
<name>${artifactId} Repository AMP project</name>
<packaging>amp</packaging>
<description>Manages the lifecycle of the ${artifactId} Repository AMP (Alfresco Module Package)</description>
<parent>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-sdk-parent</artifactId>
<version>@@alfresco.sdk.parent.version@@</version>
</parent>
<!--
SDK properties have sensible defaults in the SDK parent,
but you can override the properties below to use another version.
For more available properties see the alfresco-sdk-parent POM.
-->
<properties>
<!-- The following are default values for data location and Alfresco Community version.
Uncomment if you need to change (Note. current default version for Enterprise edition is @@alfresco.enterprise.default.version@@)
<alfresco.version>@@alfresco.community.default.version@@</alfresco.version>
<alfresco.data.location>/absolute/path/to/alf_data_dev</alfresco.data.location> -->
<!-- This control the root logging level for all apps uncomment and change, defaults to WARN
<app.log.root.level>WARN</app.log.root.level>
-->
<!-- Set the enviroment to use, this controls which properties will be picked in src/test/properties
for embedded run, defaults to the 'local' environment. See SDK Parent POM for more info.
<env>local</env>
-->
</properties>
<!-- Here we realize the connection with the Alfresco selected platform
(e.g.version and edition) -->
<dependencyManagement>
<dependencies>
<!-- Setup what versions of the different Alfresco artifacts that will be used (depends on alfresco.version),
so we don't have to specify version in any of the dependency definitions in our POM.
For more info see:
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Importing_Dependencies
-->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-platform-distribution</artifactId>
<version>${alfresco.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- Following dependencies are needed for compiling Java code in src/main/java;
<scope>provided</scope> is inherited for each of the following;
for more info, please refer to alfresco-platform-distribution POM -->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-repository</artifactId>
</dependency>
</dependencies>
<profiles>
<!--
Brings in the extra Enterprise specific repository classes,
if the 'enterprise' profile has been activated, needs to be activated manually.
-->
<profile>
<id>enterprise</id>
<dependencies>
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-enterprise-repository</artifactId>
<version>${alfresco.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
</profile>
<!--
If the 'amp-to-war' profile is enabled then make sure to bring in the alfresco-rad module,
which has the H2 scripts and other RAD features.
TODO: TO INVESTIGATE: This dependency is already defined in the parent SDK pom in the 'amp-to-war' profile
but this does not work, it is not include...
<profile>
<id>amp-to-war</id>
<dependencies>
<dependency>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-rad</artifactId>
<version>${maven.alfresco.version}</version>
</dependency>
</dependencies>
</profile> -->
</profiles>
</project>

View File

@@ -1,19 +0,0 @@
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Dev environment startup script for Alfresco Community. ::
:: ::
:: Downloads the spring-loaded lib if not existing and ::
:: runs the Repo AMP applied to Alfresco WAR. ::
:: Note. the Share WAR is not deployed. ::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@echo off
set springloadedfile=%HOME%\.m2\repository\org\springframework\springloaded\@@springloaded.version@@\springloaded-@@springloaded.version@@.jar
if not exist %springloadedfile% (
mvn validate -Psetup
)
set MAVEN_OPTS=-javaagent:"%springloadedfile%" -noverify -Xms256m -Xmx2G
mvn integration-test -Pamp-to-war -nsu
:: mvn integration-test -Pamp-to-war

View File

@@ -1,11 +0,0 @@
#!/bin/bash
# Downloads the spring-loaded lib if not existing and
# runs the Repo AMP applied to Alfresco WAR.
# Note. the Share WAR is not deployed.
springloadedfile=~/.m2/repository/org/springframework/springloaded/@@springloaded.version@@/springloaded-@@springloaded.version@@.jar
if [ ! -f $springloadedfile ]; then
mvn validate -Psetup
fi
MAVEN_OPTS="-javaagent:$springloadedfile -noverify -Xms256m -Xmx2G" mvn integration-test -Pamp-to-war

View File

@@ -1,41 +0,0 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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.
-->
<beans>
<!-- A simple class that is initialized by Spring -->
<bean id="${package}.exampleBean" class="${package}.demoamp.Demo" init-method="init" />
<!-- A simple module component that will be executed once.
Note. this module component will only be executed once, and then there will be an entry for it in the Repo.
So doing for example $ mvn clean install -Pamp-to-war twice will only execute this component the first time.
You need to remove /alf_data_dev for it to be executed again. -->
<bean id="${package}.exampleComponent" class="${package}.demoamp.DemoComponent" parent="module.baseComponent" >
<property name="moduleId" value="${artifactId}" /> <!-- See module.properties -->
<property name="name" value="exampleComponent" />
<property name="description" value="A demonstration component" />
<property name="sinceVersion" value="1.0" />
<property name="appliesFromVersion" value="1.0" />
<property name="nodeService" ref="NodeService" />
<property name="nodeLocatorService" ref="nodeLocatorService" />
</bean>
</beans>

View File

@@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<model name="myc:contentModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!-- Optional meta-data about the model -->
<description>Document Model for Repo Extension X</description>
<author>My Name</author>
<version>1.0</version>
<imports>
<!-- Import Alfresco Dictionary Definitions -->
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
<!-- Import Alfresco Content Domain Model Definitions -->
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
<!-- Import Alfresco System Model Definitions -->
<import uri="http://www.alfresco.org/model/system/1.0" prefix="sys"/>
</imports>
<!-- Custom namespace for your domain -->
<namespaces>
<namespace uri="http://www.mycompany.com/model/content/1.0" prefix="myc"/>
</namespaces>
<!-- ===============================================================================================================
Constraints, Types, and Aspects go here...
-->
</model>

View File

@@ -1,16 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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.
*/

View File

@@ -1,17 +0,0 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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.
-->
This is a demo JSP. When running with -Pamp-to-war, just change this text and it will be automatically reloaded!

View File

@@ -1,2 +0,0 @@
This folder (root in the AMP) gets mapped automagically in WEB-INF/licenses
by the MMT or the alfresco-maven-plugin

View File

@@ -1,16 +0,0 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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.
*/

View File

@@ -1,86 +0,0 @@
#set($symbol_pound='#')
#set($symbol_dollar='$')
#set($symbol_escape='\' )
package ${package}.demoamp.test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import ${package}.demoamp.DemoComponent;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.apache.log4j.Logger;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import com.tradeshift.test.remote.Remote;
import com.tradeshift.test.remote.RemoteTestRunner;
/**
* A simple class demonstrating how to run out-of-container tests
* loading Alfresco application context.
*
* This class uses the RemoteTestRunner to try and connect to
* localhost:4578 and send the test name and method to be executed on
* a running Alfresco. One or more hostnames can be configured in the @Remote
* annotation.
*
* If there is no available remote server to run the test, it falls
* back on local running of JUnits.
*
* For proper functioning the test class file must match exactly
* the one deployed in the webapp (either via JRebel or static deployment)
* otherwise "incompatible magic value XXXXX" class error loading issues will arise.
*
* @author Gabriele Columbro
* @author Maurizio Pillitu
*
*/
@RunWith(RemoteTestRunner.class)
@Remote(runnerClass=SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:alfresco/application-context.xml")
public class DemoComponentTest {
private static final String ADMIN_USER_NAME = "admin";
static Logger log = Logger.getLogger(DemoComponentTest.class);
@Autowired
protected DemoComponent demoComponent;
@Autowired
@Qualifier("NodeService")
protected NodeService nodeService;
@Test
public void testWiring() {
assertNotNull(demoComponent);
}
@Test
public void testGetCompanyHome() {
AuthenticationUtil.setFullyAuthenticatedUser(ADMIN_USER_NAME);
NodeRef companyHome = demoComponent.getCompanyHome();
assertNotNull(companyHome);
String companyHomeName = (String) nodeService.getProperty(companyHome, ContentModel.PROP_NAME);
assertNotNull(companyHomeName);
assertEquals("Company Home", companyHomeName);
}
@Test
public void testChildNodesCount() {
AuthenticationUtil.setFullyAuthenticatedUser(ADMIN_USER_NAME);
NodeRef companyHome = demoComponent.getCompanyHome();
int childNodeCount = demoComponent.childNodesCount(companyHome);
assertNotNull(childNodeCount);
// There are 7 folders by default under Company Home
assertEquals(7, childNodeCount);
}
}

View File

@@ -1,31 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- ===================================================================================================================
This context file is used only in a development IDE for rapid development,
it is never released with the Alfresco.war
=================================================================================================================-->
<!-- Setup docBase to something like repo-amp/target/repo-amp-war
and path to /alfresco
The Alfresco.war 5.0 does not have a webapp (it used to have Alfresco Explorer but not anymore)
that we will access, so this docBase might not be needed
-->
<Context docBase="${app.amp.client.war.folder}" path="${alfresco.client.contextPath}">
<Resources className="org.apache.naming.resources.VirtualDirContext"
extraResourcePaths="/=${project.build.directory}/${project.build.finalName}/web" />
<!-- Setup the virtual class path like this:
1) target/classes
2) target/${project.build.finalName}/config
3) target/test-classes
This way mvn compile can be invoked and all changes will be picked up
-->
<Loader searchVirtualFirst="true"
className="org.apache.catalina.loader.VirtualWebappLoader"
virtualClasspath="${project.build.outputDirectory};${project.build.directory}/${project.build.finalName}/config;${project.build.testOutputDirectory}" />
<!-- This enables hot reloading of web resources from uncompressed jars (while in prod they would be loaded from WEB-INF/lib/{\*.jar}/META-INF/resources -->
<JarScanner scanAllDirectories="true" />
</Context>

View File

@@ -1,62 +0,0 @@
------
Maven Alfresco AMP Archetype Advanced Usage
------
Gabriele Columbro
------
Nov 2012
------
AMP Unit Testing
Unit test your AMP customization is as easy as adding your tests in <<<src/test/java>>>. The current module in development
will be added to the test classpath together with all necessary Alfresco Spring contexts.
Running <<<mvn test>>> will results in your unit tests to be run. You can skip this (<<<not recommended>>>)
adding <<<-DskipTests>>> to your command line.
AMP Archetype properties
In the AMP archetype (as in the whole Part of the Maven Alfresco SDK\x99) properties are configurable at many levels:
* as POM properties
* direclty in *.properties, particularly
* <<<src/main/amp/module.properties>>> (filtered and packaged in the AMP)
* <<<src/test/properties/<env>/alfresco-global.properties>>> (environment dependent properties for WAR run embedded)
* Common properties
Archetype behavior can mostly be controlled directly in the POM, via common properties provided by the parent POM.
See {{{../../poms/alfresco-sdk-parent/sdk-properties.html} SDK properties reference}} for details.
* AMP specific properties
In addition to the common properties, the following properties are specific of the AMP archetype. You can change
these properties to select a different WAR to install your AMP to (e.g. a pre-customized Alfresco or Share instance):
+---+
<project>
...
<properties>
<!--
Determines the coordinates of target WAR for this AMP
Allowed values: alfresco (default) | share
-->
<alfresco.client.war>alfresco</alfresco.client.war>
<alfresco.client.war.groupId>${alfresco.groupId}</alfresco.client.war.groupId>
<alfresco.client.war.version>${alfresco.version}</alfresco.client.war.version>
</properties>
...
</project>
+---+
Parent POM and behavior customization
To customize the behavior of your project, check out full set of the properties and plugin configurations defined in the
{{{../../poms/alfresco-sdk-parent/index.html}single entry point parent POM}}.
One quick way to do that is to use the <<<maven-help-plugin:effective-pom>>> to analyze your POM at runtime.

View File

@@ -1,73 +0,0 @@
------
Building AMPs (Alfresco Module Packages) with Maven
------
Gabriele Columbro
------
Sept 2014
------
Introduction
The Alfresco AMP Archetype is a sample fully featured project to manage AMP (Alfresco Module Package) projects.
This archetype can be used for Alfresco Repository. For Share, please refer to the {{{../share-amp-archetype/index.html}Share AMP archetype}}
* Features
Amongst other features, this archetype provides support for:
* <<<amp>>> packaging support for your projects
* AMP dependency management in Maven
* Installation of AMPs in an Alfresco WAR
* AMP Unit Testing support. Just run the standard <<<mvn test>>> and see your <<<src/test/java>>> Alfresco unit tests run.
An sample Unit Test is provided in this archetype.
* Embedded run in Tomcat and embedded H2 database for demo purposes, rapid application development and integration testing
(<<NOTE>>: this is not a {{{http://www.alfresco.com/services/subscription/supported-platforms/} supported stack}} so use <<only for development purposes>>)
* Support for (remote) Junit and integration testing and rapid development (using spring-loaded, see run.sh)
* Seamless IDE integration with Eclipse and Idea
How to create a project:
As of version 2.0-beta-3, you can create a project with the latest released archetype with the following command directly from Maven Central:
+---+
mvn archetype:generate -Dfilter=org.alfresco.maven.archetype:alfresco-amp-archetype
+---+
For previous versions, you need to use the Alfresco Artifacts repository:
+---+
mvn archetype:generate -Dfilter=org.alfresco.maven.archetype:alfresco-amp-archetype -DarchetypeCatalog=https://artifacts.alfresco.com/nexus/content/groups/public/archetype-catalog.xml
+---+
You should then:
[[1]] Select the <<<alfresco-amp-archetype>>> version
[[2]] Specify the <<<groupId>>> and <<<artifactId>>> for the project you want to create
[[3]] (<Optionally>) Select Alfresco Version / Edition (current default is: Alfresco Community 4.2.c)
You can find new Alfresco AMP project ready to go in the <<<artifactId>>> folder.
Quickstart
Once your project is created:
* Enter the project folder and run <<<./run.sh>>> (you might need to <<<chmod u+x run.sh>>> to make it executable).
This will setup the SDK and the Alfresco repository (not Share or Solr).
* Wait for the startup of the webapp and then go <<<http://localhost:8080/alfresco>>>.
* Import the project in your favorite IDE (with Maven integration) and start developing right away.
Usage
Full instructions on how to use the Alfresco AMP archetype can be found on the {{{./usage.html}usage page}}, while
for more advanced use cases refer to the {{{./advanced-usage.html}advanced usage page}}

View File

@@ -1,76 +0,0 @@
------
Alfresco AMP Archetype Usage
------
Gabriele Columbro
------
Sept 2014
------
Prerequisites
See {{{../../prerequisites.html}SDK Pre-Requisites}} to successfully run this archetype.
Project layout
The archetype generated project should look like:
+---+
pom.xml
src/main/amp
|-> module.properties
|-> file-mapping.properties (optional)
|-> config/
|-> web/
|-> licenses/
src/main/java //Java classes to be packaged in the AMP embedded JAR)
src/main/resources //resources to the packaged in the AMP embedded JAR
src/main/resources/META-INF/resources //web resources to the packaged in the AMP embedded JAR, mapped to the root of the webapp as of Servlet 3.0)
src/test/java // Unit tests
src/test/resources // Unit test resources
src/test/properties/<env> // Environment aware alfresco-global.properties. By default <env>=local
+---+
Basically by default the folder <<<src/main/amp>>> maps the {{{https://wiki.alfresco.com/wiki/AMP_Files#The_structure_of_an_AMP_file}AMP structure}} and it's where you can build your module.
Usage
This project manages an AMP and provides support for typical development lifecycle use cases like:
* packaging
* rapid development
* testing (unit and integration)
* run embedded
* integration testing
* release and distribution of your AMP artifact.
The AMPs produced with this project are fully compatible with Alfresco MMT, in fact the Maven Alfresco plugin used to manage AMPs in this SDK embeds the official Alfresco MMT to install depdended AMPs.
Commands
<<<run.sh>>> will automatically set up the SDK and run the AMP on an Alfresco repo embedded to enable rapid development
Also, common AMP Maven lifecycle commands you want to run are:
* <<<mvn package>>>: Runs unit tests and packages AMP in <<<$\{project.build.directory\}/$\{project.build.finalName\}.amp>>>
* <<<mvn install>>>: Like <<<mvn package>>> but also installs AMP in local Maven repository to be depended upon
* <<<mvn install -Dmaven.test.skip=true>>>: Like <<<mvn install>>> but skips unit tests
* <<<mvn install -Pamp-to-war>>>: Like <<<mvn package -Pamp-to-war>>>
but also installs and runs the resulting WAR+AMP in Tomcat + H2 embedded from running and development.
This also enables rapid application development features, like hot reloading and remote JUnit running.
When you run this command then you can access in your browser <<< {{{http://localhost:8080/alfresco}}} >>>.
* <<<mvn clean -Ppurge>>>: Removes DB, alf_data, indexes and log files. Useful to purge the development repo (by default self contained in <<<$\{project.basedir\}/alf_data_dev>>>

Some files were not shown because too many files have changed in this diff Show More