Compare commits

...

96 Commits

Author SHA1 Message Date
mindthegab
09fefd9034 [maven-release-plugin] prepare release alfresco-sdk-aggregator-2.0.0-beta-4 2014-09-09 02:42:51 -04:00
mindthegab
8fe1d265f8 -- fixed broken run.sh re-releasing 2014-09-09 02:34:08 -04:00
mindthegab
4489f44636 -- fixed minor typo in run.sh in amp archetype. re-releasing a beta-4
-- attempted (and failed) to fix run.sh permissions in the archetype
2014-09-09 02:32:17 -04:00
mindthegab
077ff66198 [maven-release-plugin] prepare for next development iteration 2014-09-09 00:51:30 -04:00
mindthegab
6c8a4580d5 [maven-release-plugin] prepare release alfresco-sdk-aggregator-2.0.0-beta-3 2014-09-09 00:51:26 -04:00
mindthegab
27dd99b809 -- minor docs fixes 2014-09-09 00:35:14 -04:00
mindthegab
2d6eec000d -- updated docs and readme for beta-3 release
-- updated all in one index page and referneces from docs
-- added initial docs on run.sh
-- linked to teaser video
2014-09-09 00:20:37 -04:00
mindthegab
dd270a3ca8 added reference to Enterprise Portal 2014-09-08 21:16:27 -04:00
mindthegab
561aa10ff7 fixes issue #200
fixes issue #213

- refactored solr pom to properly be a WAR project (no more POM)
- removed ANTRUN for good. using maven-war-plugin to pacakge a proper
solr customized war
- added packaging of the -config.zip customized artifact for solr
- updated archetypes to include the new files
- updated runner configuration to run also solr as webapp
- added root webapp with index.html so that opening localhost:8080
points easily to the installed webapps
- aded context for solr
- fixed Solr INFO logging by adding delegate=false in the
context-solr.xml so that slf4j is NOT duplicated
- minor naming updates
2014-09-08 20:31:43 -04:00
mindthegab
65414648c8 -- fixes to the previous commit, tested on aio 2014-09-06 13:42:39 -04:00
mindthegab
dad090fc73 -- issue #214
- Refining pull request #209 to only make default use of spring loaded
in run.sh and automatically download it
- added -Psetup profile (and documented) to automatically download
springloaded in the initialize phase 
- embedded conditional call to download springloaded (if lib doesn't
exist already) in the run.sh scripts
- added run.sh scripts in each archetype
- Refined naming

- fixes issue #196
- removed double declaration of the alfresco-maven-plugin
2014-09-06 12:09:21 -04:00
mindthegab
ec26fef087 Merge pull request #209 from bhagyas/master
Bringing in consistency across docs and project naming
2014-09-03 00:17:18 -04:00
mindthegab
7ad13ab5ca More fixed for issue #197 2014-08-29 19:06:47 -04:00
mindthegab
6a770b9c3f Fix for issue #197 2014-08-29 19:04:31 -04:00
mindthegab
6f1672b481 More fixes for issue #194 2014-08-29 19:02:12 -04:00
mindthegab
b4da819901 Merge branch 'master' of https://github.com/Alfresco/alfresco-sdk 2014-08-29 19:00:06 -04:00
mindthegab
7871162941 added documentation for new profiles 2014-08-29 14:12:59 -04:00
mindthegab
97f7a04704 fixes issue #211 - added defensive measure for when people do not mvn
clean between builds
2014-08-29 14:01:23 -04:00
mindthegab
1020ea3e2b Merge pull request #212 from Alfresco/atv-integration
Atv integration + RM archetype
2014-08-29 13:54:49 -04:00
mindthegab
701c3e87d4 completed rm integration 2014-08-29 13:51:11 -04:00
mindthegab
9b712d83e2 2nd pass on issue #188 2014-08-29 10:30:04 -04:00
mindthegab
4a6c98d2a4 first pass at issue #194 - integrated -Prm profile 2014-08-29 10:28:27 -04:00
mindthegab
2718581d23 archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/pom.xml 2014-08-29 10:27:44 -04:00
mindthegab
11a75c823a - fixed issue #210 2014-08-29 10:26:12 -04:00
bhagya_silva
53547a4d8b Fixed typo 2014-08-28 16:03:26 +02:00
bhagya_silva
148dff92ed Merge remote-tracking branch 'origin-origin/master' 2014-08-28 15:58:03 +02:00
bhagya_silva
6fb92cf40b Updated read me 2014-08-28 15:50:48 +02:00
bhagya_silva
90e8f95197 Fixed SDK Naming Across all projects 2014-08-28 15:41:13 +02:00
bhagya_silva
d2fbf381e5 Changed Docs to Documentation 2014-08-28 15:34:03 +02:00
bhagya_silva
da5ffcf2a6 No more Alfresco Maven SDK, just Alfresco SDK. 2014-08-28 15:09:49 +02:00
bhagya_silva
52aac9ab2b Better naming for SDK Modules 2014-08-28 14:45:44 +02:00
bhagya_silva
a7b553866f Updated naming of the archetypes 2014-08-28 14:41:58 +02:00
bhagya_silva
d2517be6a1 Added Alfresco Share as a provided dependency with classes modifier 2014-08-28 14:41:00 +02:00
bhagya_silva
9aacf6064c Removed JVM options for Alfresco Share Build 2014-08-28 14:36:50 +02:00
bhagya_silva
13a384c437 Added bash scripts for ease of use when running from command line. 2014-08-28 14:32:51 +02:00
mindthegab
15f2aa1c85 [maven-release-plugin] prepare for next development iteration 2014-08-27 01:33:44 -04:00
mindthegab
2c880f6619 [maven-release-plugin] prepare release alfresco-sdk-aggregator-2.0.0-beta-2 2014-08-27 01:33:41 -04:00
mindthegab
495820dbc1 first take at intgration of the ATV. Getting 'Divide by Zero' exception so stopping for now 2014-08-27 01:09:40 -04:00
mindthegab
a4f932de0c - removed unused imports 2014-08-25 17:53:39 -04:00
mindthegab
5e6c04700d - removed duplicated junit declaration 2014-08-25 17:48:19 -04:00
mindthegab
8070c7c5e2 Fixed m2e version range (which prevented usage on 2.0.0-beta-1) 2014-08-25 11:46:34 -04:00
mindthegab
879f02b534 Minor site fixes 2014-08-24 08:02:11 -04:00
mindthegab
cccf604bb2 Complete issue #164.
- Added plugin configuration to meet Maven central deployment
requirements (attach src, javadocs, sign artifacts)
- Added KEYS file with for devs to add their PGP key export. Added key
used for releasing / signing.
2014-08-23 12:04:14 -04:00
mindthegab
10eef5a821 [maven-release-plugin] prepare for next development iteration 2014-08-22 19:59:22 -04:00
mindthegab
661982b7bb [maven-release-plugin] prepare release alfresco-sdk-aggregator-2.0.0-beta-1 2014-08-22 19:59:19 -04:00
mindthegab
292a90ac3a - bumped maven-release-plugin version 2014-08-22 19:45:26 -04:00
mindthegab
c625cccd3b - changed artifactId for the aggregator, lifecycle is obsolete
- updated reference to documentation location for 1.x (keeping from
duplication)
- Updted readme with new site url
2014-08-22 19:08:57 -04:00
mindthegab
fd8708c2f3 -- Updated changes plugin to work with Github issues management
-- updated team list, added Ole
-- updated readme.md
2014-08-22 18:47:20 -04:00
mindthegab
d367cf4a00 Fixed issue #164 (deployment to Maven Central).
Deployed the first snapshot.

Updated documentation getting ready for beta-1.

Removed jetty references.

Added docs for the share-amp-archetype
2014-08-22 16:07:17 -04:00
mindthegab
e354786112 fixed issue #208, updated archetype metadata to include any file type
under src/main/amp
2014-08-21 08:55:21 -04:00
mindthegab
ccdd59657f Closed issue #197 and initial support for issue #193.
- Completed migration of the all in one to the new rad spring loaded +
tomcat7 based approach. Tested successfully hot reload of classpath and
webapp resources
- added share amp in the all in one
- added sample webscript (and webscript folder) across all amp project
so that on the fly adding of webscript works 
- -Prun profile now allows rapid development of the share amp and
alfresco amp running with MAVEN_OPTS="-Xms1024m -Xmx2048m
-XX:PermSize=1024m -javaagent:/path/to/springloaded-1.2.0.RELEASE.jar
-noverify" mvn clean install -Prun
- tested and added support for META-INF/resources loading (and hot
reloading using the tomcat7 jar scanner)
- discouraged war overlay by making repo and share pure aggregator
- renamed projects
- removed faces-config-custom.xml (no more explorer stuff)
- updated solr log4j configuration
- fully tested in Eclipse
2014-08-21 02:01:21 -04:00
mindthegab
760d970240 - improved approach for issue 197 (especially for IDEA, Ole you are
welcome :)
- reduced usage of copy-resources where possible to maximize idea
compatibility
- reduced duplication of amp resources in the classpath
- tested in eclipse and all seems to work (test, remote junit test,
amp-to-war, hot java reload with spring loaded, new webscript hot
loaded, jsp change)
2014-08-15 17:15:41 -04:00
mindthegab
3f44c3be58 issue #197 - fixed remote Junit runner 2014-08-06 10:35:08 -04:00
mindthegab
b55d13b0d0 Issue #197:
- enabled rad functionalities on share archetype
- added basic Ole's sample for Aikau widget 
- added new configuration property to the AmpMojo to allow NOT including
/web resources in the AMP. This allows the -Pamp-to-war profile to
exclude /web from AMP packaging and load directly web resources from the
virtualWebapp Resources tag in context.xml (differently from Loader, if
you have web resources twice, the webapp one takes precedence)
- configured and tested amp-to-war to reload share web resources
- added
src/test/resources/alfresco/web-extension/share-config-custom.xml to
enable dev mode just in test
2014-08-06 01:45:32 -04:00
mindthegab
a37e89f34b removed tabs introduced by Eclipse.
Added m2e configuration so import in Eclipse is error-free.
2014-08-05 23:23:26 -04:00
mindthegab
351a81f4f0 Issue #197 - Enabled spring-loaded RAD ide friendly integration features
for repo amp archetype. Removed dead amp-to-war code.

Consolidated in amp-to-war:
- installation of the AMP
- rapid development / ide integration (searchVirtualFirst)
- tested junit-remote with spring-loaded (works like a charm)

Removed rad profile and created a (legacy) Jrebel profile to just create
the Jrebel files (unneeded when using Spring-loaded)

Tested:
- mvn test
- mvn integration-test -Pamp-to-war
- reloading of classes / webapp resources / unit tests
- remote unit test running

Run your build with MAVEN_OPTS="-Xms1024m -Xmx2048m -XX:PermSize=1024m
-javaagent:/path/to/springloaded/springloaded-1.2.0.RELEASE.jar" mvn
clean install -Pamp-to-war
2014-08-05 23:15:30 -04:00
mindthegab
addad0866f updated .gitignore 2014-08-05 23:07:49 -04:00
Ole Hejlskov
ba31887533 Remove version, leave that to the parent pom, as discussed on issue #70 2014-07-31 16:21:53 +02:00
Maurizio Pillitu
f7731c25c0 Fixes issue #176. added empty folders for web/js web/themes and web/components 2014-07-25 13:05:14 +02:00
Maurizio Pillitu
3028567d0f Fixed issue #195. Replaced all 5.0.a-SNAPSHOT with 5.0.a 2014-07-25 12:36:22 +02:00
Maurizio Pillitu
ba7714fccc added ignores for logs and IntelliJ Idea 2014-07-25 12:30:25 +02:00
Ole Hejlskov
e5a8e944d5 Test push permissions 2014-07-21 17:13:37 +02:00
mindthegab
d16c7572a5 completes issue #189 - updated scm references 2014-07-20 16:50:24 -04:00
mindthegab
e841f8039a added license and support info 2014-07-20 13:05:14 -04:00
mindthegab
80b914ba3d added reference to alfresco artifacts repo 2014-07-20 12:39:33 -04:00
mindthegab
0c879938b2 added reference to alfresco-sdk-samples 2014-07-20 12:32:36 -04:00
mindthegab
1d6be1d5b0 added logo 2014-07-20 12:23:20 -04:00
mindthegab
23ffd5fa9d added logo 2014-07-20 12:22:49 -04:00
mindthegab
75ad7f1d40 logo file 2014-07-20 12:22:08 -04:00
mindthegab
d99773c1f4 added logo 2014-07-20 12:21:40 -04:00
mindthegab
c537eb438f added additional resources 2014-07-20 11:57:22 -04:00
mindthegab
d095094ff4 added minimal readme with external references before publishing 2014-07-20 11:42:54 -04:00
mindthegab
3adbf119f8 removed obsolete files 2014-07-20 11:19:24 -04:00
mindthegab
a1ca398736 removed obsolete files 2014-07-20 11:18:02 -04:00
mindthegab
0f5e234d2b Initial Merge branch 'master' of https://github.com/Alfresco/alfresco-sdk 2014-07-20 09:42:19 -04:00
mindthegab
c27b75f819 fixed issue #159 - cleanp of enterprise reference and general naming alignment. pointed to official docs where available
git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/trunk@746 04253f4f-3451-0410-a141-5562f1e59037
2014-07-18 00:00:38 +00:00
mindthegab
4dadee2e76 updating used plugin version, version-maven-plugin missed that
git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/trunk@745 04253f4f-3451-0410-a141-5562f1e59037
2014-07-17 21:40:19 +00:00
mindthegab
4c21e6f8cf Initial commit 2014-07-17 14:42:00 -04:00
mindthegab
9e4dd2b84f bumped version to 2.0.0-SNAPSHOT to create fresh snapshots and work on the 2.x release
git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/trunk@744 04253f4f-3451-0410-a141-5562f1e59037
2014-07-17 17:36:26 +00:00
maoo
047c05032c issue #108 fixed; removed outdated README and ROADMAP txt
git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/trunk@743 04253f4f-3451-0410-a141-5562f1e59037
2014-07-03 10:00:59 +00:00
ohej
61b61ccbb6 Initial Share AMP archetype
git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/trunk@742 04253f4f-3451-0410-a141-5562f1e59037
2014-06-22 14:25:58 +00:00
slanglois
2513926a09 Fix type of alfresco-solr config artifact, which is now a zip.
Housekeeping in all-in-one archetype to remove Maven warnings


git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/trunk@741 04253f4f-3451-0410-a141-5562f1e59037
2014-06-18 10:26:05 +00:00
slanglois
9e051bf382 Issue #187: bump Alfresco version to 5.0.a-SNAPSHOT
git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/trunk@740 04253f4f-3451-0410-a141-5562f1e59037
2014-06-17 17:34:40 +00:00
mindthegab
dfa0937cd5 -- upgraded junit version
-- consolidated in parent pom version and scope

git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/trunk@739 04253f4f-3451-0410-a141-5562f1e59037
2014-06-17 09:44:22 +00:00
ohej
a9e8bde3a2 Re-added Gab's commit from r736
git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/trunk@738 04253f4f-3451-0410-a141-5562f1e59037
2014-06-16 21:12:43 +00:00
ohej
5c56d668e2 Bump to 4.3.0-SNAPSHOT
- Fix Solr re-packaging for all-in-one
 - Remove config artifacts
 - Initial Share AMP archetype 


git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/trunk@737 04253f4f-3451-0410-a141-5562f1e59037
2014-06-16 21:09:16 +00:00
mindthegab
c814ca2b18 test
git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/trunk@736 04253f4f-3451-0410-a141-5562f1e59037
2014-06-10 13:01:57 +00:00
maoo
49f3014c5e issue #175 - Reverted archetype-metadata.xml to previous version; the real issue was caused by a wrong mention (in the all-in-one archetype) of a property (alfresco_target_amp_client_war) that is not needed.
The amp module now has alfresco.client.war=alfresco hardcoded in the pom.xml

git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/trunk@735 04253f4f-3451-0410-a141-5562f1e59037
2014-01-09 20:37:07 +00:00
maoo
66d30c9841 fixed issue #175
git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/trunk@734 04253f4f-3451-0410-a141-5562f1e59037
2014-01-09 19:54:53 +00:00
bulat.yaminov@gmail.com
89519f33aa issue #153: added more nonFilteredFileExtensions
git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/trunk@733 04253f4f-3451-0410-a141-5562f1e59037
2013-11-17 15:53:41 +00:00
mindthegab
2461827c0d fixes issue #150. Axis logging exception not thrown anymore at startup
git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/trunk@732 04253f4f-3451-0410-a141-5562f1e59037
2013-11-17 14:53:43 +00:00
mindthegab
14727c05cf [maven-release-plugin] prepare for next development iteration
git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/trunk@731 04253f4f-3451-0410-a141-5562f1e59037
2013-11-13 19:57:48 +00:00
mindthegab
6b7c68ed22 [maven-release-plugin] prepare release alfresco-lifecycle-aggregator-1.1.1
git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/trunk@729 04253f4f-3451-0410-a141-5562f1e59037
2013-11-13 19:57:39 +00:00
mindthegab
aa48517e04 fixed java 1.7 version, needed for alfresco 4.2
git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/trunk@728 04253f4f-3451-0410-a141-5562f1e59037
2013-11-13 19:46:42 +00:00
slanglois
7ae88244ff Increase a few Maven plugins + fix Maven warnings
git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/trunk@727 04253f4f-3451-0410-a141-5562f1e59037
2013-11-06 12:42:18 +00:00
mindthegab
bdd82bfa97 [maven-release-plugin] prepare for next development iteration
git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/trunk@726 04253f4f-3451-0410-a141-5562f1e59037
2013-11-06 03:06:14 +00:00
146 changed files with 4707 additions and 1844 deletions

14
.gitignore vendored Normal file
View File

@@ -0,0 +1,14 @@
**.idea
**.classpath
**.project
**.ipr
**.iml
**.log
**.log*
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.next
release.properties
**.settings
**bin

252
DOCS.txt
View File

@@ -1,252 +0,0 @@
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>

89
KEYS Normal file
View File

@@ -0,0 +1,89 @@
This file contains the PGP keys of various developers.
Users: pgp < KEYS
gpg --import KEYS
Developers:
gpg --list-key <your email> and append it to this file.
gpg -a --export <your email> and append it to this file.
(gpg --list-key <your email>
&& gpg --armor --export <your email>) >> this file.
pub 4096R/6FE5701E 2012-03-25
uid Gabriele Columbro (VALID CODE SIGNING KEY) <gabriele@apache.org>
sub 4096R/E97059F3 2012-03-25
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.10 (GNU/Linux)
mQINBE9u680BEADFHOMCFOnPeuSNLJw+KiKVFm9Waa9oWMxKpYhCP4bDA0sH85/W
ZKJDaPR+2p5JAoB0y3ZfxHfmhoLZRmLgP1oSJBfB2VgdbG1My4Oshd/h8Tr5pAJj
bulvC5urWcYD9eYNFVJtG28l7epnjx0NglA6WBk9Bx5+XGSLvxaQkCu6S7D9V+cw
2nJqZia7ul/J5xjGWy5aBZubwj1UT2YhZwxEmSjlBo0jrf8y4YScCz2VXJVs33p1
CHQESCuBRZ0dK2kCmRaU+2bhJy9+nFstHYVAygwbQ8Km4sqSpcjEAZTpKK/lspbH
c7TcZcFujLCCoHuAh4k0I/Qp3My0QqUpmdwsWQdbknP4MkQJlYB5GxnJnFzsA1Hg
fJwOa23b1lFNhZSdmY9NSM+2Ihg1XB4pb4Z0+uqLMAVR8owpuaJ329W+LJJutQyC
87Kc1KH4He8KuENGhQT16+NJlUFrRSYaST9NB9RbFURc1eUMgHHXjcJp9sny2YPY
bq89W0HtHSNH0My/akK47qcX1ddKGE8PTVdS5kDhS+w75f9Lf+gyV5HflzZSaaSQ
+rD/WZ8uTeQKNSYvupdv63i1FIOJd1Ip0C8fj/STwWdDRvq5UwiHsiGgw30WCNAy
VQ+OPJ+7DNm4pJEkcxno+WeTbCpZGysvFjouDPig/+a69IMPEYE2xQuz7wARAQAB
tEBHYWJyaWVsZSBDb2x1bWJybyAoVkFMSUQgQ09ERSBTSUdOSU5HIEtFWSkgPGdh
YnJpZWxlQGFwYWNoZS5vcmc+iQI4BBMBAgAiBQJPbuvNAhsDBgsJCAcDAgYVCAIJ
CgsEFgIDAQIeAQIXgAAKCRA1c7pOb+VwHnTxD/0V9Fnn7pjVWYkUi/62xh4DXfMO
urvsafeH5JXE3a6e856sFg8AV/w2ceJYqzZ5l46GkF/B9buParLQmnXTni/ClokU
IeRM/Faj964DXZRAdTiu06VnGxzTN5Dpo1rr/wccjamq/B19ta7xW+z+zfY9jby3
UUHkIV0itVIRZ3K3Tc7tssmj4ATkwvHlXWQo89cQcoTpBrJyClRsSWPQgefws38P
6J+PXUqBuw5JDH6WhOvovkWBZt0ryduCjHNat7JYYjLBzPX//rMj8c9xytFHCxaq
JUvS9BAdW5UE3mG8OBkvRhNqvPLrKUch9ETiYWetWf3trRUDQhHhngN/t9a7pVDx
vsP63fozPD58LK7Ete05emukYg18xGGhRixu10KgwbuAqJD2t6GUd2gjJBI/5Qua
99ImffhLoLNuv6w2XE2ePPkMLBOh4SdzOHJ23ffO8IDRG8yfQD9yT1dC+aHEKd6D
OA/pJGcjoXUubtoa0ARKL30gx6d4xXeiaRKHUP/tLHx5nxctGOPNYgwz4j4VyaR/
KNpFU3bZPR0NWAKNcjTO2MT4ZzBMOidWJjWM3D29ZYa23Lwxea7hpswL2PQgHthu
jqArjrBTuMLmUw/L4kGQDfOfrasBoYTHKK3J2WejczgaNmEd2Rd7LjJGJZBGdcBu
l98PjbR9xLxkm3ql0okEHAQQAQIABgUCT3l9MAAKCRCKr4jW2E5BrgLBIACvfl3Z
cgPoZy/SRLF6FojxgwzX7/3t45jZnQXxWvnuEb6cFjyXU+y3i/9x9yRs8B2EeW3v
uSEa8lsUo/QN08almF+QOzNMof+RGhHsPanlm8dW5iibdWfP+GsL0S5Mo6GhaFZW
SQUfYWsuqUGBmLp9aH3uMTkCvjq2iNZ0UoTm8ZQ+iJnNhfE2iMkH6U6WBEAr9PID
uFLVy2uw2kKKdPVpRntQuOyUKuCQC1ydN2kH/I01TwonFepBCjdEMtaW9tTZNJ5A
Z8nKOlXOX+zo1HNEiD6hGAqn2ZqotnzFKrx4AwhDb4Wt3N2Nc9YBM7noxlKQuPby
Pa9ydXmtIrRHjAHJeL0dY2BFfRb5zeUuiuz+zOY186LDCaH+txjPeudKxDv7uyNu
5XNAbRUQj06ZxhtPT/xvzpIcxuqOzAh/znZXM3RnOB6Wj3p4jXC/neEJwKL/yuEo
bZvIa/dnU5tI7uVhfrK3SKdi4Q+oQgYvTmy/mrISJB9p2npJAr+mrq7XpwZD77HT
ZxYMZKjY6aQ8KoTgR48JXKylxuEGidZJduVLGsHH3mF2YcENgKcPQCOI+uSHP432
Tt/7ARsbYV9lF+9XDn75UAQrOjlbhs/ovOlzhx+BAbmszZADwRbMB+CQl2N4ds3l
LhtkbqAfs2bjauw9NnSmNAhxFdnCmBnN96+GysfQOnxhUI6LT+S8S6bWsTinq1Xa
d7lXhGtyD1LtDpdzynLjQgis6v+45IvYUa6zoOkTunhM2A0jsZhmjk9ZpZHywyZF
K5nNZQy6Q6L5OmW1XNnxtob02d4sotNoAEYvrPo3QLDsL4UI3Z1DnrvW8K4DQBj7
4EkANks7o70pxYdMElhYy4rJ5rt25004jeYztuwE885T5CSHN+0aPdjkP5rZSkuU
90j7hOT2qDkFf/H81RZufDdgyVKzLRkAYKiSrZaqAXcqBEOMq6rYMitkgEP07FOP
6eFBImRpz0OINGz3hrVCNHbxng/TWke3wi05DBRcJIhNWu8P2QXdDaAEBORFunAT
NISbdt4/5p5DYOdxe9wlUECKdE2zDG++JTat30lsNfZi183QOQfGCd770kFrGcMY
DvpyUVT8BZqS9TSsS97Zhg6boRU9Etb8MORYJ2cGdXwjrUerFBmHebSmSZPKTMKF
rznEiwroUQQsIoTzbnd88KlgqbwCazGM2LfI0svONvNXbu7B7iKkcNU9M2LpRZu3
n5t7v/Nfilc3YssRNi5nFWQarmqP2qTkyr434OeFSuzO9yz5/BGPcWbvkBzWExMS
6854rMPAFh3g6YdyJnhjf9TaNNlMH9xKQgsL5C9Q4YGSGU9oklhSq3W5FSxT97E0
NhwVmN+yElh3FBswuQINBE9u680BEAC8CvXUxbns4X8dvxEcgb8ReDGTa2vVij0U
kBqDyHq1Yta1e6Qm34fNizcds/avbmBB8q8dTNMR1Ka4aPukc+M+oGOY4aKgQNCW
YfrdBVAdVZ9RCyZC9Jy3XlPoSBokLGxz4J212OdWTOzQTzIEfsVzAQmxGmnqv5yP
R+PKLGZvyRpwAjz12K4yZmztOte8mi/pQtKXzB45LggbHh39iO1nG6EKQLWyyoA2
olF9Eb+yHdZQOpLCLnqc7FS3Cbz80SVqGS5miU3CSp7GTBEA1wualxKvNNiPO2p2
MMnjMVcxZx1k3d4C7+uMGvtZiTqa7tmWODz1dfwolfYQ/E4TcxG2vzKatE07JG7X
3vVmfR2Bjb2ITN8Kj1ZdVeQkHgJvRx8B6glFQhv6lso5XUuoWt5Gm66wCyirjCDn
OLJKk6YkdSop8EweAy675VFoq3LSASyep72jrgT3AMf8U0nAgZSrwLMjBjSVzIRs
FNv30iCBXYy/bmSyfMEphjttKCYHnNjZS8fD+ka1zzXnOXglWNtDGDOdJ5zaIymW
R4FZlrQMjs4y564WMHJWG9exncSPHNPLLieGAng4oJjAXR92GgrTZQAcghTRGBOn
rRYzv9ob6n2wgnA8wR+Wmy0xcmF44xNht3mfD1qTO0P2Fdhdm4ZvXQBII0tXkwMl
OJ/BR732xQARAQABiQIfBBgBAgAJBQJPbuvNAhsMAAoJEDVzuk5v5XAeTZQP/2g9
1KOS1pia2gAOmFbuu0ep1THRxuLydcn6C306YmnL2l+o5z0YE4nPYiD9rd+PkWFm
0itE2WBBZkEloesUcjX/xsw7t6pdzd3W6nu1LXPcppOeHAc1ofrRWqKSmfD5k2lB
8dzuRKltU6b829wcDi0HlL+dP8G9pcJXz2cMs09QchOdvm/hQam9SHFwx9IDJvrt
nHB4kLfUTJ0Fs4FjtT+nfozXE+wXd23+HyNVQPX3rTO5IR4DOTDNSZ+vxqkE0BeF
6M4dDvMADBEgkEwpsRzioEp75biw5bq8YsDvYNGpyJOFt46bRWjrzOcUsIXMy4eQ
uTk/flFQs3ukw7q7DvSBVRokfjFHWr3FZC30xyRijJImW4F1Xqa3HphC3+4fSQjx
w652pOx0aZlBHtVByYBLYcrCGcJ8p6ijpPX60ur3a8ebdUHND912+mIGiQzhkHiK
VBvvfOrbWzcNwbxAsNncAfjr/3adPAjbyMH10+e+sNhLMJuYYgP8pVhp8BTKFJF9
hrGAueS2lH5DUpjZPqClR+txnAK+hVCuFogoWsdsbRHMLkqKqhnQjWnvRrU0ud9j
ytG/XwLK3RL7LTmPIC9RqlO1U1A3h5Ykw2INH/bB90lBxmydmp/PHpkhjEAEvzGW
r+ipOwsWpF6kLIHUT2LuPxLqTGQCrqYtJyTp61tE
=GUM9
-----END PGP PUBLIC KEY BLOCK-----

201
LICENSE Normal file
View File

@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright {yyyy} {name of copyright owner}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

57
README.md Normal file
View File

@@ -0,0 +1,57 @@
# [![Maven Alfresco SDK logo](https://github.com/Alfresco/alfresco-sdk/raw/master/src/site/resources/img/alfresco-maven-logo.jpg)](#features) Maven Alfresco SDK
Maven Alfresco SDK for Alfresco Development and Customizations based on Apache Maven.
Includes support for rapid and standard development, testing, packaging, versioning and release of your Alfresco integration and extension projects. For a teaser of the SDK potential check out this video:
[![Alfresco SDK 2.x teaser](http://img.youtube.com/vi/vgbY9i4w0YU/0.jpg)](https://www.youtube.com/watch?v=vgbY9i4w0YU)
The SDK is composed of:
- An [SDK Parent POM](https://artifacts.alfresco.com/nexus/content/groups/public/alfresco-lifecycle-aggregator/latest/poms/alfresco-sdk-parent/index.html) which you can use in your projects to enable rapid Alfresco development features
- An [Alfresco Platform Distribution POM](https://artifacts.alfresco.com/nexus/content/groups/public/alfresco-platform-distribution/latest/index.html) which pre-configures versions of Alfresco and common 3rd party dependency libraries, for stability purposes
- A [Maven Alfresco Plugin](https://artifacts.alfresco.com/nexus/content/groups/public/alfresco-lifecycle-aggregator/latest/plugins/alfresco-maven-plugin/index.html) which provides AMP packaging and installation facilities (a la MMT) and other common goals for Alfresco development
- A number of *Maven Archetypes* (sample projects) including:
1. [Alfresco Repository AMP Archetype](https://artifacts.alfresco.com/nexus/content/groups/public/alfresco-lifecycle-aggregator/latest/archetypes/alfresco-amp-archetype/index.html)
2. [Alfresco Share AMP Archetype](https://artifacts.alfresco.com/nexus/content/groups/public/alfresco-lifecycle-aggregator/latest/archetypes/share-amp-archetype/index.html)
3. [Alfresco All-in-One Archetype](https://artifacts.alfresco.com/nexus/content/groups/public/alfresco-lifecycle-aggregator/latest/archetypes/alfresco-allinone-archetype/index.html)
## Resources
### Developer Documentation
**SDK 2.x**: Full documentation is available at the [Maven Alfresco SDK site](https://artifacts.alfresco.com/nexus/content/groups/public/alfresco-sdk-aggregator/latest/index.html).
### Alfresco Official Documentation
Additional documentation for Alfresco Community and Enterprise, tutorials and examples is available in the [Alfresco Documentation](http://docs.alfresco.com/4.2/concepts/dev-extensions-maven-sdk-intro.html).
### Samples
Advanced sample projects are maintained by @ohej in the [Maven Alfresco SDK Samples project](https://github.com/Alfresco/alfresco-sdk-samples/).
### Contribute
Report issues (and contribute!) [here](https://github.com/Alfresco/alfresco-sdk/issues?milestone=1&state=open). You can also join the [Alfresco list on Google Groups](https://groups.google.com/forum/#!forum/maven-alfresco).
## Maven Repositories
The Maven Alfresco SDK is released in Maven Central as of version 2.0-beta-1.
Alfresco (Community and Enterprise) artifacts are instead hosted in the [Alfresco Artifacts Repository](https://artifacts.alfresco.com/nexus/).
Alfresco Community artifacts (JARs, WARs, AMPs, poms) and SDK artifacts are publicly available.
for Enterprise and Premiere licensed software access you need to get credential via the Alfresco Enterprise Support. See [public docs](http://docs.alfresco.com/4.2/concepts/dev-extensions-maven-sdk-tutorials-alfresco-enterprise.html) or [this KB (login required)](https://myalfresco.force.com/support/articles/en_US/Technical_Article/Where-can-I-find-the-repository-for-Enterprise-Maven-artifacts) for more details.
## License and Support
This project is released under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html). It's a community driven project which is supported for Alfresco Development (please refere to the official [Alfresco Documentation](http://docs.alfresco.com/4.2/concepts/dev-extensions-maven-sdk-intro.html) for supported features.
## News
- 2014-09-09: SDK 2.0.0-beta-3 released to Maven Central
- 2014-08-30: SDK 2.0.0-beta-1 and 2.0.0-beta-2 available in [Maven Central](http://search.maven.org/#search|ga|1|org.alfresco.maven)
- 2014-08-22: First SNAPSHOT of SDK 2.0.0 in the [OSS Sonatype Repository](https://oss.sonatype.org/content/repositories/snapshots/org/alfresco/maven/alfresco-sdk-parent/2.0.0-SNAPSHOT/)!
- 2014-07: Project fully migrated from [Google Code](https://code.google.com/p/maven-alfresco-archetypes), including tags, branches, issues. Allow a little time for a full cleanup of issue labels and to sort repository permissions. Please update obsolete references and bear with us as we update Alfresco Documentation to this change.

View File

@@ -1,199 +0,0 @@
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>
---

View File

@@ -1,42 +0,0 @@
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

View File

@@ -5,13 +5,13 @@
<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>
<name>Maven Alfresco SDK - All-in-One Archetype</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>
<artifactId>alfresco-sdk-aggregator</artifactId>
<version>2.0.0-beta-4</version>
<relativePath>../../pom.xml</relativePath>
</parent>
@@ -21,6 +21,7 @@
<directory>src/main/resources</directory>
<includes>
<include>archetype-resources/pom.xml</include>
<include>archetype-resources/run.sh</include>
</includes>
<filtering>true</filtering>
</resource>
@@ -28,6 +29,7 @@
<directory>src/main/resources</directory>
<excludes>
<exclude>archetype-resources/pom.xml</exclude>
<exclude>archetype-resources/run.sh</exclude>
</excludes>
<filtering>false</filtering>
</resource>
@@ -35,6 +37,7 @@
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<configuration>
<useDefaultDelimiters>false</useDefaultDelimiters>
<delimiters>

View File

@@ -10,14 +10,14 @@
<defaultValue>org.alfresco</defaultValue>
</requiredProperty>
<requiredProperty key="alfresco_target_version">
<defaultValue>4.2.e</defaultValue>
<defaultValue>5.0.a</defaultValue>
</requiredProperty>
<requiredProperty key="package">
<defaultValue>(not used)</defaultValue>
</requiredProperty>
</requiredProperties>
<modules>
<module id="amp" dir="amp" name="amp">
<module id="repo-amp" dir="repo-amp" name="repo-amp">
<fileSets>
<fileSet filtered="false" packaged="false" encoding="UTF-8">
<directory>src/main/java</directory>
@@ -31,6 +31,9 @@
<include>**</include>
</includes>
</fileSet>
<fileSet encoding="UTF-8" filtered="false">
<directory>src/main/amp/config/alfresco/extension/templates/webscripts</directory>
</fileSet>
<fileSet encoding="UTF-8" filtered="false">
<directory>src/test/resources</directory>
<includes>
@@ -51,14 +54,49 @@
</fileSet>
</fileSets>
</module>
<module id="alfresco" dir="alfresco" name="alfresco">
<module id="share-amp" dir="share-amp" name="share-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/webapp</directory>
<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/main/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="repo" dir="repo" name="repo">
<fileSets>
<fileSet encoding="UTF-8" filtered="false">
<directory>src/main/properties</directory>
<includes>
@@ -73,6 +111,7 @@
</fileSet>
</fileSets>
</module>
<module id="solr" dir="solr" name="solr" filtered="false">
<fileSets>
<fileSet encoding="UTF-8">
@@ -88,6 +127,12 @@
<include>**</include>
</includes>
</fileSet>
<fileSet encoding="UTF-8" filtered="false">
<directory>src/assembly</directory>
<includes>
<include>**</include>
</includes>
</fileSet>
<fileSet encoding="UTF-8" filtered="false">
<directory>src/main/resources</directory>
<includes>
@@ -96,14 +141,9 @@
</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>
@@ -119,6 +159,28 @@
</fileSets>
</module>
<module id="runner" dir="runner" name="runner" filtered="false">
<fileSets>
<fileSet encoding="UTF-8" filtered="false">
<directory>tomcat</directory>
<includes>
<include>**</include>
</includes>
</fileSet>
<fileSet encoding="UTF-8" filtered="false">
<directory>src/main/webapp</directory>
<includes>
<include>**</include>
</includes>
</fileSet>
</fileSets>
</module>
</modules>
<fileSets>
<fileSet encoding="UTF-8">
<directory></directory>
<includes>
<include>run.sh</include>
</includes>
</fileSet>
</fileSets>
</archetype-descriptor>

View File

@@ -1,33 +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 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>

View File

@@ -4,7 +4,7 @@
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${version}</version>
<name>Quickstart of Alfresco and Share with DB and runner embedded</name>
<name>Alfresco Repository and Share Quickstart with database and an embedded runner.</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>
@@ -14,16 +14,19 @@
<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.
<!--
| 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 -->
| Defines the groupId for the Alfresco Artifacts to work against. As of 4.2 the only allowed value is: org.alfresco
| NOTE: See http://docs.alfresco.com/4.2/concepts/dev-extensions-maven-sdk-tutorials-alfresco-enterprise.html for details
-->
<alfresco.groupId>${alfresco_target_groupId}</alfresco.groupId>
<!-- Defines the Alfresco version to work against. Allowed values are: org.alfresco | org.alfresco.enterprise -->
<!-- Defines the Alfresco version to work against.
Community versions are typically identified by major.minor.character (4.2.a) while Enterprise versions are identified by major.minor.digit (4.2.0)
-->
<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>
@@ -36,10 +39,10 @@
<!-- Here we realize the connection with the Alfresco selected platform (e.g.version and edition) -->
<dependencyManagement>
<dependencies>
<!-- This will import the dependencyManagement for all artifacts in the selected Alfresco plaftorm
(see http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Importing_Dependencies)
NOTE: You still need to define dependencies in your POM, but you can omit version as it's enforced by this dependencyManagement.
NOTE: It defaults to the latest version this SDK pom has been tested with, but alfresco version can/should be overridden in your project's pom
<!-- This will import the dependencyManagement for all artifacts in the selected Alfresco 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>
@@ -50,23 +53,29 @@
</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>
<!-- Invoke your build with -Prun to run the multimodule project and enable rapid dev mode in your IDE.
See 'run' profile in the sub modules pom.xml for further behavioral details.
-->
<profiles>
<profile>
<id>run</id>
<properties>
<!-- While running in rapid dev mode with -Prun, we don't want amp web resources
to be added to the war, so we can load them directly from the AMP project (see
runner/tomcat/context-*.xml for more details) -->
<maven.alfresco.includeWebResources>false</maven.alfresco.includeWebResources>
</properties>
</profile>
<!-- RM profile, manually activated, automatically adds support for RM development (dependencies) and install the RM amps in the WARs -->
<profile>
<id>rm</id>
<properties>
<alfresco.rm.version>2.3.a.1</alfresco.rm.version>
<app.rm.amps.location>${project.build.directory}/rm-amps</app.rm.amps.location>
<app.rm.war.location>${project.build.directory}/${project.build.finalName}.war</app.rm.war.location>
<app.rm.artifact>org.alfresco:${alfresco.rm.artifactId}:${alfresco.rm.version}:amp</app.rm.artifact>
</properties>
</profile>
</profiles>
</project>

View File

@@ -2,9 +2,9 @@
<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>
<name>Alfresco Repository AMP Module</name>
<packaging>amp</packaging>
<description>This is a sample AMP project, depended upon by the alfresco WAR module</description>
<description>This is a sample Alfresco repository AMP project, depended upon by the alfresco WAR aggregator</description>
<parent>
<groupId>${groupId}</groupId>
@@ -12,11 +12,11 @@
<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
<!--
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>
@@ -28,12 +28,21 @@
<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> -->
<alfresco.client.war>alfresco</alfresco.client.war>
</properties>
<profiles>
<!-- RM profile, manually activated, automatically adds support for RM development (dependencies) and install the RM amps in the WARs -->
<profile>
<id>rm</id>
<dependencies>
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-rm</artifactId>
<version>${alfresco.rm.version}</version>
<type>jar</type>
<classifier>classes</classifier>
</dependency>
</dependencies>
</profile>
</profiles>
</project>

View File

@@ -0,0 +1,9 @@
#!/bin/bash
# Downloads the spring-loaded lib if not existing and runs the repository AMP
springloadedfile=~/.m2/repository/org/springframework/springloaded/${springloaded.version}/springloaded-${springloaded.version}.jar
if [ ! -f $springloadedfile ]; then
mvn validate -Psetup
fi
MAVEN_OPTS="-javaagent:$springloadedfile -noverify -Xms256m -Xmx2G -XX:PermSize=300m" mvn integration-test -Prun

View File

@@ -0,0 +1,7 @@
<webscript>
<shortname>Javascript Sample Webscript</shortname>
<description>Hands back a greeting</description>
<url>/sample/helloworld</url>
<authentication>user</authentication>
<format default="html"></format>
</webscript>

View File

@@ -13,4 +13,5 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
-->
Test jsp. Change me!

View File

@@ -2,7 +2,7 @@ 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
* This is a sample taken from Maven Alfresco SDK
*
* @author Derek Hulley
*/

View File

@@ -8,7 +8,7 @@ import org.apache.commons.logging.LogFactory;
/**
* A basic component that will be started for this module.
* This is a sample taken from Alfresco SDK
* This is a sample taken from Maven Alfresco SDK
*
* @author Derek Hulley
*/

View File

@@ -0,0 +1,53 @@
<?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>
<!-- This disables javascript compilation so that webscripts can be hot reloaded -->
<bean id="javaScriptProcessor" class="org.alfresco.repo.jscript.RhinoScriptProcessor" init-method="register">
<property name="name">
<value>javascript</value>
</property>
<property name="extension">
<value>js</value>
</property>
<!-- compile javascript and cache compiled scripts -->
<property name="compile">
<value>false</value>
</property>
<!-- allow sharing of sealed scopes for performance -->
<!-- disable to give each script it's own new scope which can be extended -->
<property name="shareSealedScopes">
<value>true</value>
</property>
<property name="scriptService">
<ref bean="scriptService"/>
</property>
<!-- Creates ScriptNodes which require the ServiceRegistry -->
<property name="serviceRegistry">
<ref bean="ServiceRegistry"/>
</property>
<property name="storeUrl">
<value>${spaces.store}</value>
</property>
<property name="storePath">
<value>${spaces.company_home.childname}</value>
</property>
</bean>
</beans>

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- This file is included only when running this project with -Pamp-to-war -->
<Context docBase="${alfresco.client.war.folder}" path="${alfresco.client.contextPath}">
<Resources className="org.apache.naming.resources.VirtualDirContext"
extraResourcePaths="/=${project.build.directory}/${project.build.finalName}/web" />
<Loader searchVirtualFirst="true" className="org.apache.catalina.loader.VirtualWebappLoader"
virtualClasspath="${project.build.outputDirectory};${project.build.testOutputDirectory};${project.build.directory}/${project.build.finalName}/config" />
<!--
<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 &quot;true TRUE, false FALSE&quot;."/>
<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."/>
-->
<!-- This enables hot reloading of web resources from uncompressed jars (while in prod they would be loaded from WEB-INF/lib/{\*.jar}/META-INF/resources -->
<JarScanner scanAllDirectories="true" />
</Context>

View File

@@ -9,14 +9,14 @@
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"
<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>
<name>Alfresco Repository WAR Aggregator</name>
<packaging>war</packaging>
<description>Alfresco Repository and Explorer Client</description>
<description>Alfresco Repository aggregator, installs your repository AMPs in the Alfresco WAR for aggregation and easy deployment purposes</description>
<parent>
<groupId>${groupId}</groupId>
@@ -30,10 +30,10 @@
<artifactId>alfresco</artifactId>
<type>war</type>
</dependency>
<!-- Demonstrating the dependency on the repo AMP developed in the 'amp' module -->
<!-- Demonstrating the dependency / installation of the repo AMP developed in the 'repo-amp' module -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>amp</artifactId>
<artifactId>repo-amp</artifactId>
<version>${project.version}</version>
<type>amp</type>
</dependency>
@@ -58,7 +58,7 @@
| NOTE: First-win resource strategy is used by the WAR plugin
-->
<overlays>
<!-- Current project customizations -->
<!-- Current project customizations. This is normally empty, since customizations come from the AMPs -->
<overlay/>
<!-- The Alfresco WAR -->
<overlay>
@@ -68,10 +68,10 @@
<!-- To allow inclusion of META-INF -->
<excludes/>
</overlay>
<!-- Add / order your AMPs here -->
<!-- Add / sort your AMPs here -->
<overlay>
<groupId>${project.groupId}</groupId>
<artifactId>amp</artifactId>
<artifactId>repo-amp</artifactId>
<type>amp</type>
</overlay>
<overlay>
@@ -85,7 +85,7 @@
</plugins>
</build>
<profiles>
<!-- Overrides the run profile to disable securecomms -->
<!-- Overrides the run profile to disable securecomms and add rapid development configuration -->
<profile>
<id>run</id>
<build>
@@ -140,6 +140,60 @@
</plugin>
</plugins>
</build>
<!-- Needed to fix http://code.google.com/p/maven-alfresco-archetypes/issues/detail?id=150 -->
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.5.11</version>
</dependency>
</dependencies>
</profile>
<profile>
<id>rm</id>
<properties>
<alfresco.rm.artifactId>alfresco-rm</alfresco.rm.artifactId>
</properties>
<build>
<plugins>
<!-- Fetch Alfresco RM repo AMP -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>get-rm-repo</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifact>${app.rm.artifact}</artifact>
<outputDirectory>${app.rm.amps.location}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<!-- The current AMP artifact is installed into the Alfresco folder using alfresco-maven-plugin -->
<plugin>
<groupId>org.alfresco.maven.plugin</groupId>
<artifactId>alfresco-maven-plugin</artifactId>
<executions>
<execution>
<id>install-rm-repo</id>
<phase>package</phase>
<goals>
<goal>install</goal>
</goals>
</execution>
</executions>
<configuration>
<ampLocation>${app.rm.amps.location}</ampLocation>
<warLocation>${app.rm.war.location}</warLocation>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

View File

@@ -227,18 +227,11 @@ alfresco.rmi.services.host=0.0.0.0
# upgrading to a new version, this can be disabled.
#db.schema.update=true
# File servers related properties
# 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
cifs.enabled=false
ftp.enabled=false
ftp.port=1121
ftp.authenticator=alfresco

View File

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

View File

@@ -15,11 +15,30 @@
<profiles>
<profile>
<id>run</id>
<properties>
<solr.project.dir>${project.basedir}/../solr</solr.project.dir>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-tomcat-resources</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/contexts</outputDirectory>
<resources>
<resource>
<directory>tomcat</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
@@ -27,27 +46,36 @@
<execution>
<id>run-wars</id>
<goals>
<goal>run-war-only</goal>
<goal>run</goal>
</goals>
<phase>integration-test</phase>
<phase>pre-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>
<ignorePackaging>true</ignorePackaging>
<useSeparateTomcatClassLoader>true</useSeparateTomcatClassLoader>
<path>/</path>
<systemProperties>
<solr.solr.home>${solr.project.dir}/solr_home</solr.solr.home>
<solr.solr.home>${project.parent.basedir}/solr/solr_home</solr.solr.home>
</systemProperties>
<!-- Configures the custom Alfresco and Share to run as embedded webapps -->
<webapps>
<webapp>
<webapp>
<groupId>${project.groupId}</groupId>
<artifactId>alfresco</artifactId>
<artifactId>solr</artifactId>
<version>${project.version}</version>
<type>war</type>
<asWebapp>true</asWebapp>
<contextPath>alfresco</contextPath>
<contextPath>/solr</contextPath>
<contextFile>${project.build.directory}/contexts/context-solr.xml</contextFile>
</webapp>
<webapp>
<groupId>${project.groupId}</groupId>
<artifactId>repo</artifactId>
<version>${project.version}</version>
<type>war</type>
<asWebapp>true</asWebapp>
<contextPath>/alfresco</contextPath>
<contextFile>${project.build.directory}/contexts/context-repo.xml</contextFile>
</webapp>
<webapp>
<groupId>${project.groupId}</groupId>
@@ -55,13 +83,15 @@
<version>${project.version}</version>
<type>war</type>
<asWebapp>true</asWebapp>
<contextPath>share</contextPath>
<contextPath>/share</contextPath>
<contextFile>${project.build.directory}/contexts/context-share.xml</contextFile>
</webapp>
</webapps>
</webapps>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

View File

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

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- This context file is used only for rapid development, never installed released with the webapp -->
<Context>
<Resources className="org.apache.naming.resources.VirtualDirContext" extraResourcePaths="/=${project.parent.basedir}/repo-amp/target/repo-amp/web" />
<Loader className="org.apache.catalina.loader.VirtualWebappLoader"
searchVirtualFirst="true"
virtualClasspath="${project.parent.basedir}/repo-amp/target/classes;${project.parent.basedir}/repo-amp/target/test-classes;${project.parent.basedir}/repo-amp/target/repo-amp/config" />
<!-- This enables hot reloading of web resources from uncompressed jars (while in prod they would be loaded from WEB-INF/lib/{\*.jar}/META-INF/resources -->
<JarScanner scanAllDirectories="true" />
</Context>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- This context file is used only for rapid development, never installed released with the webapp -->
<Context docBase="../share/target/share">
<Resources className="org.apache.naming.resources.VirtualDirContext" extraResourcePaths="/=${project.parent.basedir}/share-amp/target/share-amp/web" />
<Loader className="org.apache.catalina.loader.VirtualWebappLoader"
searchVirtualFirst="true"
virtualClasspath="${project.parent.basedir}/share-amp/target/classes;${project.parent.basedir}/share-amp/target/test-classes;${project.parent.basedir}/share-amp/target/share-amp/config" />
<!-- This enables hot reloading of web resources from uncompressed jars (while in prod they would be loaded from WEB-INF/lib/{\*.jar}/META-INF/resources -->
<JarScanner scanAllDirectories="true" />
</Context>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- This context file is used only for rapid development, never installed released with the webapp -->
<Context docBase="${project.parent.basedir}/solr/target/solr">
<Loader delegate="false" className="org.apache.catalina.loader.VirtualWebappLoader"
searchVirtualFirst="true"
virtualClasspath="${project.parent.basedir}/share-amp/target/classes;${project.parent.basedir}/solr/target/test-classes;${project.parent.basedir}/solr/target/share-amp/config" />
<!-- This enables hot reloading of web resources from uncompressed jars (while in prod they would be loaded from WEB-INF/lib/{\*.jar}/META-INF/resources -->
<JarScanner scanAllDirectories="true" />
</Context>

View File

@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>${artifactId}</artifactId>
<name>Alfresco Share AMP Module</name>
<packaging>amp</packaging>
<description>This is a sample Alfresco Share AMP project, depended upon by the share WAR module</description>
<parent>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}</artifactId>
<version>${version}</version>
</parent>
<!--
| SDK properties have sensible defaults in the SDK parent,
| but you can override the properties below to use another version.
| For more available properties see the alfresco-sdk-parent POM.
-->
<properties>
<!-- Defines the target WAR artifactId to run this amp, only used with the -Pamp-to-war switch
| Allowed values: alfresco | share. In this case it's configured to use OOTB share -->
<alfresco.client.war>share</alfresco.client.war>
<!-- Since Alfresco is already running on port 8080, we run Share on port 8081 -->
<maven.tomcat.port>8081</maven.tomcat.port>
<!-- Used in share-config-custom.xml. By default points to standard location of Alfresco -->
<alfresco.repo.url>http://localhost:8080/alfresco</alfresco.repo.url>
<!-- Defines the log level used in log4j.properties -->
<app.log.root.level>WARN</app.log.root.level>
</properties>
<!-- Following dependencies are needed for compiling Java code in src/main/java;
<scope>provided</scope> is inherited for each of the following;
for more info, please refer to alfresco-platform-distribution POM -->
<dependencies>
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>share</artifactId>
<version>${alfresco.version}</version>
<classifier>classes</classifier>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.extensions.surf</groupId>
<artifactId>spring-surf-api</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,9 @@
#!/bin/bash
# Downloads the spring-loaded lib if not existing and runs the share AMP
springloadedfile=~/.m2/repository/org/springframework/springloaded/${springloaded.version}/springloaded-${springloaded.version}.jar
if [ ! -f $springloadedfile ]; then
mvn validate -Psetup
fi
MAVEN_OPTS="-javaagent:$springloadedfile -noverify" mvn integration-test -Pamp-to-war

View File

@@ -0,0 +1,20 @@
<extension>
<modules>
<module>
<id>Example Aikau Widgets</id>
<version>1.0</version>
<auto-deploy>true</auto-deploy>
<configurations>
<config evaluator="string-compare" condition="WebFramework" replace="false">
<web-framework>
<dojo-pages>
<packages>
<package name="example" location="js/example"/>
</packages>
</dojo-pages>
</web-framework>
</config>
</configurations>
</module>
</modules>
</extension>

View File

@@ -0,0 +1,6 @@
<webscript>
<shortname>Simple Page</shortname>
<description>Simple page definition</description>
<family>Share</family>
<url>/simple-page</url>
</webscript>

View File

@@ -0,0 +1,27 @@
model.jsonModel = {
widgets: [{
id: "SET_PAGE_TITLE",
name: "alfresco/header/SetTitle",
config: {
title: "This is a simple page"
}
},
{
id: "MY_HORIZONTAL_WIDGET_LAYOUT",
name: "alfresco/layout/HorizontalWidgets",
config: {
widgetWidth: 50,
widgets: [
{
name: "alfresco/logo/Logo",
config: {
logoClasses: "alfresco-logo-only"
}
},
{
name: "example/widgets/TemplateWidget"
}
]
}
}]
};

View File

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

View File

@@ -0,0 +1,3 @@
# 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

View File

@@ -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 ====== #

View File

@@ -0,0 +1,20 @@
define(["dojo/_base/declare",
"dijit/_WidgetBase",
"alfresco/core/Core",
"dijit/_TemplatedMixin",
"dojo/text!./templates/TemplateWidget.html"
],
function(declare, _Widget, Core, _Templated, template) {
return declare([_Widget, Core, _Templated], {
templateString: template,
i18nRequirements: [ {i18nFile: "./i18n/TemplateWidget.properties"} ],
cssRequirements: [{cssFile:"./css/TemplateWidget.css"}],
buildRendering: function example_widgets_TemplateWidget__buildRendering() {
this.greeting = this.message('hello-label');
this.inherited(arguments);
}
});
});

View File

@@ -0,0 +1,5 @@
.my-template-widget {
border: 1px #000000 solid;
padding: 1em;
width: 100px;
}

View File

@@ -0,0 +1,422 @@
<alfresco-config>
<!-- Global config section -->
<config replace="true">
<flags>
<!--
Developer debugging setting to turn on DEBUG mode for client scripts in the browser
-->
<client-debug>false</client-debug>
<!--
LOGGING can always be toggled at runtime when in DEBUG mode (Ctrl, Ctrl, Shift, Shift).
This flag automatically activates logging on page load.
-->
<client-debug-autologging>false</client-debug-autologging>
</flags>
</config>
<config evaluator="string-compare" condition="WebFramework">
<web-framework>
<!-- SpringSurf Autowire Runtime Settings -->
<!--
Developers can set mode to 'development' to disable; SpringSurf caches,
FreeMarker template caching and Rhino JavaScript compilation.
-->
<autowire>
<!-- Pick the mode: "production" or "development" -->
<mode>production</mode>
</autowire>
<!-- Allows extension modules with <auto-deploy> set to true to be automatically deployed -->
<module-deployment>
<mode>manual</mode>
<enable-auto-deploy-modules>true</enable-auto-deploy-modules>
</module-deployment>
</web-framework>
</config>
<!-- Disable the CSRF Token Filter -->
<!--
<config evaluator="string-compare" condition="CSRFPolicy" replace="true">
<filter/>
</config>
-->
<!--
To run the CSRF Token Filter behind 1 or more proxies that do not rewrite the Origin or Referere headers:
1. Copy the "CSRFPolicy" default config in share-security-config.xml and paste it into this file.
2. Replace the old config by setting the <config> element's "replace" attribute to "true" like below:
<config evaluator="string-compare" condition="CSRFPolicy" replace="true">
3. To every <action name="assertReferer"> element add the following child element
<param name="referer">http://www.proxy1.com/.*|http://www.proxy2.com/.*</param>
4. To every <action name="assertOrigin"> element add the following child element
<param name="origin">http://www.proxy1.com|http://www.proxy2.com</param>
-->
<!--
Remove the default wildcard setting and use instead a strict whitelist of the only domains that shall be allowed
to be used inside iframes (i.e. in the WebView dashlet on the dashboards)
-->
<!--
<config evaluator="string-compare" condition="IFramePolicy" replace="true">
<cross-domain>
<url>http://www.trusted-domain-1.com/</url>
<url>http://www.trusted-domain-2.com/</url>
</cross-domain>
</config>
-->
<!-- Turn off header that stops Share from being displayed in iframes on pages from other domains -->
<!--
<config evaluator="string-compare" condition="SecurityHeadersPolicy">
<headers>
<header>
<name>X-Frame-Options</name>
<enabled>false</enabled>
</header>
</headers>
</config>
-->
<!-- Prevent browser communication over HTTP (for HTTPS servers) -->
<!--
<config evaluator="string-compare" condition="SecurityHeadersPolicy">
<headers>
<header>
<name>Strict-Transport-Security</name>
<value>max-age=31536000</value>
</header>
</headers>
</config>
-->
<config evaluator="string-compare" condition="Replication">
<share-urls>
<!--
To discover a Repository Id, browse to the remote server's CMIS landing page at:
http://{server}:{port}/alfresco/service/cmis/index.html
The Repository Id field is found under the "CMIS Repository Information" expandable panel.
Example config entry:
<share-url repositoryId="622f9533-2a1e-48fe-af4e-ee9e41667ea4">http://new-york-office:8080/share/</share-url>
-->
</share-urls>
</config>
<!-- Document Library config section -->
<config evaluator="string-compare" condition="DocumentLibrary" replace="true">
<tree>
<!--
Whether the folder Tree component should enumerate child folders or not.
This is a relatively expensive operation, so should be set to "false" for Repositories with broad folder structures.
-->
<evaluate-child-folders>false</evaluate-child-folders>
<!--
Optionally limit the number of folders shown in treeview throughout Share.
-->
<maximum-folder-count>1000</maximum-folder-count>
<!--
Default timeout in milliseconds for folder Tree component to recieve response from Repository
-->
<timeout>7000</timeout>
</tree>
<!--
Used by the "Manage Aspects" action
For custom aspects, remember to also add the relevant i18n string(s)
cm_myaspect=My Aspect
-->
<aspects>
<!-- Aspects that a user can see -->
<visible>
<aspect name="cm:generalclassifiable" />
<aspect name="cm:complianceable" />
<aspect name="cm:dublincore" />
<aspect name="cm:effectivity" />
<aspect name="cm:summarizable" />
<aspect name="cm:versionable" />
<aspect name="cm:templatable" />
<aspect name="cm:emailed" />
<aspect name="emailserver:aliasable" />
<aspect name="cm:taggable" />
<aspect name="app:inlineeditable" />
<aspect name="gd:googleEditable" />
<aspect name="cm:geographic" />
<aspect name="exif:exif" />
<aspect name="audio:audio" />
<aspect name="cm:indexControl" />
<aspect name="dp:restrictable" />
</visible>
<!-- Aspects that a user can add. Same as "visible" if left empty -->
<addable>
</addable>
<!-- Aspects that a user can remove. Same as "visible" if left empty -->
<removeable>
</removeable>
</aspects>
<!--
Used by the "Change Type" action
Define valid subtypes using the following example:
<type name="cm:content">
<subtype name="cm:mysubtype" />
</type>
Remember to also add the relevant i18n string(s):
cm_mysubtype=My SubType
-->
<types>
<type name="cm:content">
</type>
<type name="cm:folder">
</type>
<type name="trx:transferTarget">
<subtype name="trx:fileTransferTarget" />
</type>
</types>
<!--
If set, will present a WebDAV link for the current item on the Document and Folder details pages.
Also used to generate the "View in Alfresco Explorer" action for folders.
-->
<repository-url>http://localhost:8080/alfresco</repository-url>
<!--
Google Docs integration
-->
<google-docs>
<!--
Enable/disable the Google Docs UI integration (Extra types on Create Content menu, Google Docs actions).
-->
<enabled>false</enabled>
<!--
The mimetypes of documents Google Docs allows you to create via the Share interface.
The I18N label is created from the "type" attribute, e.g. google-docs.doc=Google Docs&trade; Document
-->
<creatable-types>
<creatable type="doc">application/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}&amp;max={maximumFolderCountSite}</uri>
</container>
</siteTree>
</config>
<!-- Repository Library config section -->
<config evaluator="string-compare" condition="RepositoryLibrary" replace="true">
<!--
Root nodeRef or xpath expression for top-level folder.
e.g. alfresco://user/home, /app:company_home/st:sites/cm:site1
If using an xpath expression, ensure it is properly ISO9075 encoded here.
-->
<root-node>alfresco://company/home</root-node>
<tree>
<!--
Whether the folder Tree component should enumerate child folders or not.
This is a relatively expensive operation, so should be set to "false" for Repositories with broad folder structures.
-->
<evaluate-child-folders>false</evaluate-child-folders>
<!--
Optionally limit the number of folders shown in treeview throughout Share.
-->
<maximum-folder-count>500</maximum-folder-count>
</tree>
<!--
Whether the link to the Repository Library appears in the header component or not.
-->
<visible>true</visible>
</config>
<!-- Kerberos settings -->
<!-- To enable kerberos rename this condition to "Kerberos" -->
<config evaluator="string-compare" condition="KerberosDisabled" replace="true">
<kerberos>
<!--
Password for HTTP service account.
The account name *must* be built from the HTTP server name, in the format :
HTTP/<server_name>@<realm>
(NB this is because the web browser requests an ST for the
HTTP/<server_name> principal in the current realm, so if we're to decode
that ST, it has to match.)
-->
<password>secret</password>
<!--
Kerberos realm and KDC address.
-->
<realm>ALFRESCO.ORG</realm>
<!--
Service Principal Name to use on the repository tier.
This must be like: HTTP/host.name@REALM
-->
<endpoint-spn>HTTP/repository.server.com@ALFRESCO.ORG</endpoint-spn>
<!--
JAAS login configuration entry name.
-->
<config-entry>ShareHTTP</config-entry>
</kerberos>
</config>
<!-- Uncomment and modify the URL to Activiti Admin Console if required. -->
<!--
<config evaluator="string-compare" condition="ActivitiAdmin" replace="true">
<activiti-admin-url>http://localhost:8080/alfresco/activiti-admin</activiti-admin-url>
</config>
-->
<config evaluator="string-compare" condition="Remote">
<remote>
<endpoint>
<id>alfresco-noauth</id>
<name>Alfresco - unauthenticated access</name>
<description>Access to Alfresco Repository WebScripts that do not require authentication</description>
<connector-id>alfresco</connector-id>
<endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
<identity>none</identity>
</endpoint>
<endpoint>
<id>alfresco</id>
<name>Alfresco - user access</name>
<description>Access to Alfresco Repository WebScripts that require user authentication</description>
<connector-id>alfresco</connector-id>
<endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
<identity>user</identity>
</endpoint>
<endpoint>
<id>alfresco-feed</id>
<name>Alfresco Feed</name>
<description>Alfresco Feed - supports basic HTTP authentication via the EndPointProxyServlet</description>
<connector-id>http</connector-id>
<endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
<basic-auth>true</basic-auth>
<identity>user</identity>
</endpoint>
<endpoint>
<id>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>

View File

@@ -0,0 +1,74 @@
<alfresco-config>
<config evaluator="string-compare" condition="WebFramework">
<web-framework>
<autowire>
<mode>development</mode>
</autowire>
</web-framework>
</config>
<!-- Global config section -->
<config replace="true">
<flags>
<!--
Developer debugging setting to turn on DEBUG mode for client scripts in the browser
-->
<client-debug>true</client-debug>
<!--
LOGGING can always be toggled at runtime when in DEBUG mode (Ctrl, Ctrl, Shift, Shift).
This flag automatically activates logging on page load.
-->
<client-debug-autologging>false</client-debug-autologging>
</flags>
</config>
<!-- Disable CSRF completely for now -->
<!-- It seems Share has issues on 4.2.x with the embedded tomcat and CSRFPolicy -->
<config evaluator="string-compare" condition="CSRFPolicy" replace="true">
<filter/>
</config>
<config evaluator="string-compare" condition="Remote">
<remote>
<endpoint>
<id>alfresco-noauth</id>
<name>Alfresco - unauthenticated access</name>
<description>Access to Alfresco Repository WebScripts that do not require authentication</description>
<connector-id>alfresco</connector-id>
<endpoint-url>${alfresco.repo.url}/s</endpoint-url>
<identity>none</identity>
</endpoint>
<endpoint>
<id>alfresco</id>
<name>Alfresco - user access</name>
<description>Access to Alfresco Repository WebScripts that require user authentication</description>
<connector-id>alfresco</connector-id>
<endpoint-url>${alfresco.repo.url}/s</endpoint-url>
<identity>user</identity>
</endpoint>
<endpoint>
<id>alfresco-feed</id>
<name>Alfresco Feed</name>
<description>Alfresco Feed - supports basic HTTP authentication via the EndPointProxyServlet</description>
<connector-id>http</connector-id>
<endpoint-url>${alfresco.repo.url}/s</endpoint-url>
<basic-auth>true</basic-auth>
<identity>user</identity>
</endpoint>
<endpoint>
<id>activiti-admin</id>
<name>Activiti Admin UI - user access</name>
<description>Access to Activiti Admin UI, that requires user authentication</description>
<connector-id>activiti-admin-connector</connector-id>
<endpoint-url>${alfresco.repo.url}/activiti-admin</endpoint-url>
<identity>user</identity>
</endpoint>
</remote>
</config>
</alfresco-config>

View File

@@ -1,265 +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
# 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

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- This file is included only when running this project with -Pamp-to-war -->
<Context docBase="${alfresco.client.war.folder}" path="${alfresco.client.contextPath}">
<Resources className="org.apache.naming.resources.VirtualDirContext"
extraResourcePaths="/=${project.build.directory}/${project.build.finalName}/web" />
<Loader searchVirtualFirst="true" className="org.apache.catalina.loader.VirtualWebappLoader"
virtualClasspath="${project.build.outputDirectory};${project.build.testOutputDirectory};${project.build.directory}/${project.build.finalName}/config" />
<!--
<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 &quot;true TRUE, false FALSE&quot;."/>
<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."/>
-->
<!-- This enables hot reloading of web resources from uncompressed jars (while in prod they would be loaded from WEB-INF/lib/{\*.jar}/META-INF/resources -->
<JarScanner scanAllDirectories="true" />
</Context>

View File

@@ -3,9 +3,9 @@
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>
<name>Alfresco Share WAR Aggregator</name>
<packaging>war</packaging>
<description>Alfresco Share Client</description>
<description>Alfresco Share aggregator, installs your Share AMPs in the Share WAR for aggregation and easy deployment purposes</description>
<parent>
<groupId>${groupId}</groupId>
@@ -19,8 +19,13 @@
<artifactId>share</artifactId>
<type>war</type>
</dependency>
<!-- Here you can add your Share AMP dependencies -->
<!-- Demonstrating the dependency / installation of the share AMP developed in the 'share-amp' module -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>share-amp</artifactId>
<version>${project.version}</version>
<type>amp</type>
</dependency>
</dependencies>
<build>
<plugins>
@@ -44,10 +49,63 @@
<!-- To allow inclusion of META-INF -->
<excludes/>
</overlay>
<!-- Add / order here the Share AMPs declared above -->
<!-- Add / sort your AMPs here -->
<overlay>
<groupId>${project.groupId}</groupId>
<artifactId>share-amp</artifactId>
<type>amp</type>
</overlay>
</overlays>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>rm</id>
<properties>
<alfresco.rm.artifactId>alfresco-rm-share</alfresco.rm.artifactId>
</properties>
<build>
<plugins>
<!-- Fetch Alfresco RM repo AMP -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>get-rm-share</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifact>${app.rm.artifact}</artifact>
<outputDirectory>${app.rm.amps.location}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<!-- The current AMP artifact is installed into the Alfresco folder using alfresco-maven-plugin -->
<plugin>
<groupId>org.alfresco.maven.plugin</groupId>
<artifactId>alfresco-maven-plugin</artifactId>
<executions>
<execution>
<id>install-rm-share</id>
<phase>package</phase>
<goals>
<goal>install</goal>
</goals>
</execution>
</executions>
<configuration>
<ampLocation>${app.rm.amps.location}</ampLocation>
<warLocation>${app.rm.war.location}</warLocation>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

View File

@@ -1,167 +0,0 @@
<?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>

View File

@@ -0,0 +1,74 @@
<alfresco-config>
<config evaluator="string-compare" condition="WebFramework">
<web-framework>
<autowire>
<mode>development</mode>
</autowire>
</web-framework>
</config>
<!-- Global config section -->
<config replace="true">
<flags>
<!--
Developer debugging setting to turn on DEBUG mode for client scripts in the browser
-->
<client-debug>true</client-debug>
<!--
LOGGING can always be toggled at runtime when in DEBUG mode (Ctrl, Ctrl, Shift, Shift).
This flag automatically activates logging on page load.
-->
<client-debug-autologging>false</client-debug-autologging>
</flags>
</config>
<!-- Disable CSRF completely for now -->
<!-- It seems Share has issues on 4.2.x with the embedded tomcat and CSRFPolicy -->
<config evaluator="string-compare" condition="CSRFPolicy" replace="true">
<filter/>
</config>
<config evaluator="string-compare" condition="Remote">
<remote>
<endpoint>
<id>alfresco-noauth</id>
<name>Alfresco - unauthenticated access</name>
<description>Access to Alfresco Repository WebScripts that do not require authentication</description>
<connector-id>alfresco</connector-id>
<endpoint-url>${alfresco.repo.url}/s</endpoint-url>
<identity>none</identity>
</endpoint>
<endpoint>
<id>alfresco</id>
<name>Alfresco - user access</name>
<description>Access to Alfresco Repository WebScripts that require user authentication</description>
<connector-id>alfresco</connector-id>
<endpoint-url>${alfresco.repo.url}/s</endpoint-url>
<identity>user</identity>
</endpoint>
<endpoint>
<id>alfresco-feed</id>
<name>Alfresco Feed</name>
<description>Alfresco Feed - supports basic HTTP authentication via the EndPointProxyServlet</description>
<connector-id>http</connector-id>
<endpoint-url>${alfresco.repo.url}/s</endpoint-url>
<basic-auth>true</basic-auth>
<identity>user</identity>
</endpoint>
<endpoint>
<id>activiti-admin</id>
<name>Activiti Admin UI - user access</name>
<description>Access to Activiti Admin UI, that requires user authentication</description>
<connector-id>activiti-admin-connector</connector-id>
<endpoint-url>${alfresco.repo.url}/activiti-admin</endpoint-url>
<identity>user</identity>
</endpoint>
</remote>
</config>
</alfresco-config>

View File

@@ -2,8 +2,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>
<name>Alfresco Apache Solr Customization Project</name>
<packaging>war</packaging>
<description>Alfresco Apache Solr Customization</description>
<parent>
@@ -12,160 +12,191 @@
<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>
<!-- The folder where the solr.home directory will be created. NOTE: this doesn't get cleaned by mvn clean, you need to invoke -Ppurge to clean this folder or remove it manually -->
<properties>
<alfresco.solr.dir>${project.basedir}/solr_home</alfresco.solr.dir>
</properties>
<dependencies>
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-solr</artifactId>
<version>${alfresco.version}</version>
<type>zip</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<!-- Copies overridden / custom configurations to solr -->
<executions>
<execution>
<id>copy-solr-properties</id>
<phase>prepare-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>
<resource>
<directory>src/main/solr-properties</directory>
<filtering>true</filtering>
<includes>
<include>log4j-solr.properties</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<!-- Allows packaging of solr-home in a zip package with the 'config' classifier -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4.1</version>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/assembly/solr-config-assembly.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<!-- The solr war -->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-solr</artifactId>
<version>${alfresco.version}</version>
<type>war</type>
</dependency>
<!-- The Alfresco solr classes for compilation purposes -->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-solr</artifactId>
<version>${alfresco.version}</version>
<classifier>classes</classifier>
<type>jar</type>
<scope>provided</scope>
</dependency>
<!-- The Zipped solr.home default configuration -->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-solr</artifactId>
<classifier>config</classifier>
<version>${alfresco.version}</version>
<type>zip</type>
</dependency>
</dependencies>
<!-- Performs operations needed to run solr embedded (e.g. disable HTTPs) -->
<profiles>
<profile>
<id>run</id>
<properties>
<app.solr.patches.folder>${project.build.directory}/${project.build.finalName}-patches</app.solr.patches.folder>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-alfresco-config</id>
<goals>
<goal>unpack</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<outputDirectory>${alfresco.solr.dir}</outputDirectory>
<artifactItems>
<artifactItem>
<artifactId>alfresco-solr</artifactId>
<groupId>${alfresco.groupId}</groupId>
<classifier>config</classifier>
<version>${alfresco.version}</version>
<type>zip</type>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<executions>
<execution>
<id>unpack-solr-war</id>
<phase>prepare-package</phase>
<goals>
<goal>exploded</goal>
</goals>
</execution>
<execution>
<id>default-war</id>
<configuration>
<webXml>${app.solr.patches.folder}/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>
<file>${project.build.directory}/${project.build.finalName}/WEB-INF/web.xml</file>
<outputDir>${app.solr.patches.folder}/WEB-INF</outputDir>
<preserveDir>false</preserveDir>
<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>
<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>
</plugins>
</build>
</profile>
</profiles>
</project>

View File

@@ -0,0 +1,19 @@
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>config</id>
<formats>
<format>zip</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>${project.basedir}/solr_home</directory>
<!-- Excludes data -->
<excludes>
<exclude>archive/**</exclude>
<exclude>workspace/**</exclude>
</excludes>
</fileSet>
</fileSets>
</assembly>

View File

@@ -1,9 +1,9 @@
------
Alfresco Maven All-in-One Archetype Advanced Usage
Alfresco All-in-One Archetype Advanced Usage
------
Gabriele Columbro
------
Nov 2012
Aug 2014
------
@@ -15,11 +15,11 @@ All-in-One Archetype properties
* direclty in *.properties, particularly
* For Alfresco WAR projects
* For the <<<repo>>> project
* <<<src/main/properties/<env>/alfresco-global.properties>>> (environment dependent <<<alfresco-global.properties>>> packaged in the WAR )
* <<<src/main/properties/<env>/alfresco-global.properties>>> (environment dependent <<<alfresco-global.properties>>> packaged in the WAR when running directly within the AMP project)
* For Alfresco AMP projects
* For Alfresco/Share AMP projects
* <<<src/test/properties/<env>/alfresco-global.properties>>> (environment dependent <<<alfresco-global.properties>>> for test WAR run)

View File

@@ -20,16 +20,24 @@ Introduction
* 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
* Embedded run in Tomcat and embedded H2 database of the full Alfresco suite, including Repository, Share, Solr
* Support for unit and integration testings
* Support for unit and integration testing and rapid development (using spring-loaded, see run.sh)
* Seamless IDE integration with Eclipse and Idea
How to create a project:
You can create the latest release archetype with the following command:
As of version 2.0-beta-3, you can create a project with the latest released archetype with the following command directly from Maven Central:
+---+
mvn archetype:generate -DarchetypeCatalog=https://artifacts.alfresco.com/nexus/content/groups/public/archetype-catalog.xml -Dfilter=org.alfresco.maven.archetype:
mvn archetype:generate -Dfilter=org.alfresco.maven.archetype: -DarchetypeCatalog=http://repo1.maven.org/maven2/archetype-catalog.xml
+---+
For previous versions, you need to use the Alfresco Artifacts repository:
+---+
mvn archetype:generate -Dfilter=org.alfresco.maven.archetype: -DarchetypeCatalog=https://artifacts.alfresco.com/nexus/content/groups/public/archetype-catalog.xml
+---+
You should then:
@@ -38,11 +46,22 @@ mvn archetype:generate -DarchetypeCatalog=https://artifacts.alfresco.com/nexus/c
[[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)
[[3]] (<Optionally>) Select Alfresco Version / Edition (current default is: Alfresco Community 5.0.a)
You can find new Alfresco All-in-One project ready to go in the <<<artifactId>>> folder.
Quickstart
Once your project is created:
* Enter the project folder and run <<<./run.sh>>> (you might need to <<<chmod u+x run.sh>>> to make it executable). This will setup the SDK and start Alfresco, Share and Solr in embedded mode.
* Wait for the startup of the webapps and then go <<<http://localhost:8080>>>.
* Import the projects in your favorite IDE (with Maven integration) and start developing right away.
Usage
Instructions on how to use the Alfresco AMP archetype can be found on the {{{./usage.html}usage page}}, while
Full instructions on how to use the Alfresco All in One archetype can be found on the {{{./usage.html}usage page}}, while
for more advanced use cases refer to the {{{./advanced-usage.html}advanced usage page}}

View File

@@ -1,9 +1,9 @@
------
Alfresco Maven All-in-One Archetype Usage
Maven Alfresco All-in-One Archetype Usage
------
Gabriele Columbro
------
Nov 2012
Sep 2013
------
Prerequisites
@@ -16,40 +16,42 @@ Project layout
+---+
pom.xml
|-> amp
|-> alfresco
|-> repo-amp
|-> repo
|-> share-amp
|-> share
|-> solr
|-> wcmqs (Alfresco Web Quick Start)
|-> runner (a Jetty embedded runner / integration test runner)
|-> runner (a Tomcat 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
* <<<repo-amp>>>: An Repository Tier AMP project, demonstrating sample project structure and demo component loading
* <<<alfresco>>>: An <<<alfresco.war>>> Repository Extension, overlaying the Alfresco WAR with custom resources / classes
* <<<repo>>>: 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
* <<<share-amp>>>: A Share Tier AMP project, demonstrating sample project structure and demo component loading
* <<<share>>>: A <<<share.war>>> extension, overlaying the Share WAR with the custom developed <<<share-amp>>>
* <<<solr>>>: An Alfresco <<<alfresco-*-*-solr.zip>>> overlay / customization to configure {{{http://solr.apache.org}Apache Solr}} cores properties
* <<<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
* <<<runner>>>: A Tomcat + H2 runner, capable of running all the aforementioned projects in embedded mode for demo / integration-testing purposes
Usage
The project provides support for typical development lifecycle use cases like
* Rapid development, in full IDE integration, and with hot classes reloading (using spring-loaded, check {{{../../prerequisites.html}prerequisites}}).
* AMP/WAR packaging
* AMP Unit testing
* AMP Unit testing and rapid development
* run embedded in Jetty + H2 database.
* run embedded in Tomcat + H2 database.
(<<NOTE>>: this is not a {{{http://www.alfresco.com/services/subscription/supported-platforms/} supported stack}} so use <<only for development purposes>>)
* Integration testing
@@ -60,13 +62,13 @@ Usage
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.
<<NOTE>>: AMPs produced with this project are fully compatible with Alfresco MMT,in fact the Maven Alfresco plugin - used to manage AMPs in this SDK - embeds the official Alfresco MMT to install depended AMPs.
Commands
* Commands from the root aggregator project
<<<run.sh>>> will automatically set up the SDK and run the webapps embedded to enable rapid development
Common Alfresco project lifecycle commands you want to run from the aggregator :
Additional common Maven lifecycle commands you want to run from the aggregator are:
* <<<mvn package>>>: Runs unit tests and packages all customized modules in their respective <<<$\{project.build.directory\}/$\{project.build.finalName\}.amp>>>
@@ -80,4 +82,4 @@ Commands
* Commands from from the <<<runner>>> project
* <<<mvn jetty:run -Prun'>>> or <<<'mvn integration-test -Prun'>>> to quickly run already packaged webapps
* <<<mvn install -Prun'>>> or <<<'mvn integration-test -Prun'>>> to quickly run already packaged webapps

View File

@@ -23,16 +23,18 @@
</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" />
<item name="Maven Alfresco SDK" href="../../index.html" />
<item name="Alfresco AMP Archetype" href="../alfresco-amp-archetype/index.html" />
<item name="Share AMP Archetype" href="../share-amp-archetype/index.html" />
<item name="Alfresco All-in-One Archetype" href="./index.html" />
<item name="Maven Alfresco SDK Parent POM" href="../../poms/alfresco-sdk-parent/index.html" />
<item name="Alfresco Platform Distribution POM" href="https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-platform-distribution/latest/index.html" />
<item name="Maven Alfresco Plugin" href="../../plugins/alfresco-maven-plugin/index.html" />
</menu>
<menu name="Maven Alfresco Community">
<item name="Alfresco Maven Wiki Docs" href="http://wiki.alfresco.com/wiki/Maven_Alfresco_SDK" />
<menu name="Alfresco Documentation">
<item name="Official Maven Alfresco SDK docs" href="http://docs.alfresco.com/community/concepts/alfresco-sdk-intro.html" />
<item name="Maven Alfresco Wiki Documentation" href="http://wiki.alfresco.com/wiki/Maven_Alfresco_SDK" />
<item name="Alfresco with Maven for Dummies" href="https://wiki.alfresco.com/wiki/Maven_For_Dummies" />
<item name="Developer Access (Google Code)" href="http://code.google.com/p/maven-alfresco-archetypes/" />
<item name="Gabriele Columbro's blog" href="http://www.mindthegab.com/" />

View File

@@ -3,4 +3,4 @@ version=0.1-SNAPSHOT
groupId=archetype.it
artifactId=allInOneTest
alfresco_target_groupId=org.alfresco
alfresco_target_version=4.2.e
alfresco_target_version=5.0.a

View File

@@ -3,4 +3,4 @@ version=0.1-SNAPSHOT
groupId=archetype.it
artifactId=allInOneTest
alfresco_target_groupId=org.alfresco
alfresco_target_version=4.2.e
alfresco_target_version=5.0.a

View File

@@ -15,8 +15,14 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.maven.ide.eclipse.maven2Nature</nature>
</natures>

View File

@@ -6,13 +6,13 @@
<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>
<name>Maven Alfresco SDK - Repository AMP Archetype</name>
<description>Sample project with full support for lifecycle and rapid development of Repository AMPs (Alfresco Module Packages)</description>
<parent>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-lifecycle-aggregator</artifactId>
<version>1.1.0</version>
<artifactId>alfresco-sdk-aggregator</artifactId>
<version>2.0.0-beta-4</version>
<relativePath>../../pom.xml</relativePath>
</parent>
@@ -22,6 +22,7 @@
<directory>src/main/resources</directory>
<includes>
<include>archetype-resources/pom.xml</include>
<include>archetype-resources/run.sh</include>
</includes>
<filtering>true</filtering>
</resource>
@@ -29,6 +30,7 @@
<directory>src/main/resources</directory>
<excludes>
<exclude>archetype-resources/pom.xml</exclude>
<exclude>archetype-resources/run.sh</exclude>
</excludes>
<filtering>false</filtering>
</resource>
@@ -36,6 +38,7 @@
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<configuration>
<useDefaultDelimiters>false</useDefaultDelimiters>
<delimiters>

View File

@@ -10,7 +10,7 @@
<defaultValue>org.alfresco</defaultValue>
</requiredProperty>
<requiredProperty key="alfresco_target_version">
<defaultValue>4.2.e</defaultValue>
<defaultValue>5.0.a</defaultValue>
</requiredProperty>
<requiredProperty key="alfresco_target_amp_client_war">
<defaultValue>alfresco</defaultValue>
@@ -19,7 +19,7 @@
<defaultValue>org.alfresco</defaultValue>
</requiredProperty>
<requiredProperty key="alfresco_target_amp_client_war_version">
<defaultValue>4.2.e</defaultValue>
<defaultValue>5.0.a</defaultValue>
</requiredProperty>
<requiredProperty key="package">
<defaultValue>(not used)</defaultValue>
@@ -35,17 +35,7 @@
<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>
<include>**/**</include>
</includes>
</fileSet>
<fileSet filtered="false" packaged="false" encoding="UTF-8">
@@ -57,7 +47,7 @@
<fileSet filtered="false" encoding="UTF-8">
<directory>src/test/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*</include>
</includes>
</fileSet>
<fileSet filtered="false" encoding="UTF-8">
@@ -72,5 +62,11 @@
<include>**/*.xml</include>
</includes>
</fileSet>
<fileSet encoding="UTF-8">
<directory></directory>
<includes>
<include>run.sh</include>
</includes>
</fileSet>
</fileSets>
</archetype-descriptor>

View File

@@ -5,9 +5,9 @@
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${version}</version>
<name>${artifactId} AMP project</name>
<name>${artifactId} Repository AMP project</name>
<packaging>amp</packaging>
<description>Manages the lifecycle of the ${artifactId} AMP (Alfresco Module Package)</description>
<description>Manages the lifecycle of the ${artifactId} Repository AMP (Alfresco Module Package)</description>
<parent>
<groupId>org.alfresco.maven</groupId>
@@ -21,9 +21,13 @@
| 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]-->
<!--
| Defines the groupId for the Alfresco Artifacts to work against. As of 4.2 the only allowed value is: org.alfresco
| NOTE: See http://docs.alfresco.com/4.2/concepts/dev-extensions-maven-sdk-tutorials-alfresco-enterprise.html for details
-->
<alfresco.groupId>${alfresco_target_groupId}</alfresco.groupId>
<!-- Defines the alfresco version to compile against -->
<!-- Defines the Alfresco version to work against.
Community versions are typically identified by major.minor.character (4.2.a) while Enterprise versions are identified by major.minor.digit (4.2.0) -->
<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>
@@ -31,7 +35,7 @@
. | 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 -->
. | Could be org.alfresco 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>
@@ -64,35 +68,6 @@
<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>

View File

@@ -0,0 +1,9 @@
#!/bin/bash
# Downloads the spring-loaded lib if not existing and runs repository AMP
springloadedfile=~/.m2/repository/org/springframework/springloaded/@@springloaded.version@@/springloaded-@@springloaded.version@@.jar
if [ ! -f $springloadedfile ]; then
mvn validate -Psetup
fi
MAVEN_OPTS="-javaagent:$springloadedfile -noverify -Xms256m -Xmx2G -XX:PermSize=300m" mvn integration-test -Pamp-to-war

View File

@@ -0,0 +1,7 @@
<webscript>
<shortname>Javascript Sample Webscript</shortname>
<description>Hands back a greeting</description>
<url>/sample/helloworld</url>
<authentication>user</authentication>
<format default="html"></format>
</webscript>

View File

@@ -1,6 +1,3 @@
#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
@@ -16,4 +13,5 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
-->
This is a demo JSP. When running with -Pamp-to-war, just change this text and it will be automatically reloaded!

View File

@@ -16,12 +16,10 @@
*/
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;

View File

@@ -2,6 +2,7 @@ package org.alfresco.demoamp.test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import org.alfresco.demoamp.DemoComponent;
@@ -10,12 +11,10 @@ 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;

View File

@@ -20,7 +20,7 @@
# 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.
# In this default file we take the property from the POM (for compatbility with local tomcat 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
@@ -46,14 +46,8 @@ 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
cifs.enabled=false
ftp.enabled=false
ftp.port=1121
ftp.authenticator=alfresco

View File

@@ -0,0 +1,53 @@
<?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>
<!-- This disables javascript compilation so that webscripts can be hot reloaded -->
<bean id="javaScriptProcessor" class="org.alfresco.repo.jscript.RhinoScriptProcessor" init-method="register">
<property name="name">
<value>javascript</value>
</property>
<property name="extension">
<value>js</value>
</property>
<!-- compile javascript and cache compiled scripts -->
<property name="compile">
<value>false</value>
</property>
<!-- allow sharing of sealed scopes for performance -->
<!-- disable to give each script it's own new scope which can be extended -->
<property name="shareSealedScopes">
<value>true</value>
</property>
<property name="scriptService">
<ref bean="scriptService"/>
</property>
<!-- Creates ScriptNodes which require the ServiceRegistry -->
<property name="serviceRegistry">
<ref bean="ServiceRegistry"/>
</property>
<property name="storeUrl">
<value>${spaces.store}</value>
</property>
<property name="storePath">
<value>${spaces.company_home.childname}</value>
</property>
</bean>
</beans>

View File

@@ -1,5 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="${alfresco.client.war.folder}" path="${alfresco.client.contextPath}">
<Resources className="org.apache.naming.resources.VirtualDirContext"
extraResourcePaths="/=${project.build.directory}/${project.build.finalName}/web" />
<Loader searchVirtualFirst="true" className="org.apache.catalina.loader.VirtualWebappLoader"
virtualClasspath="${project.build.outputDirectory};${project.build.testOutputDirectory};${project.build.directory}/${project.build.finalName}/config" />
<!--
<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."/>
@@ -8,4 +17,6 @@
<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>

View File

@@ -1,5 +1,5 @@
------
Alfresco Maven AMP Archetype Advanced Usage
Maven Alfresco AMP Archetype Advanced Usage
------
Gabriele Columbro
------
@@ -34,7 +34,8 @@ AMP Archetype properties
* AMP specific properties
In addition to the common properties, the following properties are specific of the AMP archetype:
In addition to the common properties, the following properties are specific of the AMP archetype. You can change
these properties to select a different WAR to install your AMP to (e.g. a pre-customized Alfresco or Share instance):
+---+
<project>

View File

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

View File

@@ -1,9 +1,9 @@
------
Alfresco Maven AMP Archetype Usage
Alfresco AMP Archetype Usage
------
Gabriele Columbro
------
Nov 2012
Sept 2014
------
@@ -26,7 +26,8 @@ Project layout
|-> web/
|-> licenses/
src/main/java //Java classes to be packaged in the AMP embedded JAR)
src/main/resources //resources to the packaged in the AMP embedded JAR)
src/main/resources //resources to the packaged in the AMP embedded JAR
src/main/resources/META-INF/resources //web resources to the packaged in the AMP embedded JAR, mapped to the root of the webapp as of Servlet 3.0)
src/test/java // Unit tests
src/test/resources // Unit test resources
src/test/properties/<env> // Environment aware alfresco-global.properties. By default <env>=local
@@ -41,7 +42,9 @@ Usage
* packaging
* testing
* rapid development
* testing (unit and integration)
* run embedded
@@ -49,11 +52,13 @@ Usage
* 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.
The AMPs produced with this project are fully compatible with Alfresco MMT, in fact the Maven Alfresco plugin used to manage AMPs in this SDK embeds the official Alfresco MMT to install depdended AMPs.
Commands
<<<run.sh>>> will automatically set up the SDK and run the AMP on an Alfresco repo embedded to enable rapid development
Common AMP project lifecycle commands you want to run are:
Also, common AMP Maven lifecycle commands you want to run are:
* <<<mvn package>>>: Runs unit tests and packages AMP in <<<$\{project.build.directory\}/$\{project.build.finalName\}.amp>>>
@@ -61,12 +66,11 @@ Commands
* <<<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>>>: Like <<<mvn package -Pamp-to-war>>>
but also installs and runs the resulting WAR+AMP in Tomcat + H2 embedded from running and development.
This also enables rapid application development features, like hot reloading and remote JUnit running.
When you run this command then you can access in your browser <<< {{{http://localhost:8080/alfresco}}} >>>.
* <<<mvn 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>>>

View File

@@ -26,14 +26,16 @@
<menu name="SDK components">
<item name="Maven Alfresco SDK" href="../../index.html" />
<item name="Alfresco AMP Archetype" href="./index.html" />
<item name="Share AMP Archetype" href="../share-amp-archetype/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="Maven Alfresco SDK Parent POM" href="../../poms/alfresco-sdk-parent/index.html" />
<item name="Alfresco Platform Distribution POM" href="https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-platform-distribution/latest/index.html" />
<item name="Alfresco Maven Plugin" href="../../plugins/alfresco-maven-plugin/index.html" />
<item name="Maven Alfresco 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" />
<menu name="Alfresco Community">
<item name="Official Maven Alfresco SDK docs" href="http://docs.alfresco.com/community/concepts/alfresco-sdk-intro.html" />
<item name="Maven Alfresco Wiki Documentation" href="http://wiki.alfresco.com/wiki/Maven_Alfresco_SDK" />
<item name="Alfresco with Maven for Dummies" href="https://wiki.alfresco.com/wiki/Maven_For_Dummies" />
<item name="Developer Access (Google Code)" href="http://code.google.com/p/maven-alfresco-archetypes/" />
<item name="Gabriele Columbro's blog" href="http://www.mindthegab.com/" />

View File

@@ -2,10 +2,10 @@
package=it.pkg
version=0.1-SNAPSHOT
groupId=archetype.it
alfresco_target_version=4.2.e
alfresco_target_version=5.0.a
$=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
alfresco_target_amp_client_war_version=5.0.a
artifactId=basic

View File

@@ -2,10 +2,10 @@
package=it.pkg
version=0.1-SNAPSHOT
groupId=archetype.it
alfresco_target_version=4.2.e
alfresco_target_version=5.0.a
$=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
alfresco_target_amp_client_war_version=5.0.a
artifactId=basic

View File

@@ -0,0 +1,52 @@
<?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>share-amp-archetype</artifactId>
<packaging>maven-archetype</packaging>
<name>Maven Alfresco SDK - Share AMP Archetype</name>
<description>Share project with full support for lifecycle and rapid development of AMPs (Alfresco Module Packages)</description>
<parent>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-sdk-aggregator</artifactId>
<version>2.0.0-beta-4</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>archetype-resources/pom.xml</include>
<include>archetype-resources/run.sh</include>
</includes>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<excludes>
<exclude>archetype-resources/pom.xml</exclude>
<exclude>archetype-resources/run.sh</exclude>
</excludes>
<filtering>false</filtering>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<configuration>
<useDefaultDelimiters>false</useDefaultDelimiters>
<delimiters>
<delimiter>@@</delimiter>
</delimiters>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@@ -0,0 +1,105 @@
<?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>5.0.a</defaultValue>
</requiredProperty>
<requiredProperty key="alfresco_target_amp_client_war">
<defaultValue>share</defaultValue>
</requiredProperty>
<requiredProperty key="alfresco_target_amp_client_war_groupId">
<defaultValue>org.alfresco</defaultValue>
</requiredProperty>
<requiredProperty key="alfresco_target_amp_client_war_version">
<defaultValue>5.0.a</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>**/*</include>
<include>**/*.xml</include>
<include>**/*.properties</include>
<include>**/*.txt</include>
</includes>
</fileSet>
<fileSet filtered="false" encoding="UTF-8">
<directory>src/main/resources</directory>
<includes>
<include>**/*</include>
</includes>
</fileSet>
<fileSet encoding="UTF-8">
<directory>src/main/amp</directory>
<includes>
<include>**/*.js</include>
<include>**/*.css</include>
</includes>
</fileSet>
<fileSet filtered="false" encoding="UTF-8">
<directory>src/main/amp/config/alfresco/module/__artifactId__</directory>
</fileSet>
<fileSet filtered="false" encoding="UTF-8">
<directory>src/main/amp/web</directory>
</fileSet>
<fileSet filtered="false" encoding="UTF-8">
<directory>src/main/amp/web/themes</directory>
</fileSet>
<fileSet filtered="false" encoding="UTF-8">
<directory>src/main/amp/web/js</directory>
</fileSet>
<fileSet filtered="false" encoding="UTF-8">
<directory>src/main/amp/web/components</directory>
</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>**/*</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>
<fileSet encoding="UTF-8">
<directory></directory>
<includes>
<include>run.sh</include>
</includes>
</fileSet>
</fileSets>
</archetype-descriptor>

View File

@@ -0,0 +1,78 @@
<?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 target WAR artifactId to run this amp, only used with the -Pamp-to-war switch
| Allowed values: alfresco | share. In this case it's configured to use OOTB share -->
<alfresco.client.war>share</alfresco.client.war>
<!-- Since Alfresco is already running on port 8080, we run Share on port 8081 -->
<maven.tomcat.port>8081</maven.tomcat.port>
<!-- Used in share-config-custom.xml. By default points to standard location of Alfresco -->
<alfresco.repo.url>http://localhost:8080/alfresco</alfresco.repo.url>
<!-- Defines the Alfresco version to work against.
Community versions are typically identified by major.minor.character (4.2.a),
while Enterprise versions are identified by major.minor.digit (4.2.0)
-->
<alfresco.version>${alfresco_target_version}</alfresco.version>
<!-- Defines the log level used in log4j.properties -->
<app.log.root.level>WARN</app.log.root.level>
</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>
<dependency>
<groupId>org.springframework.extensions.surf</groupId>
<artifactId>spring-surf-api</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

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

View File

@@ -0,0 +1,20 @@
<extension>
<modules>
<module>
<id>Example Aikau Widgets</id>
<version>1.0</version>
<auto-deploy>true</auto-deploy>
<configurations>
<config evaluator="string-compare" condition="WebFramework" replace="false">
<web-framework>
<dojo-pages>
<packages>
<package name="example" location="js/example"/>
</packages>
</dojo-pages>
</web-framework>
</config>
</configurations>
</module>
</modules>
</extension>

View File

@@ -0,0 +1,6 @@
<webscript>
<shortname>Simple Page</shortname>
<description>Simple page definition</description>
<family>Share</family>
<url>/simple-page</url>
</webscript>

View File

@@ -0,0 +1,27 @@
model.jsonModel = {
widgets: [{
id: "SET_PAGE_TITLE",
name: "alfresco/header/SetTitle",
config: {
title: "This is a simple page"
}
},
{
id: "MY_HORIZONTAL_WIDGET_LAYOUT",
name: "alfresco/layout/HorizontalWidgets",
config: {
widgetWidth: 50,
widgets: [
{
name: "alfresco/logo/Logo",
config: {
logoClasses: "alfresco-logo-only"
}
},
{
name: "example/widgets/TemplateWidget"
}
]
}
}]
};

View File

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

View File

@@ -0,0 +1,3 @@
# 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

View File

@@ -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 ====== #

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