mirror of
https://github.com/Alfresco/alfresco-sdk.git
synced 2025-09-10 14:12:12 +00:00
Compare commits
212 Commits
maven-alfr
...
alfresco-l
Author | SHA1 | Date | |
---|---|---|---|
|
607bba5fb4 | ||
|
36cbd57dcd | ||
|
3e97370fcf | ||
|
a5fde50bc0 | ||
|
5e7f4c623e | ||
|
df38011aa0 | ||
|
3c4d153f3d | ||
|
e3aeee2310 | ||
|
6c3977a52a | ||
|
38fd25b352 | ||
|
335c395e3a | ||
|
54eed21b25 | ||
|
278ed06ae4 | ||
|
a1d5ac50a4 | ||
|
7c388afdbd | ||
|
a06f1b3642 | ||
|
48f3c3a2b3 | ||
|
b4c4e34a02 | ||
|
1e1430fb5f | ||
|
427944a051 | ||
|
3f2b3e8dc5 | ||
|
7b1d3cca7c | ||
|
59f63764ec | ||
|
16e3456457 | ||
|
5ab005c182 | ||
|
84a34450a4 | ||
|
adbad5c377 | ||
|
42c16e2844 | ||
|
1d2213ee84 | ||
|
782c34b652 | ||
|
c11a4bea38 | ||
|
11520dd4f5 | ||
|
d2efe45daa | ||
|
4fcde94b42 | ||
|
4a9ee81c91 | ||
|
685cc19e32 | ||
|
bc55760810 | ||
|
8568a8f1e3 | ||
|
9f24d52e8c | ||
|
a5fd434727 | ||
|
800a40b895 | ||
|
281b079bff | ||
|
49c8586c8f | ||
|
206f2d1aa6 | ||
|
5a3bbf9358 | ||
|
3f364593da | ||
|
f6f3910f06 | ||
|
58e55471ea | ||
|
f3fe02bd6b | ||
|
a5d942eeea | ||
|
953656e2bd | ||
|
7cb1ddae97 | ||
|
8032c2a83c | ||
|
6ce6a25bef | ||
|
3dc65c84dd | ||
|
505d7f7659 | ||
|
13b215b1c1 | ||
|
c7e12d32c6 | ||
|
ed0bde637b | ||
|
2ef8794fa1 | ||
|
568fe5f476 | ||
|
8966296c1d | ||
|
d051aeef80 | ||
|
4d60a2defc | ||
|
2f3e4c4a18 | ||
|
5c0fad94ac | ||
|
0f914216c1 | ||
|
22102ca16f | ||
|
02f11b7a41 | ||
|
be9ffb4f28 | ||
|
39a9bb3cc9 | ||
|
e3458874da | ||
|
0a1ea9c34d | ||
|
c570ba5b38 | ||
|
572c8bdaed | ||
|
eb3de51c9a | ||
|
a69a6c240a | ||
|
3805b97335 | ||
|
34fee645b8 | ||
|
d42a868990 | ||
|
dc1b95cb08 | ||
|
830df696c5 | ||
|
394102051d | ||
|
081321c879 | ||
|
fdc7942511 | ||
|
c9eceeddff | ||
|
f623dfeecd | ||
|
11ff4a2942 | ||
|
a869e55b25 | ||
|
56475bb755 | ||
|
884f1596a9 | ||
|
9ff7d19278 | ||
|
58d01898bd | ||
|
d36f8c00a3 | ||
|
adf8bd6392 | ||
|
b299709cc3 | ||
|
1fbfe5501c | ||
|
1c0056e6b2 | ||
|
ac87c8ef7a | ||
|
16226ee5ab | ||
|
39086a6eb8 | ||
|
e76e42865a | ||
|
cccc2201e0 | ||
|
824f744f84 | ||
|
c7edadab00 | ||
|
f83762b8ef | ||
|
4d9aa57708 | ||
|
b810606967 | ||
|
5d7045d675 | ||
|
0ab8d2d046 | ||
|
dda0ecf97b | ||
|
c42a8e2039 | ||
|
4daa8d48cb | ||
|
ec7309087a | ||
|
38949c3728 | ||
|
3c4adab096 | ||
|
9dd860762c | ||
|
53014b9d78 | ||
|
2c205788b4 | ||
|
691a98030d | ||
|
d6e8c57e45 | ||
|
868f7a9c2e | ||
|
2d13720b4f | ||
|
120b53067a | ||
|
7afe3e309c | ||
|
27fb75b1e1 | ||
|
5ea00ed680 | ||
|
353af25303 | ||
|
0f40dfbf81 | ||
|
b74ac65a6a | ||
|
1d8f9bf3c0 | ||
|
c558192e84 | ||
|
6cf79d5104 | ||
|
9bf1894d85 | ||
|
f4e6dc30cd | ||
|
db4b7448bd | ||
|
8e21884722 | ||
|
d98fd5728c | ||
|
3fb674f33a | ||
|
a88707b52c | ||
|
27748d1c90 | ||
|
fdf5d67008 | ||
|
8601761e9a | ||
|
143defaf9b | ||
|
afde9bdc09 | ||
|
2b2e03a79c | ||
|
0299ba9fc5 | ||
|
e1f141fb43 | ||
|
10722715c8 | ||
|
9c75d59887 | ||
|
b84a42cadb | ||
|
0fdda216da | ||
|
74051f916f | ||
|
51df6fc3aa | ||
|
a2bf44c33e | ||
|
498803c05d | ||
|
2ee4244cb0 | ||
|
c6c2f0cf39 | ||
|
c619d89421 | ||
|
64d5f113ab | ||
|
9e30f49e8d | ||
|
ea49f96271 | ||
|
bf5cb084eb | ||
|
2b8511aea0 | ||
|
929bdaeb9d | ||
|
39aa93fb61 | ||
|
dd61aa7921 | ||
|
8dfffcd21a | ||
|
61978e48b2 | ||
|
6792f9e4da | ||
|
02b56818e0 | ||
|
f89484d869 | ||
|
1622dd961a | ||
|
786d03d99d | ||
|
3e7236abf9 | ||
|
23fcfbf4fb | ||
|
64ff61f4e0 | ||
|
56544a7e10 | ||
|
2e44c84689 | ||
|
82d38f6a42 | ||
|
33f83f9c21 | ||
|
b276eddbb8 | ||
|
cf97d54902 | ||
|
2c5cdc1b47 | ||
|
29c5a4f994 | ||
|
97c6ba59ff | ||
|
3d70b7166d | ||
|
6b99082954 | ||
|
55c749b299 | ||
|
deb9fd16e6 | ||
|
c285c4207c | ||
|
aa68a4a621 | ||
|
0d31e3ac32 | ||
|
662d923e53 | ||
|
1f0f1443a3 | ||
|
27862e4fe1 | ||
|
fb56eb8f43 | ||
|
b682e9a6b6 | ||
|
71d52265f9 | ||
|
4c69d1f07f | ||
|
0168db5323 | ||
|
b937bcb01d | ||
|
38234bcc84 | ||
|
36bd3c0298 | ||
|
4b4e0d2e26 | ||
|
fce3b805e9 | ||
|
8bcec764e7 | ||
|
be00cdfcb7 | ||
|
d7fd79f5ea | ||
|
4da863cd0a | ||
|
f861c56ea5 | ||
|
176924eb74 |
252
DOCS.txt
Normal file
252
DOCS.txt
Normal file
@@ -0,0 +1,252 @@
|
||||
This document needs updating...
|
||||
|
||||
**********************************
|
||||
Disclaimer for maven-alfresco list
|
||||
**********************************
|
||||
|
||||
This codebase is currently work in progress; the effort have been split in three directions:
|
||||
a) The definition of 2 POM files that can handle versions and common build behaviors/features
|
||||
b) The writing of an alfresco-maven-plugin to enable amp-to-war overlay provided by Alfresco
|
||||
Repository built-in features (ModuleManagementTool) and replace the maven-amp-plugin (big
|
||||
rewriting of the maven-war-plugin)
|
||||
c) The definition of (initially 2) archetypes that show some simple project's configuration using
|
||||
the parent POMs
|
||||
|
||||
Most of the build features have been successfully ported to a new structure, whose main advantage is
|
||||
to keep pom.xml files extremely simple and readable (since a lot of logic have been moved to the parent).
|
||||
Inherited behaviours are configurable simply defining specific properties in the project's or module's pom.xml
|
||||
(see documentation below).
|
||||
|
||||
Here follows a list of build features that have not been ported yet:
|
||||
- Maven SCM and release
|
||||
- JBoss run
|
||||
- Tomcat remote deployment
|
||||
- Jetty Java source and resources reloading (Jetty currently runs .war files)
|
||||
- Maven Site generation
|
||||
- Maven reporting
|
||||
- Maven distributionManagement
|
||||
|
||||
Apart from SCM and release, all the mentioned features are probably best suited for a more enterprise archetype,
|
||||
using the Alfresco Web Integration POM as parent and adding more build features around Maven, Tomcat and JBoss.
|
||||
|
||||
******************
|
||||
Alfresco Maven SDK
|
||||
******************
|
||||
|
||||
The Maven SDK is an effort that have been developing in the last 5 years - mostly driven by community efforts on
|
||||
Google Code (http://code.google.com/p/maven-alfresco-archetypes) - which delivers archetypes for building Alfresco
|
||||
integration project with Maven; builds are based on artifacts that are deployed into maven.alfresco.com Repository
|
||||
manually as a community effort.
|
||||
|
||||
The main advantages with the (currently official) Alfresco SDK follows:
|
||||
|
||||
- IDE-independent SDK, use IntelliJ, eMacs or any other IDE sto write your code
|
||||
|
||||
- No IDE manual configuration, all build-related features are provided by Apache Maven, which is the only
|
||||
prerequisite to use this SDK
|
||||
|
||||
- Language independent, you don't like Maven? You can still use Ant, Ivy, Buildr, Gradle, Leiningen or any other build
|
||||
system that is compatible with Maven artifact resolution mechanism; just configure maven.alfresco.com as (one of) your
|
||||
Maven repositories and you're ready to go
|
||||
|
||||
- Javadoc and Sources support, provided by maven.alfresco.com related Maven artifacts; you don't need to manually
|
||||
configure your IDE to attach (manually downloaded) sources to your (manually downloaded) binaries.
|
||||
|
||||
- Clean and readable, the build logic related with OOTB Alfresco features is wrapped in 50 lines of pom.xml
|
||||
|
||||
- Advanced build functionality, inherited by your parent POMs you can use embedded databases and j2ee
|
||||
containers with (almost) no configuration at all, among other features exposed below.
|
||||
|
||||
- One mvn command to generate, one mvn command to run, this is all you need to do to have a local Alfresco running
|
||||
on an empty laptop
|
||||
|
||||
- Supports community and enterprise flawlessly, allowing to switch one to another very easily
|
||||
|
||||
The following documentation aims to provide three different levels of complexity to tackle an Alfresco integration
|
||||
project: simple, advanced and custom; the latter exposes in details the Maven Alfresco SDK features.
|
||||
|
||||
*************
|
||||
Prerequisites
|
||||
*************
|
||||
|
||||
The main and only prerequisite to follow reading this document is to have Apache Maven 3.0.3 (or higher) installed
|
||||
on your machine; there is no preferred IDE nor web container and database requirements needed.
|
||||
|
||||
It is strongly advised to use the Apache Maven official binary distributions downloaded from maven.apache.org; avoid
|
||||
OS-specific distributions as much as possible.
|
||||
|
||||
************
|
||||
Use - Simple
|
||||
************
|
||||
|
||||
If you're new to Alfresco, you probably want to know which is the impact of introducing such a technology within your
|
||||
development team, run it locally, assess all development processes involved with the product and which
|
||||
technologies/tools are best suited for those.
|
||||
|
||||
You can currently choose between two different flavors, depending on your final goal:
|
||||
|
||||
* If you want to assess efforts involved with AMP development, you can run the following commands:
|
||||
|
||||
1.
|
||||
mvn archetype:generate \
|
||||
-DarchetypeGroupId=org.alfresco.maven \
|
||||
-DarchetypeArtifactId=quickstart-amp-archetype \
|
||||
-DarchetypeVersion=1.0 \
|
||||
-DgroupId=com.someco \
|
||||
-DartifactId=alfresco-amp-quickstart \
|
||||
-Dversion=1.0-SNAPSHOT \
|
||||
-DarchetypeRepository=http://maven.alfresco.com/nexus/content/repositories/releases \
|
||||
-DinteractiveMode=false
|
||||
|
||||
You can always switch Alfresco versions/editions by editing the <parent> coordinates of your generated pom.xml
|
||||
|
||||
2.
|
||||
cd alfresco-amp-quickstart && MAVEN_OPTS="-Xms256m -Xmx1G -XX:PermSize=300m" mvn package -Drunamp
|
||||
|
||||
Browse to http://localhost:8080/amp-quickstart and you will find Alfresco Explorer Client running against a local
|
||||
Alfresco Repository sitting on top of an H2 embedded database and loading your AMP package.
|
||||
|
||||
* If you want to customise Alfresco Explorer and/or Share clients, embed AMP packages/projects or simply run both
|
||||
Alfresco Explorer and Share on the same machine, run the following commands:
|
||||
|
||||
1.
|
||||
mvn archetype:generate \
|
||||
-DarchetypeGroupId=org.alfresco.maven \
|
||||
-DarchetypeArtifactId=quickstart-allinone-archetype \
|
||||
-DarchetypeVersion=1.0 \
|
||||
-DgroupId=com.someco \
|
||||
-DartifactId=alfresco-allinone-quickstart \
|
||||
-Dversion=1.0-SNAPSHOT \
|
||||
-Dedition=community \
|
||||
-DarchetypeRepository=http://maven.alfresco.com/nexus/content/repositories/releases \
|
||||
-DinteractiveMode=false
|
||||
|
||||
2.
|
||||
cd alfresco-allinone-quickstart && MAVEN_OPTS="-Xms256m -Xmx1G -XX:PermSize=300m" mvn package -Drun
|
||||
|
||||
Compared with the previous flavor, alfresco-allinone-quickstart is a Maven multi-module project, which also includes
|
||||
an AMP project that gets 'overlaid' into both Alfresco and Share web applications.
|
||||
Alfresco Explorer is available at http://localhost:8080/alfresco whereas Alfresco Share is available at
|
||||
http://localhost:8080/share
|
||||
|
||||
************
|
||||
Use - Custom
|
||||
************
|
||||
|
||||
When the build logic becomes tough, integrating with third party technologies, introducing complex build scenarios,
|
||||
you might want to have a lower integration level with Alfresco SDK; there are basically 2 big integration points
|
||||
you can rely on, which are basically Alfresco-maintained POM files that provide:
|
||||
|
||||
- A list of Alfresco artifacts, including binaries, javadoc and sources, Maven plugins successfully tested against
|
||||
the standard and supported build process; artifacts come with correct platform versions and editions
|
||||
(community vs enterprise) according with the <groupId> and <version> tags parent coordinates.
|
||||
You can simply define the following parent POM in your project's pom.xml:
|
||||
|
||||
<parent>
|
||||
<groupId>org.alfresco.enterprise</groupId>
|
||||
<artifactId>alfresco-platform-parent</artifactId>
|
||||
<version>4.0.1</version>
|
||||
</parent>
|
||||
|
||||
In Maven geek terms, this parent POM will define <dependencyManagement>, <pluginManagement> and <properties> elements
|
||||
related with Alfresco-produced artifacts.
|
||||
|
||||
The main goal of this approach is to give you full access to Alfresco artifacts without needing to handle dependency
|
||||
and plugin management inside your pom.xml.
|
||||
|
||||
Please note that Alfresco artifacts are not shipped with POM files at the moment, therefore transitive dependencies
|
||||
are not handled; you will need to define them explicitly in your pom.xml (using <scope>provided</scope>
|
||||
|
||||
- A set of useful build features around Alfresco web integrations, which are also inherited by alfresco-platform-parent;
|
||||
if you want to use it directly and skip alfresco-platform-parent, you can define:
|
||||
|
||||
<parent>
|
||||
<groupId>org.alfresco.enterprise</groupId>
|
||||
<artifactId>alfresco-developer-parent</artifactId>
|
||||
<version>1</version>
|
||||
</parent>
|
||||
|
||||
In this case you will have to re-define a list of properties to set your dependency versions:
|
||||
|
||||
<alfresco.version>4.0.1</alfresco.version>
|
||||
<spring.version>3.0.5.RELEASE</spring.version>
|
||||
<h2.version>1.3.158</h2.version>
|
||||
<h2-support.version>1.2</h2-support.version>
|
||||
<servlet.api.version>2.5</servlet.api.version>
|
||||
<faces.version>1.1_02</faces.version>
|
||||
<digester.version>1.6</digester.version>
|
||||
<log4j.version>1.2.15</log4j.version>
|
||||
|
||||
Besides the alfresco-integration-parent items inherited, this parent POM provides 3 commonly used features that can
|
||||
be easily enabled/disabled/configured:
|
||||
|
||||
* AMP overlay into an Alfresco (or Share) Extension
|
||||
---
|
||||
Activation: built-in
|
||||
---
|
||||
When your project (or sub-module) is a <packaging>war</packaging>, you can automatically include one or more
|
||||
AMP files by defining the dependencies into the pom.xml, as follows:
|
||||
<dependency>
|
||||
<groupId>com.mycompany</groupId>
|
||||
<artifactId>amp-module</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<type>amp</type>
|
||||
</dependency>
|
||||
The AMP files will be overlayed on top of your current WAR customizations, therefore
|
||||
they can override the content of the original WAR.
|
||||
|
||||
-- oOo --
|
||||
|
||||
* Multi-environment property filtering
|
||||
---
|
||||
Activation: exists src/main/properties
|
||||
---
|
||||
You can enable multi-environment property filtering by simply creating the
|
||||
src/main/properties/${env}/${webapp.resource.filter} file with your property values;
|
||||
all files included in src/main/resources and src/main/properties will be filtered
|
||||
with your properties defined; in order to switch between environments,
|
||||
simply attach -Denv=yourenv to your mvn commands.
|
||||
---
|
||||
Properties
|
||||
---
|
||||
<env>local</env>
|
||||
<webapp.resource.filter>alfresco-global.properties</webapp.resource.filter>
|
||||
<webapp.resource.build.folder>${project.build.outputDirectory}</webapp.resource.build.folder>
|
||||
<webapp.name>${project.artifactId}</webapp.name>
|
||||
|
||||
-- oOo --
|
||||
|
||||
* Jetty H2 configuration
|
||||
---
|
||||
Activation: exists jetty/jetty.xml
|
||||
---
|
||||
You can enable Jetty to run your application(s); by default Jetty will run all contexts
|
||||
using jetty/jetty.xml as Jetty Server configuration, allowing to add the jndi resource
|
||||
needed to start Alfresco Repository webapp; if you want to run multiple webapps - for
|
||||
example share and alfresco - follow the example listed below:
|
||||
<plugin>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>maven-jetty-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>run</id>
|
||||
<goals><goal>run</goal></goals>
|
||||
<phase>package</phase>
|
||||
<configuration>
|
||||
<contextPath>/</contextPath>
|
||||
<webAppSourceDirectory>.</webAppSourceDirectory>
|
||||
<webXml>jetty/root-web.xml</webXml>
|
||||
<contextHandlers>
|
||||
<contextHandler implementation="org.mortbay.jetty.webapp.WebAppContext">
|
||||
<war>${project.basedir}/../alfresco/target/alfresco.war</war>
|
||||
<contextPath>/alfresco</contextPath>
|
||||
</contextHandler>
|
||||
<contextHandler implementation="org.mortbay.jetty.webapp.WebAppContext">
|
||||
<war>${project.basedir}/../share/target/share.war</war>
|
||||
<contextPath>/share</contextPath>
|
||||
</contextHandler>
|
||||
</contextHandlers>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
199
README.txt
Normal file
199
README.txt
Normal file
@@ -0,0 +1,199 @@
|
||||
This document needs updating...
|
||||
|
||||
Archetypes using the SDK can be generated with:
|
||||
|
||||
mvn archetype:generate -DarchetypeCatalog=https://artifacts.alfresco.com/nexus/content/groups/public-snapshots/archetype-catalog.xml
|
||||
|
||||
**********
|
||||
Disclaimer
|
||||
**********
|
||||
|
||||
This codebase is currently work in progress; the effort have been split in three directions:
|
||||
a) The definition of 2 POM files that can handle versions and common build behaviors/features
|
||||
b) The writing of an alfresco-maven-plugin to enable amp-to-war overlay provided by Alfresco
|
||||
Repository built-in features (ModuleManagementTool) and replace the maven-amp-plugin (big
|
||||
rewriting of the maven-war-plugin)
|
||||
c) The definition of (initially 2) archetypes that show some simple project's configuration using
|
||||
the parent POMs
|
||||
|
||||
Most of the build features have been successfully ported to a new structure, whose main advantage is
|
||||
to keep pom.xml files extremely simple and readable (since a lot of logic have been moved to the parent).
|
||||
Inherited behaviours are configurable simply defining specific properties in the project's or module's pom.xml
|
||||
(see documentation below).
|
||||
|
||||
Here follows a list of build features that have not been ported yet:
|
||||
- Maven SCM and release
|
||||
- JBoss run
|
||||
- Tomcat remote deployment
|
||||
- Jetty Java source and resources reloading (Jetty currently runs .war files)
|
||||
- Maven Site generation
|
||||
- Maven reporting
|
||||
- Maven distributionManagement
|
||||
|
||||
Apart from SCM and release, all the mentioned features are probably best suited for a more enterprise archetype,
|
||||
using the Alfresco Web Integration POM as parent and adding more build features around Maven, Tomcat and JBoss.
|
||||
|
||||
Regarding the POM files, I'd like to see them deployed on maven.alfresco.com, hopefully generated (by the
|
||||
Alfresco build?) and tested for each Alfresco release.
|
||||
|
||||
--- oOo ---
|
||||
|
||||
*************
|
||||
Prerequisites
|
||||
*************
|
||||
|
||||
- Maven 3.0.3 (official binary distribution from maven.apache.org)
|
||||
|
||||
--- oOo ---
|
||||
|
||||
*************
|
||||
Build and Run
|
||||
*************
|
||||
|
||||
-----
|
||||
Build
|
||||
-----
|
||||
All the steps that follow are necessary because neither POMs nor
|
||||
alfresco-maven-plugin are yet available on maven.alfresco.com; as soon
|
||||
as their implementation is consolidated, you will be able to skip
|
||||
this first part and just enjoy the second.
|
||||
---
|
||||
mvn clean install
|
||||
(with empty repository, Maven will download 365Mb)
|
||||
|
||||
---
|
||||
|
||||
---
|
||||
Run
|
||||
---
|
||||
cd archetypes/quickstart-allinone-archetype
|
||||
MAVEN_OPTS="-Xms256m -Xmx1G -XX:PermSize=300m" mvn clean package -Drun
|
||||
-> http://localhost:8080/alfresco and http://localhost:8080/share
|
||||
--- OR
|
||||
cd archetypes/quickstart-amp-archetype
|
||||
MAVEN_OPTS="-Xms256m -Xmx1G -XX:PermSize=300m" mvn clean package -Drun-amp
|
||||
-> http://localhost:8080/quickstart-amp-archetype
|
||||
---
|
||||
|
||||
--- oOo ---
|
||||
|
||||
**********
|
||||
Archetypes
|
||||
**********
|
||||
|
||||
---------------------------
|
||||
ALFRESCO ALLINONE ARCHETYPE
|
||||
---------------------------
|
||||
- run mvn clean install to package all apps
|
||||
- run mvn clean install -Prun to run the full platform embedded in Jetty/H2
|
||||
---
|
||||
|
||||
---
|
||||
ALFRESCO AMP ARCHETYPE
|
||||
---
|
||||
|
||||
---
|
||||
|
||||
--- oOo ---
|
||||
|
||||
*********
|
||||
POM files
|
||||
*********
|
||||
|
||||
-------------------------------
|
||||
ALFRESCO PLATFORM POM
|
||||
-------------------------------
|
||||
* Describes the Alfresco platform. Lives in the Alfresco SVN and gets deployed at every release.
|
||||
* DependencyManagement for all Alfresco commonly used JAR/WAR/AMP artifacts
|
||||
* IInherits alfresco-developer-parent POM
|
||||
|
||||
---
|
||||
ALFRESCO DEVELOPER PARENT POM
|
||||
---
|
||||
* Alfresco Repository Log and storage cleaning
|
||||
---
|
||||
Activation: built-in
|
||||
---
|
||||
When mvn clean is invoked, all files produced by Maven runs must be removed; this is the list of
|
||||
filesets inherited from alfresco-developer-parent:
|
||||
* target/ (default behaviour)
|
||||
* *.log
|
||||
* ${alfresco.data.location}
|
||||
---
|
||||
Properties
|
||||
---
|
||||
<alfresco.data.location>alf_data_dev</alfresco.data.location>
|
||||
---
|
||||
|
||||
---
|
||||
* AMP overlay into an Alfresco (or Share) Extension
|
||||
---
|
||||
Activation: built-in
|
||||
---
|
||||
When your project (or sub-module) is a <packaging>war</packaging>, you can automatically include one or more
|
||||
AMP files by defining the dependencies into the pom.xml, as follows:
|
||||
<dependency>
|
||||
<groupId>com.mycompany</groupId>
|
||||
<artifactId>amp-module</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<type>amp</type>
|
||||
</dependency>
|
||||
The AMP files will be overlayed on top of your current WAR customizations, therefore
|
||||
they can override the content of the original WAR.
|
||||
---
|
||||
|
||||
---
|
||||
* Multi-environment property filtering
|
||||
---
|
||||
Activation: exists src/main/properties
|
||||
---
|
||||
You can enable multi-environment property filtering by simply creating the
|
||||
src/main/properties/${env}/${webapp.resource.filter} file with your property values;
|
||||
all files included in src/main/resources and src/main/properties will be filtered
|
||||
with your properties defined; in order to switch between environments,
|
||||
simply attach -Denv=yourenv to your mvn commands.
|
||||
---
|
||||
Properties
|
||||
---
|
||||
<env>local</env>
|
||||
<webapp.resource.filter>alfresco-global.properties</webapp.resource.filter>
|
||||
<webapp.resource.build.folder>${project.build.outputDirectory}</webapp.resource.build.folder>
|
||||
<webapp.name>${project.artifactId}</webapp.name>
|
||||
---
|
||||
|
||||
---
|
||||
* Jetty H2 configuration
|
||||
---
|
||||
Activation: exists jetty/jetty.xml
|
||||
---
|
||||
You can enable Jetty to run your application(s); by default Jetty will run all contexts
|
||||
using jetty/jetty.xml as Jetty Server configuration, allowing to add the jndi resource
|
||||
needed to start Alfresco Repository webapp; if you want to run multiple webapps - for
|
||||
example share and alfresco - follow the example listed below:
|
||||
<plugin>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>maven-jetty-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>run</id>
|
||||
<goals><goal>run</goal></goals>
|
||||
<phase>package</phase>
|
||||
<configuration>
|
||||
<contextPath>/</contextPath>
|
||||
<webAppSourceDirectory>.</webAppSourceDirectory>
|
||||
<webXml>jetty/root-web.xml</webXml>
|
||||
<contextHandlers>
|
||||
<contextHandler implementation="org.mortbay.jetty.webapp.WebAppContext">
|
||||
<war>${project.basedir}/../alfresco/target/alfresco.war</war>
|
||||
<contextPath>/alfresco</contextPath>
|
||||
</contextHandler>
|
||||
<contextHandler implementation="org.mortbay.jetty.webapp.WebAppContext">
|
||||
<war>${project.basedir}/../share/target/share.war</war>
|
||||
<contextPath>/share</contextPath>
|
||||
</contextHandler>
|
||||
</contextHandlers>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
---
|
42
TODO.txt
Normal file
42
TODO.txt
Normal file
@@ -0,0 +1,42 @@
|
||||
Short term (pre 4.x release):
|
||||
-----------------------------
|
||||
- Generate archetypes for sample projects
|
||||
- Cleanup issues
|
||||
- Release
|
||||
- Testing against 1 Community and 1 Enterprise version
|
||||
- Documentation, documentation, documentation
|
||||
- Maven Site
|
||||
- https://wiki.alfresco.com/index.php?title=Maven_Alfresco_SDK (from scratch)
|
||||
- http://code.google.com/p/maven-alfresco-archetypes/
|
||||
|
||||
Mid term (post 4.x release):
|
||||
----------------------------
|
||||
- More archetypes
|
||||
|
||||
**************************************************
|
||||
Enterprise Supported Archetypes (aka Advanced Use)
|
||||
**************************************************
|
||||
|
||||
If you have built integration projects with Alfresco, you're familiar with Maven and you have a case study in mind,
|
||||
wondering how to integrate it with your software development around the product, you can start from the Alfresco
|
||||
Enterprise archetype suite:
|
||||
|
||||
1.
|
||||
mvn archetype:generate \
|
||||
-DarchetypeGroupId=org.alfresco.enterprise \
|
||||
-DarchetypeArtifactId=supported-alfresco-archetype \
|
||||
-DarchetypeVersion=1.0 \
|
||||
-DgroupId=com.someco \
|
||||
-DartifactId=alfresco-enterprise \
|
||||
-Dversion=1.0-SNAPSHOT \
|
||||
-DarchetypeRepository=http://maven.alfresco.com/nexus/content/repositories/releases \
|
||||
-DinteractiveMode=false
|
||||
|
||||
2.
|
||||
cd alfresco-enterprise && MAVEN_OPTS="-Xms256m -Xmx1G -XX:PermSize=300m" mvn package -Drun
|
||||
|
||||
Run the following command if you want to have a list of the available archetypes:
|
||||
|
||||
mvn archetype:generate \
|
||||
-DarchetypeCatalog=http://maven.alfresco.com/nexus/content/repositories/releases/archetype-catalog.xml
|
||||
|
48
archetypes/alfresco-allinone-archetype/pom.xml
Normal file
48
archetypes/alfresco-allinone-archetype/pom.xml
Normal file
@@ -0,0 +1,48 @@
|
||||
<?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/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>org.alfresco.maven.archetype</groupId>
|
||||
<artifactId>alfresco-allinone-archetype</artifactId>
|
||||
<packaging>maven-archetype</packaging>
|
||||
<name>All-in-One Archetype from Maven Alfresco SDK</name>
|
||||
<description>Sample multi-module project for All-in-One development on the Alfresco plaftorm. Includes modules for: Repository WAR overlay, Repository AMP, Share WAR overlay, Solr configuration, and embedded Tomcat runner</description>
|
||||
|
||||
<parent>
|
||||
<groupId>org.alfresco.maven</groupId>
|
||||
<artifactId>alfresco-lifecycle-aggregator</artifactId>
|
||||
<version>1.1.0</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>archetype-resources/pom.xml</include>
|
||||
</includes>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<excludes>
|
||||
<exclude>archetype-resources/pom.xml</exclude>
|
||||
</excludes>
|
||||
<filtering>false</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<configuration>
|
||||
<useDefaultDelimiters>false</useDefaultDelimiters>
|
||||
<delimiters>
|
||||
<delimiter>@@</delimiter>
|
||||
</delimiters>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
@@ -0,0 +1,124 @@
|
||||
<?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="quickstart-allinone-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>
|
||||
<requiredProperty key="version">
|
||||
<defaultValue>1.0-SNAPSHOT</defaultValue>
|
||||
</requiredProperty>
|
||||
<requiredProperty key="alfresco_target_groupId">
|
||||
<defaultValue>org.alfresco</defaultValue>
|
||||
</requiredProperty>
|
||||
<requiredProperty key="alfresco_target_version">
|
||||
<defaultValue>4.2.e</defaultValue>
|
||||
</requiredProperty>
|
||||
<requiredProperty key="package">
|
||||
<defaultValue>(not used)</defaultValue>
|
||||
</requiredProperty>
|
||||
</requiredProperties>
|
||||
<modules>
|
||||
<module id="amp" dir="amp" name="amp">
|
||||
<fileSets>
|
||||
<fileSet filtered="false" packaged="false" encoding="UTF-8">
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**/*.java</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet encoding="UTF-8" filtered="false">
|
||||
<directory>src/main/amp</directory>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet encoding="UTF-8" filtered="false">
|
||||
<directory>src/test/resources</directory>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet encoding="UTF-8" filtered="false">
|
||||
<directory>src/test/properties</directory>
|
||||
<includes>
|
||||
<include>**/*.properties</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet encoding="UTF-8" filtered="false">
|
||||
<directory>tomcat</directory>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</module>
|
||||
<module id="alfresco" dir="alfresco" name="alfresco">
|
||||
<fileSets>
|
||||
<fileSet encoding="UTF-8" filtered="false">
|
||||
<directory>src/main/webapp</directory>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet encoding="UTF-8" filtered="false">
|
||||
<directory>src/main/properties</directory>
|
||||
<includes>
|
||||
<include>**/*.properties</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet encoding="UTF-8" filtered="false">
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</module>
|
||||
<module id="solr" dir="solr" name="solr" filtered="false">
|
||||
<fileSets>
|
||||
<fileSet encoding="UTF-8">
|
||||
<directory>src/main/solr-properties</directory>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet encoding="UTF-8" filtered="false">
|
||||
<directory>src/main/webapp</directory>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet encoding="UTF-8" filtered="false">
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</module>
|
||||
<module id="share" dir="share" name="share" filtered="false">
|
||||
<fileSets>
|
||||
<fileSet encoding="UTF-8">
|
||||
<directory>src/main/webapp</directory>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet encoding="UTF-8">
|
||||
<directory>src/main/properties</directory>
|
||||
<includes>
|
||||
<include>**/*.properties</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet encoding="UTF-8" filtered="false">
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</module>
|
||||
<module id="runner" dir="runner" name="runner" filtered="false">
|
||||
</module>
|
||||
</modules>
|
||||
</archetype-descriptor>
|
@@ -0,0 +1,145 @@
|
||||
<?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 and Explorer Client</name>
|
||||
<packaging>war</packaging>
|
||||
<description>Alfresco Repository and Explorer Client</description>
|
||||
|
||||
<parent>
|
||||
<groupId>${groupId}</groupId>
|
||||
<artifactId>${rootArtifactId}</artifactId>
|
||||
<version>${version}</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>${alfresco.groupId}</groupId>
|
||||
<artifactId>alfresco</artifactId>
|
||||
<type>war</type>
|
||||
</dependency>
|
||||
<!-- Demonstrating the dependency on the repo AMP developed in the 'amp' module -->
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>amp</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>amp</type>
|
||||
</dependency>
|
||||
<!-- Demonstrating the usage of a well known GA AMP (SharePoint Protocol Support) -->
|
||||
<dependency>
|
||||
<groupId>${alfresco.groupId}</groupId>
|
||||
<artifactId>alfresco-spp</artifactId>
|
||||
<version>${alfresco.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 -->
|
||||
<overlay/>
|
||||
<!-- The Alfresco WAR -->
|
||||
<overlay>
|
||||
<groupId>${alfresco.groupId}</groupId>
|
||||
<artifactId>alfresco</artifactId>
|
||||
<type>war</type>
|
||||
<!-- To allow inclusion of META-INF -->
|
||||
<excludes/>
|
||||
</overlay>
|
||||
<!-- Add / order your AMPs here -->
|
||||
<overlay>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>amp</artifactId>
|
||||
<type>amp</type>
|
||||
</overlay>
|
||||
<overlay>
|
||||
<groupId>${alfresco.groupId}</groupId>
|
||||
<artifactId>alfresco-spp</artifactId>
|
||||
<type>amp</type>
|
||||
</overlay>
|
||||
</overlays>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<profiles>
|
||||
<!-- Overrides the run profile to disable securecomms -->
|
||||
<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>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
@@ -12,28 +12,41 @@
|
||||
# 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.
|
||||
|
||||
# BUILD TIME PROPERTIES
|
||||
# ---------------------
|
||||
|
||||
# NB: This group of properties is only used by ant for tomcat deployment, and may not be maintained.
|
||||
# Appserver to deploy to (tomcat) - used only by ant ATM.
|
||||
# Use $M2_HOME/conf/settings.xml (or ~/.m2/settings.xml) for maven2 appservers username/password
|
||||
appserver.dir=/your/appserver/dir
|
||||
appserver.host=localhost
|
||||
appserver.manager.url=http://${appserver.host}:8080/manager
|
||||
appserver.username=tomcat
|
||||
appserver.password=tomcat
|
||||
|
||||
# RUN TIME PROPERTIES
|
||||
# -------------------
|
||||
|
||||
# Sample custom content and index data location
|
||||
# This will create alf_data Relative to appserver run folder
|
||||
# In this default file we take the property from the POM (for compatbility with local jetty and jboss deployments) but it can also be edited here.
|
||||
|
||||
###############################
|
||||
## Common Alfresco Properties #
|
||||
###############################
|
||||
|
||||
|
||||
dir.root=${alfresco.data.location}
|
||||
# Allowed values are: NONE, AUTO, FULL
|
||||
index.recovery.mode=NONE
|
||||
index.recovery.mode=FULL
|
||||
|
||||
index.subsystem.name=solr
|
||||
solr.host=localhost
|
||||
solr.port=8080
|
||||
solr.secureComms=none
|
||||
# Setting Solr backup for the future. Tweak this if needed (ideally in other env properties files)
|
||||
solr.backup.alfresco.cronExpression=0 30 2 * * ? 2050
|
||||
solr.backup.archive.cronExpression=0 30 3 * * ? 2050
|
||||
solr.backup.alfresco.remoteBackupLocation=${dir.root}/solrBackup/alfresco
|
||||
solr.backup.archive.remoteBackupLocation=${dir.root}/solrBackup/archive
|
||||
# We are in the local DEV properties file, no need for Solr backup
|
||||
solr.backup.alfresco.numberToKeep=0
|
||||
solr.backup.archive.numberToKeep=0
|
||||
|
||||
# These jobs seem to require Lucene (Unsupported Operation with Solr) so we disasble them / set to future date
|
||||
# See https://forums.alfresco.com/en/viewtopic.php?f=52&t=41597
|
||||
# If you want to enable them (and so full WQS functionality), please also set index.subsystem.name=lucene
|
||||
wcmqs.dynamicCollectionProcessor.schedule=0 30 2 * * ? 2060
|
||||
wcmqs.feedbackProcessor.schedule=0 40 2 * * ? 2060
|
||||
wcmqs.publishQueueProcessor.schedule=0 50 2 * * ? 2060
|
||||
|
||||
# Fail or not when there are node integrity checker errors
|
||||
integrity.failOnError=true
|
||||
@@ -41,15 +54,171 @@ integrity.failOnError=true
|
||||
# database connection properties
|
||||
# MySQL connection (This is default and requires mysql-connector-java-5.0.3-bin.jar, which ships with the Alfresco server)
|
||||
|
||||
db.driver=org.gjt.mm.mysql.Driver
|
||||
db.url=jdbc:mysql://localhost/${alfresco.db.name}
|
||||
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
|
||||
|
||||
# MySQL dialect
|
||||
hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
|
||||
|
||||
#
|
||||
# Sample custom content and index data location
|
||||
#
|
||||
#dir.root=/srv/alfresco/alf_data
|
||||
#dir.keystore=${dir.root}/keystore
|
||||
|
||||
#
|
||||
# Sample database connection properties
|
||||
#
|
||||
#db.username=alfresco
|
||||
#db.password=alfresco
|
||||
|
||||
#
|
||||
# External locations
|
||||
#-------------
|
||||
#ooo.exe=soffice
|
||||
#ooo.enabled=false
|
||||
#jodconverter.officeHome=./OpenOffice.org
|
||||
#jodconverter.portNumbers=8101
|
||||
#jodconverter.enabled=true
|
||||
#img.root=./ImageMagick
|
||||
#swf.exe=./bin/pdf2swf
|
||||
|
||||
#
|
||||
# Property to control whether schema updates are performed automatically.
|
||||
# Updates must be enabled during upgrades as, apart from the static upgrade scripts,
|
||||
# there are also auto-generated update scripts that will need to be executed. After
|
||||
# upgrading to a new version, this can be disabled.
|
||||
#
|
||||
#db.schema.update=true
|
||||
|
||||
#
|
||||
# MySQL connection
|
||||
#
|
||||
#db.driver=org.gjt.mm.mysql.Driver
|
||||
#db.url=jdbc:mysql://localhost/alfresco?useUnicode=yes&characterEncoding=UTF-8
|
||||
|
||||
#
|
||||
# Oracle connection
|
||||
#
|
||||
#db.driver=oracle.jdbc.OracleDriver
|
||||
#db.url=jdbc:oracle:thin:@localhost:1521:alfresco
|
||||
|
||||
#
|
||||
# SQLServer connection
|
||||
# Requires jTDS driver version 1.2.5 and SNAPSHOT isolation mode
|
||||
# Enable TCP protocol on fixed port 1433
|
||||
# Prepare the database with:
|
||||
# ALTER DATABASE alfresco SET ALLOW_SNAPSHOT_ISOLATION ON;
|
||||
#
|
||||
#db.driver=net.sourceforge.jtds.jdbc.Driver
|
||||
#db.url=jdbc:jtds:sqlserver://localhost:1433/alfresco
|
||||
#db.txn.isolation=4096
|
||||
|
||||
#
|
||||
# PostgreSQL connection (requires postgresql-8.2-504.jdbc3.jar or equivalent)
|
||||
#
|
||||
#db.driver=org.postgresql.Driver
|
||||
#db.url=jdbc:postgresql://localhost:5432/alfresco
|
||||
|
||||
#
|
||||
# DB2 connection
|
||||
#
|
||||
#db.driver=com.ibm.db2.jcc.DB2Driver
|
||||
#db.url=jdbc:db2://localhost:50000/alfresco:retrieveMessagesFromServerOnGetMessage=true;
|
||||
|
||||
#
|
||||
# Index Recovery Mode
|
||||
#-------------
|
||||
#index.recovery.mode=AUTO
|
||||
|
||||
#
|
||||
# Outbound Email Configuration
|
||||
#-------------
|
||||
#mail.host=
|
||||
#mail.port=25
|
||||
#mail.username=anonymous
|
||||
#mail.password=
|
||||
#mail.encoding=UTF-8
|
||||
#mail.from.default=alfresco@alfresco.org
|
||||
#mail.smtp.auth=false
|
||||
|
||||
#
|
||||
# Alfresco Email Service and Email Server
|
||||
#-------------
|
||||
|
||||
# Enable/Disable the inbound email service. The service could be used by processes other than
|
||||
# the Email Server (e.g. direct RMI access) so this flag is independent of the Email Service.
|
||||
#-------------
|
||||
#email.inbound.enabled=true
|
||||
|
||||
# Email Server properties
|
||||
#-------------
|
||||
#email.server.enabled=true
|
||||
#email.server.port=25
|
||||
#email.server.domain=alfresco.com
|
||||
#email.inbound.unknownUser=anonymous
|
||||
|
||||
# A comma separated list of email REGEX patterns of allowed senders.
|
||||
# If there are any values in the list then all sender email addresses
|
||||
# must match. For example:
|
||||
# .*\@alfresco\.com, .*\@alfresco\.org
|
||||
# Allow anyone:
|
||||
#-------------
|
||||
#email.server.allowed.senders=.*
|
||||
|
||||
#
|
||||
# The default authentication chain
|
||||
# To configure external authentication subsystems see:
|
||||
# http://wiki.alfresco.com/wiki/Alfresco_Authentication_Subsystems
|
||||
#-------------
|
||||
#authentication.chain=alfrescoNtlm1:alfrescoNtlm
|
||||
|
||||
#
|
||||
# URL Generation Parameters (The ${localname} token is replaced by the local server name)
|
||||
#-------------
|
||||
#alfresco.context=alfresco
|
||||
#alfresco.host=${localname}
|
||||
#alfresco.port=8080
|
||||
#alfresco.protocol=http
|
||||
#
|
||||
#share.context=share
|
||||
#share.host=${localname}
|
||||
#share.port=8080
|
||||
#share.protocol=http
|
||||
|
||||
#imap.server.enabled=true
|
||||
#imap.server.port=143
|
||||
#imap.server.host=localhost
|
||||
|
||||
# Default value of alfresco.rmi.services.host is 0.0.0.0 which means 'listen on all adapters'.
|
||||
# This allows connections to JMX both remotely and locally.
|
||||
#
|
||||
alfresco.rmi.services.host=0.0.0.0
|
||||
|
||||
#
|
||||
# RMI service ports for the individual services.
|
||||
# These seven services are available remotely.
|
||||
#
|
||||
# Assign individual ports for each service for best performance
|
||||
# or run several services on the same port. You can even run everything on 50500 if needed.
|
||||
#
|
||||
# Select 0 to use a random unused port.
|
||||
#
|
||||
#avm.rmi.service.port=50501
|
||||
#avmsync.rmi.service.port=50502
|
||||
#attribute.rmi.service.port=50503
|
||||
#authentication.rmi.service.port=50504
|
||||
#repo.rmi.service.port=50505
|
||||
#action.rmi.service.port=50506
|
||||
#wcm-deployment-receiver.rmi.service.port=50507
|
||||
#monitor.rmi.service.port=50508
|
||||
|
||||
|
||||
# Dialect is autodetected starting from 3.2
|
||||
# H2 dialect
|
||||
#hibernate.dialect=org.hibernate.dialect.H2Dialect
|
||||
|
||||
|
||||
# Property to control whether schema updates are performed automatically.
|
||||
@@ -69,7 +238,7 @@ smb.tcpip.port=1445
|
||||
netbios.session.port=1139
|
||||
netbios.name.port=1137
|
||||
netbios.datagram.port=1138
|
||||
ftp.server.enables=false
|
||||
ftp.server.enabled=false
|
||||
ftp.port=1121
|
||||
ftp.authenticator=alfresco
|
||||
|
||||
@@ -137,5 +306,3 @@ ldap.synchronisation.import.group.cron=0 45 21 * * ?
|
||||
# - setting this to true means old group definitions will be tidied up.
|
||||
ldap.synchronisation.import.group.clearAllChildren=false
|
||||
|
||||
|
||||
|
@@ -0,0 +1,2 @@
|
||||
# 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
|
@@ -0,0 +1,265 @@
|
||||
# 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
|
||||
|
||||
###### 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
|
||||
|
||||
###### Hibernate specific appender definition #######
|
||||
#log4j.appender.file=org.apache.log4j.FileAppender
|
||||
#log4j.appender.file.File=hibernate.log
|
||||
#log4j.appender.file.layout=org.apache.log4j.PatternLayout
|
||||
#log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
|
||||
|
||||
###### Log level overrides #######
|
||||
|
||||
# Commented-in loggers will be exposed as JMX MBeans (refer to org.alfresco.repo.admin.Log4JHierarchyInit)
|
||||
# Hence, generally useful loggers should be listed with at least ERROR level to allow simple runtime
|
||||
# control of the level via a suitable JMX Console. Also, any other loggers can be added transiently via
|
||||
# Log4j addLoggerMBean as long as the logger exists and has been loaded.
|
||||
|
||||
# Hibernate
|
||||
log4j.logger.org.hibernate=error
|
||||
log4j.logger.org.hibernate.util.JDBCExceptionReporter=fatal
|
||||
log4j.logger.org.hibernate.event.def.AbstractFlushingEventListener=fatal
|
||||
log4j.logger.org.hibernate.type=warn
|
||||
log4j.logger.org.hibernate.cfg.SettingsFactory=warn
|
||||
|
||||
# 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
|
||||
|
||||
# Axis/WSS4J
|
||||
log4j.logger.org.apache.axis=info
|
||||
log4j.logger.org.apache.ws=info
|
||||
|
||||
# CXF
|
||||
log4j.logger.org.apache.cxf=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
|
||||
|
||||
# OpenOfficeConnection
|
||||
log4j.logger.net.sf.jooreports.openoffice.connection=fatal
|
||||
|
||||
# log prepared statement cache activity ###
|
||||
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.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
|
||||
log4j.logger.org.alfresco.repo.management.subsystems=warn
|
||||
log4j.logger.org.alfresco.repo.management.subsystems.ChildApplicationContextFactory=info
|
||||
log4j.logger.org.alfresco.repo.management.subsystems.ChildApplicationContextFactory$ChildApplicationContext=warn
|
||||
log4j.logger.org.alfresco.repo.security.sync=info
|
||||
log4j.logger.org.alfresco.repo.security.person=info
|
||||
|
||||
log4j.logger.org.alfresco.sample=info
|
||||
log4j.logger.org.alfresco.web=info
|
||||
#log4j.logger.org.alfresco.web.app.AlfrescoNavigationHandler=debug
|
||||
#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
|
||||
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.repo.version.Version2ServiceImpl=warn
|
||||
|
||||
#log4j.logger.org.alfresco.web.app.DebugPhaseListener=debug
|
||||
|
||||
log4j.logger.org.alfresco.repo.workflow=info
|
||||
|
||||
# CIFS server debugging
|
||||
log4j.logger.org.alfresco.smb.protocol=error
|
||||
#log4j.logger.org.alfresco.smb.protocol.auth=debug
|
||||
#log4j.logger.org.alfresco.acegi=debug
|
||||
|
||||
# FTP server debugging
|
||||
log4j.logger.org.alfresco.ftp.protocol=error
|
||||
#log4j.logger.org.alfresco.ftp.server=debug
|
||||
|
||||
# WebDAV debugging
|
||||
#log4j.logger.org.alfresco.webdav.protocol=debug
|
||||
log4j.logger.org.alfresco.webdav.protocol=error
|
||||
|
||||
# NTLM servlet filters
|
||||
#log4j.logger.org.alfresco.web.app.servlet.NTLMAuthenticationFilter=debug
|
||||
#log4j.logger.org.alfresco.repo.webdav.auth.NTLMAuthenticationFilter=debug
|
||||
|
||||
# Kerberos servlet filters
|
||||
#log4j.logger.org.alfresco.web.app.servlet.KerberosAuthenticationFilter=debug
|
||||
#log4j.logger.org.alfresco.repo.webdav.auth.KerberosAuthenticationFilter=debug
|
||||
|
||||
# File servers
|
||||
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
|
||||
|
||||
# Indexer debugging
|
||||
log4j.logger.org.alfresco.repo.search.Indexer=error
|
||||
#log4j.logger.org.alfresco.repo.search.Indexer=debug
|
||||
|
||||
log4j.logger.org.alfresco.repo.search.impl.lucene.index=error
|
||||
log4j.logger.org.alfresco.repo.search.impl.lucene.fts.FullTextSearchIndexerImpl=warn
|
||||
#log4j.logger.org.alfresco.repo.search.impl.lucene.index=DEBUG
|
||||
|
||||
# Audit debugging
|
||||
# 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
|
||||
log4j.logger.org.alfresco.repo.dictionary.types.period=warn
|
||||
|
||||
# Virtualization Server Registry
|
||||
log4j.logger.org.alfresco.mbeans.VirtServerRegistry=error
|
||||
|
||||
# Spring context runtime property setter
|
||||
log4j.logger.org.alfresco.util.RuntimeSystemPropertiesSetter=info
|
||||
|
||||
# Debugging options for clustering
|
||||
log4j.logger.org.alfresco.repo.content.ReplicatingContentStore=error
|
||||
log4j.logger.org.alfresco.repo.content.replication=error
|
||||
|
||||
#log4j.logger.org.alfresco.repo.deploy.DeploymentServiceImpl=debug
|
||||
|
||||
# Activity service
|
||||
log4j.logger.org.alfresco.repo.activities=warn
|
||||
|
||||
# User usage tracking
|
||||
log4j.logger.org.alfresco.repo.usage=info
|
||||
|
||||
# Sharepoint
|
||||
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
|
||||
|
||||
# CMIS
|
||||
log4j.logger.org.alfresco.opencmis=error
|
||||
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
|
||||
|
||||
# IMAP
|
||||
log4j.logger.org.alfresco.repo.imap=info
|
||||
|
||||
# JBPM
|
||||
# Note: non-fatal errors (eg. logged during job execution) should be handled by Alfresco's retrying transaction handler
|
||||
log4j.logger.org.jbpm.graph.def.GraphElement=fatal
|
||||
|
||||
#log4j.logger.org.alfresco.repo.googledocs=debug
|
||||
|
||||
###### Scripting #######
|
||||
|
||||
# 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
|
||||
|
||||
# Repository
|
||||
log4j.logger.org.alfresco.repo.web.scripts=warn
|
||||
log4j.logger.org.alfresco.repo.web.scripts.BaseWebScriptTest=info
|
||||
log4j.logger.org.alfresco.repo.web.scripts.AlfrescoRhinoScriptDebugger=off
|
||||
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
|
||||
|
||||
# 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=
|
||||
|
||||
# Metadata extraction
|
||||
log4j.logger.org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter=warn
|
||||
|
||||
# Reduces PDFont error level due to ALF-7105
|
||||
log4j.logger.org.apache.pdfbox.pdmodel.font.PDSimpleFont=fatal
|
||||
log4j.logger.org.apache.pdfbox.pdmodel.font.PDFont=fatal
|
||||
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
|
@@ -1,4 +1,4 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<?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
|
||||
@@ -16,18 +16,18 @@
|
||||
limitations under the License.
|
||||
|
||||
-->
|
||||
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
|
||||
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
|
||||
<faces-config>
|
||||
<!--
|
||||
|
|
||||
| Insert here custom faces configurations like:
|
||||
| <managed-bean>
|
||||
| <navigation-rule>
|
||||
|
|
||||
| This is loaded as part of the alfresco convention over configuration
|
||||
-->
|
||||
|
||||
|
||||
</faces-config>
|
||||
|
||||
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
|
||||
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
|
||||
<faces-config>
|
||||
<!--
|
||||
|
|
||||
| Insert here custom faces configurations like:
|
||||
| <managed-bean>
|
||||
| <navigation-rule>
|
||||
|
|
||||
| This is loaded as part of the alfresco convention over configuration
|
||||
-->
|
||||
|
||||
|
||||
</faces-config>
|
||||
|
@@ -0,0 +1,39 @@
|
||||
<?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 AMP Module</name>
|
||||
<packaging>amp</packaging>
|
||||
<description>This is a sample AMP project, depended upon by the alfresco WAR module</description>
|
||||
|
||||
<parent>
|
||||
<groupId>${groupId}</groupId>
|
||||
<artifactId>${rootArtifactId}</artifactId>
|
||||
<version>${version}</version>
|
||||
</parent>
|
||||
|
||||
<!--
|
||||
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-integration-parent
|
||||
POM definition
|
||||
@TODO - document
|
||||
-->
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>${alfresco.groupId}</groupId>
|
||||
<artifactId>alfresco-repository</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<!-- Defines the target WAR artifactId to run this amp, only used with the -Pamp-to-war switch
|
||||
. | Allowed values: alfresco | share. Defaults to a repository AMP, but could point to your custom corporate Alfresco WAR -->
|
||||
<alfresco.client.war>${alfresco_target_amp_client_war}</alfresco.client.war>
|
||||
<!-- Defines the target WAR groupId to run this amp, only used with the -Pamp-to-war switch
|
||||
. | Could be org.alfresco | org.alfresco.enterprise or your corporate groupId -->
|
||||
<!-- <alfresco.client.war.groupId>org.alfresco</alfresco.client.war.groupId> -->
|
||||
<!-- Defines the target WAR version to run this amp, only used with the -Pamp-to-war switch -->
|
||||
<!-- <alfresco.client.war.version>${alfresco.version}</alfresco.client.war.version> -->
|
||||
</properties>
|
||||
|
||||
</project>
|
@@ -20,11 +20,11 @@
|
||||
<beans>
|
||||
|
||||
<!-- A simple class that is initialized by Spring -->
|
||||
<bean id="${groupId}.${artifactId}.exampleBean" class="com.sourcesense.demoamp.Demo" init-method="init" />
|
||||
<bean id="changeMe.exampleBean" class="org.alfresco.demoamp.Demo" init-method="init" />
|
||||
|
||||
<!-- A simple module component that will be executed once -->
|
||||
<bean id="${groupId}.${artifactId}.exampleComponent" class="com.sourcesense.demoamp.DemoComponent" parent="module.baseComponent" >
|
||||
<property name="moduleId" value="${pom.groupId}.${pom.artifactId}" /> <!-- See module.properties -->
|
||||
<bean id="changeMe.exampleComponent" class="org.alfresco.demoamp.DemoComponent" parent="module.baseComponent" >
|
||||
<property name="moduleId" value="${project.artifactId}" /> <!-- See module.properties -->
|
||||
<property name="name" value="exampleComponent" />
|
||||
<property name="description" value="A demonstration component" />
|
||||
<property name="sinceVersion" value="2.0" />
|
@@ -20,6 +20,6 @@
|
||||
|
||||
<beans>
|
||||
|
||||
<import resource="classpath:alfresco/module/${groupId}.${artifactId}/context/service-context.xml" />
|
||||
<import resource="classpath:alfresco/module/${artifactId}/context/service-context.xml" />
|
||||
|
||||
</beans>
|
@@ -19,11 +19,11 @@
|
||||
|
||||
# ==== Beginning of Alfresco required/optional properties ====== #
|
||||
|
||||
module.id=${pom.groupId}.${pom.artifactId}
|
||||
module.id=${project.artifactId}
|
||||
#module.aliases=myModule-123, my-module
|
||||
module.title=${pom.name}
|
||||
module.description=${pom.description}
|
||||
module.version=${noSnapshotVersion}.${buildNumber}
|
||||
module.title=${project.name}
|
||||
module.description=${project.description}
|
||||
module.version=${noSnapshotVersion}
|
||||
|
||||
# The following optional properties can be used to prevent the module from being added
|
||||
# to inappropriate versions of the WAR file.
|
@@ -0,0 +1,15 @@
|
||||
package org.alfresco.demoamp;
|
||||
|
||||
/**
|
||||
* This class does nothing except dump some output to <i>system.out</i>.
|
||||
* This is a sample taken from Alfresco SDK
|
||||
*
|
||||
* @author Derek Hulley
|
||||
*/
|
||||
public class Demo
|
||||
{
|
||||
public void init()
|
||||
{
|
||||
System.out.println("SDK Demo AMP class has been loaded");
|
||||
}
|
||||
}
|
@@ -0,0 +1,26 @@
|
||||
package org.alfresco.demoamp;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.alfresco.repo.module.AbstractModuleComponent;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
/**
|
||||
* A basic component that will be started for this module.
|
||||
* This is a sample taken from Alfresco SDK
|
||||
*
|
||||
* @author Derek Hulley
|
||||
*/
|
||||
public class DemoComponent extends AbstractModuleComponent
|
||||
{
|
||||
Log log = LogFactory.getLog(DemoComponent.class);
|
||||
|
||||
@Override
|
||||
protected void executeInternal() throws Throwable
|
||||
{
|
||||
System.out.println("DemoComponent has been executed");
|
||||
log.debug("Test debug logging is working");
|
||||
log.info("This should not be outputted by default");
|
||||
}
|
||||
}
|
@@ -0,0 +1,57 @@
|
||||
# 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.
|
||||
|
||||
|
||||
|
||||
# RUN TIME PROPERTIES
|
||||
# -------------------
|
||||
|
||||
# Sample custom content and index data location
|
||||
# This will create alf_data Relative to appserver run folder
|
||||
# In this default file we take the property from the POM (for compatbility with local jetty and jboss deployments) but it can also be edited here.
|
||||
dir.root=${alfresco.data.location}
|
||||
# Allowed values are: NONE, AUTO, FULL
|
||||
index.recovery.mode=NONE
|
||||
# This is default. Allowed values are: solr, lucene, noindex
|
||||
index.subsystem.name=solr
|
||||
|
||||
#dir.keystore=.
|
||||
#keystore.password=storepassword
|
||||
#metadata.password=metapassword
|
||||
|
||||
# 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
|
||||
|
||||
# File servers related properties
|
||||
# For local builds we disable CIFS and FTP. Edit the following property to reenable them
|
||||
smb.server.enabled=false
|
||||
smb.server.name=CFS_SHARE_LOCAL
|
||||
smb.server.domain=mycompany.com
|
||||
smb.server.bindto=127.0.0.1
|
||||
smb.tcpip.port=1445
|
||||
netbios.session.port=1139
|
||||
netbios.name.port=1137
|
||||
netbios.datagram.port=1138
|
||||
ftp.server.enables=false
|
||||
ftp.port=1121
|
||||
ftp.authenticator=alfresco
|
@@ -0,0 +1,23 @@
|
||||
# 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
|
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Context docBase="${alfresco.client.war.folder}" path="${alfresco.client.contextPath}">
|
||||
<!--
|
||||
<Environment override="false" type="java.lang.Boolean" name="properties/startup.enable" description="A flag that globally enables or disables startup of the major Alfresco subsystems." value="true"/>
|
||||
<Environment override="false" type="java.lang.String" name="properties/dir.root" description="The filesystem directory below which content and index data is stored. Should be on a shared disk if this is a clustered installation."/>
|
||||
<Environment override="false" type="java.lang.String" name="properties/hibernate.dialect" description="The fully qualified name of a org.hibernate.dialect.Dialect subclass that allows Hibernate to generate SQL optimized for a particular relational database. Choose from org.hibernate.dialect.DerbyDialect, org.hibernate.dialect.MySQLInnoDBDialect, org.alfresco.repo.domain.hibernate.dialect.AlfrescoOracle9Dialect, org.alfresco.repo.domain.hibernate.dialect.AlfrescoSybaseAnywhereDialect, org.alfresco.repo.domain.hibernate.dialect.AlfrescoSQLServerDialect, org.hibernate.dialect.PostgreSQLDialect"/>
|
||||
<Environment override="false" type="java.lang.String" name="properties/hibernate.query.substitutions" description="Mapping from tokens in Hibernate queries to SQL tokens. For PostgreSQL, set this to "true TRUE, false FALSE"."/>
|
||||
<Environment override="false" type="java.lang.Boolean" name="properties/hibernate.jdbc.use_get_generated_keys" description="Enable use of JDBC3 PreparedStatement.getGeneratedKeys() to retrieve natively generated keys after insert. Requires JDBC3+ driver. Set to false if your driver has problems with the Hibernate identifier generators. By default, tries to determine the driver capabilities using connection metadata."/>
|
||||
<Environment override="false" type="java.lang.String" name="properties/hibernate.default_schema" description="Qualify unqualified table names with the given schema/tablespace in generated SQL. It may be necessary to set this when the target database has more than one schema."/>
|
||||
-->
|
||||
</Context>
|
@@ -0,0 +1,72 @@
|
||||
<?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>Quickstart of Alfresco and Share with DB and runner embedded</name>
|
||||
<description>This All-in-One project allows to manage all the components involved in Alfresco development (Repo, Share, Solr, AMPs) in one project</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>
|
||||
<!--
|
||||
| Defines the Alfresco GroupId \ Edition to work against. Allowed values are: org.alfresco | org.alfresco.enterprise
|
||||
| NOTE: Please Refer to Alfresco Support for access to Enterprise artifacts -->
|
||||
<alfresco.groupId>${alfresco_target_groupId}</alfresco.groupId>
|
||||
<!-- Defines the Alfresco version to work against. Allowed values are: org.alfresco | org.alfresco.enterprise -->
|
||||
<alfresco.version>${alfresco_target_version}</alfresco.version>
|
||||
<!-- This control the root logging level for all apps -->
|
||||
<app.log.root.level>WARN</app.log.root.level>
|
||||
<!-- This controls the default data location for dir.root -->
|
||||
<alfresco.data.location>alf_data_dev</alfresco.data.location>
|
||||
<!-- This controls which properties will be picked in multi-enviromment build -->
|
||||
<env>local</env>
|
||||
</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
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>${alfresco.groupId}</groupId>
|
||||
<artifactId>alfresco-platform-distribution</artifactId>
|
||||
<version>${alfresco.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<!-- This repository is only needed to retrieve Alfresco parent POM.
|
||||
NOTE: This can be removed when/if Alfresco will be on Maven Central
|
||||
|
||||
NOTE: The repository to be used for Alfresco Enterprise artifacts is
|
||||
https://artifacts.alfresco.com/nexus/content/groups/private/. Please check
|
||||
with Alfresco Support to get credentials to add to your ~/.m2/settings.xml
|
||||
if you are a Enterprise customer or Partner
|
||||
-->
|
||||
<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>
|
||||
</repository>
|
||||
</repositories>
|
||||
</project>
|
@@ -0,0 +1,67 @@
|
||||
<?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 Solr Tomcat Runner</name>
|
||||
<packaging>pom</packaging>
|
||||
<description>Alfresco, Share and Solr Tomcat Runner</description>
|
||||
|
||||
<parent>
|
||||
<groupId>${groupId}</groupId>
|
||||
<artifactId>${rootArtifactId}</artifactId>
|
||||
<version>${version}</version>
|
||||
</parent>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>run</id>
|
||||
<properties>
|
||||
<solr.project.dir>${project.basedir}/../solr</solr.project.dir>
|
||||
</properties>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.tomcat.maven</groupId>
|
||||
<artifactId>tomcat7-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>run-wars</id>
|
||||
<goals>
|
||||
<goal>run-war-only</goal>
|
||||
</goals>
|
||||
<phase>integration-test</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<!-- Runs Solr as the "fake" main webapp. This is useful due to the currently poor OOTB zip packaging of Alfresco Solr -->
|
||||
<warDirectory>${solr.project.dir}/target/solr-overlay</warDirectory>
|
||||
<path>/solr</path>
|
||||
<systemProperties>
|
||||
<solr.solr.home>${solr.project.dir}/solr_home</solr.solr.home>
|
||||
</systemProperties>
|
||||
<!-- Configures the custom Alfresco and Share to run as embedded webapps -->
|
||||
<webapps>
|
||||
<webapp>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>alfresco</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>war</type>
|
||||
<asWebapp>true</asWebapp>
|
||||
<contextPath>alfresco</contextPath>
|
||||
</webapp>
|
||||
<webapp>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>share</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>war</type>
|
||||
<asWebapp>true</asWebapp>
|
||||
<contextPath>share</contextPath>
|
||||
</webapp>
|
||||
</webapps>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
@@ -0,0 +1,53 @@
|
||||
<?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 Client</name>
|
||||
<packaging>war</packaging>
|
||||
<description>Alfresco Share Client</description>
|
||||
|
||||
<parent>
|
||||
<groupId>${groupId}</groupId>
|
||||
<artifactId>${rootArtifactId}</artifactId>
|
||||
<version>${version}</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>${alfresco.groupId}</groupId>
|
||||
<artifactId>share</artifactId>
|
||||
<type>war</type>
|
||||
</dependency>
|
||||
<!-- Here you can add your Share AMP dependencies -->
|
||||
|
||||
</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>share</artifactId>
|
||||
<type>war</type>
|
||||
<!-- To allow inclusion of META-INF -->
|
||||
<excludes/>
|
||||
</overlay>
|
||||
<!-- Add / order here the Share AMPs declared above -->
|
||||
</overlays>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
@@ -0,0 +1,8 @@
|
||||
# SHARE client environment dependent properties (local build)
|
||||
share.server.scheme=http
|
||||
share.server.name=localhost
|
||||
share.server.port=${jetty.port}
|
||||
alfresco.server.scheme=http
|
||||
alfresco.server.name=localhost
|
||||
alfresco.server.port=${jetty.port}
|
||||
alfresco.webapp.name=alfresco
|
@@ -0,0 +1,112 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!-- This is a sample configuration file from Alfresco Community 4.2.b - Please adapt to your version -->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:hz="http://www.hazelcast.com/schema/config"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
|
||||
http://www.hazelcast.com/schema/config
|
||||
http://www.hazelcast.com/schema/config/hazelcast-spring.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="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>
|
@@ -0,0 +1,346 @@
|
||||
<!-- This is a sample configuration file from Alfresco Community 4.2.b - Please adapt to your version -->
|
||||
<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>
|
||||
|
||||
<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>-1</maximum-folder-count>
|
||||
</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="gd:googleEditable" />
|
||||
<aspect name="cm:geographic" />
|
||||
<aspect name="exif:exif" />
|
||||
</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>
|
||||
</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™ Document
|
||||
-->
|
||||
<creatable-types>
|
||||
<creatable type="doc">application/msword</creatable>
|
||||
<creatable type="xls">application/vnd.ms-excel</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}&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>
|
||||
</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>
|
||||
</kerberos>
|
||||
</config>
|
||||
|
||||
<!-- example port config used to access remote Alfresco server (default is 8080) -->
|
||||
<!--
|
||||
<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>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>http://localhost:8080/alfresco/activiti-admin</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 to the name of the HTTP header that the external SSO
|
||||
uses to provide the authenticated user name.
|
||||
-->
|
||||
<!--
|
||||
<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>
|
||||
</remote>
|
||||
</config>
|
||||
-->
|
||||
|
||||
</alfresco-config>
|
@@ -0,0 +1,262 @@
|
||||
# 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}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{ABSOLUTE} %-5p [%c] %m%n
|
||||
|
||||
###### Hibernate specific appender definition #######
|
||||
#log4j.appender.file=org.apache.log4j.FileAppender
|
||||
#log4j.appender.file.File=hibernate.log
|
||||
#log4j.appender.file.layout=org.apache.log4j.PatternLayout
|
||||
#log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
|
||||
|
||||
###### Log level overrides #######
|
||||
|
||||
# Commented-in loggers will be exposed as JMX MBeans (refer to org.alfresco.repo.admin.Log4JHierarchyInit)
|
||||
# Hence, generally useful loggers should be listed with at least ERROR level to allow simple runtime
|
||||
# control of the level via a suitable JMX Console. Also, any other loggers can be added transiently via
|
||||
# Log4j addLoggerMBean as long as the logger exists and has been loaded.
|
||||
|
||||
# Hibernate
|
||||
log4j.logger.org.hibernate=error
|
||||
log4j.logger.org.hibernate.util.JDBCExceptionReporter=fatal
|
||||
log4j.logger.org.hibernate.event.def.AbstractFlushingEventListener=fatal
|
||||
log4j.logger.org.hibernate.type=warn
|
||||
log4j.logger.org.hibernate.cfg.SettingsFactory=warn
|
||||
|
||||
# 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
|
||||
|
||||
# Axis/WSS4J
|
||||
log4j.logger.org.apache.axis=info
|
||||
log4j.logger.org.apache.ws=info
|
||||
|
||||
# CXF
|
||||
log4j.logger.org.apache.cxf=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
|
||||
|
||||
# OpenOfficeConnection
|
||||
log4j.logger.net.sf.jooreports.openoffice.connection=fatal
|
||||
|
||||
# log prepared statement cache activity ###
|
||||
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.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
|
||||
log4j.logger.org.alfresco.repo.management.subsystems=warn
|
||||
log4j.logger.org.alfresco.repo.management.subsystems.ChildApplicationContextFactory=info
|
||||
log4j.logger.org.alfresco.repo.management.subsystems.ChildApplicationContextFactory$ChildApplicationContext=warn
|
||||
log4j.logger.org.alfresco.repo.security.sync=info
|
||||
log4j.logger.org.alfresco.repo.security.person=info
|
||||
|
||||
log4j.logger.org.alfresco.sample=info
|
||||
log4j.logger.org.alfresco.web=info
|
||||
#log4j.logger.org.alfresco.web.app.AlfrescoNavigationHandler=debug
|
||||
#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
|
||||
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.repo.version.Version2ServiceImpl=warn
|
||||
|
||||
#log4j.logger.org.alfresco.web.app.DebugPhaseListener=debug
|
||||
|
||||
log4j.logger.org.alfresco.repo.workflow=info
|
||||
|
||||
# CIFS server debugging
|
||||
log4j.logger.org.alfresco.smb.protocol=error
|
||||
#log4j.logger.org.alfresco.smb.protocol.auth=debug
|
||||
#log4j.logger.org.alfresco.acegi=debug
|
||||
|
||||
# FTP server debugging
|
||||
log4j.logger.org.alfresco.ftp.protocol=error
|
||||
#log4j.logger.org.alfresco.ftp.server=debug
|
||||
|
||||
# WebDAV debugging
|
||||
#log4j.logger.org.alfresco.webdav.protocol=debug
|
||||
log4j.logger.org.alfresco.webdav.protocol=error
|
||||
|
||||
# NTLM servlet filters
|
||||
#log4j.logger.org.alfresco.web.app.servlet.NTLMAuthenticationFilter=debug
|
||||
#log4j.logger.org.alfresco.repo.webdav.auth.NTLMAuthenticationFilter=debug
|
||||
|
||||
# Kerberos servlet filters
|
||||
#log4j.logger.org.alfresco.web.app.servlet.KerberosAuthenticationFilter=debug
|
||||
#log4j.logger.org.alfresco.repo.webdav.auth.KerberosAuthenticationFilter=debug
|
||||
|
||||
# File servers
|
||||
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
|
||||
|
||||
# Indexer debugging
|
||||
log4j.logger.org.alfresco.repo.search.Indexer=error
|
||||
#log4j.logger.org.alfresco.repo.search.Indexer=debug
|
||||
|
||||
log4j.logger.org.alfresco.repo.search.impl.lucene.index=error
|
||||
log4j.logger.org.alfresco.repo.search.impl.lucene.fts.FullTextSearchIndexerImpl=warn
|
||||
#log4j.logger.org.alfresco.repo.search.impl.lucene.index=DEBUG
|
||||
|
||||
# Audit debugging
|
||||
# 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
|
||||
log4j.logger.org.alfresco.repo.dictionary.types.period=warn
|
||||
|
||||
# Virtualization Server Registry
|
||||
log4j.logger.org.alfresco.mbeans.VirtServerRegistry=error
|
||||
|
||||
# Spring context runtime property setter
|
||||
log4j.logger.org.alfresco.util.RuntimeSystemPropertiesSetter=info
|
||||
|
||||
# Debugging options for clustering
|
||||
log4j.logger.org.alfresco.repo.content.ReplicatingContentStore=error
|
||||
log4j.logger.org.alfresco.repo.content.replication=error
|
||||
|
||||
#log4j.logger.org.alfresco.repo.deploy.DeploymentServiceImpl=debug
|
||||
|
||||
# Activity service
|
||||
log4j.logger.org.alfresco.repo.activities=warn
|
||||
|
||||
# User usage tracking
|
||||
log4j.logger.org.alfresco.repo.usage=info
|
||||
|
||||
# Sharepoint
|
||||
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
|
||||
|
||||
# CMIS
|
||||
log4j.logger.org.alfresco.opencmis=error
|
||||
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
|
||||
|
||||
# IMAP
|
||||
log4j.logger.org.alfresco.repo.imap=info
|
||||
|
||||
# JBPM
|
||||
# Note: non-fatal errors (eg. logged during job execution) should be handled by Alfresco's retrying transaction handler
|
||||
log4j.logger.org.jbpm.graph.def.GraphElement=fatal
|
||||
|
||||
#log4j.logger.org.alfresco.repo.googledocs=debug
|
||||
|
||||
###### Scripting #######
|
||||
|
||||
# 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
|
||||
|
||||
# Repository
|
||||
log4j.logger.org.alfresco.repo.web.scripts=warn
|
||||
log4j.logger.org.alfresco.repo.web.scripts.BaseWebScriptTest=info
|
||||
log4j.logger.org.alfresco.repo.web.scripts.AlfrescoRhinoScriptDebugger=off
|
||||
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
|
||||
|
||||
# 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=
|
||||
|
||||
# Metadata extraction
|
||||
log4j.logger.org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter=warn
|
||||
|
||||
# Reduces PDFont error level due to ALF-7105
|
||||
log4j.logger.org.apache.pdfbox.pdmodel.font.PDSimpleFont=fatal
|
||||
log4j.logger.org.apache.pdfbox.pdmodel.font.PDFont=fatal
|
||||
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
|
@@ -0,0 +1,167 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!-- This is a sample from Alfresco Share 4.2.b to demonstrate how to override web.xml in your project.
|
||||
| Uncomment this file to overlay to the webapp.
|
||||
| NOTE: you will need to change/update this if you use a different Alfresco version / edition
|
||||
-->
|
||||
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
|
||||
|
||||
<display-name>Alfresco Project Slingshot</display-name>
|
||||
<description>Alfresco Project Slingshot application</description>
|
||||
|
||||
<context-param>
|
||||
<param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
|
||||
<param-value>true</param-value>
|
||||
</context-param>
|
||||
|
||||
<!-- Spring Application Context location and context class -->
|
||||
<context-param>
|
||||
<description>Spring config file location</description>
|
||||
<param-name>contextConfigLocation</param-name>
|
||||
<param-value>/WEB-INF/classes/web-application-config.xml</param-value>
|
||||
</context-param>
|
||||
|
||||
<filter>
|
||||
<description>Set HTTP cache Expires header 30 days forward for a mapping.</description>
|
||||
<filter-name>CacheExpiresFilter</filter-name>
|
||||
<filter-class>org.alfresco.web.scripts.servlet.StaticAssetCacheFilter</filter-class>
|
||||
<init-param>
|
||||
<description>Add an Expires Header 30 days forward</description>
|
||||
<param-name>expires</param-name>
|
||||
<param-value>30</param-value>
|
||||
</init-param>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<description>MT authentication support - NOTE: does not support portlets</description>
|
||||
<filter-name>MTAuthentationFilter</filter-name>
|
||||
<filter-class>org.alfresco.web.site.servlet.MTAuthenticationFilter</filter-class>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<description>Redirects view and service URLs to the dispatcher servlet.</description>
|
||||
<filter-name>UrlRewriteFilter</filter-name>
|
||||
<filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<description>Share SSO authentication support filter.</description>
|
||||
<filter-name>Authentication Filter</filter-name>
|
||||
<filter-class>org.alfresco.web.site.servlet.SSOAuthenticationFilter</filter-class>
|
||||
<init-param>
|
||||
<param-name>endpoint</param-name>
|
||||
<param-value>alfresco</param-value>
|
||||
</init-param>
|
||||
</filter>
|
||||
|
||||
<filter-mapping>
|
||||
<filter-name>CacheExpiresFilter</filter-name>
|
||||
<url-pattern>*.jpg</url-pattern>
|
||||
</filter-mapping>
|
||||
<filter-mapping>
|
||||
<filter-name>CacheExpiresFilter</filter-name>
|
||||
<url-pattern>*.png</url-pattern>
|
||||
</filter-mapping>
|
||||
<filter-mapping>
|
||||
<filter-name>CacheExpiresFilter</filter-name>
|
||||
<url-pattern>*.gif</url-pattern>
|
||||
</filter-mapping>
|
||||
<filter-mapping>
|
||||
<filter-name>CacheExpiresFilter</filter-name>
|
||||
<url-pattern>*.css</url-pattern>
|
||||
</filter-mapping>
|
||||
<filter-mapping>
|
||||
<filter-name>CacheExpiresFilter</filter-name>
|
||||
<url-pattern>*.js</url-pattern>
|
||||
</filter-mapping>
|
||||
|
||||
<filter-mapping>
|
||||
<filter-name>Authentication Filter</filter-name>
|
||||
<url-pattern>/page/*</url-pattern>
|
||||
</filter-mapping>
|
||||
|
||||
<filter-mapping>
|
||||
<filter-name>Authentication Filter</filter-name>
|
||||
<url-pattern>/p/*</url-pattern>
|
||||
</filter-mapping>
|
||||
|
||||
<filter-mapping>
|
||||
<filter-name>Authentication Filter</filter-name>
|
||||
<url-pattern>/proxy/*</url-pattern>
|
||||
</filter-mapping>
|
||||
|
||||
<filter-mapping>
|
||||
<filter-name>UrlRewriteFilter</filter-name>
|
||||
<url-pattern>/proxy/*</url-pattern>
|
||||
</filter-mapping>
|
||||
|
||||
<filter-mapping>
|
||||
<filter-name>UrlRewriteFilter</filter-name>
|
||||
<url-pattern>/service/*</url-pattern>
|
||||
</filter-mapping>
|
||||
|
||||
<filter-mapping>
|
||||
<filter-name>UrlRewriteFilter</filter-name>
|
||||
<url-pattern>/feedservice/*</url-pattern>
|
||||
</filter-mapping>
|
||||
|
||||
<filter-mapping>
|
||||
<filter-name>UrlRewriteFilter</filter-name>
|
||||
<url-pattern>/res/*</url-pattern>
|
||||
</filter-mapping>
|
||||
|
||||
<filter-mapping>
|
||||
<filter-name>UrlRewriteFilter</filter-name>
|
||||
<url-pattern>/system/*</url-pattern>
|
||||
</filter-mapping>
|
||||
|
||||
<filter-mapping>
|
||||
<filter-name>MTAuthentationFilter</filter-name>
|
||||
<url-pattern>/page/*</url-pattern>
|
||||
</filter-mapping>
|
||||
<filter-mapping>
|
||||
<filter-name>MTAuthentationFilter</filter-name>
|
||||
<url-pattern>/p/*</url-pattern>
|
||||
</filter-mapping>
|
||||
|
||||
<!-- Spring Context Loader listener - the name of the default global context is passed to the DispatcherServlet
|
||||
in the servlet definition below - this is to allow the NTLM filter etc. to find the single app context -->
|
||||
<listener>
|
||||
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
||||
</listener>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>Spring Surf Dispatcher Servlet</servlet-name>
|
||||
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
|
||||
<init-param>
|
||||
<param-name>contextAttribute</param-name>
|
||||
<param-value>org.springframework.web.context.WebApplicationContext.ROOT</param-value>
|
||||
</init-param>
|
||||
<load-on-startup>1</load-on-startup>
|
||||
</servlet>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>Spring Surf Dispatcher Servlet</servlet-name>
|
||||
<url-pattern>/page/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>Spring Surf Dispatcher Servlet</servlet-name>
|
||||
<url-pattern>/p/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<session-config>
|
||||
<session-timeout>60</session-timeout>
|
||||
</session-config>
|
||||
|
||||
<!-- welcome file list precedence order is index.jsp -->
|
||||
<welcome-file-list>
|
||||
<welcome-file>page</welcome-file>
|
||||
<welcome-file>index.jsp</welcome-file>
|
||||
</welcome-file-list>
|
||||
|
||||
<error-page>
|
||||
<error-code>500</error-code>
|
||||
<location>/error500.jsp</location>
|
||||
</error-page>
|
||||
|
||||
</web-app>
|
@@ -0,0 +1,171 @@
|
||||
<?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 Apache Solr customization</name>
|
||||
<packaging>pom</packaging>
|
||||
<description>Alfresco Apache Solr Customization</description>
|
||||
|
||||
<parent>
|
||||
<groupId>${groupId}</groupId>
|
||||
<artifactId>${rootArtifactId}</artifactId>
|
||||
<version>${version}</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<alfresco.solr.dir>${project.basedir}/solr_home</alfresco.solr.dir>
|
||||
<alfresco.solr.war.overlay>${project.build.directory}/${project.artifactId}-overlay</alfresco.solr.war.overlay>
|
||||
</properties>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-alfresco-community-lib</id>
|
||||
<goals><goal>unpack</goal></goals>
|
||||
<phase>generate-resources</phase>
|
||||
<configuration>
|
||||
<outputDirectory>${alfresco.solr.dir}</outputDirectory>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<artifactId>alfresco-solr</artifactId>
|
||||
<groupId>${alfresco.groupId}</groupId>
|
||||
<version>${alfresco.version}</version>
|
||||
<type>zip</type>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<version>1.7</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>overlay-solr-war</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<echo message="Unpacking Apache Solr for web.xml overlay" />
|
||||
<unzip src="${alfresco.solr.dir}/apache-solr-1.4.1.war" dest="${alfresco.solr.war.overlay}" />
|
||||
</tasks>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>overlay-web-xml</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals><goal>copy-resources</goal></goals>
|
||||
<configuration>
|
||||
<outputDirectory>${alfresco.solr.war.overlay}/WEB-INF</outputDirectory>
|
||||
<overwrite>true</overwrite>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>true</filtering>
|
||||
<targetPath>classes</targetPath>
|
||||
</resource>
|
||||
</resources>
|
||||
</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>process-resources</phase>
|
||||
<goals>
|
||||
<goal>replace</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<ignoreErrors>true</ignoreErrors>
|
||||
<file>${alfresco.solr.war.overlay}/WEB-INF/web.xml</file>
|
||||
<replacements>
|
||||
<replacement>
|
||||
<token><![CDATA[<security-constraint>]]></token>
|
||||
<value><![CDATA[<!-- <security-constraint>]]></value>
|
||||
</replacement>
|
||||
<replacement>
|
||||
<token><![CDATA[</security-role>]]></token>
|
||||
<value><![CDATA[</security-role> -->]]></value>
|
||||
</replacement>
|
||||
</replacements>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<version>1.7</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>create-solr-war</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<echo message="Packaging Apache Solr WAR overlay" />
|
||||
<zip basedir="${alfresco.solr.war.overlay}" destfile="${alfresco.solr.dir}/apache-solr-1.4.1-overlay.war" />
|
||||
</tasks>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-lib</id>
|
||||
<phase>package</phase>
|
||||
<goals><goal>copy-resources</goal></goals>
|
||||
<configuration>
|
||||
<outputDirectory>${alfresco.solr.dir}</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/solr-properties/archive</directory>
|
||||
<filtering>true</filtering>
|
||||
<targetPath>${alfresco.solr.dir}/archive-SpacesStore/conf</targetPath>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/solr-properties/workspace</directory>
|
||||
<filtering>true</filtering>
|
||||
<targetPath>${alfresco.solr.dir}/workspace-SpacesStore/conf</targetPath>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>${alfresco.groupId}</groupId>
|
||||
<artifactId>alfresco-solr</artifactId>
|
||||
<version>${alfresco.version}</version>
|
||||
<type>zip</type>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
@@ -0,0 +1,18 @@
|
||||
# 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
|
||||
|
||||
log4j.appender.Console.layout.ConversionPattern=%d{ISO8601} %x %-5p [%c{3}] [%t] %m%n
|
||||
|
||||
###### File appender definition #######
|
||||
log4j.appender.File=org.apache.log4j.DailyRollingFileAppender
|
||||
log4j.appender.File.File=${app.log.dir}solr.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
|
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,84 @@
|
||||
#
|
||||
# solrcore.properties - used in solrconfig.xml
|
||||
#
|
||||
# data is in ${data.dir.root}/${data.dir.store}
|
||||
|
||||
data.dir.root=${alfresco.solr.dir}
|
||||
data.dir.store=archive/SpacesStore
|
||||
enable.alfresco.tracking=true
|
||||
cache.alfresco.size=100
|
||||
max.field.length=2147483647
|
||||
|
||||
|
||||
#
|
||||
# Properties loaded during alfresco tracking
|
||||
#
|
||||
|
||||
alfresco.host=localhost
|
||||
alfresco.port=8080
|
||||
alfresco.port.ssl=8443
|
||||
alfresco.baseUrl=/alfresco
|
||||
alfresco.cron=0/15 * * * * ? *
|
||||
alfresco.stores=archive://SpacesStore
|
||||
alfresco.lag=1000
|
||||
alfresco.hole.retention=3600000
|
||||
alfresco.batch.count=1000
|
||||
|
||||
# encryption
|
||||
|
||||
# none, https
|
||||
alfresco.secureComms=none
|
||||
|
||||
# ssl
|
||||
alfresco.encryption.ssl.keystore.type=JCEKS
|
||||
alfresco.encryption.ssl.keystore.provider=
|
||||
alfresco.encryption.ssl.keystore.location=ssl.repo.client.keystore
|
||||
alfresco.encryption.ssl.keystore.passwordFileLocation=ssl-keystore-passwords.properties
|
||||
alfresco.encryption.ssl.truststore.type=JCEKS
|
||||
alfresco.encryption.ssl.truststore.provider=
|
||||
alfresco.encryption.ssl.truststore.location=ssl.repo.client.truststore
|
||||
alfresco.encryption.ssl.truststore.passwordFileLocation=ssl-truststore-passwords.properties
|
||||
|
||||
## Tracking
|
||||
|
||||
alfresco.enableMultiThreadedTracking=true
|
||||
alfresco.corePoolSize=3
|
||||
alfresco.maximumPoolSize=-1
|
||||
alfresco.keepAliveTime=120
|
||||
alfresco.threadPriority=5
|
||||
alfresco.threadDaemon=true
|
||||
alfresco.workQueueSize=-1
|
||||
|
||||
# HTTP Client
|
||||
|
||||
alfresco.maxTotalConnections=40
|
||||
alfresco.maxHostConnections=40
|
||||
alfresco.socketTimeout=60000
|
||||
|
||||
# SOLR caching
|
||||
|
||||
solr.filterCache.size=64
|
||||
solr.filterCache.initialSize=64
|
||||
solr.queryResultCache.size=64
|
||||
solr.queryResultCache.initialSize=64
|
||||
solr.documentCache.size=64
|
||||
solr.documentCache.initialSize=64
|
||||
solr.queryResultMaxDocsCached=200
|
||||
|
||||
solr.authorityCache.size=64
|
||||
solr.authorityCache.initialSize=64
|
||||
solr.pathCache.size=64
|
||||
solr.pathCache.initialSize=64
|
||||
|
||||
# SOLR
|
||||
|
||||
solr.maxBooleanClauses=10000
|
||||
|
||||
#
|
||||
# TODO
|
||||
#
|
||||
# cross language support
|
||||
# locale expansion
|
||||
# logging check report ....
|
||||
#
|
||||
#
|
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,110 @@
|
||||
#
|
||||
# solrcore.properties - used in solrconfig.xml
|
||||
#
|
||||
# data is in ${data.dir.root}/${data.dir.store}
|
||||
|
||||
data.dir.root=${alfresco.solr.dir}
|
||||
data.dir.store=workspace/SpacesStore
|
||||
enable.alfresco.tracking=true
|
||||
cache.alfresco.size=100
|
||||
max.field.length=2147483647
|
||||
|
||||
|
||||
#
|
||||
# Properties loaded during alfresco tracking
|
||||
#
|
||||
|
||||
alfresco.host=localhost
|
||||
alfresco.port=8080
|
||||
alfresco.port.ssl=8443
|
||||
alfresco.baseUrl=/alfresco
|
||||
alfresco.cron=0/15 * * * * ? *
|
||||
alfresco.stores=workspace://SpacesStore
|
||||
#alfresco.index.transformContent=false
|
||||
#alfresco.ignore.datatype.1=d:content
|
||||
alfresco.lag=1000
|
||||
alfresco.hole.retention=3600000
|
||||
# alfresco.hole.check.after is not used yet
|
||||
# It will reduce the hole checking load
|
||||
alfresco.hole.check.after=300000
|
||||
alfresco.batch.count=1000
|
||||
|
||||
# encryption
|
||||
|
||||
# none, https
|
||||
alfresco.secureComms=none
|
||||
|
||||
# ssl
|
||||
alfresco.encryption.ssl.keystore.type=JCEKS
|
||||
alfresco.encryption.ssl.keystore.provider=
|
||||
alfresco.encryption.ssl.keystore.location=ssl.repo.client.keystore
|
||||
alfresco.encryption.ssl.keystore.passwordFileLocation=ssl-keystore-passwords.properties
|
||||
alfresco.encryption.ssl.truststore.type=JCEKS
|
||||
alfresco.encryption.ssl.truststore.provider=
|
||||
alfresco.encryption.ssl.truststore.location=ssl.repo.client.truststore
|
||||
alfresco.encryption.ssl.truststore.passwordFileLocation=ssl-truststore-passwords.properties
|
||||
|
||||
# Tracking
|
||||
|
||||
alfresco.enableMultiThreadedTracking=true
|
||||
alfresco.corePoolSize=3
|
||||
alfresco.maximumPoolSize=-1
|
||||
alfresco.keepAliveTime=120
|
||||
alfresco.threadPriority=5
|
||||
alfresco.threadDaemon=true
|
||||
alfresco.workQueueSize=-1
|
||||
|
||||
# HTTP Client
|
||||
|
||||
alfresco.maxTotalConnections=40
|
||||
alfresco.maxHostConnections=40
|
||||
alfresco.socketTimeout=60000
|
||||
|
||||
# SOLR caching
|
||||
|
||||
solr.filterCache.size=64
|
||||
solr.filterCache.initialSize=64
|
||||
solr.queryResultCache.size=1024
|
||||
solr.queryResultCache.initialSize=1024
|
||||
solr.documentCache.size=64
|
||||
solr.documentCache.initialSize=64
|
||||
solr.queryResultMaxDocsCached=2000
|
||||
|
||||
solr.authorityCache.size=64
|
||||
solr.authorityCache.initialSize=64
|
||||
solr.pathCache.size=64
|
||||
solr.pathCache.initialSize=64
|
||||
|
||||
solr.readerToAclIdsCache.size=64
|
||||
solr.readerToAclIdsCache.initialSize=64
|
||||
|
||||
# SOLR
|
||||
|
||||
solr.maxBooleanClauses=10000
|
||||
|
||||
# Batch fetch
|
||||
|
||||
alfresco.transactionDocsBatchSize=100
|
||||
alfresco.changeSetAclsBatchSize=100
|
||||
alfresco.aclBatchSize=10
|
||||
|
||||
# Warming
|
||||
|
||||
solr.filterCache.autowarmCount=128
|
||||
solr.authorityCache.autowarmCount=0
|
||||
solr.pathCache.autowarmCount=128
|
||||
|
||||
solr.queryResultWindowSize=200
|
||||
|
||||
|
||||
#
|
||||
# TODO
|
||||
#
|
||||
# cross language support
|
||||
# locale expansion
|
||||
# logging check report ....
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
alfresco.doPermissionChecks=true
|
@@ -0,0 +1,39 @@
|
||||
------
|
||||
Alfresco Maven All-in-One Archetype Advanced Usage
|
||||
------
|
||||
Gabriele Columbro
|
||||
------
|
||||
Nov 2012
|
||||
------
|
||||
|
||||
|
||||
All-in-One Archetype properties
|
||||
|
||||
In each of the modules of the archetype (as in the whole Maven Alfresco SDK\x99) properties are configurable at many levels:
|
||||
|
||||
* as POM properties
|
||||
|
||||
* direclty in *.properties, particularly
|
||||
|
||||
* For Alfresco WAR projects
|
||||
|
||||
* <<<src/main/properties/<env>/alfresco-global.properties>>> (environment dependent <<<alfresco-global.properties>>> packaged in the WAR )
|
||||
|
||||
* For Alfresco 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.
|
@@ -0,0 +1,48 @@
|
||||
------
|
||||
Building AMPs (Alfresco Module Packages) with Maven
|
||||
------
|
||||
Gabriele Columbro
|
||||
------
|
||||
Nov 2012
|
||||
------
|
||||
|
||||
Introduction
|
||||
|
||||
The Alfresco All-in-One Archetype is a multi-module project,
|
||||
leveraging Maven 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 Jetty and embedded H2 database of the full Alfresco suite, including Repository, Share, Solr and Web Quick Start
|
||||
|
||||
* Support for unit and integration testings
|
||||
|
||||
How to create a project:
|
||||
|
||||
You can create the latest release archetype with the following command:
|
||||
|
||||
+---+
|
||||
mvn archetype:generate -DarchetypeCatalog=https://artifacts.alfresco.com/nexus/content/groups/public/archetype-catalog.xml -Dfilter=org.alfresco.maven.archetype:
|
||||
+---+
|
||||
|
||||
You should then:
|
||||
|
||||
[[1]] Select the <<<alfresco-allinone-archetype>>> option
|
||||
|
||||
[[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 All-in-One project ready to go in the <<<artifactId>>> folder.
|
||||
|
||||
Usage
|
||||
|
||||
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}}
|
@@ -0,0 +1,83 @@
|
||||
------
|
||||
Alfresco Maven All-in-One Archetype Usage
|
||||
------
|
||||
Gabriele Columbro
|
||||
------
|
||||
Nov 2012
|
||||
------
|
||||
|
||||
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
|
||||
|-> amp
|
||||
|-> alfresco
|
||||
|-> share
|
||||
|-> solr
|
||||
|-> wcmqs (Alfresco Web Quick Start)
|
||||
|-> runner (a Jetty embedded runner / integration test runner)
|
||||
+---+
|
||||
|
||||
* Modules
|
||||
|
||||
The All-in-One Alfresco project is composed by the following modules:
|
||||
|
||||
* <<<amp>>>: An Repository Tier AMP project, demonstrating sample project structure and demo component loading. It can be configured to work for Share
|
||||
|
||||
* <<<alfresco>>>: An <<<alfresco.war>>> Repository Extension, overlaying the Alfresco WAR with custom resources / classes
|
||||
and depending on the <<<amp>>> project
|
||||
|
||||
* <<<share>>>: A <<<share.war>>> extension, overlaying the Share WAR with custom resoruces / classes
|
||||
|
||||
* <<<solr>>>: An Alfresco <<<alfresco-*-*-solr.zip>>> overlay / customization to configure {{{http://solr.apache.org}Apache Solr}} cores properties
|
||||
|
||||
* <<<wcmqs>>>: An Alfresco Web Quick Start overlay / customization. WQS Repository and Share AMPs are also installed on Alfresco and Share.
|
||||
|
||||
* <<<runner>>>: A Jetty + 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
|
||||
|
||||
* AMP/WAR packaging
|
||||
|
||||
* AMP Unit testing
|
||||
|
||||
* run embedded in Jetty + 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 Alfresco Maven plugin - used to manage AMPs in this SDK - embeds the official Alfresco MMT to install depended AMPs.
|
||||
|
||||
Commands
|
||||
|
||||
* Commands from the root aggregator project
|
||||
|
||||
Common Alfresco project lifecycle commands you want to run from the aggregator :
|
||||
|
||||
* <<<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 jetty:run -Prun'>>> or <<<'mvn integration-test -Prun'>>> to quickly run already packaged webapps
|
47
archetypes/alfresco-allinone-archetype/src/site/site.xml
Normal file
47
archetypes/alfresco-allinone-archetype/src/site/site.xml
Normal file
@@ -0,0 +1,47 @@
|
||||
<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="Alfresco All-in-One Archetype" href="./index.html" />
|
||||
<item name="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="Alfresco Maven Plugin" href="../../plugins/alfresco-maven-plugin/index.html" />
|
||||
</menu>
|
||||
|
||||
<menu name="Maven Alfresco Community">
|
||||
<item name="Alfresco Maven Wiki Docs" 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>
|
@@ -0,0 +1,6 @@
|
||||
package=it.pkg
|
||||
version=0.1-SNAPSHOT
|
||||
groupId=archetype.it
|
||||
artifactId=allInOneTest
|
||||
alfresco_target_groupId=org.alfresco
|
||||
alfresco_target_version=4.2.e
|
@@ -0,0 +1 @@
|
||||
verify
|
@@ -0,0 +1,6 @@
|
||||
package=it.pkg
|
||||
version=0.1-SNAPSHOT
|
||||
groupId=archetype.it
|
||||
artifactId=allInOneTest
|
||||
alfresco_target_groupId=org.alfresco
|
||||
alfresco_target_version=4.2.e
|
@@ -0,0 +1 @@
|
||||
verify -Prun -Dmaven.tomcat.fork=true
|
8
archetypes/alfresco-amp-archetype/.classpath
Normal file
8
archetypes/alfresco-amp-archetype/.classpath
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
|
||||
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
|
||||
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
23
archetypes/alfresco-amp-archetype/.project
Normal file
23
archetypes/alfresco-amp-archetype/.project
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>alfresco-amp-archetype</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.maven.ide.eclipse.maven2Builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.maven.ide.eclipse.maven2Nature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
49
archetypes/alfresco-amp-archetype/pom.xml
Normal file
49
archetypes/alfresco-amp-archetype/pom.xml
Normal file
@@ -0,0 +1,49 @@
|
||||
<?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/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>org.alfresco.maven.archetype</groupId>
|
||||
<artifactId>alfresco-amp-archetype</artifactId>
|
||||
|
||||
<packaging>maven-archetype</packaging>
|
||||
<name>AMP Archetype from Maven Alfresco SDK</name>
|
||||
<description>Sample project with full support for lifecycle and rapid development of AMPs (Alfresco Module Packages)</description>
|
||||
|
||||
<parent>
|
||||
<groupId>org.alfresco.maven</groupId>
|
||||
<artifactId>alfresco-lifecycle-aggregator</artifactId>
|
||||
<version>1.1.0</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>archetype-resources/pom.xml</include>
|
||||
</includes>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<excludes>
|
||||
<exclude>archetype-resources/pom.xml</exclude>
|
||||
</excludes>
|
||||
<filtering>false</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<configuration>
|
||||
<useDefaultDelimiters>false</useDefaultDelimiters>
|
||||
<delimiters>
|
||||
<delimiter>@@</delimiter>
|
||||
</delimiters>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
@@ -0,0 +1,76 @@
|
||||
<?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="quickstart-amp-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>
|
||||
<requiredProperty key="version">
|
||||
<defaultValue>1.0-SNAPSHOT</defaultValue>
|
||||
</requiredProperty>
|
||||
<requiredProperty key="alfresco_target_groupId">
|
||||
<defaultValue>org.alfresco</defaultValue>
|
||||
</requiredProperty>
|
||||
<requiredProperty key="alfresco_target_version">
|
||||
<defaultValue>4.2.e</defaultValue>
|
||||
</requiredProperty>
|
||||
<requiredProperty key="alfresco_target_amp_client_war">
|
||||
<defaultValue>alfresco</defaultValue>
|
||||
</requiredProperty>
|
||||
<requiredProperty key="alfresco_target_amp_client_war_groupId">
|
||||
<defaultValue>org.alfresco</defaultValue>
|
||||
</requiredProperty>
|
||||
<requiredProperty key="alfresco_target_amp_client_war_version">
|
||||
<defaultValue>4.2.e</defaultValue>
|
||||
</requiredProperty>
|
||||
<requiredProperty key="package">
|
||||
<defaultValue>(not used)</defaultValue>
|
||||
</requiredProperty>
|
||||
</requiredProperties>
|
||||
<fileSets>
|
||||
<fileSet filtered="true" packaged="false" encoding="UTF-8">
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**/*.java</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="false" encoding="UTF-8">
|
||||
<directory>src/main/amp</directory>
|
||||
<includes>
|
||||
<include>**/*.jsp</include>
|
||||
<include>**/*.xml</include>
|
||||
<include>**/*.properties</include>
|
||||
<include>**/*.txt</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet encoding="UTF-8">
|
||||
<directory>src/main/amp</directory>
|
||||
<includes>
|
||||
<include>**/*.js</include>
|
||||
<include>**/*.css</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="false" packaged="false" encoding="UTF-8">
|
||||
<directory>src/test/java</directory>
|
||||
<includes>
|
||||
<include>**/*.java</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="false" encoding="UTF-8">
|
||||
<directory>src/test/resources</directory>
|
||||
<includes>
|
||||
<include>**/*.properties</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="false" encoding="UTF-8">
|
||||
<directory>src/test/properties</directory>
|
||||
<includes>
|
||||
<include>**/*</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="false" encoding="UTF-8">
|
||||
<directory>tomcat</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</archetype-descriptor>
|
@@ -0,0 +1,98 @@
|
||||
<?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} AMP project</name>
|
||||
<packaging>amp</packaging>
|
||||
<description>Manages the lifecycle of the ${artifactId} 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>
|
||||
<!-- Defines the alfresco edition to compile against. Allowed values are [org.alfresco|org.alfresco.enterprise]-->
|
||||
<alfresco.groupId>${alfresco_target_groupId}</alfresco.groupId>
|
||||
<!-- Defines the alfresco version to compile against -->
|
||||
<alfresco.version>${alfresco_target_version}</alfresco.version>
|
||||
<app.log.root.level>WARN</app.log.root.level>
|
||||
<alfresco.data.location>alf_data_dev</alfresco.data.location>
|
||||
<!-- Defines the target WAR artifactId to run this amp, only used with the -Pamp-to-war switch
|
||||
. | Allowed values: alfresco | share. Defaults to a repository AMP, but could point to your foundation WAR -->
|
||||
<alfresco.client.war>${alfresco_target_amp_client_war}</alfresco.client.war>
|
||||
<!-- Defines the target WAR groupId to run this amp, only used with the -Pamp-to-war switch
|
||||
. | Could be org.alfresco | org.alfresco.enterprise or your corporate groupId -->
|
||||
<alfresco.client.war.groupId>${alfresco_target_amp_client_war_groupId}</alfresco.client.war.groupId>
|
||||
<!-- Defines the target WAR version to run this amp, only used with the -Pamp-to-war switch -->
|
||||
<alfresco.client.war.version>${alfresco_target_amp_client_war_version}</alfresco.client.war.version>
|
||||
<!-- This controls which properties will be picked in src/test/properties for embedded run -->
|
||||
<env>local</env>
|
||||
</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 version/edition
|
||||
(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 -->
|
||||
<dependency>
|
||||
<groupId>${alfresco.groupId}</groupId>
|
||||
<artifactId>alfresco-platform-distribution</artifactId>
|
||||
<version>${alfresco.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
<!-- 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>
|
||||
<!-- Test dependencies -->
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.8.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<!-- This repository is only needed to retrieve Alfresco parent POM.
|
||||
NOTE: This can be removed when/if Alfresco will be on Maven Central
|
||||
|
||||
NOTE: The repository to be used for Alfresco Enterprise artifacts is
|
||||
https://artifacts.alfresco.com/nexus/content/groups/private/. Please check
|
||||
with Alfresco Support to get credentials to add to your ~/.m2/settings.xml
|
||||
if you are a Enterprise customer or Partner
|
||||
-->
|
||||
<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>
|
||||
</project>
|
@@ -0,0 +1,35 @@
|
||||
<?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="changeme.exampleBean" class="org.alfresco.demoamp.Demo" init-method="init" />
|
||||
|
||||
<!-- A simple module component that will be executed once -->
|
||||
<bean id="changeme.exampleComponent" class="org.alfresco.demoamp.DemoComponent" parent="module.baseComponent" >
|
||||
<property name="moduleId" value="${project.artifactId}" /> <!-- See module.properties -->
|
||||
<property name="name" value="exampleComponent" />
|
||||
<property name="description" value="A demonstration component" />
|
||||
<property name="sinceVersion" value="2.0" />
|
||||
<property name="appliesFromVersion" value="2.0" />
|
||||
<property name="nodeService" ref="NodeService" />
|
||||
<property name="nodeLocatorService" ref="nodeLocatorService" />
|
||||
</bean>
|
||||
|
||||
</beans>
|
@@ -0,0 +1,40 @@
|
||||
# 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.
|
||||
#-----------------------------------------------------------------------
|
||||
# ${artifactId} module log4j.properties
|
||||
#
|
||||
# NOTE
|
||||
# ----
|
||||
# Log4j uses the following logging levels:
|
||||
# debug,info,warn,error,fatal
|
||||
#
|
||||
# To set the logging level of {fullClassName} to {loglevel},
|
||||
# add a line to this file of the following form:
|
||||
#
|
||||
# log4j.logger.{fullClassName}={loglevel}
|
||||
#
|
||||
# For example, to make 'com.example.MyExample' produce 'debug'
|
||||
# logs, add a line like this:
|
||||
#
|
||||
# log4j.logger.com.example.MyExample=debug
|
||||
#
|
||||
#
|
||||
# WARNING
|
||||
# -------
|
||||
# Log properties in this log4j.properties file override/augment
|
||||
# those in the webapp's main log4j.properties.
|
||||
#
|
||||
#-----------------------------------------------------------------------
|
||||
log4j.logger.org.alfresco.demoamp.DemoComponent=${module.log.level}
|
@@ -0,0 +1,24 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements.
|
||||
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.
|
||||
|
||||
-->
|
||||
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
|
||||
|
||||
<beans>
|
||||
<!-- This is filtered by Maven at build time, so that module name is single sourced. -->
|
||||
<import resource="classpath:alfresco/module/${project.artifactId}/context/service-context.xml" />
|
||||
|
||||
</beans>
|
@@ -0,0 +1,4 @@
|
||||
# Define here logging properties for your AMP specific classes
|
||||
# This will end up in alfresco.war/WEB-INF/classes/alfresco/module/log4j.properties
|
||||
# and loaded as per http://wiki.alfresco.com/wiki/Developing_an_Alfresco_Module#log4j.properties
|
||||
log4j.logger.org.alfresco.demoamp=DEBUG
|
@@ -0,0 +1,48 @@
|
||||
# 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.
|
||||
|
||||
|
||||
|
||||
# SDK Sample module
|
||||
|
||||
# ==== Beginning of Alfresco required/optional properties ====== #
|
||||
# NB: These properties are filtered at build time by Maven, single
|
||||
# sourcing from POM properties
|
||||
module.id=${project.artifactId}
|
||||
#module.aliases=myModule-123, my-module
|
||||
module.title=${project.name}
|
||||
module.description=${project.description}
|
||||
module.version=${noSnapshotVersion}
|
||||
|
||||
# The following optional properties can be used to prevent the module from being added
|
||||
# to inappropriate versions of the WAR file.
|
||||
# module.repo.version.min=2.0
|
||||
# module.repo.version.max=2.1
|
||||
|
||||
# FIXME: This dependencies should come out of mvn dependencies on amp
|
||||
|
||||
# The following describe dependencies on other modules
|
||||
# Depends on net.sf.myproject.module.SupportModuleA version ${version} or later
|
||||
# module.depends.net.sf.myproject.module.SupportModuleA=${version}-*
|
||||
# Depends on net.sf.myproject.module.SupportModuleA version ${version} to 2.0
|
||||
# module.depends.net.sf.myproject.module.SupportModuleB=${version}-2.0
|
||||
# Depends on net.sf.myproject.module.SupportModuleC - any version
|
||||
# module.depends.net.sf.myproject.module.SupportModuleB=*
|
||||
|
||||
|
||||
# ==== End of Alfresco required/optional properties ======= #
|
||||
|
||||
|
||||
# ==== Beginning of module required properties/optional ====== #
|
@@ -1,41 +1,16 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
package com.sourcesense.demoamp;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.alfresco.repo.module.AbstractModuleComponent;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
/**
|
||||
* A basic component that will be started for this module.
|
||||
*
|
||||
* @author Derek Hulley
|
||||
*/
|
||||
public class DemoComponent extends AbstractModuleComponent
|
||||
{
|
||||
Log log = LogFactory.getLog(DemoComponent.class);
|
||||
|
||||
@Override
|
||||
protected void executeInternal() throws Throwable
|
||||
{
|
||||
System.out.println("DemoComponent has been executed");
|
||||
log.debug("Test debug logging is working");
|
||||
log.info("This should not be outputted by default");
|
||||
}
|
||||
}
|
||||
/*
|
||||
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.
|
||||
*/
|
@@ -0,0 +1,19 @@
|
||||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
<!--
|
||||
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.
|
||||
-->
|
@@ -0,0 +1,2 @@
|
||||
This folder (root in the AMP) gets mapped automagically in WEB-INF/licenses
|
||||
by the MMT or the alfresco-maven-plugin
|
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
@@ -22,11 +22,11 @@
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
*/
|
||||
package com.sourcesense.demoamp;
|
||||
package org.alfresco.demoamp;
|
||||
|
||||
/**
|
||||
* This class does nothing except dump some output to <i>system.out</i>.
|
||||
*
|
||||
* NB: This code is taken from Alfresco Eclipse SDK Samples
|
||||
* @author Derek Hulley
|
||||
*/
|
||||
public class Demo
|
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
package org.alfresco.demoamp;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.module.AbstractModuleComponent;
|
||||
import org.alfresco.repo.nodelocator.NodeLocatorService;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.repository.StoreRef;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
/**
|
||||
* A basic component that will be started for this module.
|
||||
* Uses the NodeLocatorService to easily find nodes and the
|
||||
* NodeService to display them
|
||||
*
|
||||
* @author Gabriele Columbro
|
||||
* @author Maurizio Pillitu
|
||||
*/
|
||||
public class DemoComponent extends AbstractModuleComponent
|
||||
{
|
||||
Log log = LogFactory.getLog(DemoComponent.class);
|
||||
|
||||
private NodeService nodeService;
|
||||
|
||||
private NodeLocatorService nodeLocatorService;
|
||||
|
||||
public void setNodeService(NodeService nodeService) {
|
||||
this.nodeService = nodeService;
|
||||
}
|
||||
|
||||
public void setNodeLocatorService(NodeLocatorService nodeLocatorService) {
|
||||
this.nodeLocatorService = nodeLocatorService;
|
||||
}
|
||||
|
||||
/**
|
||||
* Bogus component execution
|
||||
*/
|
||||
@Override
|
||||
protected void executeInternal() throws Throwable
|
||||
{
|
||||
System.out.println("DemoComponent has been executed");
|
||||
log.debug("Test debug logging. Congratulation your AMP is working");
|
||||
log.info("This is only for information purposed. Better remove me from the log in Production");
|
||||
}
|
||||
|
||||
/**
|
||||
* This is a demo service interaction with Alfresco Foundation API.
|
||||
* This sample method returns the number of child nodes of a certain type
|
||||
* under a certain node.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public int childNodesCount(NodeRef nodeRef)
|
||||
{
|
||||
return nodeService.countChildAssocs(nodeRef, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the NodeRef of "Company Home"
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public NodeRef getCompanyHome()
|
||||
|
||||
{
|
||||
return nodeLocatorService.getNode("companyhome", null, null);
|
||||
}
|
||||
}
|
@@ -0,0 +1,87 @@
|
||||
package org.alfresco.demoamp.test;
|
||||
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
||||
import org.alfresco.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.BeforeClass;
|
||||
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.context.ApplicationContext;
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,59 @@
|
||||
# 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.
|
||||
|
||||
|
||||
|
||||
# RUN TIME PROPERTIES
|
||||
# -------------------
|
||||
|
||||
# Sample custom content and index data location
|
||||
# This will create alf_data Relative to appserver run folder
|
||||
# In this default file we take the property from the POM (for compatbility with local jetty and jboss deployments) but it can also be edited here.
|
||||
dir.root=${alfresco.data.location}
|
||||
# Allowed values are: NONE, AUTO, FULL
|
||||
index.recovery.mode=NONE
|
||||
# As we run embedded, we set Lucene
|
||||
index.subsystem.name=lucene
|
||||
|
||||
#dir.keystore=.
|
||||
#keystore.password=storepassword
|
||||
#metadata.password=metapassword
|
||||
|
||||
# Fail or not when there are node integrity checker errors
|
||||
integrity.failOnError=true
|
||||
|
||||
# Database connection properties
|
||||
# These are also filtered from Maven at build time from POM properties.
|
||||
# Alternatively you can directly define them directly here
|
||||
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
|
||||
|
||||
# File servers related properties
|
||||
# For local builds we disable CIFS and FTP. Edit the following property to reenable them
|
||||
smb.server.enabled=false
|
||||
smb.server.name=CFS_SHARE_LOCAL
|
||||
smb.server.domain=mycompany.com
|
||||
smb.server.bindto=127.0.0.1
|
||||
smb.tcpip.port=1445
|
||||
netbios.session.port=1139
|
||||
netbios.name.port=1137
|
||||
netbios.datagram.port=1138
|
||||
ftp.server.enables=false
|
||||
ftp.port=1121
|
||||
ftp.authenticator=alfresco
|
@@ -0,0 +1,266 @@
|
||||
# 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
|
||||
|
||||
###### 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
|
||||
|
||||
###### Hibernate specific appender definition #######
|
||||
#log4j.appender.file=org.apache.log4j.FileAppender
|
||||
#log4j.appender.file.File=hibernate.log
|
||||
#log4j.appender.file.layout=org.apache.log4j.PatternLayout
|
||||
#log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
|
||||
|
||||
###### Log level overrides #######
|
||||
|
||||
# Commented-in loggers will be exposed as JMX MBeans (refer to org.alfresco.repo.admin.Log4JHierarchyInit)
|
||||
# Hence, generally useful loggers should be listed with at least ERROR level to allow simple runtime
|
||||
# control of the level via a suitable JMX Console. Also, any other loggers can be added transiently via
|
||||
# Log4j addLoggerMBean as long as the logger exists and has been loaded.
|
||||
|
||||
# Hibernate
|
||||
log4j.logger.org.hibernate=error
|
||||
log4j.logger.org.hibernate.util.JDBCExceptionReporter=fatal
|
||||
log4j.logger.org.hibernate.event.def.AbstractFlushingEventListener=fatal
|
||||
log4j.logger.org.hibernate.type=warn
|
||||
log4j.logger.org.hibernate.cfg.SettingsFactory=warn
|
||||
|
||||
# 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
|
||||
|
||||
# Axis/WSS4J
|
||||
log4j.logger.org.apache.axis=info
|
||||
log4j.logger.org.apache.ws=info
|
||||
|
||||
# CXF
|
||||
log4j.logger.org.apache.cxf=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
|
||||
|
||||
# OpenOfficeConnection
|
||||
log4j.logger.net.sf.jooreports.openoffice.connection=fatal
|
||||
|
||||
# log prepared statement cache activity ###
|
||||
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.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
|
||||
log4j.logger.org.alfresco.repo.management.subsystems=warn
|
||||
log4j.logger.org.alfresco.repo.management.subsystems.ChildApplicationContextFactory=info
|
||||
log4j.logger.org.alfresco.repo.management.subsystems.ChildApplicationContextFactory$ChildApplicationContext=warn
|
||||
log4j.logger.org.alfresco.repo.security.sync=info
|
||||
log4j.logger.org.alfresco.repo.security.person=info
|
||||
|
||||
log4j.logger.org.alfresco.sample=info
|
||||
log4j.logger.org.alfresco.web=info
|
||||
#log4j.logger.org.alfresco.web.app.AlfrescoNavigationHandler=debug
|
||||
#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
|
||||
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.repo.version.Version2ServiceImpl=warn
|
||||
|
||||
#log4j.logger.org.alfresco.web.app.DebugPhaseListener=debug
|
||||
|
||||
log4j.logger.org.alfresco.repo.workflow=info
|
||||
|
||||
# CIFS server debugging
|
||||
log4j.logger.org.alfresco.smb.protocol=error
|
||||
#log4j.logger.org.alfresco.smb.protocol.auth=debug
|
||||
#log4j.logger.org.alfresco.acegi=debug
|
||||
|
||||
# FTP server debugging
|
||||
log4j.logger.org.alfresco.ftp.protocol=error
|
||||
#log4j.logger.org.alfresco.ftp.server=debug
|
||||
|
||||
# WebDAV debugging
|
||||
#log4j.logger.org.alfresco.webdav.protocol=debug
|
||||
log4j.logger.org.alfresco.webdav.protocol=error
|
||||
|
||||
# NTLM servlet filters
|
||||
#log4j.logger.org.alfresco.web.app.servlet.NTLMAuthenticationFilter=debug
|
||||
#log4j.logger.org.alfresco.repo.webdav.auth.NTLMAuthenticationFilter=debug
|
||||
|
||||
# Kerberos servlet filters
|
||||
#log4j.logger.org.alfresco.web.app.servlet.KerberosAuthenticationFilter=debug
|
||||
#log4j.logger.org.alfresco.repo.webdav.auth.KerberosAuthenticationFilter=debug
|
||||
|
||||
# File servers
|
||||
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
|
||||
|
||||
# Indexer debugging
|
||||
log4j.logger.org.alfresco.repo.search.Indexer=error
|
||||
#log4j.logger.org.alfresco.repo.search.Indexer=debug
|
||||
|
||||
log4j.logger.org.alfresco.repo.search.impl.lucene.index=error
|
||||
log4j.logger.org.alfresco.repo.search.impl.lucene.fts.FullTextSearchIndexerImpl=warn
|
||||
#log4j.logger.org.alfresco.repo.search.impl.lucene.index=DEBUG
|
||||
|
||||
# Audit debugging
|
||||
# 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
|
||||
log4j.logger.org.alfresco.repo.dictionary.types.period=warn
|
||||
|
||||
# Virtualization Server Registry
|
||||
log4j.logger.org.alfresco.mbeans.VirtServerRegistry=error
|
||||
|
||||
# Spring context runtime property setter
|
||||
log4j.logger.org.alfresco.util.RuntimeSystemPropertiesSetter=info
|
||||
|
||||
# Debugging options for clustering
|
||||
log4j.logger.org.alfresco.repo.content.ReplicatingContentStore=error
|
||||
log4j.logger.org.alfresco.repo.content.replication=error
|
||||
|
||||
#log4j.logger.org.alfresco.repo.deploy.DeploymentServiceImpl=debug
|
||||
|
||||
# Activity service
|
||||
log4j.logger.org.alfresco.repo.activities=warn
|
||||
|
||||
# User usage tracking
|
||||
log4j.logger.org.alfresco.repo.usage=info
|
||||
|
||||
# Sharepoint
|
||||
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
|
||||
|
||||
# CMIS
|
||||
log4j.logger.org.alfresco.opencmis=error
|
||||
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
|
||||
|
||||
# IMAP
|
||||
log4j.logger.org.alfresco.repo.imap=info
|
||||
|
||||
# JBPM
|
||||
# Note: non-fatal errors (eg. logged during job execution) should be handled by Alfresco's retrying transaction handler
|
||||
log4j.logger.org.jbpm.graph.def.GraphElement=fatal
|
||||
|
||||
#log4j.logger.org.alfresco.repo.googledocs=debug
|
||||
|
||||
###### Scripting #######
|
||||
|
||||
# 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
|
||||
|
||||
# Repository
|
||||
log4j.logger.org.alfresco.repo.web.scripts=warn
|
||||
log4j.logger.org.alfresco.repo.web.scripts.BaseWebScriptTest=info
|
||||
log4j.logger.org.alfresco.repo.web.scripts.AlfrescoRhinoScriptDebugger=off
|
||||
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
|
||||
|
||||
# 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=
|
||||
|
||||
# Metadata extraction
|
||||
log4j.logger.org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter=warn
|
||||
|
||||
# Reduces PDFont error level due to ALF-7105
|
||||
log4j.logger.org.apache.pdfbox.pdmodel.font.PDSimpleFont=fatal
|
||||
log4j.logger.org.apache.pdfbox.pdmodel.font.PDFont=fatal
|
||||
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
|
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Context docBase="${alfresco.client.war.folder}" path="${alfresco.client.contextPath}">
|
||||
<!--
|
||||
<Environment override="false" type="java.lang.Boolean" name="properties/startup.enable" description="A flag that globally enables or disables startup of the major Alfresco subsystems." value="true"/>
|
||||
<Environment override="false" type="java.lang.String" name="properties/dir.root" description="The filesystem directory below which content and index data is stored. Should be on a shared disk if this is a clustered installation."/>
|
||||
<Environment override="false" type="java.lang.String" name="properties/hibernate.dialect" description="The fully qualified name of a org.hibernate.dialect.Dialect subclass that allows Hibernate to generate SQL optimized for a particular relational database. Choose from org.hibernate.dialect.DerbyDialect, org.hibernate.dialect.MySQLInnoDBDialect, org.alfresco.repo.domain.hibernate.dialect.AlfrescoOracle9Dialect, org.alfresco.repo.domain.hibernate.dialect.AlfrescoSybaseAnywhereDialect, org.alfresco.repo.domain.hibernate.dialect.AlfrescoSQLServerDialect, org.hibernate.dialect.PostgreSQLDialect"/>
|
||||
<Environment override="false" type="java.lang.String" name="properties/hibernate.query.substitutions" description="Mapping from tokens in Hibernate queries to SQL tokens. For PostgreSQL, set this to "true TRUE, false FALSE"."/>
|
||||
<Environment override="false" type="java.lang.Boolean" name="properties/hibernate.jdbc.use_get_generated_keys" description="Enable use of JDBC3 PreparedStatement.getGeneratedKeys() to retrieve natively generated keys after insert. Requires JDBC3+ driver. Set to false if your driver has problems with the Hibernate identifier generators. By default, tries to determine the driver capabilities using connection metadata."/>
|
||||
<Environment override="false" type="java.lang.String" name="properties/hibernate.default_schema" description="Qualify unqualified table names with the given schema/tablespace in generated SQL. It may be necessary to set this when the target database has more than one schema."/>
|
||||
-->
|
||||
</Context>
|
@@ -0,0 +1,61 @@
|
||||
------
|
||||
Alfresco Maven 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:
|
||||
|
||||
+---+
|
||||
<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.
|
||||
|
51
archetypes/alfresco-amp-archetype/src/site/apt/index.apt.vm
Normal file
51
archetypes/alfresco-amp-archetype/src/site/apt/index.apt.vm
Normal file
@@ -0,0 +1,51 @@
|
||||
------
|
||||
Building AMPs (Alfresco Module Packages) with Maven
|
||||
------
|
||||
Gabriele Columbro
|
||||
------
|
||||
Nov 2012
|
||||
------
|
||||
|
||||
Introduction
|
||||
|
||||
The Alfresco AMP Archetype is a sample fully featured project to manage AMP (Alfresco Module Package) projects.
|
||||
This archetype can be used both for Alfresco Repository and Alfresco Share AMPs.
|
||||
|
||||
* 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 or Share 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 Jetty 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>>)
|
||||
|
||||
How to create a project:
|
||||
|
||||
You can create the latest release archetype with the following command:
|
||||
|
||||
+---+
|
||||
mvn archetype:generate -DarchetypeCatalog=https://artifacts.alfresco.com/nexus/content/groups/public/archetype-catalog.xml -Dfilter=org.alfresco.maven.archetype:
|
||||
+---+
|
||||
|
||||
You should then:
|
||||
|
||||
[[1]] Select the <<<alfresco-amp-archetype>>> option
|
||||
|
||||
[[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.
|
||||
|
||||
Usage
|
||||
|
||||
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}}
|
72
archetypes/alfresco-amp-archetype/src/site/apt/usage.apt.vm
Normal file
72
archetypes/alfresco-amp-archetype/src/site/apt/usage.apt.vm
Normal file
@@ -0,0 +1,72 @@
|
||||
------
|
||||
Alfresco Maven AMP Archetype Usage
|
||||
------
|
||||
Gabriele Columbro
|
||||
------
|
||||
Nov 2012
|
||||
------
|
||||
|
||||
|
||||
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/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
|
||||
|
||||
* testing
|
||||
|
||||
* 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 Alfresco Maven plugin used to manage AMPs in this SDK embeds the official Alfresco MMT to install depdended AMPs.
|
||||
|
||||
Commands
|
||||
|
||||
Common AMP project 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 for integration testing.
|
||||
When you run this command then you can access in your browser <<< {{{http://localhost:8080/alfresco}}} >>> or <<< {{{http://localhost:8080/share}}} >>>
|
||||
depending on the value of the property <<<alfresco.client.war>>>
|
||||
|
||||
* <<<mvn install -Pamp-to-war -Dalfresco.client.war=share>>>: Like <<<mvn install -Pamp-to-war>>> but installs the AMP and runs on the Share WAR in Tomcat embedded.
|
||||
|
||||
* <<<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>>>
|
||||
|
49
archetypes/alfresco-amp-archetype/src/site/site.xml
Normal file
49
archetypes/alfresco-amp-archetype/src/site/site.xml
Normal file
@@ -0,0 +1,49 @@
|
||||
<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 AMP 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="./index.html" />
|
||||
<item name="Alfresco All-in-One Archetype" href="../alfresco-allinone-archetype/index.html" />
|
||||
<item name="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="Alfresco Maven Plugin" href="../../plugins/alfresco-maven-plugin/index.html" />
|
||||
</menu>
|
||||
|
||||
<menu name="Maven Alfresco Community">
|
||||
<item name="Alfresco Maven Wiki Docs" 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>
|
||||
|
||||
<!-- maybe it's inherited? -->
|
||||
<!--<menu ref="reports"/>-->
|
||||
|
||||
</body>
|
||||
</project>
|
@@ -0,0 +1,11 @@
|
||||
#Tue Oct 30 14:23:01 CET 2012
|
||||
package=it.pkg
|
||||
version=0.1-SNAPSHOT
|
||||
groupId=archetype.it
|
||||
alfresco_target_version=4.2.e
|
||||
$=cat archetype.properties
|
||||
alfresco_target_groupId=org.alfresco
|
||||
alfresco_target_amp_client_war=alfresco
|
||||
alfresco_target_amp_client_war_groupId=org.alfresco
|
||||
alfresco_target_amp_client_war_version=4.2.e
|
||||
artifactId=basic
|
@@ -0,0 +1 @@
|
||||
verify
|
@@ -0,0 +1,11 @@
|
||||
#Tue Oct 30 14:23:01 CET 2012
|
||||
package=it.pkg
|
||||
version=0.1-SNAPSHOT
|
||||
groupId=archetype.it
|
||||
alfresco_target_version=4.2.e
|
||||
$=cat archetype.properties
|
||||
alfresco_target_groupId=org.alfresco
|
||||
alfresco_target_amp_client_war=alfresco
|
||||
alfresco_target_amp_client_war_groupId=org.alfresco
|
||||
alfresco_target_amp_client_war_version=4.2.e
|
||||
artifactId=basic
|
@@ -0,0 +1 @@
|
||||
verify -Pamp-to-war -Dmaven.tomcat.fork=true
|
@@ -1,46 +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>maven-alfresco-amp-archetype</artifactId>
|
||||
<packaging>maven-archetype</packaging>
|
||||
<name>Maven Alfresco Amp Archetype</name>
|
||||
<description>
|
||||
This archetype aims to provide a standardized approach to development, release and deployment of Alfresco AMPs (as opposed to Alfresco
|
||||
extensions, released as a different artifact ). Using standard m2 lifecycle commands (mvn compile package deploy) and generally available
|
||||
plugins (cargo, release, assembly) we are able to cover a very high percentage of Alfresco lifecycle common use cases. You are able within
|
||||
minutes to have a compatible AMP module built and its lifecycle supported by Maven, in a fully transparent way also with open source available
|
||||
AMPs.
|
||||
</description>
|
||||
<parent>
|
||||
<groupId>com.sourcesense.alfresco</groupId>
|
||||
<artifactId>maven-alfresco-archetypes</artifactId>
|
||||
<version>1.9.0-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<build>
|
||||
<extensions>
|
||||
<extension>
|
||||
<groupId>org.apache.maven.archetype</groupId>
|
||||
<artifactId>archetype-packaging</artifactId>
|
||||
<version>2.0-alpha-3</version>
|
||||
</extension>
|
||||
</extensions>
|
||||
</build>
|
||||
</project>
|
@@ -1,21 +0,0 @@
|
||||
<document>
|
||||
<properties>
|
||||
<title>Maven Alfresco AMP archetype</title>
|
||||
<author email="g.columbro@sourcesense.com">Gabriele Columbro</author>
|
||||
</properties>
|
||||
<body>
|
||||
<release version="1.9.0" date="2009-11-07" description="Public release alfresco 3.2r based">
|
||||
<action dev="g.columbro" type="add">
|
||||
Updated to Alfresco 3.2r artifacts
|
||||
</action>
|
||||
<action dev="g.columbro" type="add">
|
||||
Updated to new Sourcesense repository
|
||||
</action>
|
||||
</release>
|
||||
<release version="1.0.0" date="2008-07-06" description="Public release">
|
||||
<action dev="g.columbro" type="add">
|
||||
Added full AMP lifecycle management
|
||||
</action>
|
||||
</release>
|
||||
</body>
|
||||
</document>
|
@@ -1,60 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><archetype-descriptor name="test">
|
||||
<fileSets>
|
||||
<fileSet filtered="false" packaged="true" encoding="UTF-8">
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**/*.java</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="false" encoding="UTF-8">
|
||||
<directory>src/main/webapp</directory>
|
||||
<includes>
|
||||
<include>**/*.txt</include>
|
||||
<include>**/*.jsp</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="false" encoding="UTF-8">
|
||||
<directory>src/main/config</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
<include>**/*.properties</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="false" encoding="UTF-8">
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
<include>**/*.properties</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet encoding="UTF-8">
|
||||
<directory>src/main/webapp</directory>
|
||||
<includes>
|
||||
<include>**/*.js</include>
|
||||
<include>**/*.gif</include>
|
||||
<include>**/*.css</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="false" encoding="UTF-8">
|
||||
<directory>src/test/properties</directory>
|
||||
<includes>
|
||||
<include>**/*.properties</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="false" encoding="UTF-8">
|
||||
<directory>src/test/resources</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
<include>**/*.properties</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="false" encoding="UTF-8">
|
||||
<directory></directory>
|
||||
<includes>
|
||||
<include>module.properties</include>
|
||||
<include>README.txt</include>
|
||||
<include>TODO.txt</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</archetype-descriptor>
|
@@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><archetype>
|
||||
<id>maven-alfresco-amp-archetype</id>
|
||||
<sources>
|
||||
<source>src/main/java/com/sourcesense/demoamp/Demo.java</source>
|
||||
<source>src/main/java/com/sourcesense/demoamp/DemoComponent.java</source>
|
||||
</sources>
|
||||
<resources>
|
||||
<resource filtered="false">src/main/config/context/service-context.xml</resource>
|
||||
<resource filtered="false">src/main/config/log4j.properties</resource>
|
||||
<resource filtered="false">src/main/config/module-context.xml</resource>
|
||||
<resource filtered="false">src/main/webapp/css/demoamp.css</resource>
|
||||
<resource filtered="false">src/main/webapp/images/sourcesense.gif</resource>
|
||||
<resource filtered="false">src/main/webapp/jsp/demoamp.jsp</resource>
|
||||
<resource filtered="false">src/main/webapp/licenses/README-licenses.txt</resource>
|
||||
<resource filtered="false">src/main/webapp/scripts/demoamp.js</resource>
|
||||
<resource filtered="false">module.properties</resource>
|
||||
<resource filtered="false">README.txt</resource>
|
||||
<resource filtered="false">TODO.txt</resource>
|
||||
</resources>
|
||||
<testResources>
|
||||
<resource filtered="false">src/test/properties/local/application.properties</resource>
|
||||
<resource filtered="false">src/test/resources/alfresco/extension/custom-repository-context.xml</resource>
|
||||
<resource filtered="false">src/test/resources/alfresco/extension/file-servers-custom.xml</resource>
|
||||
<resource filtered="false">src/test/resources/log4j.properties</resource>
|
||||
</testResources>
|
||||
</archetype>
|
@@ -1,95 +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.
|
||||
======================================================================
|
||||
|
||||
|
||||
---------------------------------------
|
||||
Archetype Release: Archetype - maven-amp-archetype
|
||||
Author: g.columbro@sourcesense.com
|
||||
http://forge.alfresco.com/m2alfresco
|
||||
|
||||
Contacts:
|
||||
- alfresco-dev@lists.sourcesense.com (developer)
|
||||
- alfresco@sourcesense.com (commercial)
|
||||
|
||||
See Also:
|
||||
http://wiki.alfresco.com/wiki/Module_Management_Tool
|
||||
-----------------------------------------------------
|
||||
|
||||
|
||||
|
||||
M2 Instructions for Alfresco AMP:
|
||||
--------------------------------
|
||||
|
||||
The project can be built using Maven2.
|
||||
|
||||
|
||||
Alfresco maven2 AMP build
|
||||
-------------------------
|
||||
|
||||
|
||||
One command quickstart:
|
||||
$ MAVEN_OPTS="-Xms256m -Xmx512m -XX:PermSize=128m" mvn clean integration-test -P webapp
|
||||
|
||||
Runs the jetty embedded with overlayed the currently developed AMP
|
||||
|
||||
|
||||
FEATURES:
|
||||
---------
|
||||
|
||||
- AMP customized build : mvn clean package
|
||||
- AMP dependencies management: 'mvn clean package' can take care of overlay deps
|
||||
- Alfresco webapp integration via war creation mvn clean package -P webapp
|
||||
- jetty embedded build for fast testing, mvn clean integration-test -P webapp
|
||||
- install/deployment of Alfresco compatible AMPs on a m2 repo mvn install / deploy [ params ]
|
||||
|
||||
- using the maven-amp-plugin (http://forge.alfresco.com/maven4alfresco) WAR can depend on AMP artifacts and have them overlayed within the maven
|
||||
lifecycle, avoiding the boring MMT run.
|
||||
|
||||
Specific dependencies and different Alfresco versions can be specified in 'webapp' profile dependecies. Alfresco test webapp is overlayed (apart with
|
||||
all AMP and WAR dependencies specified) also with a sensible default 'alfresco/extension' folder to have a clean safe reproduceable and portable
|
||||
default alfresco run. Find these test configuaration files in 'src/test/resources' and environment dependent properties in src/test/properties/<env>/application.properties
|
||||
|
||||
|
||||
PROJECT LAYOUT
|
||||
--------------
|
||||
|
||||
src --------------------------------------------------------> (source folder)
|
||||
|
|
||||
|__ main ___ __ resources --------------------------> mapped in the classpath. Add here classpath resources
|
||||
| |
|
||||
| |__ config----- alfresco module config goes here.
|
||||
| | | Get's copied (by best practice) by build into package alfresco/module/groupId.artifactId.
|
||||
| | | This convention is used by the archetype and by the AMP unpacker.
|
||||
| | |__ ex: alfresco/module/com.sourcesense.alfresco.mymodule ---> Example Alfresco module config
|
||||
| |
|
||||
| |
|
||||
| |__ java -------------------------------> customization java classes
|
||||
| |
|
||||
| |__ webapp -----------------------------> AMP overlay folder - this folder is overlayed (so may overwrite other dependent AMPs)
|
||||
|
||||
|
|
||||
|__ test __ __ resources
|
||||
|
|
||||
| | |__ alfresco/extension ---> alfresco overriding Spring contexts
|
||||
| |__ properties -------------------------> environment aware application properties files
|
||||
| | |
|
||||
| | |__ local -------------> default application.properties
|
||||
| |
|
||||
|
|
||||
target - Project build dir
|
||||
|
||||
|
@@ -1,34 +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.
|
||||
======================================================================
|
||||
|
||||
Known Issues:
|
||||
-------------
|
||||
|
||||
|
||||
|
||||
MAJOR:
|
||||
|
||||
|
||||
MINOR:
|
||||
- cannot use maven SNAPSHOT versioning as it's copied over in the module.properties
|
||||
file and not accepted by alfresco as valid module version number
|
||||
|
||||
|
||||
TRIVIAL:
|
||||
|
||||
IMPROVEMENTS:
|
||||
- maven-sql-plugin to autocreate jetty db
|
@@ -1,423 +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>
|
||||
<groupId>${groupId}</groupId>
|
||||
<artifactId>${artifactId}</artifactId>
|
||||
<packaging>amp</packaging>
|
||||
<name>Maven Alfresco AMP Packaging Sample</name>
|
||||
<!--
|
||||
An Alfresco version number must be of the form 1.2.3.4. Using
|
||||
1.0-SNAPSHOT as the AMP version will create an exception. See
|
||||
http://wiki.alfresco.com/wiki/Developing_an_Alfresco_Module: "The
|
||||
version number must be made up of numeric values separated by dots.
|
||||
For example '2.1.56' is a valid version number, '2.3.4a' is not. " In
|
||||
order to be able to use Maven snapshots we cannot use the <version/>
|
||||
below as the AMP module version. Instead we use the
|
||||
buildnumber-maven-plugin. This requires a scm connection.
|
||||
-->
|
||||
<version>${version}</version>
|
||||
<description>Test AMP project</description>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>ss-public-mirror</id>
|
||||
<url>http://repository.sourcesense.com/nexus/content/groups/public</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>ss-public-snapshots-mirror</id>
|
||||
<url>http://repository.sourcesense.com/nexus/content/groups/public-snapshots</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>ss-public-mirror</id>
|
||||
<url>http://repository.sourcesense.com/nexus/content/groups/public</url>
|
||||
</pluginRepository>
|
||||
<pluginRepository>
|
||||
<id>ss-public-snapshots-mirror</id>
|
||||
<url>http://repository.sourcesense.com/nexus/content/groups/public-snapshots</url>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
<properties>
|
||||
<!--
|
||||
Default for which src/main/properties/<env>/application.properties is
|
||||
loaded. NB: used only for the 'test' profile (e.g. '-P test' on the
|
||||
mvn commandline) jetty run deployment, does not impact AMP behavior
|
||||
which is typically environment independent
|
||||
-->
|
||||
<env>local</env>
|
||||
<!-- Webapp used to test/develop locally the AMP -->
|
||||
<webapp.name>${artifactId}-webapp</webapp.name>
|
||||
<!--
|
||||
| | By default the src/test/properties/local/application.properties
|
||||
uses the property "alfresco.data.location" to specify where |
|
||||
alf_data gets created. | For local jetty:run deployment default
|
||||
creation dir is under project root folder (as location is specified
|
||||
relatively to run | dir). Please add alf_data_jetty in svn/cvs
|
||||
ignores in order not to commit that. You can also specified a
|
||||
different (out of the | sproject) folder | by editing the following
|
||||
properties. | DB is also configurable here. Of course keep in sync
|
||||
these two values otherwise you'll get integrity errors. | | Empty log
|
||||
dir creates file alfresco.log in appserver default dir. You can also
|
||||
specify a meaningful log directory for the server | (add a trailing
|
||||
slash, e.g. '/var/log/alfresco/' ) | | Jetty embedded run logs by
|
||||
default in target/alfresco.log
|
||||
-->
|
||||
<alfresco.data.location>./alf_data_jetty</alfresco.data.location>
|
||||
<alfresco.db.name>alf_jetty</alfresco.db.name>
|
||||
<alfresco.db.username>alfresco</alfresco.db.username>
|
||||
<alfresco.db.password>alfresco</alfresco.db.password>
|
||||
<webapp.log.level>error</webapp.log.level>
|
||||
<webapp.log.dir></webapp.log.dir>
|
||||
<!-- End of testing webapp specific properties -->
|
||||
<!-- Module specific build time properties -->
|
||||
<module.log.level>debug</module.log.level>
|
||||
</properties>
|
||||
<!--
|
||||
need to list these as a provided so that Maven doesn't download them
|
||||
and include them in the AMP, they are provided by Alfresco
|
||||
-->
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-repository</artifactId>
|
||||
<version>3.2r</version>
|
||||
<scope>provided</scope>
|
||||
<classifier>community</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring</artifactId>
|
||||
<version>2.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!--
|
||||
Example Jar dependency: will be properly packed into the AMP /lib
|
||||
directory <dependency> <groupId>rome</groupId>
|
||||
<artifactId>opensearch</artifactId> <version>0.1</version>
|
||||
</dependency>
|
||||
-->
|
||||
<!--
|
||||
Example AMP dependency: will be properly overlayed in the WAR
|
||||
produced by the integration-test phase in profile 'webapp'
|
||||
<dependency> <groupId>org.alfresco</groupId>
|
||||
<artifactId>recordsmanagement</artifactId> <version>2.1.0</version>
|
||||
<type>amp</type> </dependency>
|
||||
-->
|
||||
<!--
|
||||
By default archetype assumes mysql for test webapp. Change
|
||||
src/test/properties/<env>/application.properties FIXME: support in
|
||||
memory db for cleaner and safer test runs
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>5.0.3</version>
|
||||
</dependency>
|
||||
<!-- Don't add here amp dependencies as it will break amp packaging -->
|
||||
</dependencies>
|
||||
<!--
|
||||
The scm is required for the buildnumber-maven-plugin which is required
|
||||
for AMP version numbering
|
||||
-->
|
||||
<scm>
|
||||
<connection>scm:svn:http://domain.com/svn/trunk/</connection>
|
||||
<developerConnection>scm:svn:https://${maven.username}@domain.com/svn/trunk/</developerConnection>
|
||||
<url>http://domain.com/svn/trunk/</url>
|
||||
</scm>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-nosnapshot-plugin</artifactId>
|
||||
<groupId>com.sourcesense.maven</groupId>
|
||||
<version>0.0.5-SNAPSHOT</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>default</id>
|
||||
<phase>initialize</phase>
|
||||
<goals>
|
||||
<goal>strip</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>buildnumber-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>validate</phase>
|
||||
<goals>
|
||||
<goal>create</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<revisionOnScmFailure>1</revisionOnScmFailure>
|
||||
<doCheck>false</doCheck>
|
||||
<doUpdate>false</doUpdate>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.5</source>
|
||||
<target>1.5</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.alfresco.maven.plugin</groupId>
|
||||
<artifactId>maven-amp-plugin</artifactId>
|
||||
<version>3.0.1-SNAPSHOT</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<archive>
|
||||
<addMavenDescriptor>false</addMavenDescriptor>
|
||||
</archive>
|
||||
<overlays>
|
||||
<!--
|
||||
This sample adds records management module in the finally built
|
||||
AMP <overlay> <groupId>org.org.alfresco</groupId>
|
||||
<artifactId>recordsmanagement</artifactId>
|
||||
<version>2.1.0</version> <type>amp</type> </overlay>
|
||||
-->
|
||||
<!--
|
||||
The current AMP is always last in order to overwrite other
|
||||
modules' modules.properties <overlay></overlay>
|
||||
-->
|
||||
</overlays>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<!--
|
||||
Copies and filters resources in build folder so maven-amp-plugin can
|
||||
pick them up
|
||||
-->
|
||||
<resources>
|
||||
<resource>
|
||||
<filtering>true</filtering>
|
||||
<directory>src/main/resources</directory>
|
||||
<excludes>
|
||||
<exclude>**README-*</exclude>
|
||||
</excludes>
|
||||
</resource>
|
||||
<!--
|
||||
Copies and filters AMP config in the proper package
|
||||
'alfresco/module/${groupId}.${artifactId}' so to enforce full module
|
||||
naming single sourcing from POM properties
|
||||
-->
|
||||
<resource>
|
||||
<filtering>true</filtering>
|
||||
<directory>src/main/config</directory>
|
||||
<targetPath>alfresco/module/${groupId}.${artifactId}</targetPath>
|
||||
<excludes>
|
||||
<exclude>**README-*</exclude>
|
||||
</excludes>
|
||||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
<profiles>
|
||||
<!--
|
||||
Profile used to trigger war creation and integration within Jetty
|
||||
embedded
|
||||
-->
|
||||
<profile>
|
||||
<id>webapp</id>
|
||||
<build>
|
||||
<filters>
|
||||
<filter>src/test/properties/${env}/application.properties</filter>
|
||||
</filters>
|
||||
<defaultGoal>jetty:run-exploded</defaultGoal>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>unpack-amps</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>unpack-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<includeTypes>amp</includeTypes>
|
||||
<outputDirectory>${build.directory}/${webapp.name}</outputDirectory>
|
||||
<excludes>META*</excludes>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
<dependencies>
|
||||
<!--
|
||||
This is required to be re-defined explicitly at plugin level as
|
||||
otherwise the 'amp' extension unArchiver won't be available to
|
||||
the maven-dependency-plugin
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>org.alfresco.maven.plugin</groupId>
|
||||
<artifactId>maven-amp-plugin</artifactId>
|
||||
<version>3.0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<executions>
|
||||
<!-- Runs war packaging when 'integration-test' phase is called -->
|
||||
<execution>
|
||||
<id>it</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>exploded</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<archiveClasses>true</archiveClasses>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<primaryArtifact>false</primaryArtifact>
|
||||
<!--
|
||||
Don't remove the following line otherwise WAR and AMP builds
|
||||
will be done in the same folder, with unexpected results
|
||||
-->
|
||||
<webappDirectory>${build.directory}/${webapp.name}</webappDirectory>
|
||||
<archive>
|
||||
<addMavenDescriptor>false</addMavenDescriptor>
|
||||
</archive>
|
||||
<warSourceExcludes>licenses/**</warSourceExcludes>
|
||||
<webResources></webResources>
|
||||
<webResources>
|
||||
<resource>
|
||||
<directory>${build.testOutputDirectory}</directory>
|
||||
<targetPath>WEB-INF/classes</targetPath>
|
||||
<filtering>true</filtering>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<!-- Here we add default this AMP web/ resources-->
|
||||
<resource>
|
||||
<directory>src/main/webapp</directory>
|
||||
<targetPath>WEB-INF/licenses</targetPath>
|
||||
<includes>
|
||||
<include>licenses/*.*</include>
|
||||
</includes>
|
||||
<filtering>false</filtering>
|
||||
</resource>
|
||||
</webResources>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<!--
|
||||
This is required to be re-defined explicitly at plugin level as
|
||||
otherwise the 'amp' extension unArchiver won't be available to
|
||||
the maven-war-plugin
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>org.alfresco.maven.plugin</groupId>
|
||||
<artifactId>maven-amp-plugin</artifactId>
|
||||
<version>3.0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>maven-jetty-plugin</artifactId>
|
||||
<executions>
|
||||
<!-- Runs jetty when 'integration-test' phase is called -->
|
||||
<execution>
|
||||
<id>it</id>
|
||||
<phase>integration-test</phase>
|
||||
<goals>
|
||||
<goal>run-exploded</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<contextPath>/${webapp.name}</contextPath>
|
||||
<webApp>${pom.build.directory}/${webapp.name}</webApp>
|
||||
<scanIntervalSeconds>10</scanIntervalSeconds>
|
||||
<connectors>
|
||||
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
|
||||
<port>8080</port>
|
||||
<maxIdleTime>60000</maxIdleTime>
|
||||
</connector>
|
||||
</connectors>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<!--
|
||||
When invoking 'mvn integration-test', the following alf configs are
|
||||
added to the test war in order to be able to run it seamlessly. NB:
|
||||
the application.properties file is filtered with alfresco.db.name
|
||||
and alf.data.location POM properties as default configuration
|
||||
-->
|
||||
<testResources>
|
||||
<testResource>
|
||||
<filtering>true</filtering>
|
||||
<directory>src/test/resources</directory>
|
||||
</testResource>
|
||||
<!-- Includes default properties for alfresco test war -->
|
||||
<testResource>
|
||||
<filtering>true</filtering>
|
||||
<directory>src/test/properties/${env}</directory>
|
||||
<targetPath>alfresco/extension</targetPath>
|
||||
</testResource>
|
||||
<!--
|
||||
src/main/config/ is copied into ==>
|
||||
target/test-classes/alfresco/module/${groupId}.${artifactId} to be
|
||||
picked up by the maven-war plugin Best practice tacken from
|
||||
recordsmanagement.amp, is enforced troughout the whole archetype.
|
||||
This convention is also used for module.properties filtering.
|
||||
-->
|
||||
<testResource>
|
||||
<filtering>true</filtering>
|
||||
<directory>.</directory>
|
||||
<includes>
|
||||
<include>module.properties</include>
|
||||
</includes>
|
||||
<targetPath>alfresco/module/${groupId}.${artifactId}</targetPath>
|
||||
</testResource>
|
||||
</testResources>
|
||||
</build>
|
||||
<!--
|
||||
Here you can add test dependencies you want to have included in the
|
||||
the WAR (not in the AMP, built in the main profile) | | Typical use
|
||||
case: add here additional AMPs that you want to test compatibility
|
||||
of with the current module |
|
||||
-->
|
||||
<dependencies>
|
||||
<!--
|
||||
This is the alfresco version you're testing the AMP against. Don't
|
||||
remove if you want jetty to be able to deploy a WAR :)
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco</artifactId>
|
||||
<version>3.2r</version>
|
||||
<type>war</type>
|
||||
<classifier>community</classifier>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
|
||||
</profiles>
|
||||
</project>
|
@@ -1,41 +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.
|
||||
#-----------------------------------------------------------------------
|
||||
# ${artifactId} module log4j.properties
|
||||
#
|
||||
# NOTE
|
||||
# ----
|
||||
# Log4j uses the following logging levels:
|
||||
# debug,info,warn,error,fatal
|
||||
#
|
||||
# To set the logging level of {fullClassName} to {loglevel},
|
||||
# add a line to this file of the following form:
|
||||
#
|
||||
# log4j.logger.{fullClassName}={loglevel}
|
||||
#
|
||||
# For example, to make 'com.example.MyExample' produce 'debug'
|
||||
# logs, add a line like this:
|
||||
#
|
||||
# log4j.logger.com.example.MyExample=debug
|
||||
#
|
||||
#
|
||||
# WARNING
|
||||
# -------
|
||||
# Log properties in this log4j.properties file override/augment
|
||||
# those in the webapp's main log4j.properties.
|
||||
#
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
log4j.logger.com.sourcesense.demoamp.DemoComponent=${module.log.level}
|
Binary file not shown.
Before Width: | Height: | Size: 3.5 KiB |
@@ -1,139 +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.
|
||||
|
||||
# RUN TIME PROPERTIES
|
||||
# -------------------
|
||||
|
||||
# Sample custom content and index data location
|
||||
# This will create alf_data Relative to appserver run folder
|
||||
# In this default file we take the property from the POM (for compatbility with local jetty and jboss deployments) but it can also be edited here.
|
||||
dir.root=${alfresco.data.location}
|
||||
# Allowed values are: NONE, AUTO, FULL
|
||||
index.recovery.mode=AUTO
|
||||
|
||||
# Fail or not when there are node integrity checker errors
|
||||
integrity.failOnError=true
|
||||
|
||||
# database connection properties
|
||||
# MySQL connection (This is default and requires mysql-connector-java-5.0.3-bin.jar, which ships with the Alfresco server)
|
||||
|
||||
db.driver=org.gjt.mm.mysql.Driver
|
||||
db.url=jdbc:mysql://localhost/${alfresco.db.name}
|
||||
db.username=${alfresco.db.username}
|
||||
db.password=${alfresco.db.password}
|
||||
db.pool.initial=10
|
||||
db.pool.max=100
|
||||
|
||||
# MySQL dialect
|
||||
hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
|
||||
|
||||
|
||||
|
||||
|
||||
# Change the following values only if you know what you're doing.
|
||||
# Default should suffice in most cases when running jetty embedded
|
||||
# for amp testing
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Property to control whether schema updates are performed automatically.
|
||||
# Updates must be enabled during upgrades as, apart from the static upgrade scripts,
|
||||
# there are also auto-generated update scripts that will need to be executed. After
|
||||
# upgrading to a new version, this can be disabled.
|
||||
#db.schema.update=true
|
||||
|
||||
|
||||
# File servers related properties
|
||||
# For local builds we disable CIFS and FTP. Edit the following property to reenable them
|
||||
smb.server.enabled=false
|
||||
smb.server.name=CFS_SHARE_LOCAL
|
||||
smb.server.domain=mycompany.com
|
||||
smb.server.bindto=127.0.0.1
|
||||
smb.tcpip.port=1445
|
||||
netbios.session.port=1139
|
||||
netbios.name.port=1137
|
||||
netbios.datagram.port=1138
|
||||
ftp.server.enabled=false
|
||||
ftp.port=1121
|
||||
ftp.authenticator=alfresco
|
||||
|
||||
# This properties file is used to configure LDAP authentication
|
||||
# NB: The following LDAP related properties are read only in case -Denteprise mvn build property is specified
|
||||
# Wheter to allow silent deletion of users in the Alfresco UI (note: users will be then resynced in the next synchronization)
|
||||
ldap.authentication.allowDeleteUser=true
|
||||
# LDAP JNDI provider
|
||||
ldap.authentication.provider=com.sun.jndi.ldap.LdapCtxFactory
|
||||
# Url and protocol for LDAP server to carry authentication against
|
||||
ldap.authentication.url=ldap://ldap.mycompany.com:636
|
||||
# can be (simple, ssl)
|
||||
ldap.authentication.protcol=ssl
|
||||
# Credentials with full access to the directoty used
|
||||
ldap.authentication.adminUser=ou=Admin,ou=Services,o=Company
|
||||
ldap.authentication.adminPassword=secret
|
||||
# Wheter to allow unauthenticated guest a read only login
|
||||
ldap.authentication.guestLogin.allowed=false
|
||||
# Wheter users can be created on the fly upon successful external (e.g. LDAP) authentication. Useful to avoid user synchronization in case just uid and pwd are needed for a user
|
||||
server.transaction.allow-writes=true
|
||||
# Wheter user names are case sensitive
|
||||
user.name.caseSensitive=true
|
||||
# Wheter the synchronization process has to process duplicated users (e.g. synced users and users coming from the sync)
|
||||
personService.processDuplicates=true
|
||||
# Which action to take when processin duplicates. One of: LEAVE, SPLIT, DELETE
|
||||
personService.duplicateMode=DELETE
|
||||
# Which of the users (in case of SPLIT duplicates policy) should be considered valid
|
||||
personService.lastIsBest=true
|
||||
# Wheter auto created users should be considered when processing duplicates
|
||||
personService.includeAutoCreated=true
|
||||
# The query to find the people to import
|
||||
ldap.synchronisation.personQuery=(objectclass=inetOrgPerson)
|
||||
# The search base of the query to find people to import
|
||||
ldap.synchronisation.personSearchBase=ou=Identities,ou=mycompany,o=com
|
||||
# The attribute name on people objects found in LDAP to use as the uid in Alfresco
|
||||
ldap.synchronisation.userIdAttributeName=cn
|
||||
# The attribute on person objects in LDAP to map to the first name property in Alfresco
|
||||
ldap.synchronisation.userFirstNameAttributeName=givenName
|
||||
# The attribute on person objects in LDAP to map to the last name property in Alfresco
|
||||
ldap.synchronisation.userLastNameAttributeName=sn
|
||||
# The attribute on person objects in LDAP to map to the email property in Alfresco
|
||||
ldap.synchronisation.userEmailAttributeName=cn
|
||||
# The attribute on person objects in LDAP to map to the organizational id property in Alfresco
|
||||
ldap.synchronisation.userOrganizationalIdAttributeName=maildomain
|
||||
# The default home folder provider to use for people created via LDAP import
|
||||
ldap.synchronisation.defaultHomeFolderProvider=companyHomeFolderProvider
|
||||
# The query to find group objects
|
||||
ldap.synchronisation.groupQuery=(objectclass=AlfrescoGroup)
|
||||
# The search base to use to find group objects
|
||||
ldap.synchronisation.groupSearchBase=ou=AlfrescoGroups,ou=mycompany,o=com
|
||||
# The attribute on LDAP group objects to map to the gid property in Alfrecso
|
||||
ldap.synchronisation.groupIdAttributeName=cn
|
||||
# The group type in LDAP
|
||||
ldap.synchronisation.groupType=AlfrescoGroup
|
||||
# The person type in LDAP
|
||||
ldap.synchronisation.personType=inetOrgPerson
|
||||
# The attribute in LDAP on group objects that defines the DN for its members
|
||||
ldap.synchronisation.groupMemberAttributeName=member
|
||||
# The cron expression defining when people imports should take place (e.g. every evening at 22:00 hours)
|
||||
ldap.synchronisation.import.person.cron=0 0 22 * * ?
|
||||
# The cron expression defining when group imports should take place (e.g. every evening at 21:45 hours)
|
||||
ldap.synchronisation.import.group.cron=0 45 21 * * ?
|
||||
# Should all groups be cleared out at import time?
|
||||
# - this is safe as groups are not used in Alfresco for other things (unlike person objects which you should never clear out during an import)
|
||||
# - setting this to true means old group definitions will be tidied up.
|
||||
ldap.synchronisation.import.group.clearAllChildren=false
|
||||
|
||||
|
||||
|
@@ -1,53 +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.
|
||||
|
||||
-->
|
||||
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
|
||||
|
||||
<!--
|
||||
This shows the common minimum configuration overrides.
|
||||
By default, the content and indexes are located at a relative location, which should only
|
||||
be used when doing a quick preview of the Alfresco server.
|
||||
-->
|
||||
<beans>
|
||||
|
||||
<!-- overriding to point to custom properties -->
|
||||
<bean id="repository-properties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
||||
<property name="ignoreUnresolvablePlaceholders">
|
||||
<value>true</value>
|
||||
</property>
|
||||
<property name="locations">
|
||||
<list>
|
||||
<value>classpath:alfresco/repository.properties</value>
|
||||
<value>classpath:alfresco/version.properties</value>
|
||||
<value>classpath:alfresco/domain/transaction.properties</value>
|
||||
|
||||
<!-- Override basic repository properties, dir.root and hibernate dialect -->
|
||||
<value>classpath:alfresco/extension/application.properties</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="hibernateConfigProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
|
||||
<property name="locations">
|
||||
<list>
|
||||
<value>classpath:alfresco/domain/hibernate-cfg.properties</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
</beans>
|
@@ -1,152 +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.
|
||||
|
||||
-->
|
||||
<!--
|
||||
| Default property based configuration.
|
||||
| Example configurations are also provided.
|
||||
|
|
||||
-->
|
||||
<alfresco-config area="file-servers">
|
||||
|
||||
<!-- To override the default Alfresco filesystem use replace="true", to -->
|
||||
<!-- add additional filesystems remove the replace="true" attribute -->
|
||||
|
||||
|
||||
<!-- Sample passtrhu Novel authentication
|
||||
<config evaluator="string-compare" condition="Filesystem Security" replace="true">
|
||||
<authenticator type="passthru">
|
||||
<Server>passtrhu1.mycompany.com,passthru2.mycompany.com</Server>
|
||||
</authenticator>
|
||||
</config>
|
||||
-->
|
||||
|
||||
<!-- Sample kerberos configuration. Untested.
|
||||
|
||||
config evaluator="string-compare" condition="Filesystem Security" replace="true">
|
||||
<authenticator type="enterprise">
|
||||
<KDC>authserver.company.com</KDC>
|
||||
<Realm>MYCOMPANY.COM</Realm>
|
||||
<Password>secret</Password>
|
||||
<LoginEntry>AlfCommon</LoginEntry>
|
||||
</authenticator>
|
||||
</config-->
|
||||
|
||||
<config evaluator="string-compare" condition="Filesystem Security" replace="true">
|
||||
<authenticator type="alfresco"/>
|
||||
</config>
|
||||
|
||||
<config evaluator="string-compare" condition="CIFS Server" replace="true">
|
||||
<serverEnable enabled="${smb.server.enabled}"/>
|
||||
<host name="${smb.server.name}" domain="${smb.server.domain}"/>
|
||||
<comment>Alfresco CIFS Server</comment>
|
||||
|
||||
<!-- Set to the broadcast mask for the subnet -->
|
||||
<broadcast>255.255.255.0</broadcast>
|
||||
|
||||
<!-- Use Java socket based NetBIOS over TCP/IP and native SMB on linux -->
|
||||
<tcpipSMB platforms="linux,solaris,macosx"/>
|
||||
<netBIOSSMB platforms="linux,solaris,macosx"/>
|
||||
<!-- bind to the frontend facing interface of this server -->
|
||||
<bindto>${smb.server.bindto}</bindto>
|
||||
|
||||
<!-- Can be mapped to non-privileged ports, then use firewall rules to forward requests from the standard ports -->
|
||||
|
||||
<tcpipSMB port="${smb.tcpip.port}" platforms="linux,solaris,macosx"/>
|
||||
<netBIOSSMB sessionPort="${netbios.session.port}" namePort="${netbios.name.port}" datagramPort="${netbios.datagram.port}" platforms="linux,solaris,macosx"/>
|
||||
|
||||
<hostAnnounce interval="5"/>
|
||||
|
||||
<!-- Use Win32 NetBIOS interface on Windows -->
|
||||
<Win32NetBIOS/>
|
||||
<Win32Announce interval="5"/>
|
||||
|
||||
<!--
|
||||
<WINS>
|
||||
<primary>1.2.3.4</primary>
|
||||
<secondary>5.6.7.8</secondary>
|
||||
</WINS>
|
||||
-->
|
||||
<sessionDebug flags="Negotiate,Socket"/>
|
||||
</config>
|
||||
|
||||
<config evaluator="string-compare" condition="FTP Server">
|
||||
<serverEnable enabled="${ftp.server.enabled}"/>
|
||||
<port>${ftp.port}</port>
|
||||
|
||||
<!-- FTP authentication -->
|
||||
<authenticator type="${ftp.authenticator}"/>
|
||||
<!-- <debug flags="File,Search,Error,Directory,Info,DataPort"/> -->
|
||||
</config>
|
||||
|
||||
|
||||
<config evaluator="string-compare" condition="Filesystems" replace="true">
|
||||
<filesystems>
|
||||
|
||||
<filesystem name="Alfresco">
|
||||
<store>workspace://SpacesStore</store>
|
||||
<rootPath>/app:company_home</rootPath>
|
||||
|
||||
<!-- Add a URL file to each folder that links back to the web client -->
|
||||
<urlFile>
|
||||
<filename>__Alfresco.url</filename>
|
||||
<webpath>http://${localname}/</webpath>
|
||||
</urlFile>
|
||||
|
||||
<!-- Mark locked files as offline -->
|
||||
<offlineFiles/>
|
||||
|
||||
<!-- Desktop actions -->
|
||||
|
||||
<desktopActions>
|
||||
<global>
|
||||
<path>alfresco/desktop/Alfresco.exe</path>
|
||||
<webpath>http://${localname}/</webpath>
|
||||
</global>
|
||||
<action>
|
||||
<class>org.alfresco.filesys.smb.server.repo.desk.CheckInOutDesktopAction</class>
|
||||
<name>CheckInOut</name>
|
||||
<filename>__CheckInOut.exe</filename>
|
||||
</action>
|
||||
<action>
|
||||
<class>org.alfresco.filesys.smb.server.repo.desk.JavaScriptDesktopAction</class>
|
||||
<name>JavaScriptURL</name>
|
||||
<filename>__ShowDetails.exe</filename>
|
||||
<script>alfresco/desktop/showDetails.js</script>
|
||||
<attributes>anyFiles</attributes>
|
||||
<preprocess>copyToTarget</preprocess>
|
||||
</action>
|
||||
|
||||
</desktopActions>
|
||||
|
||||
<!--
|
||||
<accessControl default="Write">
|
||||
<user name="admin" access="Write"/>
|
||||
<address subnet="90.${version}.0" mask="255.255.0.0" access="Write"/>
|
||||
</accessControl>
|
||||
-->
|
||||
|
||||
</filesystem>
|
||||
|
||||
<!-- AVM virtualization view of all stores/versions for WCM -->
|
||||
<avmfilesystem name="AVM">
|
||||
<virtualView/>
|
||||
</avmfilesystem>
|
||||
|
||||
</filesystems>
|
||||
</config>
|
||||
|
||||
</alfresco-config>
|
@@ -1,147 +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.
|
||||
|
||||
|
||||
# Customized alfresco log location
|
||||
# Set root logger level to error
|
||||
log4j.rootLogger=${webapp.log.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
|
||||
log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{3}] %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=${webapp.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
|
||||
|
||||
###### Hibernate specific appender definition #######
|
||||
#log4j.appender.file=org.apache.log4j.FileAppender
|
||||
#log4j.appender.file.File=hibernate.log
|
||||
#log4j.appender.file.layout=org.apache.log4j.PatternLayout
|
||||
#log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
|
||||
|
||||
###### Log level overrides #######
|
||||
|
||||
log4j.logger.org.alfresco.repo.model.filefolder=info
|
||||
|
||||
# Hibernate
|
||||
log4j.logger.org.hibernate=error
|
||||
log4j.logger.org.hibernate.util.JDBCExceptionReporter=fatal
|
||||
log4j.logger.org.hibernate.event.def.AbstractFlushingEventListener=fatal
|
||||
#log4j.logger.org.hibernate.cache.EhCacheProvider=warn
|
||||
log4j.logger.org.hibernate.type=warn
|
||||
# log4j.logger.org.hibernate.persister.collection=DEBUG
|
||||
|
||||
# Spring
|
||||
log4j.logger.org.springframework=warn
|
||||
|
||||
# Axis/WSS4J
|
||||
log4j.logger.org.apache.axis=info
|
||||
log4j.logger.org.apache.ws=info
|
||||
|
||||
# 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
|
||||
|
||||
# log prepared statement cache activity ###
|
||||
log4j.logger.org.hibernate.ps.PreparedStatementCache=info
|
||||
|
||||
# Alfresco
|
||||
log4j.logger.org.alfresco=error
|
||||
log4j.logger.org.alfresco.repo.avm=info
|
||||
log4j.logger.org.alfresco.config=info
|
||||
log4j.logger.org.alfresco.sample=info
|
||||
log4j.logger.org.alfresco.web=info
|
||||
log4j.logger.org.alfresco.web.scripts=warn
|
||||
#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.repo.importer.ImporterBootstrap=info
|
||||
#log4j.logger.org.alfresco.web.ui.common.Utils=info
|
||||
log4j.logger.org.alfresco.repo.admin.patch.PatchExecuter=info
|
||||
log4j.logger.org.alfresco.repo.module.ModuleServiceImpl=info
|
||||
log4j.logger.org.alfresco.repo.domain.schema.SchemaBootstrap=info
|
||||
log4j.logger.org.alfresco.repo.admin.ConfigurationChecker=info
|
||||
log4j.logger.org.alfresco.repo.node.index.FullIndexRecoveryComponent=info
|
||||
log4j.logger.org.alfresco.util.OpenOfficeConnectionTester=warn
|
||||
log4j.logger.org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl=warn
|
||||
#log4j.logger.org.alfresco.web.app.DebugPhaseListener=debug
|
||||
#log4j.logger.org.alfresco.repo.cache.EhCacheTracerJob=debug
|
||||
#log4j.logger.org.alfresco.repo.search.Indexer=debug
|
||||
#log4j.logger.org.alfresco.repo.workflow=info
|
||||
#log4j.logger.org.alfresco.repo.jscript=DEBUG
|
||||
log4j.logger.org.alfresco.repo.jscript.AlfrescoRhinoScriptDebugger=off
|
||||
|
||||
# CIFS server debugging
|
||||
#log4j.logger.org.alfresco.smb.protocol=debug
|
||||
#log4j.logger.org.alfresco.smb.protocol.auth=debug
|
||||
#log4j.logger.org.alfresco.acegi=debug
|
||||
|
||||
# FTP server debugging
|
||||
#log4j.logger.org.alfresco.ftp.protocol=debug
|
||||
#log4j.logger.org.alfresco.ftp.server=debug
|
||||
|
||||
# WebDAV debugging
|
||||
#log4j.logger.org.alfresco.webdav.protocol=debug
|
||||
|
||||
# NTLM servlet filters
|
||||
#log4j.logger.org.alfresco.web.app.servlet.NTLMAuthenticationFilter=debug
|
||||
#log4j.logger.org.alfresco.repo.webdav.auth.NTLMAuthenticationFilter=debug
|
||||
|
||||
# Integrity message threshold - if 'failOnViolation' is off, then WARNINGS are generated
|
||||
log4j.logger.org.alfresco.repo.node.integrity=ERROR
|
||||
|
||||
# New indexer debugging
|
||||
#log4j.logger.org.alfresco.repo.search.impl.lucene.index=DEBUG
|
||||
|
||||
# Audit debugging
|
||||
# log4j.logger.org.alfresco.repo.audit=DEBUG
|
||||
# log4j.logger.org.alfresco.repo.audit.model=DEBUG
|
||||
|
||||
# Turn off Spring remoting warnings that should really be info or debug.
|
||||
log4j.logger.org.springframework.remoting.support=error
|
||||
|
||||
# Templating debugging
|
||||
# log4j.logger.org.alfresco.web.forms=debug
|
||||
# log4j.logger.org.chiba.xml.xforms=debug
|
||||
|
||||
# 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
|
||||
#log4j.logger.org.alfresco.repo.dictionary.DictionaryDAO=info
|
||||
|
||||
|
||||
# Virtualization Server Registry
|
||||
#log4j.logger.org.alfresco.mbeans.VirtServerRegistry=debug
|
||||
|
||||
# Link Validation debugging
|
||||
#log4j.logger.org.alfresco.linkvalidation.LinkValidationServiceImpl=debug
|
||||
#log4j.logger.org.alfresco.linkvalidation.LinkValidationStoreCallbackHandler=debug
|
||||
|
@@ -1,29 +0,0 @@
|
||||
-----
|
||||
Maven Alfresco Extension Archetype
|
||||
-----
|
||||
Sourcesense
|
||||
-----
|
||||
|
||||
|
||||
|
||||
Welcome to the Maven Alfresco AMP Archetype home
|
||||
|
||||
You've reached the Sourcesense ({{ ${site_pom_url} }}) Maven Alfresco AMP archetype home page (version: ${site_pom_version})
|
||||
|
||||
|
||||
|
||||
Description
|
||||
|
||||
${site_pom_description}
|
||||
|
||||
|
||||
|
||||
Quick Start (maven2)
|
||||
|
||||
For a quick start you can a maven alfresco AMP project created by just running <<(maven 2.0.6+ required)>>:
|
||||
|
||||
--------------------------------------------
|
||||
mvn archetype:generate -DarchetypeCatalog=http://repository.sourcesense.com/nexus/content/repositories/alfresco.public.releases/archetype-catalog.xml
|
||||
--------------------------------------------
|
||||
|
||||
and then choose the option 'maven-alfresco-amp-archetype'
|
@@ -1,43 +0,0 @@
|
||||
-----
|
||||
Archetype Project Generated Layout
|
||||
-----
|
||||
|
||||
|
||||
|
||||
What do I have when I created the project?
|
||||
|
||||
You will encounter an AMP project structure, filtered with values you provided in creation phase,
|
||||
which has the following layout:
|
||||
|
||||
|
||||
------------------------------------------------------------------
|
||||
|
||||
|
||||
src --------------------------------------------------------> (source folder)
|
||||
|
|
||||
|__ main ___ __ resources --------------------------> mapped in the classpath. Add here classpath resources
|
||||
| |
|
||||
| |__ config----- alfresco module config goes here.
|
||||
| | | Get's copied (by best practice) by build into package alfresco/module/groupId.artifactId.
|
||||
| | | This convention is used by the archetype and by the AMP unpacker.
|
||||
| | |__ ex: alfresco/module/com.sourcesense.alfresco.mymodule ---> Example Alfresco module config
|
||||
| |
|
||||
| |
|
||||
| |__ java -------------------------------> customization java classes
|
||||
| |
|
||||
| |__ webapp -----------------------------> AMP overlay folder - this folder is overlayed (so may overwrite other dependent AMPs)
|
||||
|
||||
|
|
||||
|__ test __ __ resources _
|
||||
| | |
|
||||
| | |__ alfresco/extension ---> alfresco overriding Spring contexts
|
||||
| |
|
||||
| |__ properties -------------------------> environment aware application properties files
|
||||
| | |
|
||||
| | |__ local -------------> default application.properties
|
||||
| |
|
||||
|
|
||||
target - Project build dir
|
||||
|
||||
------------------------------------------------------------------
|
||||
|
@@ -1,56 +0,0 @@
|
||||
-----
|
||||
Alfresco maven2 AMP lifecycle
|
||||
-----
|
||||
|
||||
|
||||
What an AMP is?
|
||||
|
||||
Alfresco Module packages are software modules to be added on top of the Alfresco ECM
|
||||
platform. \
|
||||
As opposed to Alfresco Extensions (which can be generated with {{{http://repository.sourcesense.com/maven2-sites/maven-alfresco-extension-archetype} maven-alfresco-extension-archetype }})
|
||||
which are meant to mainly produce a single customized build of Alfresco, an AMP is a small
|
||||
ZIP file primary product of the build lifecyle defined by the
|
||||
|
||||
|
||||
---------
|
||||
<packaging>amp</packaging>
|
||||
---------
|
||||
|
||||
POM property. Use this build to create and modules which then can be used as dependencies
|
||||
by a maven-alfresco-extension generated project (e.g. enterprise Alfresco WAR customization).
|
||||
|
||||
|
||||
|
||||
One command quickstart
|
||||
|
||||
|
||||
-------------
|
||||
$ MAVEN_OPTS="-Xms256m -Xmx512m -XX:PermSize=128m" mvn clean integration-test -P webapp
|
||||
----------------
|
||||
|
||||
|
||||
will runns the jetty embedded with overlayed the currently developed AMP
|
||||
|
||||
|
||||
FEATURES:
|
||||
|
||||
|
||||
|
||||
AMP archetype + plugin features:
|
||||
|
||||
* AMP customized build : <<<mvn clean package>>>
|
||||
|
||||
* Alfresco webapp integrationt test via war creation and embedded run <<<mvn clean integration-test -P webapp>>>
|
||||
|
||||
* Install/deployment of Alfresco compatible AMPs on a m2 repo <<< mvn install / deploy [ params ] >>>
|
||||
|
||||
* using the {{{http://repository.sourcesense.com/maven2-sites/maven-amp-plugin} maven-amp-plugin}} WAR can depend on AMP artifacts and have them overlayed within the maven lifecycle, avoiding the boring MMT run.
|
||||
|
||||
* AMP dependencies management: <<<mvn clean package>>> can take care of overlay AMP deps
|
||||
|
||||
* Error safe single sourcing of POM properties <<<groupId>>> and <<<artifactId>>> used to copy config in the proper package and to ensure consistency
|
||||
|
||||
|
||||
Specific dependencies and different Alfresco versions can be specified in 'webapp' profile dependecies. Alfresco test webapp is overlayed (apart with
|
||||
all AMP and WAR dependencies specified) also with a sensible default 'alfresco/extension' folder to have a clean safe reproduceable and portable
|
||||
default alfresco run. Find these test configuaration files in 'src/test/resources' and environment dependent properties in src/test/properties/<env>/application.properties
|
@@ -1,72 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<faqs id="Maven Alfresco Extension FAQ">
|
||||
<part id="General">
|
||||
<title>General</title>
|
||||
<faq id="build">
|
||||
<question>How do I build an AMP?</question>
|
||||
<answer>
|
||||
<p>
|
||||
Just Run
|
||||
<source>mvn clean package</source>
|
||||
</p>
|
||||
</answer>
|
||||
</faq>
|
||||
<faq id="test">
|
||||
<question>How do I test the AMP?</question>
|
||||
<answer>
|
||||
<p>
|
||||
You can run Jetty embedded in maven by typing
|
||||
<source>mvn clean integration-test -P webapp</source>
|
||||
</p>
|
||||
</answer>
|
||||
</faq>
|
||||
<faq id="transitive">
|
||||
<question>Are AMP transitive dependencies supported?</question>
|
||||
<answer>
|
||||
<p>
|
||||
Yes, they are, both from AMP and WAR packaging projects. For AMP projects this will turn out into having a final built AMP which
|
||||
contains all the chain of AMPs the current AMP is depending upon. For WAR projects all AMPs will be unpacked in the proper
|
||||
position same as the MMT would do.
|
||||
</p>
|
||||
</answer>
|
||||
</faq>
|
||||
<faq id="mmt">
|
||||
<question>Is MMT needed with maven?</question>
|
||||
<answer>
|
||||
<p>
|
||||
No, it is not. The whole point of it is getting rid of the annoying non integrated in the lifecycle MMT run. We created the
|
||||
<a href="https://forge.alfresco.com/projects/maven4alfresco" target="_blank">maven-amp-plugin</a>
|
||||
for managing and processing AMP lifecycle, making MMT obsolete.
|
||||
</p>
|
||||
</answer>
|
||||
</faq>
|
||||
</part>
|
||||
<part id="Developer">
|
||||
<title>Developer questions</title>
|
||||
<faq id="Eclipse">
|
||||
<question>How do I configure Eclipse?</question>
|
||||
<answer>
|
||||
<ul>
|
||||
<li>Run <source> mvn eclipse:eclipse </source></li>
|
||||
<li>hit "Refresh" on your Eclipse project</li>
|
||||
</ul>
|
||||
</answer>
|
||||
</faq>
|
||||
<faq id="Memory">
|
||||
<question>Why I get PermGen or HeapSpace errors</question>
|
||||
<answer>
|
||||
<p>Run your build with : <source>MAVEN_OPTS="-Xms256m -Xmx512m -XX:PermSize=128m" mvn ...</source> </p>
|
||||
</answer>
|
||||
</faq>
|
||||
<faq id="AMPs">
|
||||
<question>How do I deploy a generally available AMP into a maven repo for dependency usage</question>
|
||||
<answer>
|
||||
<source>
|
||||
mvn deploy:deploy-file -DrepositoryId=repo -Dfile=/Users/youruser/projectz/alfresco/alfresco-recordsmanagement-2.1.0.amp
|
||||
-DgroupId=org.alfresco.community -DartifactId=recordsmanagement -Dversion=2.1.0 -Dpackaging=amp -Durl=scp://...
|
||||
</source>
|
||||
</answer>
|
||||
</faq>
|
||||
</part>
|
||||
|
||||
</faqs>
|
Binary file not shown.
Before Width: | Height: | Size: 11 KiB |
@@ -1 +0,0 @@
|
||||
.maven {}
|
@@ -1,39 +0,0 @@
|
||||
<project>
|
||||
<skin>
|
||||
<groupId>org.apache.maven.skins</groupId>
|
||||
<artifactId>maven-stylus-skin</artifactId>
|
||||
<version>1.0</version>
|
||||
</skin>
|
||||
<poweredBy>
|
||||
<logo name="Maven" href="http://maven.apache.org" img="http://maven.apache.org/images/logos/maven-feather.png"/>
|
||||
<logo name="Alfresco - Open source ECM" img="http://alfresco.com/assets/images/icons/powered_by_alfresco.gif" href="http://www.sourcesense.com" />
|
||||
</poweredBy>
|
||||
<publishDate position="navigation-bottom" format="MM-dd-yy"/>
|
||||
<bannerLeft>
|
||||
<name>Maven alfresco AMP archetype - v. ${project.version}</name>
|
||||
<href>${site_site_url}</href>
|
||||
<src>images/logo_noclaim.png</src>
|
||||
</bannerLeft>
|
||||
<body>
|
||||
<links>
|
||||
<item name="Maven" href="http://maven.apache.org/"/>
|
||||
<item name="Apache" href="http://www.apache.org/"/>
|
||||
</links>
|
||||
|
||||
<menu name="M2 Alfresco AMP Archetype">
|
||||
<item name="Introduction" href="/index.html"/>
|
||||
<item name="README" href="/readme.html"/>
|
||||
<item name="Generated Project Layout " href="layout.html"/>
|
||||
<item name="FAQ" href="faq.html"/>
|
||||
</menu>
|
||||
|
||||
<menu name="See also">
|
||||
<item name="Maven Alfresco Extension Archetype" href="http://repository.sourcesense.com/nexus/content/repositories/alfresco.public.sites/maven-alfresco-lifecyle/maven-alfresco-archetypes/maven-alfresco-extension-archetype"/>
|
||||
<item name="Maven AMP Plugin" href="http://repository.sourcesense.com/nexus/content/repositories/alfresco.public.sites/maven-alfresco-lifecyle/plugins/maven-amp-plugin"/>
|
||||
<item name="Alfresco AMP files" href="http://wiki.alfresco.com/wiki/AMP_Files" />
|
||||
</menu>
|
||||
|
||||
<menu ref="reports" />
|
||||
|
||||
</body>
|
||||
</project>
|
@@ -1,123 +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.
|
||||
|
||||
NOTE: This file maybe obsolete. Please refer to documentation site.
|
||||
|
||||
|
||||
Maven2/Ant Alfresco extension archetype
|
||||
---------------------------------------
|
||||
|
||||
What is an Alfresco extension?
|
||||
------------------------------
|
||||
We define an "Alfresco extension" (or customization) a custom build of Alfresco which does not impact on Alfresco source code (while depends on binary releases of the libraries and webapp).
|
||||
This is realized overriding (and in certain particular cases overwriting) Alfresco default configuration using Convention over Configuration hooks (e.g. classpath:alfresco/extension/*-context.xml autoloading), in order to ease integration in enterprise environments and to simplify full lifecycle management (from scratch-start to release and deploy) also for non experienced developers, resulting in a less error prone controlled process.
|
||||
Alternative to an "Alfresco extension" is the "Alfresco Module" (or AMP) which is meant to be deployed on an existing Alfresco instance and above all to coexist with other modules on top of this instance: as a general rule of thumb an extension is an exclusive customization while a module is one of many customizations which have a separate lifecycle (and owner).
|
||||
For an maven2 archetype of AMP Alfresco build please have a look at:
|
||||
|
||||
https://dev.sourcesense.com/cargo/maven2-sites/maven-alfresco-extension-archetype
|
||||
|
||||
|
||||
Quick Start:
|
||||
------------
|
||||
Wanna skip all the discussion (or you know already the thing) and want a zero conf maven2 alfresco customization project generation?
|
||||
Just run:
|
||||
|
||||
mvn org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:create -DarchetypeGroupId=${pom.groupId} -DarchetypeArtifactId=${pom.artifactId} -DarchetypeVersion=${pom.version} \
|
||||
-DgroupId=mycompany.com -DartifactId=my-alfresco-customization -Dversion=0.1-SNAPSHOT
|
||||
-DremoteRepositories=http://repository.sourcesense.com/maven2 (archetype is deployed there)
|
||||
-DpomRemoteRepositories=http://repository.sourcesense.com/maven2 (wagon-dav ssh version patched is here)
|
||||
|
||||
|
||||
Introduction:
|
||||
-------------
|
||||
|
||||
This archetype developed within Sourcesense (http://www.sourcesense.com) aims to provide a standardized approach to development, release and deployment of Alfresco extensions (as opposed to AMP builds). Using standard m2 lifecycle commands (mvn compile package deploy) and generally available plugins (cargo, release, assembly) we are able to cover a very high percentage of Alfresco lifecycle common use cases.
|
||||
It can be used both with Maven2 and Ant build systems, but it must be clear that *only* the Maven2 approach provides all the automation features we will describe in the next paragraphs.
|
||||
In addition to that the m2 approach provides a zero-conf approach while ant requires (as usual) manual gathering and selection of required alfresco libraries and webapp (please refer to README-ant.txt for further info about the Ant build). Last but not the least, m2 build is more likely to be maintained and improved (especially in the likely case Alfresco moves to maven2).
|
||||
For more details on the m2 apprach please refer instead to README-m2.txt.
|
||||
|
||||
|
||||
|
||||
Features (maven2 only):
|
||||
----------------------
|
||||
|
||||
-- Easy dependency management and upgrade testing
|
||||
|
||||
Webapp WAR dependency on Alfresco community/enterprise wars (or even environment dependent builds, e.g. WAR without log4j for Jboss-4.0.X) can be easily switched and build
|
||||
for different platforms in custom maven2 build profiles.
|
||||
Alfresco JAR dependency are only included for compilation (scope="provided") and IDE configuration and must manually be kept in sync with the WAR version (we used a maven style library naming, renaming Alfresco distributed libraries).
|
||||
|
||||
-- Single source environment dependent properties filtering:
|
||||
|
||||
One of the biggest flaws (and most frequent cause for runtime errors) for Alfresco (and more in general for webapplications) is a poor build system which requires manual editing of properties in the source code in a developer/environment dependent way. With this build system just by specifying the -Denv=<yourEnv> command line property your able to switch between different buildtime/runtime properties configuration and also have all common properties in one file for simple edit. No more messing up with Spring files when what you need to change is just a property.
|
||||
Properties files are stored in src/main/properties/<yourEnv> and get automatically copied over the classpath to provide complete code and configuration separation. Typical examples of developer/environment dependent properties are: db connection, LDAP server connection, alf_data location, SMB/FTP server enabling and configuration.
|
||||
|
||||
-- Automated (convention over configuration based) full Alfresco repository restore (boostrap)
|
||||
|
||||
Alfresco bootstrap process requires manual actions to be taken, and namely to include the restore-context.xml and the 6 full repo export ACP files to be included in the alfresco/extension/restore package. With this build this becomes as easy as specifying the -DrestoreVersion=<myVersion> build property which will automatically pick up ACP files (alfresco package name = "export") found in tools/export/<myVersion> and include them in the right position in the classpath. When the property is specified also the restore-context.xml to load them is automatically included
|
||||
|
||||
-- Automated LDAP configuration (and associated personService behaviors)
|
||||
|
||||
Fill in your application.properties with appropriate LDAP connection and synchronization values and by specifying the -Denterprise build property on the command line you will have the LDAP authentication and sychronization context already configured. No more hassles in digging into huge Spring files ;)
|
||||
|
||||
-- Jboss/Tomcat cargo based deployment
|
||||
|
||||
Using cargo we're able to provide (local) Jboss and (local/remote) Tomcat deployment. This comes handy both in the development phases and in the release phases when we want the release operation (scm tagging, m2 repo deployment, version update, appserver deployment) to be transactional and managed by maven. For additional configuration please refer to maven-cargo-plugin configuration and fine tune your $M2_HOME/conf/settings.xml (for system level settings) or ~/.m2/settings.xml (for user level settings) in order to match your host/credentials configuration
|
||||
|
||||
-- Zero conf startup
|
||||
|
||||
Community artifacts (alfresco 2.x) artifacts are available on Sourcesense public repository (http://repository.sourcesense.com/maven2) and allow all the default dependencies specified in this POM to be successfully retrieved with no additional configuration. If you want to use instead enterprise dependencies you either need to have a private access to Sourcesense private repositories or push alfresco for releasing this artifacts on public Alfresco maven repositories
|
||||
|
||||
--- Configurable log location and easy database setup
|
||||
By editing the <log.dir> POM property in the appropriate profile you can have the setting applied where it makes sense (jboss configures everything centrally).
|
||||
Database creation/remove scripts are filtered according to the build profile, so you can directly run them for the different environment they were 'built' for.
|
||||
|
||||
--- Easy ide (Eclipse) integration
|
||||
As difficult as running mvn eclipse:eclipse and hitting "Refresh in your eclipse proje"
|
||||
|
||||
--- Release process
|
||||
One command release deploy for this artifact and for the project generated from it. See README-m2.txt for more details.
|
||||
|
||||
--- Integrated documentation system
|
||||
Documentation is integrated and can be modified with one of the supported formats (Xdoc, APT, FML): project resources can be also linked (e.g.physical documents) .
|
||||
To test an example typing 'mvn site:run' will run your site in jetty embedded on port 8080, with redeployment of sited source files.
|
||||
To stage the site just type 'mvn site:stage' and to deploy to remote site location, guess what, 'mvn site:deploy'
|
||||
|
||||
TODO:
|
||||
----
|
||||
See TODO.txt
|
||||
|
||||
|
||||
ROADMAP:
|
||||
--------
|
||||
See ROADMAP.txt
|
||||
|
||||
|
||||
REFERENCES:
|
||||
----------
|
||||
http://www.mortbay.org/maven-plugin
|
||||
http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin
|
||||
http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html
|
||||
http://maven.apache.org/guides/getting-started/index.html#How_do_I_filter_resource_files
|
||||
http://maven.apache.org/pom.html#Final
|
||||
http://maven.apache.org/plugins/maven-resources-plugin/resources-mojo.html
|
||||
http://jira.codehaus.org/browse/CARGO-416
|
||||
http://www.javaworld.com/javaworld/jw-05-2006/jw-0529-maven.html
|
||||
http://cargo.codehaus.org/Maven2+Plugin+Installation
|
||||
http://cargo.codehaus.org/Deploying+to+a+running+container
|
||||
http://maven.apache.org/plugins/maven-release-plugin/
|
||||
http://www.javaworld.com/javaworld/jw-02-2006/jw-0227-maven.html?page=2
|
||||
http://maven.apache.org/doxia/references/apt-format.html
|
||||
http://maven.apache.org/guides/mini/guide-site.html
|
@@ -1,32 +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.
|
||||
|
||||
ISSUES:
|
||||
-------
|
||||
- tools/mysql folder scripts are copied over the classpath (because of the filtering feature, shall we remove it?). It's harmless anyways apart from the potential secuity issues (BTW credentials are deployed non encrypted anyways in application.properties)
|
||||
- fix commented library versions
|
||||
|
||||
|
||||
TODO (in order of priority):
|
||||
-----
|
||||
- AMP archetype
|
||||
- make jetty:run-inplace work for easy runtime editing
|
||||
- translate other TXT files into APT for maven site generation (as done for README)
|
||||
- Integration testing with selenium
|
||||
- unit testing suite
|
||||
- Configure class/contexts reloading for jetty run
|
||||
- add multimodule support (and extract release/deploy policies to a super POM for usage also by AMP archetype)
|
||||
- add amp dependency mgmt or let steer alfresco for a jar artifact (jsp loading from jar or pre extracted?)
|
||||
- move archetype documentation in mvn site
|
@@ -1,53 +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>maven-alfresco-extension-archetype</artifactId>
|
||||
<packaging>maven-archetype</packaging>
|
||||
<name>Maven alfresco Extension archetype</name>
|
||||
<parent>
|
||||
<groupId>com.sourcesense.alfresco</groupId>
|
||||
<artifactId>maven-alfresco-archetypes</artifactId>
|
||||
<version>1.9.0-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<description>
|
||||
This archetype developed aims to provide a standardized approach to development, release and deployment of Alfresco extensions (as opposed to
|
||||
AMP builds, to be released as a different artifact ). Using standard m2 lifecycle commands (mvn compile package deploy) and generally
|
||||
available plugins (cargo, release, assembly) we are able to cover a very high percentage of Alfresco lifecycle common use cases. It can be
|
||||
used both with Maven2 and Ant build systems, but it must be clear that *only* the Maven2 approach provides all the automation features we will
|
||||
describe in this website. In addition to that the m2 approach provides a zero-conf approach while ant requires (as usual) manual gathering and
|
||||
selection of required alfresco libraries and webapp (please refer to README-ant.txt for further info about the Ant build). Last but not the
|
||||
least, m2 build is more likely to be maintained and improved (especially in the likely case Alfresco moves to maven2). For more details on the
|
||||
m2 apprach please refer instead to README Section (or directly and to README-m2.txt of the generated project).
|
||||
</description>
|
||||
<build>
|
||||
<extensions>
|
||||
<extension>
|
||||
<groupId>org.apache.maven.archetype</groupId>
|
||||
<artifactId>archetype-packaging</artifactId>
|
||||
<version>2.0-alpha-2</version>
|
||||
</extension>
|
||||
<!--
|
||||
Unreleased version of webdav wagon plugin which fixes a boring
|
||||
stacktrace logging from this provider. FIXME: Improve the fix and
|
||||
submit the patch
|
||||
-->
|
||||
</extensions>
|
||||
</build>
|
||||
</project>
|
@@ -1,21 +0,0 @@
|
||||
<document>
|
||||
<properties>
|
||||
<title>Maven Alfresco Extension archetype</title>
|
||||
<author email="g.columbro@sourcesense.com">Gabriele Columbro</author>
|
||||
</properties>
|
||||
<body>
|
||||
<release version="1.9.0" date="2009-11-07" description="Public release alfresco 3.2r based">
|
||||
<action dev="g.columbro" type="add">
|
||||
Updated to Alfresco 3.2r artifacts
|
||||
</action>
|
||||
<action dev="g.columbro" type="add">
|
||||
Updated to new Sourcesense repository
|
||||
</action>
|
||||
</release>
|
||||
<release version="1.1.0" date="2008-07-11" description="Public release">
|
||||
<action dev="g.columbro" type="add">
|
||||
Added full AMP lifecycle management.
|
||||
</action>
|
||||
</release>
|
||||
</body>
|
||||
</document>
|
@@ -1,112 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><archetype-descriptor name="maven-alfresco-extension-archetype">
|
||||
<fileSets>
|
||||
<fileSet filtered="true" encoding="UTF-8">
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**/*.java</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="true" encoding="UTF-8">
|
||||
<directory>src/main/webapp</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
<include>**/*.txt</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="true" encoding="UTF-8">
|
||||
<directory>src/main/properties</directory>
|
||||
<includes>
|
||||
<include>**/*.txt</include>
|
||||
<include>**/*.properties</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="true" encoding="UTF-8">
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
<include>**/*.properties</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet encoding="UTF-8">
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/*.js</include>
|
||||
<include>**/*.ftl</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="true" encoding="UTF-8">
|
||||
<directory>tools/export</directory>
|
||||
<includes>
|
||||
<include>**/*.txt</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="true" encoding="UTF-8">
|
||||
<directory>tools/ant</directory>
|
||||
<includes>
|
||||
<include>**/*.txt</include>
|
||||
<include>**/*.html</include>
|
||||
<include>**/*.jsp</include>
|
||||
<include>**/*.xml</include>
|
||||
<include>**/*.properties</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet encoding="UTF-8">
|
||||
<directory>tools/m2</directory>
|
||||
<includes>
|
||||
<include>**/*.sh</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet encoding="UTF-8">
|
||||
<directory>tools/ant</directory>
|
||||
<includes>
|
||||
<include>**/*.access</include>
|
||||
<include>**/*.tld</include>
|
||||
<include>**/*.xsd</include>
|
||||
<include>**/*.sample</include>
|
||||
<include>**/*.gif</include>
|
||||
<include>**/*.ftl</include>
|
||||
<include>**/*.ico</include>
|
||||
<include>**/*.MF</include>
|
||||
<include>**/*.0-community/scripts/ajax/dojo/src/crypto/LICENSE</include>
|
||||
<include>**/*.as</include>
|
||||
<include>**/*.fla</include>
|
||||
<include>**/*.pdf</include>
|
||||
<include>**/*.0-community/scripts/ajax/dojo/src/i18n/calendar/nls/README</include>
|
||||
<include>**/*.0-community/scripts/ajax/dojo/src/i18n/currency/nls/README</include>
|
||||
<include>**/*.svg</include>
|
||||
<include>**/*.sql</include>
|
||||
<include>**/*.htm</include>
|
||||
<include>**/*.password</include>
|
||||
<include>**/*.exe</include>
|
||||
<include>**/*.jar</include>
|
||||
<include>**/*.js</include>
|
||||
<include>**/*.class</include>
|
||||
<include>**/*.dtd</include>
|
||||
<include>**/*.wsdd</include>
|
||||
<include>**/*.css</include>
|
||||
<include>**/*.png</include>
|
||||
<include>**/*.wsdl</include>
|
||||
<include>**/*.jpg</include>
|
||||
<include>**/*.smd</include>
|
||||
<include>**/*.acp</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet encoding="UTF-8">
|
||||
<directory>.externalToolBuilders</directory>
|
||||
<includes>
|
||||
<include>**/*.launch</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="true" encoding="UTF-8">
|
||||
<directory></directory>
|
||||
<includes>
|
||||
<include>.classpath</include>
|
||||
<include>.project</include>
|
||||
<include>build.xml</include>
|
||||
<include>maven-eclipse.xml</include>
|
||||
<include>README-ANT.txt</include>
|
||||
<include>README-m2.txt</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</archetype-descriptor>
|
@@ -1,46 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archetype>
|
||||
<id>maven-alfresco-extension-archetype</id>
|
||||
<sources></sources>
|
||||
<resources>
|
||||
<resource>src/books/manual.xml</resource>
|
||||
<resource>src/site/site.xml</resource>
|
||||
<resource>src/site/apt/index.apt.vm</resource>
|
||||
<resource>src/site/apt/book-index.apt</resource>
|
||||
<resource>src/site/fml/faq.fml</resource>
|
||||
<resource>src/main/properties/local/application.properties</resource>
|
||||
<resource>src/main/properties/local/README-properties.txt</resource>
|
||||
<resource>src/main/resources/alfresco/extension/custom-model-context.xml</resource>
|
||||
<resource>src/main/resources/alfresco/extension/custom-model.xml</resource>
|
||||
<resource>src/main/resources/alfresco/extension/custom-repository-context.xml</resource>
|
||||
<resource>src/main/resources/alfresco/extension/restore-context.xml</resource>
|
||||
<resource>src/main/resources/alfresco/extension/web-client-config-custom.xml</resource>
|
||||
<resource>src/main/resources/alfresco/extension/webclient.properties</resource>
|
||||
<resource>tools/ant/tasks/tomcat-tasks.properties</resource>
|
||||
<resource>tools/ant/tasks/tomcat-tasks.xml</resource>
|
||||
<resource>tools/ant/ant-bootstrap.sh</resource>
|
||||
<resource>tools/m2/m2-bootstrap.sh</resource>
|
||||
<resource>README-ANT.txt</resource>
|
||||
<resource>README-m2.txt</resource>
|
||||
<resource>build.xml</resource>
|
||||
<resource>pom.xml</resource>
|
||||
<resource>src/main/resources/alfresco/extension/custom-model-context.xml</resource>
|
||||
<resource>src/main/resources/alfresco/extension/custom-model.xml</resource>
|
||||
<resource>src/main/resources/alfresco/extension/custom-repository-context.xml</resource>
|
||||
<resource>src/main/resources/alfresco/extension/file-servers-custom.xml</resource>
|
||||
<resource>src/main/resources/alfresco/extension/ldap-authentication-context.xml</resource>
|
||||
<resource>src/main/resources/alfresco/extension/ldap-synchronisation-context.xml</resource>
|
||||
<resource>src/main/resources/alfresco/extension/restore-context.xml</resource>
|
||||
<resource>src/main/resources/alfresco/extension/web-client-config-custom.xml</resource>
|
||||
<resource>src/main/resources/alfresco/extension/webclient.properties</resource>
|
||||
<resource>src/main/resources/log4j.properties</resource>
|
||||
<resource>src/main/webapp/WEB-INF/web.xml</resource>
|
||||
<resource>src/main/webapp/WEB-INF/README-WEB-INF.txt</resource>
|
||||
<resource>src/main/webapp/WEB-INF/faces-config-custom.xml</resource>
|
||||
<resource>tools/ant/tasks/tomcat-tasks.properties</resource>
|
||||
<resource>tools/ant/tasks/tomcat-tasks.xml</resource>
|
||||
<resource>tools/export/testRestoreVersion/README-restore.txt</resource>
|
||||
<resource>tools/mysql/db_remove.sql</resource>
|
||||
<resource>tools/mysql/db_setup.sql</resource>
|
||||
</resources>
|
||||
</archetype>
|
@@ -1,119 +0,0 @@
|
||||
Maven-alfresco-archetype references
|
||||
-----------------------------------
|
||||
|
||||
|
||||
AMP Packaging - http://forge.alfresco.com/forum/forum.php?thread_id=662&forum_id=310
|
||||
|
||||
Documentation site - http://repository.sourcesense.com/maven2-sites/maven-alfresco-extension-archetype-1.0.0/
|
||||
|
||||
Library conventions - http://forums.alfresco.com/viewtopic.php?f=10&t=1017&p=39172#p39172
|
||||
|
||||
Maven repositories - http://forums.alfresco.com/viewtopic.php?f=12&t=10210&p=39175#p39175
|
||||
|
||||
Running outside a container - http://forums.alfresco.com/viewtopic.php?f=4&t=9317&p=39176#p39176
|
||||
|
||||
Maven4alfresco - http://forums.alfresco.com/viewtopic.php?f=32&t=9268&p=39179#p39179
|
||||
|
||||
Maven for building Alfresco - http://forums.alfresco.com/viewtopic.php?f=14&t=7619&p=39188#p39188
|
||||
|
||||
Release gforge page - http://forge.alfresco.com/frs/?group_id=90
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Forum post - Maven for building Alfresco
|
||||
---------------------------
|
||||
|
||||
Hi all, a bit delayed but wanted to leave my 2 cents on this *very interesting* topic.
|
||||
|
||||
I believe that independently from the technology that is used, which hardly depends upon the context you plan to adopt and deploy Alfresco in,
|
||||
using Maven2 can be far more useful in structured enterprise environments where some of the mentioned requirements (strict dependency management and versioning or releasing policies / ownerships) which Ant is certainly the low key entry point for a test drive / evaluation or for very simple customizations for which maven would be overkill.
|
||||
|
||||
ATM, as no real news have happened in one year on the Alfresco side on the mavenization of the Alfresco sources,
|
||||
we proceeded (in Sourcesense, http://www.sourcesense.com, alfresco partner) in using maven to build and customize Alfresco at our clients, typically big and potentially intricate enterprise environments.
|
||||
|
||||
To be clear: we use maven ATM to build alfresco extensions (in the future also AMP should be supported) and that does not mandatorily mean that Alfresco itself should build with maven, even if how it works now (basically a maven-webapp-archetype with a war dependency on the alfresco war) is not completely neat as it flattens the whole transitive dependency resolving magic of m2.
|
||||
|
||||
The process of improvement of this lifecycle management (more than just build) tool has been later on released on the alfresco forge (http://forge.alfresco.com/projects/m2alfresco/ and http://repository.sourcesense.com/maven ... ype-1.0.0/) and provides a number of interesting features (like jetty embedded run, clean property filtering management, documentation, jboss/tomcat local/remote deploy, maven release support etc.).
|
||||
For supporting this release, we made alfresco community artifacts (jar and war) available on Sourcesense repositories in order to have a zero conf startup for even junior developers (and to lower the maven learning curve). See http://repository.sourcesense.com/maven2/alfresco.
|
||||
|
||||
For enterprise customization instead, we happily use internal repositories (Sourcesense or clients') with the same approach.
|
||||
|
||||
About my 2 cents, it would be much better if Alfresco itself releases its artifacts on m2 repos (thus complete the m10n - mavenization - of source tree) for a number of reasons
|
||||
|
||||
- standardization of the naming/versioning
|
||||
- easy startup
|
||||
- Alfresco declares itself a ECM systems, as we know 'E' stands for "enterprise", and as we all (sadly) know "enterprise" stands for processes, release policies, bureaucracy, ownerships, lifecycle, development vs. maintenance. A m2 structured approach will ease to me integration in highly complex environments (and with many enterprise applications) in which is not just a matter of "taking and xml file, dropping it in the shared folder, and restart the server" , because it's *simply* not possible
|
||||
- Having an archetype based approach can really gear community development and lower Alfresco "real" learning curve, as it's pretty much easier to have a list of properties to edit more than go-search-crawl-find on the wiki which is the Spring snippet to be modified. This is true for the extension projects (already in the forge) as well as AMP (let's say module build).
|
||||
- Alfresco grows faster and faster, to me it's the moment (especially with the 3.0 release) to provide a real neat basis for the even greater growth alfresco expects from the great improvements they are doing: Apache maven is basis for most open source projects, and even tough and complex frameworks (e.g. Apache Cocoon) have completed (not without hassles) the m10n process, towards a more integrated and documented open source vision. The bigger it grows the more difficult will be to do this change and to me it may really make it an outstanding example of "enterprise opensource"
|
||||
- I don't have to maintain a public m2 repository almost just for Alfresco ;)
|
||||
|
||||
Ok, now you may think I'm a maven evangelist trying to find useful applications of that technology at all costs ;)
|
||||
|
||||
On the other hand I believe that (especially being a partner) we should not impose technologies, while adapt the way we work to the open source (typically high) standards of development, and this is a characteristic that sometimes I see missing in Alfresco extension development: in this sense the archetype we've released builds *also* with Apache Ant (see http://forge.alfresco.com/forum/forum.php?forum_id=512), exploiting the tidy and standard maven project hierarchy and sharing the same property filtering policies.
|
||||
Of course all the nice m2 features (like jetty run, jboss and tomcat deploy, release management, etc.) are not supported by this build, but what you just need is to checkout the jar, unzip it, and run ant to have a properly packaged, environment aware alfresco WAR build.
|
||||
|
||||
This was more a POC for the feasibility of this double approach, so I'm not planning to maintain the ant part while focusing on the interesting growth perspectives of the m2 part, but it can be useful to provide the double point of access I was mentioning before (enterprise vs. community).
|
||||
|
||||
So wrapping up:
|
||||
I would be (and so my company Sourcesense) to see Alfresco move (and to help/support in this transition) to maven for building its source code, document and release it. But I understand it's a complex and risky process (but risks can be lowered supporting a bottom line Ant based build which provides continuity with current developments).
|
||||
|
||||
So ATM I'd love to have some feedback on the possibility of building extension (and AMP in a while) using archetypes / prototype based approach (even before an Alfresco official move to maven) and hopefully some contributions to the project. I think that it's vitally important to have a (still agile but) sort of a process when developing and releasing and application.
|
||||
That's especially true/valuable for a partner but I think that will especially gear the professional open source community interest in Alfresco.
|
||||
|
||||
Hope this helps,
|
||||
Gab
|
||||
|
||||
PS:
|
||||
For some additional references on the maven topic you may be interested in (sorry for the spamming ;) :
|
||||
|
||||
Library conventions - viewtopic.php?f=10&t=1017&p=39172#p39172
|
||||
Maven repositories - viewtopic.php?f=12&t=10210&p=39175#p39175
|
||||
Running outside a container - viewtopic.php?f=4&t=9317&p=39176#p39176
|
||||
Maven4alfresco - viewtopic.php?f=32&t=9268&p=39179#p39179
|
||||
|
||||
|
||||
|
||||
Library conventions:
|
||||
--------------------
|
||||
|
||||
have been working a lot with Maven and Alfresco, especially in enterprise environments where versioning, releasing and dependency management can be really important and tricky.
|
||||
That's why I've put my efforts in releasing a maven2 archetype which can be used for building Alfresco extensions (and soon AMP, I hope) and managing the artifact in its whole lifecycle as m2 prescribes, e.g providing features like:
|
||||
|
||||
- Property filtering
|
||||
- Rapid prototyping (common properties already available to the - junior - developer rather than Spring conf files)
|
||||
- Releasing
|
||||
- Documentation site
|
||||
- LDAP configuration samples
|
||||
- Local/remote deploy on tomcat/jboss with cargo
|
||||
- jetty embedded run
|
||||
|
||||
Results are in the m2alfresco forge project here
|
||||
|
||||
http://forge.alfresco.com/projects/m2alfresco/,
|
||||
|
||||
and the documentation site with the zero conf command to run are here:
|
||||
|
||||
http://repository.sourcesense.com/maven ... ype-1.0.0/.
|
||||
|
||||
|
||||
Now the geek part ;)
|
||||
|
||||
I used almost your same convention, but you can have a look at the public repo with only community artifacts available (for obvious redistribution rules):
|
||||
http://repository.sourcesense.com/maven2/alfresco/
|
||||
|
||||
Basically the war build overlays the extension to the alfresco WAR dependency (that brings already all the dependencies inside WEB-INF/lib, so no real pom.xml for it). All the other dependencies are directly set by the extension pom.xml with scope="provided" so that they don't get included again in the overlay phase.
|
||||
I agree that a an Alfresco pom is the most correct approach but I want to have it released by Alfresco itself in order to have the support and all the stuff for my clients.
|
||||
|
||||
Maybe you can join the project in the forge and contribute all the (advanced ;) pom studies you've done here in the main pom of the archetype.
|
||||
|
||||
Every feedback would be really appreciated.
|
||||
|
||||
Ciao!
|
||||
|
||||
Gabriele
|
||||
|
||||
|
||||
PS:
|
||||
BTW, sources are still in Sourcesense private repos but I'm going to move to the forge soon. Sources are available anyways in the maven repo http://repository.sourcesense.com/maven ... archetype/ and in the forge http://forge.alfresco.com/frs/?group_id=90.
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user