Compare commits

..

106 Commits

Author SHA1 Message Date
mindthegab
44b6327aca [maven-release-plugin] prepare release alfresco-sdk-aggregator-2.0.0 2014-12-19 08:32:58 -05:00
mindthegab
1bc351d51b added comment 2014-12-19 02:13:17 -05:00
mindthegab
1c56ccdab2 - issue #228
- temporarily we'll use buildonly, later we need to find a better
solution 
- documented options in comments
2014-12-19 01:54:57 -05:00
mindthegab
6826351beb -- fixes issue #242
-- removed superfluous log4j config
2014-12-19 01:24:02 -05:00
Samuel Langlois
f5a4787964 Tune generated doc (mostly Maven Alfresco SDK -> Alfresco SDK) 2014-12-18 18:06:56 +00:00
Ole Hejlskov
6493b8e9d1 Add jetty plugin to re-enable remote unit tests 2014-12-04 16:57:21 +01:00
Samuel Langlois
c8fc67a273 #230 Comment out application of alfresco-spp amp: it's not available in Enterprise Edition 2014-12-04 12:13:41 +00:00
Samuel Langlois
27236060b9 Switch default enterprise version to 5.0 2014-12-04 11:41:15 +00:00
Samuel Langlois
a0be18daee Upgrade Enterprise tests to 5.0 now that it is released 2014-12-01 15:37:49 +00:00
Samuel Langlois
bbf5197a5a Provide a way to skip the tests: -DskipTests now works 2014-12-01 15:37:21 +00:00
Samuel Langlois
30d8412f0b Change default Alfresco version from 5.0.b to 5.0.c 2014-12-01 14:58:31 +00:00
Samuel Langlois
4355d0fb50 #186 Add integration tests against the Enterprise edition 2014-11-21 14:39:11 +00:00
Samuel Langlois
55c21e7989 Upgrade Maven plugins to their latest version 2014-11-19 18:34:48 +00:00
Ole Hejlskov
5e02d4d071 Merge pull request #232 from loftuxab/master
Merged loftux's pull request. Disable resource filtering on binary files, support for H2 upgrades
2014-11-09 22:48:18 +01:00
Ole Hejlskov
3a322ceb2d Add Sonatype repository, fixes #221 2014-11-09 21:42:14 +01:00
Ole Hejlskov
6cf5ec1305 Comment out pluginrepositories that points to artifacts.alfresco.com in an attempt to fix plugin resolution failure. 2014-11-09 20:42:47 +01:00
Ole Hejlskov
7a9d6c9403 Add sonatype as plugin repository 2014-11-09 20:19:10 +01:00
Peter Löfgren
154da68795 Add support for upgrade scripts for H2
Upgrades may or may not work (determined by my own experience). The failure seen was due to an activiti patch in 5.0.b, this patch is changes so if using later version of Alfresco the upgrades work.
There is however no guarantee that it will work in the future, but I think it is worth to have support, because if it works, you avoid having to recreate test data when upgrading alfresco version.

Since I couldn't find a good way to use wildcard copy for the upgrade scripts copying, it does have the version numbers included in path. So whenever Alfresco determines that it is time for a new folder for later version, this has to be added.
2014-10-27 16:59:51 +01:00
Peter Löfgren
9c4adc5dd6 Adding non filtered files
-jar  to allow jar files to be added in src/main/amp/lib
-font files if used in custom themes
2014-10-20 15:29:40 +02:00
mindthegab
a94f0081d0 Closes issue #227
Consolidated h2 dialect on-the-fly "generation" (and other h2 related
operations) into an sdk-parent pom profile. Activated *only* when
src/test/properties/local/alfresco-global.properties is present.
2014-10-16 21:09:21 +02:00
Michael Suzuki
600eeeacc3 removed files that are related to eclipse and not part of the archetype 2014-10-10 18:01:19 +01:00
Michael Suzuki
447a22a2ae fix #227, All in one archetype was not able to start as the db config files where generated in the runner module instead of repo-amp 2014-10-10 17:45:38 +01:00
Samuel Langlois
2bdaf65f2c Fix typo 2014-10-07 17:28:30 +01:00
Samuel Langlois
4d1886a4da Merge branch 'master' of https://github.com/Alfresco/alfresco-sdk 2014-10-07 17:07:26 +01:00
Samuel Langlois
134d16973d Fix support of H2 database
- Remove dependency to tk.skuro.alfresco:h2-support
 - Extract PostreSQL dialect files from alfresco-repository and transform then into H2 files dialect on-the-fly
2014-10-07 16:47:46 +01:00
Ole Hejlskov
a641eb8a6b Use buildonly for now to make tests pass 2014-10-07 16:14:34 +01:00
mindthegab
5400489974 Merge pull request #218 from kgeis/patch-1
Update alfresco-global.properties
2014-10-07 14:31:37 +01:00
mindthegab
a46eed0d7b Merge branch 'master' of https://github.com/Alfresco/alfresco-sdk 2014-10-07 14:19:11 +01:00
mindthegab
a594d9b523 - Added experimental integration with Alfresco Technical Validation for issue #188 2014-10-07 14:18:29 +01:00
Ole Hejlskov
c6beb898ad Bump to 5.0.b.
- Remove jcl-over-slf4j
 - Bump H2 support
2014-10-06 21:10:26 +01:00
Ole Hejlskov
70533a2973 Remove old dependency causing issues with 5.0.b 2014-10-06 15:32:27 +01:00
Michael
e97deb4f14 Merge pull request #219 from Alfresco/revert-215-master
Revert "Adding integration test profile"
2014-09-12 19:10:07 +01:00
Michael
3b2e93904f Revert "Adding integration test profile" 2014-09-12 19:06:13 +01:00
Ken Geis
60d805768a Update alfresco-global.properties
fix typo
2014-09-12 02:40:50 -07:00
Michael
9616129c69 Merge pull request #215 from michaelsuzukisagi/master
Adding integration test profile
2014-09-11 09:47:03 +01:00
mindthegab
ef2dd626f1 -- fixed typo 2014-09-11 01:42:15 -04:00
mindthegab
cb796f3b2a -- minor context path fix. with Enterprise alfresco.client.war !=
alfresco.client.contextPath
2014-09-11 01:39:24 -04:00
mindthegab
a0c8e3e867 Fixes issue #164, merged pull request #216
- -Penterprise is now added and SDK will run against latest alfresco
enterprise
- currently Alfresco INTERNAL only (no Enterprise SNAPSHOTs published)
- tested with latest Enterprise HEAD and also aligned artifactId to new
naming (alfresco-enterprise|share-enterprise)
- updated docs


Merge remote-tracking branch 'origin/enterprise-profile'

Conflicts:
	archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/pom.xml
	archetypes/alfresco-amp-archetype/src/main/resources/archetype-resources/pom.xml
	archetypes/share-amp-archetype/src/main/resources/archetype-resources/pom.xml
	poms/alfresco-sdk-parent/pom.xml
	poms/alfresco-sdk-parent/src/site/apt/sdk-profiles.apt.vm
	src/site/apt/prerequisites.apt.vm
2014-09-11 01:28:54 -04:00
mindthegab
c75a137a80 -- updated metadata descriptors (shown in Maven central)
-- updated readme to point to the new video
2014-09-10 18:40:44 -04:00
mindthegab
284710ab26 issue #217
-- added -Pregression profile to invoke Share PO / Selenium
functional/regression tests 
-- tested successfully with 'mvn clean install' -Prun,regression
(optionally -Dtest=LoginPageTests)
-- reports are produced in target
-- updates docs on available profiles
2014-09-10 16:35:56 -04:00
Michael Suzuki
4c6610a004 tidy amp demo,and added mechanism to slow test down to allow every one to see the demo page with selenium 2014-09-09 15:47:42 +01:00
Michael Suzuki
8e10982a4a merge changes from alfresco sdk 2014-09-09 14:23:52 +01:00
Michael Suzuki
cb8315e268 remove testng from sample 2014-09-09 12:58:21 +01:00
Michael Suzuki
19701b28c6 added param to allow skiping of unit test 2014-09-09 12:28:49 +01:00
Michael Suzuki
6f3363074e remove testing from integration profile 2014-09-09 11:26:18 +01:00
Michael Suzuki
247b23a818 fix to run unit test and integration test 2014-09-09 11:06:51 +01:00
Michael Suzuki
d23ce407cd fix to compile integration folder 2014-09-09 08:54:06 +01:00
mindthegab
572cbab5f6 -- fixed minor missing token replacement in index.html 2014-09-09 03:02:08 -04:00
mindthegab
b97c4fccdc [maven-release-plugin] prepare for next development iteration 2014-09-09 02:42:56 -04:00
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
Michael Suzuki
5c4174e0d8 fix amp archetype to run, resolve dependency conflict 2014-09-08 14:41:21 +01:00
Michael Suzuki
ab258df2b4 add new profile to setup integration 2014-09-08 13:05:04 +01: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
Michael Suzuki
84e8fd5ae7 fix test 2014-09-05 17:20:30 +01:00
Michael Suzuki
f3df237cf0 fix demo to work 2014-09-05 17:15:58 +01:00
Michael Suzuki
fe2fdd3c06 updated to latest plugin version and fix to allow ui-test run after amp-to-war 2014-09-05 16:37:39 +01:00
Michael Suzuki
be3b8618ae import all sub dependency via share po project 2014-09-05 15:07:50 +01:00
Michael Suzuki
6d5ab89f4a remove dependency from project, included in profile 2014-09-05 14:37:04 +01:00
Michael Suzuki
51ab29e79b formatting amend 2014-09-05 14:23:38 +01:00
Michael Suzuki
dab870c8f5 fix to run testng in functional and integration tests 2014-09-05 14:06:34 +01:00
Michael Suzuki
6076eecf4c added junit runner to junit test class 2014-09-05 11:52:51 +01:00
Michael Suzuki
eb583a15fd updated profile to not affect mvn test 2014-09-05 11:47:22 +01:00
Michael Suzuki
114d66fca1 adding integration profile 2014-09-04 15:35:36 +01:00
Michael Suzuki
faf0d89df9 added integration as source folder for m2 eclipse setup 2014-09-04 14:57:41 +01:00
Michael Suzuki
a409cf08bd added new integration test directory, manages all integration test content 2014-09-04 13:45:02 +01:00
Michael Suzuki
5421b845c8 seperated tests into unit and integration 2014-09-03 11:15:47 +01:00
Michael Suzuki
fc55716499 tidy up formatting 2014-09-03 10:10:31 +01: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
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
Maurizio Pillitu
17350c4328 changed Alfresco private repository id to alfresco-private-repository, in order to be compliant with http://docs.alfresco.com/4.2/tasks/dev-extensions-maven-sdk-tutorials-configure-maven-enterprise.html (issue #163) 2014-07-25 18:15:23 +02:00
Maurizio Pillitu
feb0d736da added documentation for issue #163 2014-07-25 18:11:19 +02:00
Maurizio Pillitu
ed17a67187 commented alfresco.client.war.version, which defaults to alfresco.version 2014-07-25 15:46:40 +02:00
Maurizio Pillitu
3735773e71 fixes issue #163. junit dependency definition on amp-archetype, I removed it where unnecessary (while keeping junit in the test build scope) 2014-07-25 15:22:58 +02:00
81 changed files with 1403 additions and 611 deletions

View File

@@ -1,12 +1,16 @@
# [![Maven Alfresco SDK logo](https://github.com/Alfresco/alfresco-sdk/raw/master/src/site/resources/img/alfresco-maven-logo.jpg)](#features) Maven Alfresco SDK
# [![Alfresco SDK logo](https://github.com/Alfresco/alfresco-sdk/raw/master/src/site/resources/img/alfresco-maven-logo.jpg)](#features) Alfresco SDK
The Alfresco SDK based on Apache Maven, includes support for rapid and standard development, testing, packaging, versioning and release of your Alfresco integration and extension projects.
SDK for Alfresco Development, Testing, packaging and custom project lifecycle management based on Apache Maven.
It is composed of:
Includes support for rapid and standard development, testing, packaging, versioning and release of your Alfresco integration and extension projects. For an overview of the SDK potential check out this video:
[![Alfresco SDK 2.x howto](http://img.youtube.com/vi/utYZaVe9Nd0/0.jpg)](https://www.youtube.com/watch?v=utYZaVe9Nd0)
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
- An Alfresco [Maven 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 facitilites (a la MMT) and other common goals for Alfresco development
- 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)
@@ -14,15 +18,13 @@ It is composed of:
## Resources
### Developer docs
### 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).
**SDK 2.x**: Full documentation is available at the [Alfresco SDK site](https://artifacts.alfresco.com/nexus/content/groups/public/alfresco-sdk-aggregator/latest/index.html).
**SDK 1.x**: Full documentation is available at the [Maven Alfresco SDK site](https://artifacts.alfresco.com/nexus/content/groups/public/alfresco-lifecycle-aggregator/latest/index.html).
### Alfresco Official Documentation
### Alfresco Official docs
Additional documentation for Alfresco Community and Enterprise, tutorials and examples is available in the [Alfresco Docs](http://docs.alfresco.com/4.2/concepts/dev-extensions-maven-sdk-intro.html).
Additional documentation for Alfresco Community and Enterprise, tutorials and examples is available in the [Alfresco Documentation](http://docs.alfresco.com/community/concepts/alfresco-sdk-intro.html).
### Samples
@@ -31,21 +33,26 @@ Advanced sample projects are maintained by @ohej in the [Alfresco SDK Samples pr
### Contribute
Report issues (and contribute!) [here](https://github.com/Alfresco/alfresco-sdk/issues?milestone=1&state=open). You can also join the [Maven Alfresco list on Google Groups](https://groups.google.com/forum/#!forum/maven-alfresco).
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 Alfresco Maven 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/).
The 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 Docs](http://docs.alfresco.com/4.2/concepts/dev-extensions-maven-sdk-intro.html) for supported features.
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/community/concepts/alfresco-sdk-intro.html) for supported features.
## News
- 2014-09-10: SDK 2.0.0-beta-4 released to Maven Central and in the [Archetype Catalog](http://repo1.maven.org/maven2/archetype-catalog.xml)!
- 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 Docs to this change.
- 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

@@ -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-sdk-aggregator</artifactId>
<version>2.0.0-beta-2</version>
<version>2.0.0</version>
<relativePath>../../pom.xml</relativePath>
</parent>
@@ -21,6 +21,8 @@
<directory>src/main/resources</directory>
<includes>
<include>archetype-resources/pom.xml</include>
<include>archetype-resources/run.sh</include>
<include>archetype-resources/runner/src/main/webapp/index.html</include>
</includes>
<filtering>true</filtering>
</resource>
@@ -28,6 +30,8 @@
<directory>src/main/resources</directory>
<excludes>
<exclude>archetype-resources/pom.xml</exclude>
<exclude>archetype-resources/run.sh</exclude>
<exclude>archetype-resources/runner/src/main/webapp/index.html</exclude>
</excludes>
<filtering>false</filtering>
</resource>
@@ -35,7 +39,7 @@
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<version>2.7</version>
<configuration>
<useDefaultDelimiters>false</useDefaultDelimiters>
<delimiters>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<archetype-descriptor xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" name="quickstart-allinone-archetype"
<archetype-descriptor xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" name="All In One Archetype for Alfresco. Provides rapid development, IDE integration, and running embedded of Alfresco Repo, Share and Solr"
xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<requiredProperties>
@@ -10,7 +10,7 @@
<defaultValue>org.alfresco</defaultValue>
</requiredProperty>
<requiredProperty key="alfresco_target_version">
<defaultValue>5.0.a</defaultValue>
<defaultValue>5.0.c</defaultValue>
</requiredProperty>
<requiredProperty key="package">
<defaultValue>(not used)</defaultValue>
@@ -127,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>
@@ -160,7 +166,21 @@
<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

@@ -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>
@@ -23,11 +23,11 @@
| 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>
<!-- <alfresco.groupId>${alfresco_target_groupId}</alfresco.groupId> -->
<!-- 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>
<!--<alfresco.version>${alfresco_target_version}</alfresco.version>-->
<!-- This control the root logging level for all apps -->
<app.log.root.level>WARN</app.log.root.level>
<!-- This controls the default data location for dir.root -->
@@ -67,6 +67,15 @@
<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 repository AMP Module</name>
<name>Alfresco Repository AMP Module</name>
<packaging>amp</packaging>
<description>This is a sample Alfresco repository 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,6 +12,12 @@
<version>${version}</version>
</parent>
<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</alfresco.client.war>
</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-integration-parent
@@ -25,15 +31,19 @@
</dependency>
</dependencies>
<properties>
<!-- Defines the target WAR artifactId to run this amp, only used with the -Pamp-to-war switch
. | Allowed values: alfresco | share. Defaults to a repository AMP, but could point to your custom corporate Alfresco WAR -->
<alfresco.client.war>alfresco</alfresco.client.war>
<!-- Defines the target WAR groupId to run this amp, only used with the -Pamp-to-war profile
. | Could be org.alfresco 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 profile -->
<!-- <alfresco.client.war.version>${alfresco.version}</alfresco.client.war.version> -->
</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

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

@@ -14,9 +14,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 Repository and Explorer Client</name>
<name>Alfresco Repository WAR Aggregator</name>
<packaging>war</packaging>
<description>Alfresco Repository and Explorer Client, installs your AMPs in the Alfresco WAR for aggregation purposes</description>
<description>Alfresco Repository aggregator, installs your repository AMPs in the Alfresco WAR for aggregation and easy deployment purposes</description>
<parent>
<groupId>${groupId}</groupId>
@@ -27,7 +27,8 @@
<dependencies>
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco</artifactId>
<artifactId>${alfresco.repo.artifactId}</artifactId>
<version>${alfresco.version}</version>
<type>war</type>
</dependency>
<!-- Demonstrating the dependency / installation of the repo AMP developed in the 'repo-amp' module -->
@@ -38,12 +39,14 @@
<type>amp</type>
</dependency>
<!-- Demonstrating the usage of a well known GA AMP (SharePoint Protocol Support) -->
<!--
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-spp</artifactId>
<version>${alfresco.version}</version>
<type>amp</type>
</dependency>
-->
</dependencies>
<build>
@@ -63,7 +66,7 @@
<!-- The Alfresco WAR -->
<overlay>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco</artifactId>
<artifactId>${alfresco.repo.artifactId}</artifactId>
<type>war</type>
<!-- To allow inclusion of META-INF -->
<excludes/>
@@ -74,11 +77,13 @@
<artifactId>repo-amp</artifactId>
<type>amp</type>
</overlay>
<!--
<overlay>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-spp</artifactId>
<type>amp</type>
</overlay>
-->
</overlays>
</configuration>
</plugin>
@@ -140,14 +145,53 @@
</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>
<!-- Installs the needed runtime artifact for an RM (Records Management) project -->
<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
# 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,10 +15,6 @@
<profiles>
<profile>
<id>run</id>
<properties>
<!-- Location of the Solr project, which is loaded via filesystem. Change if your Solr customization project lives in a different folder. -->
<solr.project.dir>${project.basedir}/../solr</solr.project.dir>
</properties>
<build>
<plugins>
<plugin>
@@ -52,21 +48,26 @@
<goals>
<goal>run</goal>
</goals>
<phase>integration-test</phase>
<phase>pre-integration-test</phase>
</execution>
</executions>
<configuration>
<warSourceDirectory>${project.parent.basedir}/solr/target/solr-overlay</warSourceDirectory>
<path>/solr</path>
<useTestClasspath>false</useTestClasspath>
<ignorePackaging>true</ignorePackaging>
<useSeparateTomcatClassLoader>true</useSeparateTomcatClassLoader>
<path>/</path>
<systemProperties>
<solr.solr.home>${project.parent.basedir}/solr/solr_home</solr.solr.home>
<java.io.tmpdir>${project.build.directory}</java.io.tmpdir>
</systemProperties>
<delegate>true</delegate>
<webapps>
<webapp>
<groupId>${project.groupId}</groupId>
<artifactId>solr</artifactId>
<version>${project.version}</version>
<type>war</type>
<asWebapp>true</asWebapp>
<contextPath>/solr</contextPath>
<contextFile>${project.build.directory}/contexts/context-solr.xml</contextFile>
</webapp>
<webapp>
<groupId>${project.groupId}</groupId>
<artifactId>repo</artifactId>
@@ -91,5 +92,112 @@
</plugins>
</build>
</profile>
<!-- Runs regression tests using Alfresco Share PO (Page Object) vanilla Selenium / Webdrone driven functional test, during integration-test phase.
NOTE: Assumes an already running Alfresco + Share at the default location ${app.share.url} (e.g. by invoking -Prun,regression) -->
<profile>
<id>regression</id>
<properties>
<maven.tomcat.fork>true</maven.tomcat.fork>
<!-- The URL Under Test -->
<app.share.url>http://localhost:8080/share</app.share.url>
</properties>
<build>
<plugins>
<!-- Workaround for classloading issue in share-po (need to unpack it) -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>prepare-regression-test-resources</id>
<phase>pre-integration-test</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifact>${alfresco.groupId}:share-po:${alfresco.version}:jar:tests</artifact>
<outputDirectory>${project.build.directory}/testng-resources</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.17</version>
<executions>
<execution>
<id>run-regression-tests</id>
<goals>
<goal>test</goal>
</goals>
<phase>integration-test</phase>
<configuration>
<systemProperties>
<share.target>${app.share.url}</share.target>
</systemProperties>
<dependenciesToScan>
<dependency>${alfresco.groupId}:share-po</dependency>
</dependenciesToScan>
<additionalClasspathElements>
<additionalClasspathElement>${project.build.directory}/testng-resources</additionalClasspathElement>
</additionalClasspathElements>
<suiteXmlFiles>
<suiteXmlFile>${project.build.directory}/testng-resources/testng.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>share-po</artifactId>
<version>${alfresco.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>share-po</artifactId>
<version>${alfresco.version}</version>
<classifier>tests</classifier>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>3.1.1.RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>3.1.1.RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.8.8</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</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,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

@@ -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>Share AMP project</name>
<name>Alfresco Share AMP Module</name>
<packaging>amp</packaging>
<description>This is a sample Share AMP project, depended upon by the share WAR module</description>
<description>This is a sample Alfresco Share AMP project, depended upon by the share WAR module</description>
<parent>
<groupId>${groupId}</groupId>
@@ -38,6 +38,14 @@
<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>

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

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

@@ -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>
@@ -16,7 +16,8 @@
<dependencies>
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>share</artifactId>
<artifactId>${alfresco.share.artifactId}</artifactId>
<version>${alfresco.version}</version>
<type>war</type>
</dependency>
<!-- Demonstrating the dependency / installation of the share AMP developed in the 'share-amp' module -->
@@ -44,7 +45,7 @@
<!-- The Share WAR -->
<overlay>
<groupId>${alfresco.groupId}</groupId>
<artifactId>share</artifactId>
<artifactId>${alfresco.share.artifactId}</artifactId>
<type>war</type>
<!-- To allow inclusion of META-INF -->
<excludes/>
@@ -60,4 +61,53 @@
</plugin>
</plugins>
</build>
<profiles>
<!-- Installs the needed runtime component for an Alfresco RM (Records Management) project -->
<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

@@ -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,163 +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>
<classifier>config</classifier>
<version>${alfresco.version}</version>
<type>zip</type>
</artifactItem>
</artifactItems>
</configuration>
</execution>
<execution>
<id>copy-alfresco-solr</id>
<goals><goal>unpack</goal></goals>
<phase>generate-resources</phase>
<configuration>
<outputDirectory>${alfresco.solr.war.overlay}</outputDirectory>
<artifactItems>
<artifactItem>
<artifactId>alfresco-solr</artifactId>
<groupId>${alfresco.groupId}</groupId>
<version>${alfresco.version}</version>
<type>war</type>
</artifactItem>
</artifactItems>
</configuration>
</execution>
<!-- 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>
</executions>
</plugin>
<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>
<!-- 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>
</executions>
</plugin>
</plugins>
</build>
<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>
<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>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>overlay-web-xml</id>
<phase>generate-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>
<execution>
<id>copy-solr-resources</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>
<resource>
<directory>src/main/solr-properties</directory>
<filtering>true</filtering>
<includes>
<include>log4j-solr.properties</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<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,23 +1,23 @@
------
Alfresco Maven All-in-One Archetype Advanced Usage
Alfresco All-in-One Archetype Advanced Usage
------
Gabriele Columbro
------
Nov 2012
Aug 2014
------
All-in-One Archetype properties
In each of the modules of the archetype (as in the whole Maven Alfresco SDK\x99) properties are configurable at many levels:
In each of the modules of the archetype (as in the whole Alfresco SDK\x99) properties are configurable at many levels:
* as POM properties
* direclty in *.properties, particularly
* For 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/Share AMP projects

View File

@@ -9,7 +9,7 @@
Introduction
The Alfresco All-in-One Archetype is a multi-module project,
leveraging Maven Alfresco SDK\x99 powerful capabilities to customize and run the full Alfresco platform embedded and all it's components.
leveraging Alfresco SDK\x99 powerful capabilities to customize and run the full Alfresco platform embedded and all it's components.
The archetype does not require additional download and provides a perfect starting point for full-blown Alfresco projects.
* Features
@@ -22,27 +22,46 @@ Introduction
* 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 -Dfilter=org.alfresco.maven.archetype:
mvn archetype:generate -Dfilter=org.alfresco.maven.archetype:alfresco-allinone-archetype
+---+
For previous versions, you need to use the Alfresco Artifacts repository:
+---+
mvn archetype:generate -Dfilter=org.alfresco.maven.archetype:alfresco-allinone-archetype -DarchetypeCatalog=https://artifacts.alfresco.com/nexus/content/groups/public/archetype-catalog.xml
+---+
You should then:
[[1]] Select the <<<alfresco-allinone-archetype>>> option
[[1]] Select the <<<alfresco-allinone-archetype>>> version
[[2]] Specify the <<<groupId>>> and <<<artifactId>>> for the project you want to create
[[3]] (<Optionally>) Select Alfresco Version / Edition (current default is: Alfresco Community 5.0.a)
[[3]] (<Optionally>) Select Alfresco Version / Edition (current default is: Alfresco Community 5.0.c)
You can find new Alfresco All-in-One project ready to go in the <<<artifactId>>> folder.
Quickstart
Once your project is created:
* Enter the project folder and run <<<./run.sh>>> (you might need to <<<chmod u+x run.sh>>> to make it executable). This will setup the SDK and start Alfresco, Share and Solr in embedded mode.
* Wait for the startup of the webapps and then go <<<http://localhost:8080>>>.
* Import the projects in your favorite IDE (with Maven integration) and start developing right away.
Usage
Instructions on how to use the Alfresco All in One 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,8 +16,9 @@ Project layout
+---+
pom.xml
|-> amp
|-> alfresco
|-> repo-amp
|-> repo
|-> share-amp
|-> share
|-> solr
|-> runner (a Tomcat embedded runner / integration test runner)
@@ -48,7 +49,7 @@ Usage
* AMP/WAR packaging
* AMP Unit testing
* AMP Unit testing and rapid development
* run embedded in Tomcat + H2 database.
(<<NOTE>>: this is not a {{{http://www.alfresco.com/services/subscription/supported-platforms/} supported stack}} so use <<only for development purposes>>)
@@ -61,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>>>
@@ -81,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

@@ -27,14 +27,14 @@
<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="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 Docs">
<item name="Official Alfresco SDK docs" href="http://docs.alfresco.com/community/concepts/alfresco-sdk-intro.html" />
<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=5.0.a
alfresco_target_version=5.0.c

View File

@@ -0,0 +1,6 @@
package=it.pkg
version=0.1-SNAPSHOT
groupId=archetype.it
artifactId=allInOneTest
alfresco_target_groupId=org.alfresco
alfresco_target_version=5.0

View File

@@ -0,0 +1 @@
verify -Prun -Penterprise -Dmaven.tomcat.fork=true

View File

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

View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@@ -1,29 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>alfresco-amp-archetype</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.maven.ide.eclipse.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
<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>
</projectDescription>

View File

@@ -6,13 +6,13 @@
<artifactId>alfresco-amp-archetype</artifactId>
<packaging>maven-archetype</packaging>
<name>Repository AMP Archetype from Maven Alfresco SDK</name>
<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-sdk-aggregator</artifactId>
<version>2.0.0-beta-2</version>
<version>2.0.0</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,7 +38,7 @@
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<version>2.7</version>
<configuration>
<useDefaultDelimiters>false</useDefaultDelimiters>
<delimiters>

View File

@@ -1,5 +1,5 @@
<?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"
<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="AMP Archetype for Alfresco. Provides rapid development, IDE integration, and running embedded an Alfresco Repo AMP"
xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<requiredProperties>
@@ -10,16 +10,7 @@
<defaultValue>org.alfresco</defaultValue>
</requiredProperty>
<requiredProperty key="alfresco_target_version">
<defaultValue>5.0.a</defaultValue>
</requiredProperty>
<requiredProperty key="alfresco_target_amp_client_war">
<defaultValue>alfresco</defaultValue>
</requiredProperty>
<requiredProperty key="alfresco_target_amp_client_war_groupId">
<defaultValue>org.alfresco</defaultValue>
</requiredProperty>
<requiredProperty key="alfresco_target_amp_client_war_version">
<defaultValue>5.0.a</defaultValue>
<defaultValue>5.0.c</defaultValue>
</requiredProperty>
<requiredProperty key="package">
<defaultValue>(not used)</defaultValue>
@@ -62,5 +53,11 @@
<include>**/*.xml</include>
</includes>
</fileSet>
<fileSet encoding="UTF-8">
<directory></directory>
<includes>
<include>run.sh</include>
</includes>
</fileSet>
</fileSets>
</archetype-descriptor>

View File

@@ -25,22 +25,27 @@
| 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>
<!-- <alfresco.groupId>${alfresco_target_groupId}</alfresco.groupId> -->
<!-- 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>
<!-- <alfresco.version>${alfresco_target_version}</alfresco.version>-->
<app.log.root.level>WARN</app.log.root.level>
<alfresco.data.location>alf_data_dev</alfresco.data.location>
<!-- Defines the target WAR artifactId to run this amp, only used with the -Pamp-to-war switch
. | Allowed values: alfresco | share. Defaults to a repository AMP, but could point to your foundation WAR -->
<alfresco.client.war>${alfresco_target_amp_client_war}</alfresco.client.war>
<!-- Defines the target WAR groupId to run this amp, only used with the -Pamp-to-war switch
. | Could be org.alfresco or your corporate groupId -->
<alfresco.client.war.groupId>${alfresco_target_amp_client_war_groupId}</alfresco.client.war.groupId>
<!-- Defines the target WAR version to run this amp, only used with the -Pamp-to-war switch -->
<alfresco.client.war.version>${alfresco_target_amp_client_war_version}</alfresco.client.war.version>
<!-- This controls which properties will be picked in src/test/properties for embedded run -->
<env>local</env>
<!-- Defines the target WAR artifactId to run this amp, only used with the -Pamp-to-war profile
| Defaults to a vanilla repository AMP, but could point to your foundation / aggregator WAR
. | Allowed values for Community: alfresco | share
| Allowed values for Enterprise: alfresco-enterprise | share-enterprise
<alfresco.client.war>${alfresco.repo.artifactId}</alfresco.client.war> -->
<!-- Context path to run alfresco on -->
<alfresco.client.contextPath>/alfresco</alfresco.client.contextPath>
<!-- Defines the target WAR groupId to run this amp, only used with the -Pamp-to-war switch
. | Could be org.alfresco or your corporate groupId -->
<!-- <alfresco.client.war.groupId>${alfresco.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.version}</alfresco.client.war.version>-->
</properties>
<!-- Here we realize the connection with the Alfresco selected platform
@@ -69,5 +74,4 @@
<artifactId>alfresco-repository</artifactId>
</dependency>
</dependencies>
</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

@@ -1,4 +0,0 @@
# Define here logging properties for your AMP specific classes
# This will end up in alfresco.war/WEB-INF/classes/alfresco/module/log4j.properties
# and loaded as per http://wiki.alfresco.com/wiki/Developing_an_Alfresco_Module#log4j.properties
log4j.logger.org.alfresco.demoamp=DEBUG

View File

@@ -20,12 +20,17 @@
# 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 tomcat and jboss deployments) but it can also be edited here.
# In this default file we take the property from the POM (for compatibility 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
# As we run embedded, we set Lucene
index.subsystem.name=lucene
# TODO: Find a better solution for indexing, as buildonly (embedded Lucene) is deprecated and going to be removed soon
#index.subsystem.name=noindex
#index.subsystem.name=solr
#index.subsystem.name=solr4
index.subsystem.name=buildonly
#dir.keystore=.
#keystore.password=storepassword
@@ -46,14 +51,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

@@ -1,5 +1,5 @@
------
Alfresco Maven AMP Archetype Advanced Usage
Maven Alfresco AMP Archetype Advanced Usage
------
Gabriele Columbro
------

View File

@@ -3,7 +3,7 @@
------
Gabriele Columbro
------
Nov 2012
Sept 2014
------
Introduction
@@ -27,17 +27,27 @@ Introduction
* 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 -Dfilter=org.alfresco.maven.archetype:
mvn archetype:generate -Dfilter=org.alfresco.maven.archetype:alfresco-amp-archetype
+---+
For previous versions, you need to use the Alfresco Artifacts repository:
+---+
mvn archetype:generate -Dfilter=org.alfresco.maven.archetype:alfresco-amp-archetype -DarchetypeCatalog=https://artifacts.alfresco.com/nexus/content/groups/public/archetype-catalog.xml
+---+
You should then:
[[1]] Select the <<<alfresco-amp-archetype>>> option
[[1]] Select the <<<alfresco-amp-archetype>>> version
[[2]] Specify the <<<groupId>>> and <<<artifactId>>> for the project you want to create
@@ -45,7 +55,19 @@ mvn archetype:generate -Dfilter=org.alfresco.maven.archetype:
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

@@ -3,7 +3,7 @@
------
Gabriele Columbro
------
Nov 2012
Sept 2014
------
@@ -27,6 +27,7 @@ Project layout
|-> licenses/
src/main/java //Java classes to be packaged in the AMP embedded JAR)
src/main/resources //resources to the packaged in the AMP embedded JAR
src/main/resources/META-INF/resources //web resources to the packaged in the AMP embedded JAR, mapped to the root of the webapp as of Servlet 3.0)
src/test/java // Unit tests
src/test/resources // Unit test resources
src/test/properties/<env> // Environment aware alfresco-global.properties. By default <env>=local
@@ -51,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
Common AMP project lifecycle commands you want to run are:
<<<run.sh>>> will automatically set up the SDK and run the AMP on an Alfresco repo embedded to enable rapid development
Also, common AMP Maven lifecycle commands you want to run are:
* <<<mvn package>>>: Runs unit tests and packages AMP in <<<$\{project.build.directory\}/$\{project.build.finalName\}.amp>>>
@@ -63,7 +66,7 @@ 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>>>
* <<<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}}} >>>.

View File

@@ -28,14 +28,14 @@
<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="Official Alfresco SDK docs" href="http://docs.alfresco.com/community/concepts/alfresco-sdk-intro.html" />
<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=5.0.a
alfresco_target_version=5.0.c
$=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=5.0.a
alfresco_target_amp_client_war_version=5.0.c
artifactId=basic

View File

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

View File

@@ -0,0 +1,8 @@
#Tue Oct 30 14:23:01 CET 2012
groupId=archetype.it
artifactId=enterprise
version=0.1-SNAPSHOT
package=it.pkg
$=cat archetype.properties
alfresco_target_groupId=org.alfresco
alfresco_target_version=5.0

View File

@@ -0,0 +1 @@
verify -Pamp-to-war -Penterprise -Dmaven.tomcat.fork=true

View File

@@ -6,13 +6,13 @@
<artifactId>share-amp-archetype</artifactId>
<packaging>maven-archetype</packaging>
<name>Share AMP Archetype from Maven Alfresco SDK</name>
<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-2</version>
<version>2.0.0</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,7 +38,7 @@
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<version>2.7</version>
<configuration>
<useDefaultDelimiters>false</useDefaultDelimiters>
<delimiters>

View File

@@ -1,5 +1,5 @@
<?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"
<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="Share AMP Archetype for Alfresco. Provides rapid development, IDE integration, and running embedded an Alfresco Share AMP"
xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<requiredProperties>
@@ -10,16 +10,7 @@
<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>
<defaultValue>5.0.c</defaultValue>
</requiredProperty>
<requiredProperty key="package">
<defaultValue>(not used)</defaultValue>
@@ -95,5 +86,11 @@
<include>**/*.xml</include>
</includes>
</fileSet>
<fileSet encoding="UTF-8">
<directory></directory>
<includes>
<include>run.sh</include>
</includes>
</fileSet>
</fileSets>
</archetype-descriptor>

View File

@@ -23,8 +23,8 @@
<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>
<alfresco.client.war>${alfresco.share.artifactId}</alfresco.client.war>
<alfresco.client.contextPath>/share</alfresco.client.contextPath>
<!-- Since Alfresco is already running on port 8080, we run Share on port 8081 -->
<maven.tomcat.port>8081</maven.tomcat.port>
@@ -35,7 +35,8 @@
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>
<!--<alfresco.version>${alfresco_target_version}</alfresco.version>-->
<!-- Defines the log level used in log4j.properties -->
<app.log.root.level>WARN</app.log.root.level>

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

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

@@ -1,4 +1,4 @@
<!-- Alfresco 5.0.a share-config-custom.xml sample -->
<!-- Alfresco 5.0.c share-config-custom.xml sample -->
<alfresco-config>
<!-- Global config section -->

View File

@@ -16,7 +16,7 @@ AMP Unit Testing
Share AMP Archetype properties
In the AMP archetype (as in the whole Part of the Maven Alfresco SDK\x99) properties are configurable at many levels:
In the AMP archetype (as in the whole Part of the Alfresco SDK\x99) properties are configurable at many levels:
* as POM properties

View File

@@ -42,7 +42,7 @@ 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 5.0.a)
[[3]] (<Optionally>) Select Alfresco Version / Edition (current default is: Alfresco Community 5.0.c)
You can find new Share AMP project ready to go in the <<<artifactId>>> folder.

View File

@@ -52,7 +52,7 @@ 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

View File

@@ -28,14 +28,14 @@
<item name="Alfresco AMP Archetype" href="../alfresco-amp-archetype/index.html" />
<item name="Share AMP Archetype" href="./index.html" />
<item name="Alfresco All-in-One Archetype" href="../alfresco-allinone-archetype/index.html" />
<item name="Alfresco SDK Parent POM" href="../../poms/alfresco-sdk-parent/index.html" />
<item name="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="Official Alfresco SDK docs" href="http://docs.alfresco.com/community/concepts/alfresco-sdk-intro.html" />
<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

@@ -1,12 +1,12 @@
------
Alfresco Maven AMP Archetype Advanced Usage
Alfresco Share AMP Archetype Advanced Usage
------
Gabriele Columbro
------
Nov 2012
------
AMP Unit Testing
Unit Testing
Unit test your AMP customization is as easy as adding your tests in <<<src/test/java>>>. The current module in development
will be added to the test classpath together with all necessary Alfresco Spring contexts.
@@ -14,9 +14,9 @@ AMP Unit Testing
Running <<<mvn test>>> will results in your unit tests to be run. You can skip this (<<<not recommended>>>)
adding <<<-DskipTests>>> to your command line.
AMP Archetype properties
Share AMP Archetype properties
In the AMP archetype (as in the whole Part of the Maven Alfresco SDK\x99) properties are configurable at many levels:
In the AMP archetype (as in the whole Alfresco SDK\x99) properties are configurable at many levels:
* as POM properties
@@ -24,8 +24,6 @@ AMP Archetype properties
* <<<src/main/amp/module.properties>>> (filtered and packaged in the AMP)
* <<<src/test/properties/<env>/alfresco-global.properties>>> (environment dependent properties for WAR run embedded)
* Common properties
Archetype behavior can mostly be controlled directly in the POM, via common properties provided by the parent POM.

View File

@@ -3,7 +3,7 @@
------
Gabriele Columbro
------
Nov 2012
Sept 2014
------
Introduction
@@ -21,30 +21,47 @@ Introduction
* Installation of AMPs in an Alfresco or Share WAR
* AMP Unit Testing support. Just run the standard <<<mvn test>>> and see your <<<src/test/java>>> Alfresco unit tests run.
An sample Unit Test is provided in this archetype.
* AMP Unit Testing support. Just run the standard <<<mvn test>>> and see your <<<src/test/java>>> Alfresco unit tests run.
* 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 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 -Dfilter=org.alfresco.maven.archetype:
mvn archetype:generate -Dfilter=org.alfresco.maven.archetype:share-amp-archetype
+---+
For previous versions, you need to use the Alfresco Artifacts repository:
+---+
mvn archetype:generate -Dfilter=org.alfresco.maven.archetype:share-amp-archetype -DarchetypeCatalog=https://artifacts.alfresco.com/nexus/content/groups/public/archetype-catalog.xml
+---+
You should then:
[[1]] Select the <<<share-amp-archetype>>> option
[[1]] Select the <<<share-amp-archetype>>> version
[[2]] Specify the <<<groupId>>> and <<<artifactId>>> for the project you want to create
[[3]] (<Optionally>) Select Alfresco Version / Edition (current default is: Alfresco Community 5.0.a)
[[3]] (<Optionally>) Select Alfresco Version / Edition (current default is: Alfresco Community 5.0.c)
You can find new Share 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 Share on port 8081 (not Alfresco Repository or Solr).
* Wait for the startup of the webapp and then go <<<http://localhost:8081/share>>>. <NOTE>: For this to work you need
to have an Alfresco previously running on port 8080, for example as provided by the {{{../alfresco-amp-archetype/index.html}Alfresco AMP archetype}}
* Import the project in your favorite IDE (with Maven integration) and start developing right away.
Usage
Instructions on how to use the Share AMP archetype can be found on the {{{./usage.html}usage page}}, while

View File

@@ -1,5 +1,5 @@
------
Alfresco Maven AMP Archetype Usage
Maven Alfresco AMP Archetype Usage
------
Gabriele Columbro
------
@@ -27,6 +27,7 @@ Project layout
|-> licenses/
src/main/java //Java classes to be packaged in the AMP embedded JAR)
src/main/resources //resources to the packaged in the AMP embedded JAR)
src/main/resources/META-INF/resources //web resources to the packaged in the AMP embedded JAR, mapped to the root of the webapp as of Servlet 3.0)
src/test/java // Unit tests
src/test/resources // Unit test resources
src/test/properties/<env> // Environment aware alfresco-global.properties. By default <env>=local
@@ -43,17 +44,21 @@ Usage
* testing
* rapid development
* run embedded
* integration testing
* release and distribution of your AMP artifact.
* release and distribution of your Share 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
Common AMP project lifecycle commands you want to run are:
<<<run.sh>>> will automatically set up the SDK and run the AMP on Alfresco Share embedded to enable rapid development
Other common Share AMP project lifecycle commands you want to run are:
* <<<mvn package>>>: Runs unit tests and packages AMP in <<<$\{project.build.directory\}/$\{project.build.finalName\}.amp>>>

View File

@@ -28,13 +28,13 @@
<item name="Alfresco AMP Archetype" href="../alfresco-amp-archetype/index.html" />
<item name="Share AMP Archetype" href="./index.html" />
<item name="Alfresco All-in-One Archetype" href="../alfresco-allinone-archetype/index.html" />
<item name="Alfresco SDK Parent POM" href="../../poms/alfresco-sdk-parent/index.html" />
<item name="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="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=5.0.a
alfresco_target_version=5.0.c
$=cat archetype.properties
alfresco_target_groupId=org.alfresco
alfresco_target_amp_client_war=share
alfresco_target_amp_client_war_groupId=org.alfresco
alfresco_target_amp_client_war_version=5.0.a
alfresco_target_amp_client_war_version=5.0.c
artifactId=basic

View File

@@ -2,10 +2,10 @@
package=it.pkg
version=0.1-SNAPSHOT
groupId=archetype.it
alfresco_target_version=5.0.a
alfresco_target_version=5.0.c
$=cat archetype.properties
alfresco_target_groupId=org.alfresco
alfresco_target_amp_client_war=share
alfresco_target_amp_client_war_groupId=org.alfresco
alfresco_target_amp_client_war_version=5.0.a
alfresco_target_amp_client_war_version=5.0.c
artifactId=basic

View File

@@ -0,0 +1,8 @@
#Tue Oct 30 14:23:01 CET 2012
groupId=archetype.it
artifactId=basic
version=0.1-SNAPSHOT
$=cat archetype.properties
package=it.pkg
alfresco_target_groupId=org.alfresco
alfresco_target_version=5.0

View File

@@ -0,0 +1 @@
verify -Pamp-to-war -Penterprise -Dmaven.tomcat.fork=true

View File

@@ -4,12 +4,12 @@
<artifactId>alfresco-rad</artifactId>
<packaging>jar</packaging>
<name>Rapid Application Development support</name>
<description>SDK module for Rapid Deveopment support</description>
<name>Rapid Application Development Support</name>
<description>SDK module for Rapid Development support</description>
<parent>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-sdk-aggregator</artifactId>
<version>2.0.0-beta-2</version>
<version>2.0.0</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@@ -3,12 +3,12 @@
<groupId>org.alfresco.maven.plugin</groupId>
<artifactId>alfresco-maven-plugin</artifactId>
<packaging>maven-plugin</packaging>
<name>Alfresco Maven Plugin</name>
<name>Maven Alfresco Plugin</name>
<parent>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-sdk-aggregator</artifactId>
<version>2.0.0-beta-2</version>
<version>2.0.0</version>
<relativePath>../../pom.xml</relativePath>
</parent>
@@ -17,10 +17,10 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<version>3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
@@ -79,7 +79,12 @@
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-mmt</artifactId>
<version>5.0.a</version>
<version>5.0.c</version>
</dependency>
<dependency>
<groupId>org.alfrescolabs.alfresco-technical-validation</groupId>
<artifactId>org.alfrescolabs.alfresco-technical-validation</artifactId>
<version>0.4.0</version>
</dependency>
</dependencies>
@@ -88,8 +93,16 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.2</version>
<version>3.3</version>
</plugin>
</plugins>
</reporting>
<repositories>
<!-- Used for the ATV donwload -->
<repository>
<id>clojars.org</id>
<url>http://clojars.org/repo</url>
</repository>
</repositories>
</project>

View File

@@ -0,0 +1,80 @@
package org.alfresco.maven.plugin;
import java.io.File;
import org.alfrescolabs.technical.validation.AlfrescoTechnicalValidation;
import org.alfrescolabs.technical.validation.impl.AlfrescoTechnicalValidationImpl;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.project.MavenProject;
/**
* This goal provides the EXPERIMENTAL feature of validating your AMP module (source and binaries)
* against Alfresco (Repository and Share) development best practices, providing validation and
* alerts that can be used to improve quality, longevity and supportability of your code.
*
* It uses the ATV (Alfresco Technical Validation https://github.com/AlfrescoLabs/technical-validation)
*
* @version $Id:$
* @goal validate
* @phase verify
* @requiresProject
* @since 2.0.0-beta-2
* @threadSafe
* @description Invokes the Alfresco Technical Validation (https://github.com/AlfrescoLabs/technical-validation) of your customization
*/
public class ValidateMojo extends AbstractMojo {
/**
* This parameter skips validation (the feature is experimental so disabled by default)
*
* @parameter property="maven.alfresco.validation.skip" default-value="true"
* @required
*/
protected boolean skip;
//
/**
* The directory where the source project is stored. Should not include /target otherwise checks will be duplicated.
*
* @parameter property="maven.alfresco.validation.sourceLocation" default-value="${project.build.directory}/${project.build.finalName}-src"
* @required
*/
protected String sourceLocation;
/**
* The directory where the binary AMP package is to be found
*
* @parameter property="maven.alfresco.validation.binaryLocation" default-value="${project.build.directory}/${project.build.finalName}.amp"
* @required
*/
protected String binaryLocation;
/**
* The directory where the binary AMP package is to be found
*
* @parameter property="maven.alfresco.validation.neo4jUrl" default-value="http://localhost:7474/db/data/"
* @required
*/
protected String neo4jUrl;
/**
* [Read Only] The Maven project.
*
* @parameter default-value="${project}"
* @required
* @readonly
*/
protected MavenProject project;
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
if(!skip)
{
AlfrescoTechnicalValidation atv = new AlfrescoTechnicalValidationImpl();
atv.validate(sourceLocation, binaryLocation, neo4jUrl);
}
}
}

View File

@@ -8,7 +8,7 @@
Managing AMP packaging projects
See {{{./usage.html} Usage page}} for the different approaches to AMP projects development with the Alfresco Maven Plugin.
See {{{./usage.html} Usage page}} for the different approaches to AMP projects development with the Maven Alfresco Plugin.
Overlay and installation of AMPs to WAR
@@ -98,7 +98,7 @@ Overlay and installation of AMPs to WAR
** Multiple AMP installation
The plugin installation goal is thoroughly documented in the {{{./install-mojo.html} alfresco:install mojo page}}, but we provide here an example of how to mimic the
<<<apply_amps.sh>>> (Alfresco script), using the Alfresco Maven Plugin to install a full folder of AMPs (<<NOTE:>> The install goal
<<<apply_amps.sh>>> (Alfresco script), using the Maven Alfresco Plugin to install a full folder of AMPs (<<NOTE:>> The install goal
is bound in this case to the <<<package>>> phase, it's up to you to make sure an exploded WAR or WAR is present in warLocation
during that phase):

View File

@@ -8,11 +8,11 @@
Introduction
The Alfresco Maven Plugin provides development features to manage {{{http://www.alfresco.com}Alfresco ECM}} WAR and {{{https://wiki.alfresco.com/wiki/AMP_Files}AMP}} project lifecycles.
The Maven Alfresco Plugin provides development features to manage {{{http://www.alfresco.com}Alfresco ECM}} WAR and {{{https://wiki.alfresco.com/wiki/AMP_Files}AMP}} project lifecycles.
* Goals Overview
The Alfresco Maven plugin has three goals:
The Maven Alfresco plugin has three goals:
*{{{./amp-mojo.html}alfresco:amp}} Packages an AMP file
@@ -24,10 +24,10 @@ Introduction
* Usage
General instructions on how to use the Alfresco Maven Plugin can be found on the {{{./usage.html}usage page}}.
General instructions on how to use the Maven Alfresco Plugin can be found on the {{{./usage.html}usage page}}.
The Alfresco Maven Plugin provides support for <<<amp>>> packaging in your Maven projects and allows you to
The Maven Alfresco Plugin provides support for <<<amp>>> packaging in your Maven projects and allows you to
build AMPs as well as used them as standard Maven dependencies. You can also use AMPs as part of the standard
{{{http://maven.apache.org/plugins/maven-war-plugin/overlays.html}maven-war-plugin}} <<< <overlays> >>> configuration.
For more complex usage of the Alfresco Maven Plugin check the {{{./advanced-usage.html}advanced usage page}}.
For more complex usage of the Maven Alfresco Plugin check the {{{./advanced-usage.html}advanced usage page}}.

View File

@@ -1,7 +1,7 @@
-----
Alfresco Maven Plugin Components
Maven Alfresco Plugin Components
-----
The Alfresco Maven Plugin defines support components to manage AMP (Alfresco Module Package) lifecycle.
The Maven Alfresco Plugin defines support components to manage AMP (Alfresco Module Package) lifecycle.
AMP Lifecycle

View File

@@ -10,13 +10,13 @@ How to use this plugin?
There are fundamentally 3 methods to use this plugin:
[[1]] Using Archetypes provided in the Maven Alfresco SDK
[[1]] Using Archetypes provided in the Alfresco SDK
[[2]] By using the Alfresco SDK Parent POM
[[3]] Via direct configuration in your POM
* Method 1 - Using Maven Alfresco SDK Archetypes
* Method 1 - Using Alfresco SDK Archetypes
Two sample archetypes already use the plugin and provide best practice example on how to use it:
@@ -27,9 +27,9 @@ How to use this plugin?
This is the <<recommended>> and less error-prone way of using the plugin.
* Method 2 - Using Maven Alfresco SDK Parent POM
* Method 2 - Using Alfresco SDK Parent POM
The {{{../../poms/alfresco-sdk-parent/index.html}Maven Alfresco SDK Parent POM}} provides a single entry point for all SDK features.
The {{{../../poms/alfresco-sdk-parent/index.html}Alfresco SDK Parent POM}} provides a single entry point for all SDK features.
By using it as parent as follows:
@@ -53,7 +53,7 @@ How to use this plugin?
<<NOTE>>: The following configuration is not required when using the SDK parent, as it's already included there.
In order to manage AMP artifacts with the Alfresco Maven plugin you need to:
In order to manage AMP artifacts with the Maven Alfresco plugin you need to:
* Declare the plugin in your POM with <<<<extensions>>>> enabled, to allow AMP packaging lifecycle:

View File

@@ -17,7 +17,7 @@
</script>
</head>
<menu name="Alfresco Maven Plugin">
<menu name="Maven Alfresco Plugin">
<item name="Introduction" href="index.html"/>
<item name="Goals" href="plugin-info.html"/>
<item name="Usage" href="usage.html"/>
@@ -30,14 +30,14 @@
<item name="Alfresco AMP Archetype" href="../../archetypes/alfresco-amp-archetype/index.html" />
<item name="Share AMP Archetype" href="../../archetypes/share-amp-archetype/index.html" />
<item name="Alfresco All-in-One Archetype" href="../../archetypes/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="./index.html" />
<item name="Maven Alfresco Plugin" href="./index.html" />
</menu>
<menu name="Maven Alfresco Community">
<item name="Official Alfresco SDK docs" href="http://docs.alfresco.com/community/concepts/alfresco-sdk-intro.html" />
<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/" />

47
pom.xml
View File

@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-sdk-aggregator</artifactId>
<version>2.0.0-beta-2</version>
<version>2.0.0</version>
<name>Maven Alfresco SDK</name>
<description>This aggregator Project builds all modules required for
the Maven Alfresco SDK</description>
@@ -31,7 +31,7 @@
<connection>scm:git:${scm.url.base}.git</connection>
<developerConnection>scm:git:${scm.url.base}</developerConnection>
<url>${scm.url.base}</url>
<tag>alfresco-sdk-aggregator-2.0.0-beta-2</tag>
<tag>alfresco-sdk-aggregator-2.0.0</tag>
</scm>
<developers>
@@ -121,6 +121,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.archetype.version>2.2</maven.archetype.version>
<alfresco.sdk.parent.version>${project.version}</alfresco.sdk.parent.version>
<springloaded.version>1.2.0.RELEASE</springloaded.version>
<scm.url.base>https://github.com/Alfresco/alfresco-sdk</scm.url.base>
</properties>
<build>
@@ -130,6 +131,9 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-archetype-plugin</artifactId>
<version>${maven.archetype.version}</version>
<configuration>
<skip>${skipTests}</skip>
</configuration>
</plugin>
</plugins>
</pluginManagement>
@@ -169,7 +173,7 @@
<id>sdk-release</id>
<properties>
<maven.site.url>https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-sdk-aggregator/latest</maven.site.url>
<maven.release.version>2.5</maven.release.version>
<maven.release.version>2.5.1</maven.release.version>
<maven.release.goals>deploy site-deploy</maven.release.goals>
<maven.site.version>3.4</maven.site.version>
<maven.changes.version>2.10</maven.changes.version>
@@ -179,7 +183,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<version>2.4</version>
<executions>
<execution>
<id>attach-sources</id>
@@ -192,7 +196,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<version>2.10.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
@@ -272,6 +276,39 @@
</site>
</distributionManagement>
</profile>
<!-- Attempt (failed) to retain run.sh permissions. Zip files are bad at this, full stop.
<profile>
<id>set-executables-permissions</id>
<activation>
<file>
<exists>src/main/resources/archetype-resources/run.sh</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>set-executable-resources</id>
<goals>
<goal>run</goal>
</goals>
<phase>process-resources</phase>
<configuration>
<target>
<chmod file="${project.build.outputDirectory}/archetype-resources/run.sh" perm="755" />
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
-->
</profiles>
</project>

View File

@@ -2,7 +2,7 @@
<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>alfresco-sdk-parent</artifactId>
<name>Maven Alfresco SDK Parent POM</name>
<name>Maven Alfresco SDK - Parent POM</name>
<description>
The Maven Alfresco SDK Parent POM exposes the developer features of the Maven Alfresco SDK.
Declare this POM as parent for your project and select the Alfresco version/edition by defining
@@ -14,12 +14,12 @@
<parent>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-sdk-aggregator</artifactId>
<version>2.0.0-beta-2</version>
<version>2.0.0</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<!-- This defines the version of the SDK in terms of features -->
<version>2.0.0-beta-2</version>
<version>2.0.0</version>
<prerequisites>
<maven>3.2.2</maven>
@@ -29,23 +29,25 @@
<!-- Default Alfresco version this SDK version has been tested with:
|
| alfresco.groupId can be
| org.alfresco ==> Alfresco community
| org.alfresco.enterprise ==> Alfresco Enterprise
| org.alfresco ==> Alfresco Community/Enterprise (post alfresco 4.2)
| org.alfresco.enterprise ==> Alfresco Enterprise (pre Alfresco 4.2)
|
| NOTE: You can / should override these properties in you POM to select the proper version
|
| For available versions please search on https://artifacts.alfresco.com/nexus/index.html
-->
<alfresco.groupId>org.alfresco</alfresco.groupId>
<alfresco.version>5.0.a</alfresco.version>
<alfresco.version>5.0.c</alfresco.version>
<!-- By default uses community artifacts (alfresco|share). Overridden in the 'enterprise' profile, with 'alfresco-enterprise' and 'share-enterprise' -->
<alfresco.repo.artifactId>alfresco</alfresco.repo.artifactId>
<alfresco.share.artifactId>share</alfresco.share.artifactId>
<!-- Values can be "alfresco" or "share". Default value is 'alfresco' assuming you are developing a repository AMP, change to share for share AMPs
| This impact (in AMP projects) the choice of the WAR project for embedded run
-->
<alfresco.client.war>alfresco</alfresco.client.war>
<alfresco.client.war>${alfresco.repo.artifactId}</alfresco.client.war>
<alfresco.client.war.groupId>${alfresco.groupId}</alfresco.client.war.groupId>
<alfresco.client.war.version>${alfresco.version}</alfresco.client.war.version>
<alfresco.client.contextPath>/${alfresco.client.war}</alfresco.client.contextPath>
<!-- IMPORTANT! Override this only if you know what you're doing; it could break amp-to-war overlay -->
<alfresco.client.war.folder>${project.build.directory}/${project.build.finalName}-war</alfresco.client.war.folder>
@@ -56,7 +58,7 @@
<alfresco.db.name>alf_dev</alfresco.db.name>
<alfresco.db.username>alfresco</alfresco.db.username>
<alfresco.db.password>alfresco</alfresco.db.password>
<alfresco.db.params>MODE=PostgreSQL;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=10000;MVCC=TRUE</alfresco.db.params>
<alfresco.db.params>MODE=PostgreSQL;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=10000;MVCC=FALSE;LOCK_MODE=0</alfresco.db.params>
<!-- By default the H2 embedded database datafile is created under the alfresco.data.location folder -->
<alfresco.db.url>jdbc:h2:./${alfresco.data.location}/h2_data/${alfresco.db.name};${alfresco.db.params}</alfresco.db.url>
<alfresco.db.datasource.class>org.h2.jdbcx.JdbcDataSource</alfresco.db.datasource.class>
@@ -97,29 +99,35 @@
<app.log.dir>${project.build.directory}/</app.log.dir>
<app.log.root.level>WARN</app.log.root.level>
<!-- Needed for community to avoid weird logging exceptions -->
<app.slf4j.scope>runtime</app.slf4j.scope>
<app.slf4j.version>1.5.11</app.slf4j.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- Maven Plugins Versions used by the SDK -->
<maven.compiler.version>3.1</maven.compiler.version>
<maven.clean.version>2.5</maven.clean.version>
<maven.dependency.version>2.8</maven.dependency.version>
<maven.compiler.version>3.2</maven.compiler.version>
<maven.clean.version>2.6.1</maven.clean.version>
<maven.dependency.version>2.9</maven.dependency.version>
<maven.enforcer.plugin>1.3.1</maven.enforcer.plugin>
<maven.resources.version>2.6</maven.resources.version>
<maven.surefire.version>2.16</maven.surefire.version>
<maven.install.version>2.5.1</maven.install.version>
<maven.jar.version>2.4</maven.jar.version>
<maven.war.version>2.4</maven.war.version>
<maven.release.version>2.4.2</maven.release.version>
<maven.buildhelper.version>1.8</maven.buildhelper.version>
<maven.resources.version>2.7</maven.resources.version>
<maven.surefire.version>2.18</maven.surefire.version>
<maven.install.version>2.5.2</maven.install.version>
<maven.jar.version>2.5</maven.jar.version>
<maven.war.version>2.5</maven.war.version>
<maven.antrun.version>1.7</maven.antrun.version>
<maven.release.version>2.5.1</maven.release.version>
<maven.buildhelper.version>1.9.1</maven.buildhelper.version>
<maven.replacer.version>1.5.3</maven.replacer.version>
<maven.tomcat.version>2.1</maven.tomcat.version>
<maven.tomcat.version>2.2</maven.tomcat.version>
<!-- This is used for the site deployment procedure (override in your POM as needed) -->
<stagingDirectory>../../target/staging/poms/alfresco-sdk-parent</stagingDirectory>
<!-- Alfresco Maven plugin in use throughout the SDK -->
<maven.alfresco.version>2.0.0-beta-2</maven.alfresco.version>
<h2.version>1.3.174</h2.version>
<h2-support.version>1.5</h2-support.version>
<!-- Maven Alfresco plugin in use throughout the SDK -->
<maven.alfresco.version>2.0.0</maven.alfresco.version>
<h2.version>1.4.182</h2.version>
<h2-support.version>5.0.0</h2-support.version>
<junit.version>4.11</junit.version>
<maven.jetty.version>7.4.0.v20110414</maven.jetty.version>
</properties>
<!-- This repository is only needed to retrieve Alfresco parent POM.
@@ -131,6 +139,17 @@
if you are a Enterprise customer or Partner
-->
<repositories>
<repository>
<id>sonatype-snapshots</id>
<name>Sonatype Snapshot Repo</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>alfresco-public</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
@@ -146,6 +165,14 @@
</repositories>
<pluginRepositories>
<pluginRepository>
<id>sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>alfresco-plugin-public</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
@@ -194,6 +221,7 @@
<nonFilteredFileExtension>jpg</nonFilteredFileExtension>
<nonFilteredFileExtension>png</nonFilteredFileExtension>
<nonFilteredFileExtension>gif</nonFilteredFileExtension>
<nonFilteredFileExtension>svg</nonFilteredFileExtension>
<nonFilteredFileExtension>pdf</nonFilteredFileExtension>
<nonFilteredFileExtension>doc</nonFilteredFileExtension>
<nonFilteredFileExtension>docx</nonFilteredFileExtension>
@@ -206,6 +234,11 @@
<nonFilteredFileExtension>swf</nonFilteredFileExtension>
<nonFilteredFileExtension>zip</nonFilteredFileExtension>
<nonFilteredFileExtension>msg</nonFilteredFileExtension>
<nonFilteredFileExtension>jar</nonFilteredFileExtension>
<nonFilteredFileExtension>ttf</nonFilteredFileExtension>
<nonFilteredFileExtension>eot</nonFilteredFileExtension>
<nonFilteredFileExtension>woff</nonFilteredFileExtension>
<nonFilteredFileExtension>woff2</nonFilteredFileExtension>
</nonFilteredFileExtensions>
</configuration>
</plugin>
@@ -259,6 +292,11 @@
<artifactId>maven-jar-plugin</artifactId>
<version>${maven.jar.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>${maven.antrun.version}</version>
</plugin>
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
@@ -278,11 +316,6 @@
<artifactId>h2</artifactId>
<version>${h2.version}</version>
</dependency>
<dependency>
<groupId>tk.skuro.alfresco</groupId>
<artifactId>h2-support</artifactId>
<version>${h2-support.version}</version>
</dependency>
<!-- Major performance improvement,
see http://mindthegab.com/2013/06/20/maven-is-not-so-evil-plexus-archives-2-3-is-a-life-saver-for-the-speed-of-your-war-development-with-maven/ -->
<dependency>
@@ -324,13 +357,6 @@
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.alfresco.maven.plugin</groupId>
<artifactId>alfresco-maven-plugin</artifactId>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
@@ -350,6 +376,7 @@
</testResources>
</build>
<!-- Feature / behavioral profiles -->
<profiles>
<!-- Enable environment properties filtering based on the env property -->
@@ -515,29 +542,6 @@
<version>${maven.alfresco.version}</version>
<scope>test</scope>
</dependency>
<!--
| Requires this explicit test dependency, for a Spring 3.0.5 bug
| See https://jira.springsource.org/browse/SPR-8527
-->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>3.0.6.RELEASE</version>
<scope>provided</scope>
</dependency>
<!-- SDK AMP Testing Dependencies -->
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>${h2.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>tk.skuro.alfresco</groupId>
<artifactId>h2-support</artifactId>
<version>${h2-support.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
@@ -672,22 +676,18 @@
</plugins>
</build>
<dependencies>
<!-- Needed to fix http://code.google.com/p/maven-alfresco-archetypes/issues/detail?id=150 -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.5.11</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.5.11</version>
</dependency>
<dependency>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-rad</artifactId>
<version>${maven.alfresco.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>${maven.jetty.version}</version>
</dependency>
</dependencies>
</profile>
@@ -760,5 +760,223 @@
</plugins>
</build>
</profile>
<!-- Does any SDK dev environment preparation (e.g. spring-loaded download) -->
<profile>
<id>setup</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<!-- This simply downloads the spring-loaded jar to ~/.m2/repository/org/springframework/spring-loaded/${springloaded.version}/spring-loaded-${springloaded.version}.jar -->
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>get-spring-loaded</id>
<phase>validate</phase>
<goals><goal>get</goal></goals>
<configuration>
<artifact>org.springframework:springloaded:${springloaded.version}</artifact>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!--
Enables working with Alfresco Enterprise latest version. You can then manually override the alfresco.version in your pom.xml
-->
<profile>
<id>enterprise</id>
<properties>
<alfresco.version>5.0</alfresco.version>
<alfresco.repo.artifactId>alfresco-enterprise</alfresco.repo.artifactId>
<alfresco.share.artifactId>share-enterprise</alfresco.share.artifactId>
<!-- Not needed in the webapp for enterprise -->
<app.slf4j.scope>provided</app.slf4j.scope>
</properties>
<repositories>
<repository>
<id>alfresco-internal</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/private</url>
</repository>
</repositories>
</profile>
<!-- EXPERIMENTAL: Invokes the Alfresco Technical Validation tool at https://github.com/AlfrescoLabs/technical-validation -->
<profile>
<id>atv</id>
<properties>
<maven.alfresco.validation.skip>false</maven.alfresco.validation.skip>
<maven.alfresco.validation.sourceLocation>${project.build.directory}/${project.build.finalName}-src</maven.alfresco.validation.sourceLocation>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>isolate-project-src</id>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${maven.alfresco.validation.sourceLocation}</outputDirectory>
<resources>
<resource>
<directory>${project.basedir}</directory>
<excludes>
<exclude>target</exclude>
</excludes>
<filtering>${app.filtering.enabled}</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.alfresco.maven.plugin</groupId>
<artifactId>alfresco-maven-plugin</artifactId>
<executions>
<execution>
<id>run-atv</id>
<phase>verify</phase>
<goals>
<goal>validate</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>de.herschke</groupId>
<artifactId>neo4j-maven-plugin</artifactId>
<version>2.0.2-20140827</version>
<executions>
<execution>
<id>start-neo4j-server</id>
<phase>post-integration-test</phase>
<goals>
<goal>start-server</goal>
</goals>
</execution>
<execution>
<id>stop-neo4j-server</id>
<phase>verify</phase>
<goals>
<goal>stop-server</goal>
</goals>
</execution>
</executions>
<configuration>
<port>7474</port>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!-- Configures automatic embedded H2 database support for repository amps (if a test alfresco-global.properties is found) -->
<profile>
<id>config-h2-support</id>
<activation>
<file>
<exists>src/test/properties/local/alfresco-global.properties</exists>
</file>
</activation>
<build>
<plugins>
<!-- Copied PostgreSQL dialect files to generate H2 dialect files on-the-fly -->
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>extract-postgres-dialect</id>
<phase>generate-test-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-repository</artifactId>
<version>${alfresco.version}</version>
<includes>alfresco/dbscripts/create/org.hibernate.dialect.PostgreSQLDialect/*,alfresco/dbscripts/upgrade/*/org.hibernate.dialect.PostgreSQLDialect/*,alfresco/ibatis/org.hibernate.dialect.PostgreSQLDialect/*</includes>
<outputDirectory>${project.build.testOutputDirectory}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>generate-h2-dialect</id>
<phase>generate-test-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.testOutputDirectory}</outputDirectory>
<resources>
<resource>
<directory>${project.build.testOutputDirectory}/alfresco/dbscripts/create/org.hibernate.dialect.PostgreSQLDialect</directory>
<includes>
<include>*</include>
</includes>
<targetPath>alfresco/dbscripts/create/org.hibernate.dialect.H2Dialect</targetPath>
</resource>
<resource>
<directory>${project.build.testOutputDirectory}/alfresco/ibatis/org.hibernate.dialect.PostgreSQLDialect</directory>
<includes>
<include>*</include>
</includes>
<targetPath>alfresco/ibatis//org.hibernate.dialect.H2Dialect</targetPath>
</resource>
<!-- Upgrade scripts -->
<resource>
<directory>${project.build.testOutputDirectory}/alfresco/dbscripts/upgrade/4.1/org.hibernate.dialect.PostgreSQLDialect</directory>
<includes>
<include>*</include>
</includes>
<targetPath>alfresco/dbscripts/upgrade/4.1/org.hibernate.dialect.H2Dialect</targetPath>
</resource>
<resource>
<directory>${project.build.testOutputDirectory}/alfresco/dbscripts/upgrade/4.2/org.hibernate.dialect.PostgreSQLDialect</directory>
<includes>
<include>*</include>
</includes>
<targetPath>alfresco/dbscripts/upgrade/4.2/org.hibernate.dialect.H2Dialect</targetPath>
</resource>
<resource>
<directory>${project.build.testOutputDirectory}/alfresco/dbscripts/upgrade/5.0/org.hibernate.dialect.PostgreSQLDialect</directory>
<includes>
<include>*</include>
</includes>
<targetPath>alfresco/dbscripts/upgrade/5.0/org.hibernate.dialect.H2Dialect</targetPath>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<!-- h2 Dependency -->
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>${h2.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
</profiles>
</project>

View File

@@ -8,10 +8,10 @@
Introduction
The Alfresco SDK Parent POM ${project.version} is the <<<single entry point>>> for all Maven Alfresco SDK\x99 features.
The Alfresco SDK Parent POM ${project.version} is the <<<single entry point>>> for all Alfresco SDK\x99 features.
It aggregates plugin configurations and dependencies to provide a set of profiles and properties to manage the full Alfresco projects Lifecycle on Maven.
The current version of the POM in use in the Maven Alfresco SDK\x99 ${project.version} is available {{{https://oss.sonatype.org/index.html#nexus-search;gav~org.alfresco.maven~alfresco-sdk-parent~${project.version}~pom~}on Maven Central}}.
The current version of the POM in use in the Alfresco SDK\x99 ${project.version} is available {{{https://oss.sonatype.org/index.html#nexus-search;gav~org.alfresco.maven~alfresco-sdk-parent~${project.version}~pom~}on Maven Central}}.
Usage

View File

@@ -1,31 +1,41 @@
------
Maven Alfresco SDK\x99 Profiles
Alfresco SDK\x99 Profiles
------
Gabriele Columbro
------
Nov 2012
Aug 2014
------
SDK Available Profiles
The Maven Alfresco SDK\x99 defines common features required by different Alfresco projects.
The Alfresco SDK\x99 defines common features required by different Alfresco projects.
While the <<<recommended>>> way is to use full working examples of usage of these profiles (e.g. the
{{{../../archetypes/alfresco-amp-archetype/index.html}AMP}} and {{{../../archetypes/alfresco-allinone-archetype/index.html}All-in-One}} archetypes),
{{{../../archetypes/alfresco-amp-archetype/index.html}Repo AMP}}, {{{../../archetypes/share-amp-archetype/index.html}Share AMP} and {{{../../archetypes/alfresco-allinone-archetype/index.html}All-in-One}} archetypes),
you can also directly use this POM as a parent in your custom project.
Here goes the list of common used profiles (with their activation conditions):
*-----------+--------------+-------------+-------------+
|| Profile || Description || Activation || Phase |
*-----------+--------------+-------------+-------------+
| amp-to-war | Allows AMP projects to be run embedded on a WAR | Manual: <<<-Pamp-to-war>>> | integration-test |
*-----------*--------------*-------------*-------------*
| purge | Cleans all alf_data and logs from Alfresco runs | Manual: <<<-Ppurge>>> | clean |
*-----------*--------------*-------------*-------------*
| enable-amp-testing | Allows AMP unit testing | Automatic if <<<src/test/java>>> is present | test |
*-----------*--------------*-------------*-------------*
| enable-amp | Activates AMP packaging | Automatic if <<<src/main/amp/modules.properties>>> is present | test |
*-----------+--------------+-------------+-------------+
*-----------+--------------+-------------+-------------+-------------+
|| Archetypes || Profile || Description || Activation || Phase |
*-----------+--------------+-------------+-------------+-------------+
| amp, share-amp | amp-to-war | Allows AMP projects to be run embedded on a WAR and in rapid dev mode | Manual: <<<-Pamp-to-war>>> | pre-integration-test |
*-----------*--------------*-------------*-------------*-------------+
| all-in-one | run | Runs embedded Alfresco + Share + Solr in rapid dev mode | Manual: <<<-Prun>>> | pre-integration-test |
*-----------*--------------*-------------*-------------*-------------+
| any | purge | Cleans all alf_data and logs from Alfresco runs | Manual: <<<-Ppurge>>> | clean |
*-----------*--------------*-------------*-------------*-------------+
| any | enterprise |Configures your build to use Alfresco Enterprise. Obtain your credentials with {{{https://support.alfresco.com}Alfresco Support}}| Manual: <<<-Penterprise>>> | N/A |
*-----------+--------------+-------------+-------------+-------------+
| any | setup | Sets up the sdk, e.g. grabs springloaded. | Manual: <<<-Psetup>>> (automated in the run.sh) | initialize |
*-----------+--------------+-------------+-------------+-------------+
| all-in-one | rm | Adds Records Management runtime and compile time dependencies | Manual: <<<-Prm>>> | package |
*-----------+--------------+-------------+-------------+-------------+
| all-in-one | regression | (Experimental) Invokes the Alfresco {{{https://github.com/AlfrescoLabs/technical-validation/}Share PO}} Webdrone / Selenium based regression tests| Manual: <<<-Pregression>>> | integration-test |
*-----------+--------------+-------------+-------------+-------------+
| amp, share-amp | atv | (Experimental) Invokes the {{{https://github.com/AlfrescoLabs/technical-validation/}Alfresco Technical Validation tool}} | Manual: <<<-Patv>>> | validate |
*-----------+--------------+-------------+-------------+-------------+
The full list of available profiles (with their activation conditions) can be instead found in the <<<profiles>>> section of the
{{{https://artifacts.alfresco.com/nexus/index.html#nexus-search;gav~org.alfresco.maven~alfresco-sdk-parent~${project.version}~pom~}Alfresco SDK POM}}.

View File

@@ -1,5 +1,5 @@
------
Maven Alfresco SDK Properties
Alfresco SDK Properties
------
Gabriele Columbro
------
@@ -20,7 +20,7 @@ Common SDK properties
-->
<properties>
<alfresco.groupId>org.alfresco</alfresco.groupId>
<alfresco.version>4.2.b</alfresco.version>
<alfresco.version>5.0.c</alfresco.version>
<!-- Defines root logger log level for testing and embedded run -->
<app.log.root.level>WARN</app.log.root.level>
<!-- Logging dir. Note the trailing slash is required -->

View File

@@ -2,7 +2,7 @@
<skin>
<groupId>org.apache.maven.skins</groupId>
<artifactId>maven-fluido-skin</artifactId>
<version>1.3.0</version>
<version>1.3.1</version>
</skin>
<custom>
@@ -62,14 +62,14 @@
<item name="Alfresco AMP Archetype" href="../../archetypes/alfresco-amp-archetype/index.html" />
<item name="Share AMP Archetype" href="../../archetypes/share-amp-archetype/index.html" />
<item name="Alfresco All-in-One Archetype" href="../../archetypes/alfresco-allinone-archetype/index.html" />
<item name="Alfresco SDK Parent POM" href="./index.html" />
<item name="Maven Alfresco SDK Parent POM" href="./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="Official Alfresco SDK docs" href="http://docs.alfresco.com/community/concepts/alfresco-sdk-intro.html" />
<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

@@ -1,7 +1,7 @@
<!-- This document is obsolete. Now release notes are generated via the github report -->
<document>
<properties>
<title>Maven Alfresco SDK (former Maven Alfresco Lifecycle)</title>
<title>Maven Alfresco SDK (former Alfresco Lifecycle)</title>
<author email="gabriele.columbro@alfresco.com">Gabriele Columbro</author>
</properties>
<body>
@@ -41,7 +41,7 @@
Linked all sub modules.
</action>
<action dev="columbro" type="add">
Added this wrapper project to group all Maven Alfresco plugins and archetype useful for the Maven Alfresco Lifecycle support
Added this wrapper project to group all Alfresco plugins and archetype useful for the Alfresco Lifecycle support
</action>
</release>
</body>

View File

@@ -1,5 +1,5 @@
------
Maven Alfresco SDK\x99
Alfresco SDK\x99
------
Gabriele Columbro
------
@@ -8,13 +8,13 @@
Introduction
The (Maven) Alfresco SDK\x99 - formerly {{{https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/maven-alfresco-lifecycle/latest/index.html} Maven Alfresco Lifecycle 3.9.1}} -
The Alfresco SDK\x99 - formerly Maven Alfresco SDK\x99, formerly {{{https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/maven-alfresco-lifecycle/latest/index.html} Alfresco Lifecycle 3.9.1}} -
provides a fully fledged Maven support for {{{http://www.alfresco.com}Alfresco ECM}} WAR and {{{https://wiki.alfresco.com/wiki/AMP_Files}AMP}} project development.
Being fully integrated with Maven it allows to both leverage the vast number of Maven plugins for your Alfresco project as well as integrated your
project easily in Open Source and Enterprise development processes.
The Maven Alfresco SDK\x99 is fully documented in the single components websites (see menu above).
For official (Enterprise) support of this SDK please refer to the features and tutorials documented in {{{http://docs.alfresco.com/community/concepts/alfresco-sdk-intro.html}the Official Alfresco Docs}}.
The Alfresco SDK\x99 is fully documented in the single components websites (see menu above).
For official (Enterprise) support of this SDK please refer to the features and tutorials documented in {{{http://docs.alfresco.com/community/concepts/alfresco-sdk-intro.html}the Official Alfresco Documentation}}.
How to Use the SDK
@@ -27,7 +27,7 @@ SDK Versions
As of version 2.0, releases for the Alfresco SDK are available in Maven Central.
Alfresco SDK 1.x versions rely on the {{{https://artifacts.alfresco.com/nexus/content/groups/public/}Alfresco Artifacts Repository}}.
Maven Alfresco SDK 1.x versions rely on the {{{https://artifacts.alfresco.com/nexus/content/groups/public/}Alfresco Artifacts Repository}}.
For documentation on the Maven Alfresco SDK\x99 1.x please refer to {{{https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-lifecycle-aggregator/latest/index.html} Maven Alfresco SDK 1.x}}
SDK Alfresco Compatibility
@@ -35,15 +35,21 @@ SDK Alfresco Compatibility
Please refer to the {{{http://docs.alfresco.com/community/concepts/alfresco-sdk-compatibility.html}official Alfresco docs}} for details of SDK / Alfresco compatibility.
Maven Alfresco SDK\x99 components
Alfresco SDK\x99 components
The Maven Alfresco SDK relies on a number of components:
The Alfresco SDK relies on a number of components:
* {{{./poms/alfresco-sdk-parent/index.html}The SDK parent POM}} providing full Alfresco project lifecycle feature, to be added as a <<<<parent>>>> in your projects
* Archetypes like the {{{./archetypes/alfresco-amp-archetype/index.html}Repo AMP}}, {{{./archetypes/share-amp-archetype/index.html}Share AMP}} or {{{./archetypes/alfresco-allinone-archetype/index.html}All-in-One}} providing sample project to kickstart your Alfresco development and boost it with best practices
* Archetypes providing sample project to kickstart your Alfresco development and boost it with best practices
* The {{{./plugins/alfresco-maven-plugin/index.html} Alfresco Maven Plugin}} to manage AMP packaging and dependencies
* the {{{./archetypes/alfresco-amp-archetype/index.html}Repo AMP}}, a single project that customizes Alfresco Repository
* the {{{./archetypes/share-amp-archetype/index.html}Share AMP}}, a single project that customizes Alfresco Share
* the {{{./archetypes/alfresco-allinone-archetype/index.html}All-in-One}}, a multi-module project to customize and run all components
* The {{{./plugins/alfresco-maven-plugin/index.html} Maven Alfresco Plugin}} to manage AMP packaging and dependencies
* {{{https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-platform-distribution/latest}Alfresco Platform Distribution POM}} can (optionally) be used to provide centralized <<<<dependencyManagement>>>> on a particular Alfresco version / edition (Community / Enterprise)
@@ -65,18 +71,18 @@ Pre-requisites
Project History
* Born in 2007 with the name of {{{http://forge.alfresco.com/gf/project/maven4alfresco/}maven4alfresco}}, later committed on google Code as {{{https://code.google.com/p/maven-alfresco-archetypes/}Maven Alfresco Archetypes}}
* Born in 2007 with the name of {{{http://forge.alfresco.com/gf/project/maven4alfresco/}maven4alfresco}}, later committed on google Code as {{{https://code.google.com/p/maven-alfresco-archetypes/}Alfresco Archetypes}}
* Created in 2008 the {{{https://groups.google.com/forum/?fromgroups#!forum/maven-alfresco}Maven Alfresco Lifecycle Discussion Group}} in order to open roadmap and features with Alfresco Community
* Created in 2008 the {{{https://groups.google.com/forum/?fromgroups#!forum/maven-alfresco}Alfresco Lifecycle Discussion Group}} in order to open roadmap and features with Alfresco Community
* {{{https://artifacts.alfresco.com/}Alfresco Maven Repository}} is {{{http://mindthegab.com/2009/12/02/dreams-come-true-launching-the-alfresco-community-maven-repository/}launched}} in 2009 for Community and Enterprise Alfresco customers
* {{{https://artifacts.alfresco.com/}Maven Alfresco Repository}} is {{{http://mindthegab.com/2009/12/02/dreams-come-true-launching-the-alfresco-community-maven-repository/}launched}} in 2009 for Community and Enterprise Alfresco customers
* In April 2012 version {{{https://groups.google.com/forum/?fromgroups=#!searchin/maven-alfresco/3.9.1/maven-alfresco/ZSX1t9W-Jcg/MB-YqAdnCAAJ}3.9.1 is released}}, which delivers Maven build support for all 3.x Alfresco versions
* The {{{https://groups.google.com/forum/?fromgroups#!forum/maven-alfresco}Maven Alfresco Lifecycle Discussion Group}} reaches 100 members in August 2012
* The {{{https://groups.google.com/forum/?fromgroups#!forum/maven-alfresco}Alfresco Lifecycle Discussion Group}} reaches 100 members in August 2012
* In October 2012 Alfresco finalises the {{{https://issues.alfresco.com/jira/browse/ALF-14353} Maven modularisation and dependency categorisation}}, delivering {{{https://artifacts.alfresco.com}artifacts and poms}}
* The new Alfresco Maven SDK 1.0 is released and presented on Tuesday 7 November at {{{http://devcon.alfresco.com/}Alfresco DevCon}} in Berlin.
* The new Maven Alfresco SDK 1.0 is released and presented on Tuesday 7 November at {{{http://devcon.alfresco.com/}Alfresco DevCon}} in Berlin.
* The new Alfresco Maven SDK 2.0 is released and presented on late 2014 November and released on Maven Central
* The new Alfresco SDK 2.0 is released and presented on late 2014 November and released on Maven Central

View File

@@ -1,5 +1,5 @@
------
Maven Alfresco SDK Prerequisites
Alfresco SDK Prerequisites
------
Gabriele Columbro
------
@@ -7,10 +7,10 @@
------
Maven Alfresco SDK\x99 Pre-Requisites
Alfresco SDK\x99 Pre-Requisites
The only real prerequisite of the Maven Alfresco SDK\x99 Apache Maven 3.0.4 installed (and properly configured) on your machine;
The only real prerequisite of the Alfresco SDK\x99 Apache Maven 3.0.4 installed (and properly configured) on your machine;
neither <<an IDE>> nor <<web container or database>> are required.
Additional tips:
@@ -27,6 +27,8 @@ Maven Alfresco SDK\x99 Pre-Requisites
Alfresco platform is retrieved automatically from {{{https://artifacts.alfresco.com} the Alfresco Artifacts Repository}}
based on the <<<alfresco.groupId>>> and <<<alfresco.version>>> POM properties
* If you're an Alfresco customer, you can setup a ~/.m2/settings.xml as documented on {{{http://docs.alfresco.com/4.2/tasks/dev-extensions-maven-sdk-tutorials-configure-maven-enterprise.html} Alfresco Docs page}} and specify <<<-Penterprise>>> on your Maven build command to use the latest Alfresco Enterprise version
Enable hot class reload with spring-loaded
@@ -44,7 +46,7 @@ H2 Embedded Support Pre-Requisites
the open source effort {{{https://github.com/skuro/alfresco-h2-support} Alfresco H2 Support}}. This bridge allows to emulate
Alfresco expected DB behavior and is therefore very specific to every Alfresco version.
Maven Alfresco SDK\x99 ${project.version} uses version 1.5 of the Alfresco H2 Support. In case you experience
Alfresco SDK\x99 ${project.version} uses version 1.5 of the Alfresco H2 Support. In case you experience
issues with the embedded DB support, please check the {{{https://github.com/skuro/alfresco-h2-support/wiki/H2-Database-support-for-Alfresco} H2 Support Compatibility matrix}}.
Alternatively, you can easily setup your DB access by defining {{{./poms/alfresco-sdk-parent/sdk-properties.html}POM properties}}

View File

@@ -8,14 +8,14 @@
Rationale
The Alfresco Maven SDK introduces a new way of conceiving software development, deployment and release of Alfresco related projects and artifacts.
The Alfresco SDK introduces a new way of conceiving software development, deployment and release of Alfresco related projects and artifacts.
In contrast to the manual (and error prone) deployment approach based on an installer / Alfresco WAR distribution(s) and the <infamous> <<<${extensionRoot}>>>,
the Maven SDK provides a unified access to fine grained Artifacts (jar,war,pom files),] that can be easily integrated
the Alfresco SDK provides a unified access to fine grained Artifacts (jar,war,pom files),] that can be easily integrated
in your project by the means of Alfresco-specific Maven components and configurations. The main goal of this SDK is to
enable rapid development and prototyping of Alfresco projects, while enabling agile development practices (i.e. TDD, FDD)
and fostering process reuse due to standardization
Why would you use the Maven Alfresco SDK\x99?
Why would you use the Alfresco SDK\x99?
As a standard de facto, Maven allows you projects to be inherently more reusable and enables <process reuse> of your development practices,
and, in certain successful cases, Application Lifecycle Management process at large.

View File

@@ -2,7 +2,7 @@
<skin>
<groupId>org.apache.maven.skins</groupId>
<artifactId>maven-fluido-skin</artifactId>
<version>1.3.0</version>
<version>1.3.1</version>
</skin>
<custom>
<fluidoSkin>
@@ -57,14 +57,14 @@
<item name="Alfresco AMP Archetype" href="./archetypes/alfresco-amp-archetype/index.html" />
<item name="Share AMP Archetype" href="./archetypes/alfresco-amp-archetype/index.html" />
<item name="Alfresco All-in-One Archetype" href="./archetypes/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="Community Docs">
<item name="Official Alfresco SDK docs" href="http://docs.alfresco.com/community/concepts/alfresco-sdk-intro.html" />
<item name="Alfresco Maven Wiki Docs" href="http://wiki.alfresco.com/wiki/Maven_Alfresco_SDK" />
<menu name="Community Documentation">
<item name="Official Maven Alfresco SDK Documnetation" 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/" />