Compare commits

...
Author SHA1 Message Date
alfresco-build 14cd4be39c [maven-release-plugin] prepare release alfresco-sdk-aggregator-2.2.0-beta-1 2016-02-04 10:41:50 +00:00
Ole Hejlskov f2f5698a3b Remove double activation tag from pull request #352 2016-02-04 11:00:46 +01:00
Ole Hejlskov 5b83b99549 Merge pull request #352 from michaeljmuller/master
change activation of enforce-sdk-rules so it's *really* on by default, as intended
2016-02-04 10:54:24 +01:00
Ole Hejlskov 181951ed99 Add MAVEN_OPTS that are compatible with JDK7 but comment out by default. See DEVPLAT-456 for more info 2016-02-04 10:50:21 +01:00
Ole Hejlskov a4711142e6 Merge pull request #354 from michaeljmuller/chmod
make run.sh executable during the "validation" phase of the build
2016-02-04 10:39:06 +01:00
Michael Muller 78d1466220 make run.sh executable during the "validation" phase of the build 2016-02-03 12:00:13 -07:00
Michael Muller d99539c9b0 change activation of enforce-sdk-rules so it's *really* on by default, as intended 2016-02-03 11:37:34 -07:00
Ole Hejlskov 30bfc14422 Fix escaping 2016-01-29 10:57:27 +01:00
Martin Bergljung 641aa6bb8e DEVPLAT-440 2016-01-25 14:37:57 +00:00
Ole Hejlskov f031c76a41 Add JS to the nonFilteredFileExtension list. See #254 for more info 2016-01-22 16:12:30 +01:00
Ole Hejlskov 2ad03e3f5c Bump version to 2.2.0-SNAPSHOT 2016-01-22 16:05:37 +01:00
Martin Bergljung 7275ba32e8 DEVPLAT-452 2016-01-22 08:26:23 +00:00
Samuel Langlois 9bf50267dd Housekeeping: upgrading versions of dependencies and Maven plugins 2016-01-21 12:22:51 +00:00
Martin Bergljung bbe3de2abb DEVPLAT-444 2016-01-21 11:26:15 +00:00
Samuel Langlois 5c01e8127c Change <id> of temporary Maven Repo hosting 5.1-EA, to fix CI 2016-01-21 11:20:35 +00:00
Martin Bergljung 9a1b97e64d DEVPLAT-442 2016-01-21 10:34:36 +00:00
Martin Bergljung b3955a1b4f DEVPLAT-443 2016-01-20 10:41:06 +00:00
Martin Bergljung 2e546a1cae DEVPLAT-445 2016-01-20 10:18:04 +00:00
Martin Bergljung 9dd9f530bb DEVPLAT-333, DEVPLAT-435, DEVPLAT-436, DEVPLAT-437, DEVPLAT-438, DEVPLAT-439, DEVPLAT-447 2016-01-12 15:14:53 +00:00
Ole Hejlskov 27bcaa3daf Revert "Revert "DEVPLAT-338, Incorrect naming of AIO AMPs, #311""
This reverts commit b2afebed09.
2015-11-06 21:16:57 +01:00
Ole Hejlskov 8f29244d99 Changed my info for future reference. I no longer work with Magenta 2015-10-19 17:55:01 +02:00
Ole Hejlskov 87af573673 Updated README with 2.1.1 information 2015-10-19 17:15:50 +02:00
alfresco-build d53184196b [maven-release-plugin] prepare for next development iteration 2015-10-19 11:20:20 +01:00
alfresco-build 4431863500 [maven-release-plugin] prepare release alfresco-sdk-aggregator-2.1.1 2015-10-19 11:20:15 +01:00
alfresco-build d2e9b89720 [maven-release-plugin] prepare for next development iteration 2015-10-09 15:34:00 +01:00
alfresco-build cda786187c [maven-release-plugin] prepare release alfresco-sdk-aggregator-2.1.1-beta-3 2015-10-09 15:33:54 +01:00
Ole Hejlskov 8cf04fc98d Revert "[maven-release-plugin] prepare release alfresco-sdk-aggregator-2.1.1-beta-1"
This reverts commit 3b579596db.
2015-10-09 15:55:24 +02:00
alfresco-build 3b579596db [maven-release-plugin] prepare release alfresco-sdk-aggregator-2.1.1-beta-1 2015-10-09 14:19:39 +01:00
Ole Hejlskov b2afebed09 Revert "DEVPLAT-338, Incorrect naming of AIO AMPs, #311"
This reverts commit 6c57d9ede0.

We can't put this commit in a SP release, so we have to revert the revert when we need it back
2015-10-09 13:48:22 +02:00
Martin Bergljung 3707dbc5d6 DEVPLAT-343, alfresco-sdk uses relative path for dir.root,#289 2015-10-07 19:50:34 +01:00
Martin Bergljung f3d85a19ce DEVPLAT-342, Define argLine property rather than setting it in surefire, to ease integration with other plugins, #298 2015-10-07 13:01:54 +01:00
Martin Bergljung 6c57d9ede0 DEVPLAT-338, Incorrect naming of AIO AMPs, #311 2015-10-07 10:45:51 +01:00
Martin Bergljung 0958c63b44 DEVPLAT-337, AIO/share-amp share-config-custom.xml changes are not loaded, #299 2015-10-05 13:47:14 +01:00
Martin Bergljung eeb5e7304f DEVPLAT-108, Repo-amp contains unwanted libs after running amp-to-war 2015-10-02 09:20:45 +01:00
alfresco-build 8d06e0e791 [maven-release-plugin] prepare for next development iteration 2015-09-28 13:12:09 +01:00
alfresco-build a11a3a65b6 [maven-release-plugin] prepare release alfresco-sdk-aggregator-2.1.1-beta-2 2015-09-28 13:12:03 +01:00
Ole Hejlskov 5936c3fcda Merge pull request #326 from binovo/Issue/317
fix issue #317
2015-09-24 15:15:47 +02:00
alfresco-build 235a84105a [maven-release-plugin] prepare for next development iteration 2015-09-01 09:04:47 +01:00
alfresco-build 3465b3aaf5 [maven-release-plugin] prepare release alfresco-sdk-aggregator-2.1.1-beta-1 2015-09-01 09:04:41 +01:00
Ole Hejlskov 509e4072e8 Revert version back to 2.1.1-SNAPSHOT 2015-09-01 09:29:52 +02:00
alfresco-build 6e7e2d7740 [maven-release-plugin] prepare release alfresco-sdk-aggregator-2.0.0 2015-08-31 15:08:14 +01:00
Martin Bergljung 841c72e64a DEVPLAT-258,Ensure demoComponent is loaded properly,#220 2015-08-27 08:23:47 +01:00
Martin Bergljung 6b83be9d9f DEVPLAT-83 - Remove plexus-archiver from maven-war-plugin definition in parent SDK pom 2015-08-26 12:11:52 +01:00
Martin Bergljung f4c9a36256 DEVPLAT-107 - Add scope test to <artifactId>selenium-java</artifactId> in aio/share-amp/pom.xml, #300 2015-08-26 11:43:59 +01:00
Martin Bergljung 7309916d83 DEVPLAT-151 - Files that are generated from the Share AMP archetype needs unique names 2015-08-26 10:22:45 +01:00
mindthegab de723e44ff Fix DOCS-1155 2015-08-12 16:48:07 -04:00
Igor Blanco 60dac34448 fix issue #317 2015-08-03 15:50:41 +02:00
mindthegab 477067a992 udpated release profile to run enterprise-tests as per issue #314 2015-07-30 14:16:18 -04:00
mindthegab 016879ec87 added link to command reference in response to request on issue #309 2015-07-30 14:12:20 -04:00
mindthegab 97cbaefc6f fixed issue #314 - by default now mvn clean install works without enterprise access. to run enterprise-tests use -Penterprise-tests 2015-07-30 13:46:54 -04:00
Samuel Langlois c854a0aad3 Issue #301: remove JDK8 specific flag for Javadoc 2015-07-23 10:24:52 +01:00
Samuel Langlois d483c01a6c Set ALL settings to Java 7 for compiler plugin + remove test on JDK version 2015-07-23 10:15:45 +01:00
mindthegab 3116123800 reverted target version for the SDK to java7 for issue #301, added some logging for issue #297 2015-07-22 17:10:26 -04:00
mindthegab a39a11ffe7 fixed issue #297, now webappDirectory is honored if present 2015-06-01 18:13:36 +01:00
mindthegab 41dd5ff1ea imprving unarchiver logging 2015-06-01 12:54:13 +01:00
mindthegab 2a3eb3919e improved logging 2015-05-29 17:00:19 -04:00
mindthegab f9c4647f22 more fixes for issue #254 2015-05-29 10:31:17 -04:00
mindthegab bc97442af7 Merge pull request #288 from jphuynh/master
DEVPLAT-75: Added Alfresco PGP public key and fingerprint information
2015-05-22 09:46:55 -04:00
Jean-Pierre Huynh 9c49d6c7f9 DEVPLAT-75: Added Alfresco PGP public key and fingerprint information 2015-05-21 07:29:06 +01:00
mindthegab 2453421d1b Update README.md 2015-05-20 18:28:36 -04:00
mindthegab 5e17baa651 Update README.md 2015-05-20 18:19:32 -04:00
mindthegab c3b43c0c68 Update README.md 2015-05-20 18:18:28 -04:00
mindthegab 6f0589ce63 Update README.md 2015-05-20 18:17:08 -04:00
mindthegab abee710157 Updated readme.MD 2015-05-20 18:12:53 -04:00
mindthegab 19b0d1d8a7 Updated README for SDK 2.1.0 release 2015-05-20 18:07:52 -04:00
mindthegab 6ebaa083d4 Merge pull request #281 from Alfresco/readme-update
Updated SDK README, needs further edits.
2015-05-20 17:23:33 -04:00
mindthegab 80f62c65ca Merge branch 'master' of https://github.com/Alfresco/alfresco-sdk 2015-05-20 12:01:22 -04:00
mindthegab f946d711ea issue #267 - added logging to install amp goal 2015-05-20 12:01:07 -04:00
alfresco-build 4a25c4ceba [maven-release-plugin] prepare for next development iteration 2015-05-20 13:24:05 +01:00
alfresco-build 6140990608 [maven-release-plugin] prepare release alfresco-sdk-aggregator-2.1.0 2015-05-20 13:24:00 +01:00
Martin Bergljung 6a6fcacf78 DEVPLAT-72: Move site-webscripts and site-data in under web-extension for share-amp 2015-05-18 14:11:06 +01:00
Martin Bergljung 3a9f08620a DEVPLAT-71: Set <disable-resource-caching> to false for AIO and Share AMP 2015-05-18 11:33:26 +01:00
Martin Bergljung 8b48a63e0a DEVPLAT-70, the share/src/test directory in the AIO artefact is not generated 2015-05-18 09:22:01 +01:00
Martin Bergljung d0fdd2fdfe Updated enforcer plugin config, DEVPLAT-67 2015-05-15 11:11:40 +01:00
mindthegab 603fe956c6 DEVPLAT-67 - partial update for JDK 8 2015-05-14 11:00:21 -04:00
mindthegab ccb6728e4c Merge branch 'master' of https://github.com/Alfresco/alfresco-sdk 2015-05-14 10:49:37 -04:00
mindthegab 3ef4131ce8 Fixing javadoc strict build 2015-05-14 10:38:18 -04:00
Martin Bergljung f1735544ab Fixed Solr Data Dir path on Windows, #284 2015-05-14 11:38:12 +01:00
Ole Hejlskov ee6861e873 Bump to Java 8 by default 2015-05-12 17:24:48 +02:00
Ole Hejlskov 2a45c2eaa5 Merge pull request #277 from rpiccoli/master
Alfresco 5.0.1 supports Java 8, but Maven Compiler settings are hardcode...
2015-05-12 17:07:49 +02:00
Martin Bergljung b33837280d Added Java controller to sample webscript 2015-05-12 10:47:34 +01:00
Ole Hejlskov 748231a932 Rename properties to a more consistent scheme. All refresh mojo related properties are now maven.alfresco.refresh.* (#283) 2015-05-11 15:39:42 +02:00
Ole Hejlskov 8707fbebbf Merge branch 'master' of https://github.com/Alfresco/alfresco-sdk 2015-05-11 15:23:56 +02:00
Ole Hejlskov 8d5d26a1a5 Add the alfresco-maven-plugin to AIO parent poms so the plugin shows up in IDEA (#283) 2015-05-11 15:23:14 +02:00
alfresco-build 0f6b82d7f1 [maven-release-plugin] prepare for next development iteration 2015-05-11 14:12:53 +01:00
Martin Bergljung f050c75615 Updated SDK README 2015-05-06 09:38:04 +01:00
Ricardo Piccoli d4872f7e1a Alfresco 5.0.1 supports Java 8, but Maven Compiler settings are hardcoded to 1.7 2015-05-01 14:10:16 +01:00
Ricardo Piccoli 126747dbc9 Alfresco 5.0.1 supports Java 8, but Maven Compiler settings are hardcoded to 1.7 2015-04-28 10:41:06 +01:00
106 changed files with 1117 additions and 670 deletions
+66
View File
@@ -9,6 +9,10 @@ Developers:
(gpg --list-key <your email>
&& gpg --armor --export <your email>) >> this file.
################################################################
# Gabriele Columbro
################################################################
pub 4096R/6FE5701E 2012-03-25
uid Gabriele Columbro (VALID CODE SIGNING KEY) <gabriele@apache.org>
sub 4096R/E97059F3 2012-03-25
@@ -86,4 +90,66 @@ hrGAueS2lH5DUpjZPqClR+txnAK+hVCuFogoWsdsbRHMLkqKqhnQjWnvRrU0ud9j
ytG/XwLK3RL7LTmPIC9RqlO1U1A3h5Ykw2INH/bB90lBxmydmp/PHpkhjEAEvzGW
r+ipOwsWpF6kLIHUT2LuPxLqTGQCrqYtJyTp61tE
=GUM9
-----END PGP PUBLIC KEY BLOCK-----
################################################################
# Alfresco Software, Inc - PGP key
################################################################
pub 4096R/DAD3B670 2014-10-20 [expires: 2015-10-20]
Key fingerprint = 6959 A697 47E2 7AC4 E1E7 1636 199D 99B1 DAD3 B670
uid Alfresco Software, Inc (GPG) <info@alfresco.com>
sub 4096R/A4B70B45 2014-10-20 [expires: 2015-10-20]
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2.0.14 (GNU/Linux)
mQINBFRFM3EBEADveqoXdxufZiP+hK992UJO9OIumDts9SlirI4VviyRlCn/qc3X
5wzAAsTNRBJjsk3S3O3EfmK79GodIb0ebnQSbv6+EnwPK0uwS0ykoy7JrMUHVBY+
zI9AwGIe0UpCRXfPH3x0O1Psi1fcKGR/Qs2ouTnCpzDZRq3kFt7/iCXm6t8QpaxE
y4KNxT/S8MeGydslqgbEA4fCZ6RP9kzFs8tCNyv9WxHkcb0oos/nC2ihJy3HZATO
A2qeTxS5pf6O1hJuE7XRIRCPTN1j0uSAl4ebDKPn4uANz8MwYcZBz89lWVmP/wEz
AoN8jWjqb/SstURj+czjXoxhoxMaLDMjdw5RoJsLUmlfp2j9eaFbxmUl103wUL+O
R+6sk5pXHpvifjeI/AjNTaZe6WVfkgcUqkHmw0GUgdASgBLBDciGd+O4sXr/L/iZ
wxhdxcubWy4MbKcy7QlcS4Z4FwK6jjPQKjn+7PT3Wexh8SAX0661gntV7Rr/SYIY
edyRdtLd+SP+TuOn4wQY5x8ahHqGi4PDoSaCMAZ8jbQnbAXXeOlkBuyDm+Z4iGDC
OQgjvvQufB2ZA1ml9DjtZOWIdgUQfanGaO8TW+V5v+PFvfMkRFIMMyS8WEp6ePT/
IOBDxUBQ0BZ1BktkQ+Oifi179EyvghpePciUWX5oDf6AfW/QfLhnkVhQPQARAQAB
tDBBbGZyZXNjbyBTb2Z0d2FyZSwgSW5jIChHUEcpIDxpbmZvQGFsZnJlc2NvLmNv
bT6JAj4EEwECACgFAlRFM3ECGwMFCQHhM4AGCwkIBwMCBhUIAgkKCwQWAgMBAh4B
AheAAAoJEBmdmbHa07ZwTtYP/jdMOUFvUqAwaiDBap0+DqyyFgeWfa90b3O6LlAf
BeKin4lq8TEVL1CCehRSILAgd0nQQYHeJvLwpvZNl4t2TBFk5e/Xd4gHdszum4Ms
aJ0qc2G61ep5vE5z11Ca2vWLEG1Org+iVtZuMZcsCtPhFjyHE1PRU1s0ApoIXZxt
z35pgz5PSldPpOk4nuUKIhLLTpNLNd4fgbPiHhyqJloTMsOEycZ+W5Em2Ib2/kxx
0GIjAy5A9IlezALKengZ4NjHFwcddcP6+2rFgBTY/7KhhGNyOghwSIIJOdp0BQwD
bSN26e5WpYT+gja44QZ44KdMpOcxH8Qt0lJmjULizxcbYTPMsoPF3Jszm0E5auOQ
y2cixDEfmioqgJ4KKS6AIXd/yfLEvsGEU1Zz1a1yDQz12ZhzBa/GtoQRhzWErspR
7kMPiGKQEhQowB7vHfiCmVhx89RWPwZFFyLz92jS11ZGpeBlWF4hMSefQR7sFWLi
rYw0LOyMyFyz9P60ZKX18LHltxsrsteJA7zARcS0uv112O7wSTX1k44s5fiaWlVR
Ciuchcp0eTcsYa4Jiz4yZNnJhRi7tnsQJOXYF4IjGAxnJoBLSUUt2uEWtMg09m5F
vgrCNcc8HFy1hIIHy0l5CaLJY/5x9Z1Lg2dbwVP7+goTRogRGvpdjy7/eMlQEAgm
HMtsuQINBFRFM3EBEADCohKTxy3JYJ3dPzxhD/76nX0zkyvuhepVXAkpzjhWSx9r
9RQSB6WLnczlZVriQKVPR6RZ7fn4XhLim3v9e9c188R1WeUvuHWaJXDAvBWFarLu
y7kd1ZRpS0UWWE+k/WBruT5rEqjpW4Un/7WINsr972Ic7IFiv5ISUC7h/ylym5T1
w15WRZnMF96tLmMjzGdqJYrbu7Y4ZPYr5VwWnd9hE9Cal3YMMsfcXlIWOzw7BRDO
aWmMsWyFiVkwCeAZOSYthu4Qdo3bSlGo5C46JuRcdU1ZimZKztC1qlihiju7oWfa
3hJT/uWFu06IAdcI6lq4yEb+iG73BNUGNMDzpTeWLW7Q3IByZ/e9/DzFJcjsDf5N
jCzJGxAtEJ28egrZe6/Fk6yBwE0+nzUmOPU3qqi57aFFajfdV89SoQwKG83IpNJl
L9vbE62Iljm0DNK3VEotw9OMc6B3z6TfatVclqLFTH5Q+4rNcCytpK747loGVJcP
KFs1FzFj+hW2MkFcnY1JbuaSuyrhPVpg4Z1bjxLVLdlisYm0AL+n+z0tmFO45XJ2
mS06ckpqFAhk5HOOMOd/9+Qi3p9orE6dFM+TIWnxDphpws43O+FSYM8OJk7saGos
DNMvm9C0oz07MwMuthkLmSBsWmkZYXrvkUY1lrTdpyqqs11qllBZ1PsRATKeIQAR
AQABiQIlBBgBAgAPBQJURTNxAhsMBQkB4TOAAAoJEBmdmbHa07ZwQl4P/2FH+4Sa
JJgaNGoyyo1Oh1Xd1OMHf++V7FpXxHHmgEv6bTz3E8xHTMA7Zm1iBIPGrIo2loKe
49p3gbGFtvZLLT31Tg+usUN62QntKYOIiztdjsxzTskBgJH+A4Ucz7O1NsN6GQXF
QgGFlEpWApXCK8ogNp6ntwxGCyOFvZujuJjSFUZcpNEGhOYhYuKvo18qboP3RgVy
o74FPtPvh3YMz9DLRXeVbhhIq0oejek5z0aOXEjgZipVO4U7uDO5EVcG57jIVfiI
WM681KHG/Djx64GmSi9wo+P687Ib7+UHSzBTeEm9YVRNNSQFbuvxqq9XhDctkkbZ
m/QRbQXJFPQJcDOLLH06JNQ+/KvT8uwduiBFs2x77qKrVCxqCQU8XwY+KnyGouf9
sLdxDZwGoXFbnCyRKFH+fqoIMdcYzIT/VvGswTCNqSOvDxnSNO9REVbdsIJwenqt
QetRR7SVYKfcyLMCtMek3Fgst85khwP8tIYAEerE+XN04b1FfD3mjqvgBdUY7IDM
W1NVRTtjlX46ltNvtERO8JGYMqlRW/wpDXQzRxryNY7frXA+fhog2L53cOK/Fwc8
UcbLubQPkh/6+w4SybT2F8otOB1J8KZ0tzbTd5JxuX0V0AD8OjH+uuN67r5bQBk9
ARVlLqDOpHP01PW6WUQta2xAQ2mshuQZTX1H
=3Y/D
-----END PGP PUBLIC KEY BLOCK-----
+68 -82
View File
@@ -1,89 +1,75 @@
# [![Alfresco SDK logo](https://github.com/Alfresco/alfresco-sdk/raw/master/src/site/resources/img/alfresco-maven-logo.jpg)](#features) Alfresco SDK
SDK for Alfresco Development, Testing, packaging and custom project lifecycle management based on Apache Maven.
This is the home of the Alfresco SDK. The Alfresco SDK is used by developers to build extensions for the Alfresco content management system. It is based on [Apache Maven](http://maven.apache.org/), compatible with major IDEs and enables Rapid Application Development (RAD) and Test Driven Development (TDD).
Includes support for rapid and standard development, testing, packaging, versioning and release of your Alfresco integration and extension projects.
## SDK 2.0.0 available in Maven Central
The SDK 2.0.0 is finally [released in Maven Central](http://search.maven.org/#search|ga|1|alfresco%20sdk).
- *To create a new Alfresco project*: Run a
```bash
mvn archetype:generate -Dfilter=org.alfresco:
```
and use one of the available archetypes (AMP, Share AMP, All in One)
- *To use the SDK in your project:* Add the below parent reference snippet to the existing project (*NOTE*: you might need folder layout changes) to inherit features from Alfresco SDK POM:
```xml
<parent>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-sdk-parent</artifactId>
<version>2.0.0</version>
</parent>
```
## Resources
### Alfresco Official Docs
- Documentation for the SDK on Alfresco Community (latest) is available [here](http://docs.alfresco.com/community/concepts/alfresco-sdk-intro.html)
- Documentation for the SDK on Alfresco Enterprise (5.0) is available [here](http://docs.alfresco.com/5.0/concepts/alfresco-sdk-intro.html)
### Developer Documentation
**SDK 2.x**: Full developer (Maven) documentation is available at the [Alfresco SDK site](https://artifacts.alfresco.com/nexus/content/groups/public/alfresco-sdk-aggregator/latest/index.html).
# Check the SDK in action!
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
- A [Maven Alfresco Plugin](https://artifacts.alfresco.com/nexus/content/groups/public/alfresco-lifecycle-aggregator/latest/plugins/alfresco-maven-plugin/index.html) which provides AMP packaging and installation facilities (a la MMT) and other common goals for Alfresco development
- A number of *Maven Archetypes* (sample projects) including:
1. [Alfresco Repository AMP Archetype](https://artifacts.alfresco.com/nexus/content/groups/public/alfresco-lifecycle-aggregator/latest/archetypes/alfresco-amp-archetype/index.html)
2. [Alfresco Share AMP Archetype](https://artifacts.alfresco.com/nexus/content/groups/public/alfresco-lifecycle-aggregator/latest/archetypes/share-amp-archetype/index.html)
3. [Alfresco All-in-One Archetype](https://artifacts.alfresco.com/nexus/content/groups/public/alfresco-lifecycle-aggregator/latest/archetypes/alfresco-allinone-archetype/index.html)
### Samples
Advanced sample projects are maintained by @ohej in the [Alfresco SDK Samples project](https://github.com/Alfresco/alfresco-sdk-samples/).
### Contribute
Report issues (and contribute!) [here](https://github.com/Alfresco/alfresco-sdk/issues?milestone=1&state=open). You can also join the [Alfresco list on Google Groups](https://groups.google.com/forum/#!forum/maven-alfresco).
## Maven Repositories
The Alfresco SDK is released in Maven Central as of version 2.0-beta-1.
Alfresco (Community and Enterprise) artifacts are instead hosted in the [Alfresco Artifacts Repository](https://artifacts.alfresco.com/nexus/).
Alfresco Community artifacts (JARs, WARs, AMPs, poms) and SDK artifacts are publicly available.
for Enterprise and Premiere licensed software access you need to get credential via the Alfresco Enterprise Support. See [public docs](http://docs.alfresco.com/4.2/concepts/dev-extensions-maven-sdk-tutorials-alfresco-enterprise.html) or [this KB (login required)](https://myalfresco.force.com/support/articles/en_US/Technical_Article/Where-can-I-find-the-repository-for-Enterprise-Maven-artifacts) for more details.
## License and Support
This project is released under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html). It's a community driven project which is supported for Alfresco Development (please refere to the official [Alfresco Documentation](http://docs.alfresco.com/community/concepts/alfresco-sdk-intro.html) for supported features.
## License
This project is released under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html). If you are an Enterprise customer check the [Support](#alfresco-enterprise-customers-and-partners-support) section.
## News
- 2014-12-20: SDK 2.0.0 in staging. If you want early access to the release candidate build and want to participate to the testing process check [this page](https://github.com/Alfresco/alfresco-sdk/wiki/SDK-Supported-Features-and-Test-plan) and report issues [here](https://github.com/Alfresco/alfresco-sdk/issues).
- 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)
- 2015-10-19: SDK 2.1.1 released to Maven Central. Docs for [Community](http://docs.alfresco.com/community/concepts/alfresco-sdk-intro.html), [Enterprise](http://docs.alfresco.com/5.0/concepts/alfresco-sdk-intro.html), [Release notes](https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-sdk-aggregator/latest/github-report.html)
- 2015-05-20: SDK 2.1.0 released to Maven Central. Docs for [Community](http://docs.alfresco.com/community/concepts/alfresco-sdk-intro.html), [Enterprise](http://docs.alfresco.com/5.0/concepts/alfresco-sdk-intro.html), [Release notes](https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-sdk-aggregator/latest/github-report.html)
- 2014-12-23: SDK 2.0.0 release to Maven Central. [Docs](http://docs.alfresco.com/sdk2.0/concepts/alfresco-sdk-intro.html), [Release Notes](https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-sdk-aggregator/archive/2.0.0/github-report.htm)
- 2014-08-22: First SNAPSHOT of SDK 2.0.0 in the [OSS Sonatype Repository](https://oss.sonatype.org/content/repositories/snapshots/org/alfresco/maven/alfresco-sdk-parent/2.0.0-SNAPSHOT/)!
- 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.
- 2014-07: Project fully migrated from [Google Code](https://code.google.com/p/maven-alfresco-archetypes).
## User Getting Started
### Latest Documentation
To get started with Alfresco SDK 2.1.1 (latest) visit the offical Alfresco Documentation for:
- [Alfresco Community 5.0.d and above](http://docs.alfresco.com/community/concepts/alfresco-sdk-intro.html)
- [Alfresco Enterprise 5.0.1 and above](http://docs.alfresco.com/5.0/concepts/alfresco-sdk-intro.html)
#### Previous versions Documentation
- Documentation for [Alfresco SDK 2.0](http://docs.alfresco.com/sdk2.0/concepts/alfresco-sdk-intro.html) (compatible with Alfresco 5.0.d Community and 5.0.0 Enterprise)
- Documentation for [Alfresco SDK 1.1.1](http://docs.alfresco.com/4.2/concepts/dev-extensions-maven-sdk-intro.html) (compatible with Alfresco 4.2)
### Samples
Sample extension projects that use the SDK, maintained by @ohej in the [Alfresco SDK Samples project](https://github.com/Alfresco/alfresco-sdk-samples/).
### Command reference
A list of supported features and commands, explanation of Maven profiles and commands is kept in the [Alfresco Official Docs](http://docs.alfresco.com/5.0/concepts/alfresco-sdk-cmd-reference.html).
### Want to get up to speed quickly in Eclipse? Check out this video!
[![Alfresco SDK 2.1 howto](http://img.youtube.com/vi/utYZaVe9Nd0/0.jpg)](https://www.youtube.com/watch?v=utYZaVe9Nd0)
## Reporting Issues and Community Support
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) or join us on the [IRC Channel](http://chat.alfresco.com/).
## Alfresco Enterprise Customers and Partners Support
If you are an Alfresco Customer please check the [SDK Support status](http://www.alfresco.com/services/subscription/technical-support/product-support-status) for the version you are using and the [Compatibily Matrix](http://docs.alfresco.com/community/concepts/alfresco-sdk-compatibility.html) for the SDK / Alfresco compatibility. If your version is in Limited or Full Support, you can raise issues via the [Support Portal](http://support.alfresco.com).
## Maven repositories
- As of version 2.0-beta-1, The Alfresco SDK is released in [Maven Central](http://search.maven.org/#search|ga|1|alfresco-sdk). Previous versions are available in the [Alfresco Artifacts Repository](https://artifacts.alfresco.com/).
- Alfresco (Community and Enterprise) artifacts are hosted in the [Alfresco Artifacts Repository](https://artifacts.alfresco.com/).
- Alfresco Community artifacts (JARs, WARs, AMPs, poms) and SDK artifacts are publicly available.
*NOTE:* For Enterprise and Premiere licensed software access you need to get credential via the Alfresco Enterprise Support. See [Maven Alfresco Enterprise setup](http://docs.alfresco.com/5.0/concepts/alfresco-sdk-using-enterprise-edition.html).
### Alfresco Artifacts Repository
#### Alfresco Releases
You can use the following snippet in your pom.xml to access releases on Alfresco Artifact repository:
```xml
<repository>
<id>alfresco-public</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
</repository>
```
#### SDK Snapshots
To test new unreleased (unsupported) features, you can use the following snippet in your pom.xml to access SDK nightlies (SNAPSHOTS) from the OSS Sonatype repository:
```xml
<repository>
<id>oss-sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</repository>
```
## For Developers that want to contribute to the SDK
See the [Developers Wiki page](https://github.com/Alfresco/alfresco-sdk/wiki/Developer-Wiki).
@@ -11,7 +11,7 @@
<parent>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-sdk-aggregator</artifactId>
<version>2.1.0-beta-1</version>
<version>2.2.0-beta-1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
@@ -10,7 +10,7 @@
</requiredProperty>
</requiredProperties>
<modules>
<module id="repo-amp" dir="repo-amp" name="repo-amp">
<module id="${rootArtifactId}-repo-amp" name="${rootArtifactId}-repo-amp" dir="__rootArtifactId__-repo-amp">
<fileSets>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/main/java</directory>
@@ -54,7 +54,7 @@
</fileSets>
</module>
<module id="share-amp" dir="share-amp" name="share-amp">
<module id="${rootArtifactId}-share-amp" name="${rootArtifactId}-share-amp" dir="__rootArtifactId__-share-amp" >
<fileSets>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/main/java</directory>
@@ -68,11 +68,27 @@
<include>**/*.java</include>
</includes>
</fileSet>
<fileSet filtered="true" packaged="false" encoding="UTF-8">
<directory>src/main/amp/config/alfresco/web-extension</directory>
<includes>
<include>__artifactId__-slingshot-application-context.xml</include>
</includes>
</fileSet>
<fileSet filtered="true" packaged="false" encoding="UTF-8">
<directory>src/main/amp/config/alfresco/web-extension/site-data/extensions</directory>
<includes>
<include>__artifactId__-example-widgets.xml</include>
</includes>
</fileSet>
<fileSet encoding="UTF-8" filtered="false">
<directory>src/main/amp</directory>
<includes>
<include>**</include>
</includes>
<excludes>
<exclude>**/__artifactId__-slingshot-application-context.xml</exclude>
<exclude>**/__artifactId__-example-widgets.xml</exclude>
</excludes>
</fileSet>
<fileSet filtered="true" packaged="false" encoding="UTF-8">
<directory>src/test/resources</directory>
@@ -97,11 +113,20 @@
<include>**/*.properties</include>
</includes>
</fileSet>
<fileSet encoding="UTF-8" filtered="true">
<directory>src/main/resources/alfresco/extension</directory>
<includes>
<include>dev-log4j.properties</include>
</includes>
</fileSet>
<fileSet encoding="UTF-8" filtered="false">
<directory>src/main/resources</directory>
<includes>
<include>**</include>
</includes>
<excludes>
<exclude>**/dev-log4j.properties</exclude>
</excludes>
</fileSet>
</fileSets>
</module>
@@ -117,12 +142,18 @@
<include>**</include>
</includes>
</fileSet>
<fileSet filtered="true" packaged="false" encoding="UTF-8">
<directory>src/test/resources</directory>
<includes>
<include>**</include>
</includes>
</fileSet>
</fileSets>
</module>
<module id="runner" dir="runner" name="runner" filtered="false">
<fileSets>
<fileSet encoding="UTF-8" filtered="false">
<fileSet encoding="UTF-8" filtered="true">
<directory>tomcat</directory>
<includes>
<include>**</include>
@@ -1,5 +1,5 @@
<webscript>
<shortname>Javascript Sample Webscript</shortname>
<shortname>Hello World Sample Webscript</shortname>
<description>Hands back a greeting</description>
<url>/sample/helloworld</url>
<authentication>user</authentication>
@@ -12,7 +12,7 @@
<!-- Registration of new models -->
<bean id="${package}.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
<bean id="${artifactId}.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
<property name="models">
<list>
<value>alfresco/module/${project.artifactId}/model/content-model.xml</value>
@@ -22,17 +22,21 @@
<beans>
<!-- A simple class that is initialized by Spring -->
<bean id="${package}.exampleBean" class="${package}.demoamp.Demo" init-method="init" />
<!-- A simple module component that will be executed once -->
<bean id="${package}.exampleComponent" class="${package}.demoamp.DemoComponent" parent="module.baseComponent" >
<property name="moduleId" value="${project.artifactId}" /> <!-- See module.properties -->
<bean id="${artifactId}.exampleBean" class="${package}.demoamp.Demo" init-method="init" />
<!-- A simple module component that will be executed once.
Note. this module component will only be executed once, and then there will be an entry for it in the Repo.
So doing for example $ mvn clean install -Prun twice will only execute this component the first time.
You need to remove /alf_data_dev for it to be executed again. -->
<bean id="${artifactId}.exampleComponent" class="${package}.demoamp.DemoComponent" parent="module.baseComponent" >
<property name="moduleId" value="${artifactId}" /> <!-- See module.properties -->
<property name="name" value="exampleComponent" />
<property name="description" value="A demonstration component" />
<property name="sinceVersion" value="2.0" />
<property name="appliesFromVersion" value="2.0" />
<property name="sinceVersion" value="1.0" />
<property name="appliesFromVersion" value="1.0" />
<property name="nodeService" ref="NodeService" />
<property name="nodeLocatorService" ref="nodeLocatorService" />
</bean>
</beans>
@@ -1,27 +1,27 @@
<?xml version='1.0' encoding='UTF-8'?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!-- This is filtered by Maven at build time, so that module name is single sourced. -->
<import resource="classpath:alfresco/module/${project.artifactId}/context/service-context.xml" />
<import resource="classpath:alfresco/module/${project.artifactId}/context/bootstrap-context.xml" />
</beans>
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<beans>
<bean id="webscript.helloworld.get"
class="${package}.demoamp.HelloWorldWebScript"
parent="webscript">
</bean>
</beans>
@@ -0,0 +1,31 @@
<?xml version='1.0' encoding='UTF-8'?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!-- This is filtered by Maven at build time, so that module name is single sourced. -->
<!-- Note. The bootstrap-context.xml file has to be loaded first.
Otherwise your custom models are not yet loaded when your service beans are instantiated and you
cannot for example register policies on them. -->
<import resource="classpath:alfresco/module/${project.artifactId}/context/bootstrap-context.xml" />
<import resource="classpath:alfresco/module/${project.artifactId}/context/service-context.xml" />
<import resource="classpath:alfresco/module/${project.artifactId}/context/webscript-context.xml" />
</beans>
@@ -23,7 +23,7 @@ module.id=${project.artifactId}
#module.aliases=myModule-123, my-module
module.title=${project.name}
module.description=${project.description}
module.version=${noSnapshotVersion}
module.version=${project.version}
# The following optional properties can be used to prevent the module from being added
# to inappropriate versions of the WAR file.
@@ -0,0 +1,43 @@
#set($symbol_pound='#')
#set($symbol_dollar='$')
#set($symbol_escape='\' )
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package ${package}.demoamp;
import org.springframework.extensions.webscripts.Cache;
import org.springframework.extensions.webscripts.DeclarativeWebScript;
import org.springframework.extensions.webscripts.Status;
import org.springframework.extensions.webscripts.WebScriptRequest;
import java.util.HashMap;
import java.util.Map;
/**
* A demonstration Java controller for the Hello World Web Script.
*
* @author martin.bergljung@alfresco.com
* @since 2.1.0
*/
public class HelloWorldWebScript extends DeclarativeWebScript {
protected Map<String, Object> executeImpl(
WebScriptRequest req, Status status, Cache cache) {
Map<String, Object> model = new HashMap<String, Object>();
model.put("fromJava", "HelloFromJava");
return model;
}
}
@@ -20,7 +20,6 @@
# This will create the alf_data_dev directory relative to Tomcat run folder.
# Property values from the POM but it can also be edited here.
########################################################################################################################
dir.root=${alfresco.data.location}
# Use Solr4 as that is used by default with Alfresco 5
@@ -23,9 +23,6 @@
Allowed values: alfresco | share. In this case it's configured to use OOTB share -->
<app.amp.client.war.artifactId>share</app.amp.client.war.artifactId>
<!-- Used in share-config-custom.xml. By default points to standard location of Alfresco Repository -->
<alfresco.repo.url>http://localhost:8080/alfresco</alfresco.repo.url>
<!-- Defines the log level used in log4j.properties -->
<app.log.root.level>WARN</app.log.root.level>
</properties>
@@ -49,12 +46,13 @@
</dependency>
<!--===============================================================
The following dependencies are needed to be able to compile the
custom functional tests that are based on Page Objects (PO)
===============================================================-->
The following dependencies are needed to be able to compile the
custom functional tests that are based on Page Objects (PO)
===============================================================-->
<!-- Bring in the Share Page Objects (PO) used in our functional tests.
It contains page objects such as LoginPage -->
It contains page objects such as LoginPage and it also brings
in selenium-grid and selenium. -->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>share-po</artifactId>
@@ -70,8 +68,7 @@
<classifier>tests</classifier>
<scope>test</scope>
<!-- Exclude version 2.39.0 of selenium that does not work with latest FF browsers, we include
version 2.45 later on here -->
<!-- Exclude selenium as it is already brought in by share-po dependency above -->
<exclusions>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
@@ -83,12 +80,6 @@
</exclusion>
</exclusions>
</dependency>
<!-- Bring in newer selenium version -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.45.0-alfresco</version>
</dependency>
<!-- Test NG is defined with test scope in share-po, so need it here too -->
<!-- Alfresco code creates a wrapper around Test NG -->
<dependency>
@@ -103,7 +94,6 @@
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>
@@ -1,11 +1,11 @@
#set($symbol_pound='#')
#set($symbol_dollar='$')
#set($symbol_escape='\' )
<?xml version='1.0' encoding='UTF-8'?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:hz="http://www.hazelcast.com/schema/spring"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.hazelcast.com/schema/spring
http://www.hazelcast.com/schema/spring/hazelcast-spring-2.4.xsd">
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
<!--
Define beans related to this Share extension here, such as
@@ -16,12 +16,12 @@
placed in the alfresco-allinone/share/src/main/resources/alfresco/web-extension/custom-slingshot-application-context.xml file
-->
<!-- Add extension specific messages and labels -->
<bean id="com.mycompany.share-amp.resources"
<!-- Add module specific messages and labels -->
<bean id="${artifactId}.resources"
class="org.springframework.extensions.surf.util.ResourceBundleBootstrapComponent">
<property name="resourceBundles">
<list>
<value>alfresco.messages.custom</value>
<value>alfresco.web-extension.messages.${artifactId}</value>
</list>
</property>
</bean>
@@ -1,7 +1,10 @@
#set($symbol_pound='#')
#set($symbol_dollar='$')
#set($symbol_escape='\' )
<extension>
<modules>
<module>
<id>Example Aikau Widgets</id>
<id>${artifactId} - Example Aikau Widgets</id>
<version>1.0</version>
<auto-deploy>true</auto-deploy>
<configurations>
@@ -0,0 +1,6 @@
## If you are overriding out-of-the-box Alfresco web scripts, put these files here
## in the correct org.alfresco... package.
## If you are defining a new custom web script, add it under
## resources/alfresco/web-extension/site-webscripts/{your domain path}.
##
@@ -24,7 +24,7 @@ module.id=${project.artifactId}
#module.aliases=myModule-123, my-module
module.title=${project.name}
module.description=${project.description}
module.version=${noSnapshotVersion}
module.version=${project.version}
# The following optional properties can be used to prevent the module from being added
# to inappropriate versions of the WAR file.
@@ -2,7 +2,7 @@
#set($symbol_dollar='$')
#set($symbol_escape='\' )
/*
* Copyright (C) 2005-2015 Alfresco Software Limited.
* Copyright (C) 2005-2016 Alfresco Software Limited.
* This file is part of Alfresco
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -18,8 +18,8 @@
package ${package}.demoamp;
import ${package}.demoamp.po.DemoPage;
import org.alfresco.po.share.AbstractTest;
import org.alfresco.po.share.LoginPage;
import org.alfresco.po.AbstractTest;
import org.alfresco.po.share.PeopleFinderPage;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
@@ -41,18 +41,22 @@ public class DemoPageTestIT extends AbstractTest {
@BeforeClass(groups = {"alfresco-one"})
public void prepare() throws Exception {
// Navigate to share
drone.navigateTo(shareUrl + "/page/hdp/ws/simple-page");
// Reuse Alfresco Share login page object from share-po lib.
LoginPage loginPage = new LoginPage(drone);
// Navigate to share, which will redirect to Login page
driver.navigate().to(shareUrl + "/page");
// Resolve/Bind current page to LoginPage object
LoginPage loginPage = resolvePage(driver).render();
loginPage.loginAs(username, password);
}
@BeforeMethod
public void loadPage() {
// Goto demo page
drone.navigateTo(shareUrl + "/page/hdp/ws/simple-page");
page = new DemoPage(drone);
driver.navigate().to(shareUrl + "/page/hdp/ws/simple-page");
// We need to instantiate the page like this as it is not yet in
// the factory known list of pages
page = factoryPage.instantiatePage(driver, DemoPage.class);
}
@Test
@@ -86,7 +90,7 @@ public class DemoPageTestIT extends AbstractTest {
@Test
public void navigate() {
Assert.assertNotNull(page.getNav());
PeopleFinderPage peoppleFinderPage = page.getNav().selectPeople().render();
Assert.assertNotNull(peoppleFinderPage);
PeopleFinderPage peopleFinderPage = page.getNav().selectPeople().render();
Assert.assertNotNull(peopleFinderPage);
}
}
@@ -2,7 +2,7 @@
#set($symbol_dollar='$')
#set($symbol_escape='\' )
/*
* Copyright (C) 2005-2015 Alfresco Software Limited.
* Copyright (C) 2005-2016 Alfresco Software Limited.
* This file is part of Alfresco
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -18,10 +18,10 @@
package ${package}.demoamp.po;
import org.alfresco.po.share.SharePage;
import org.alfresco.webdrone.RenderTime;
import org.alfresco.webdrone.WebDrone;
import org.openqa.selenium.By;
import org.alfresco.po.RenderTime;
import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
/**
* Demo of simple share page object that encapsulates the demo of simple page.
@@ -30,22 +30,17 @@ import org.openqa.selenium.NoSuchElementException;
* @since 2.0.1
*/
public class DemoPage extends SharePage {
private By SIMPLE_DEMO_LOGO = By.id("DEMO_SIMPLE_LOGO");
private By SIMPLE_DEMO_MESSAGE = By.id("DEMO_SIMPLE_MSG");
@FindBy(id="DEMO_SIMPLE_LOGO")
WebElement logo;
public DemoPage(WebDrone drone) {
super(drone);
}
@SuppressWarnings("unchecked")
@Override
public DemoPage render() {
return render(new RenderTime(maxPageLoadingTime));
}
@FindBy(id="DEMO_SIMPLE_MSG")
WebElement msg;
@SuppressWarnings("unchecked")
@Override
public DemoPage render(RenderTime timer) {
// Wait for logo and message to display, then consider page rendered
while (true) {
timer.start();
try {
@@ -57,32 +52,19 @@ public class DemoPage extends SharePage {
timer.end();
}
}
return this;
}
@SuppressWarnings("unchecked")
@Override
public DemoPage render(long time) {
return render(new RenderTime(time));
}
public boolean isSimpleLogoDisplayed() {
try {
return drone.find(SIMPLE_DEMO_LOGO).isDisplayed();
} catch (NoSuchElementException se) {
}
return false;
return isDisplayed(logo);
}
public boolean isMessageDisplayed() {
try {
return drone.find(SIMPLE_DEMO_MESSAGE).isDisplayed();
} catch (NoSuchElementException se) {
}
return false;
return isDisplayed(msg);
}
public String getMessage() {
return drone.find(SIMPLE_DEMO_MESSAGE).getText();
return msg.getText();
}
}
@@ -26,7 +26,7 @@
Uncomment if you need to change (Note. current default version for Enterprise edition is @@alfresco.enterprise.default.version@@)
<alfresco.version>@@alfresco.community.default.version@@</alfresco.version>
<alfresco.rm.version>@@alfresco.rm.version@@</alfresco.rm.version>
<alfresco.data.location>alf_data_dev</alfresco.data.location> -->
<alfresco.data.location>/absolute/path/to/alf_data_dev</alfresco.data.location> -->
<!-- This control the root logging level for all apps uncomment and change, defaults to WARN
<app.log.root.level>WARN</app.log.root.level>
@@ -41,6 +41,24 @@
<share.client.url>http://localhost:8080/share</share.client.url>
</properties>
<dependencies>
<!-- If we are running tests then make the H2 Scripts available.
Note. tests are skipped when you are running -Prun -->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-repository</artifactId>
<version>${alfresco.version}</version>
<classifier>h2scripts</classifier>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<!-- Here we realize the connection with the Alfresco selected platform (e.g.version and edition) -->
<dependencyManagement>
<dependencies>
@@ -66,6 +84,10 @@
<groupId>net.alchim31.maven</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.alfresco.maven.plugin</groupId>
<artifactId>alfresco-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
@@ -82,5 +104,35 @@
<maven.alfresco.includeWebResources>false</maven.alfresco.includeWebResources>
</properties>
</profile>
<!-- if we're on a unix machine, chmod run.sh to be executable -->
<profile>
<id>chmod</id>
<activation><os><family>unix</family></os></activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<inherited>false</inherited>
<executions>
<execution>
<id>chmod</id>
<phase>validate</phase>
<goals><goal>exec</goal></goals>
</execution>
</executions>
<configuration>
<executable>chmod</executable>
<arguments>
<argument>+x</argument>
<argument>${basedir}/run.sh</argument>
</arguments>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
@@ -24,6 +24,14 @@
<version>${version}</version>
</parent>
<properties>
<!-- During development we set log root level to Debug,
this will be applicable to the log configuration in
repo/src/main/resources/alfresco/extension/dev-log4j.properties,
such as DemoComponent logging. -->
<app.log.root.level>DEBUG</app.log.root.level>
</properties>
<dependencies>
<dependency>
<groupId>${alfresco.groupId}</groupId>
@@ -34,7 +42,7 @@
<!-- Demonstrating the dependency / installation of the repo AMP developed in the 'repo-amp' module -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>repo-amp</artifactId>
<artifactId>${rootArtifactId}-repo-amp</artifactId>
<version>${project.version}</version>
<type>amp</type>
</dependency>
@@ -48,7 +56,7 @@
</dependency>
-->
<!-- Uncomment if you are using the RM (Records Management) module. -->
<!--
<!-- Set alfresco.rm.version in parent pom to appropriate version for 5.1
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-rm</artifactId>
@@ -83,7 +91,7 @@
<!-- Add / sort your AMPs here -->
<overlay>
<groupId>${project.groupId}</groupId>
<artifactId>repo-amp</artifactId>
<artifactId>${rootArtifactId}-repo-amp</artifactId>
<type>amp</type>
</overlay>
<!-- Uncomment if you are using SPP -->
@@ -165,6 +173,7 @@
</plugins>
</build>
<dependencies>
<!-- Include remote JUnit test lib to allow remote unit testing and start remote JUnit runner. -->
<dependency>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-rad</artifactId>
@@ -1,2 +1,6 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
# You can add here custom log4j classes. This will be merged with the main log4j.properties
# See http://wiki.alfresco.com/wiki/Developing_an_Alfresco_Module#Best_Log4j_Configuration_Practices
# See http://wiki.alfresco.com/wiki/Developing_an_Alfresco_Module#Best_Log4j_Configuration_Practices
log4j.logger.${package}.demoamp.DemoComponent=${app.log.root.level}
@@ -9,7 +9,11 @@ if not exist %springloadedfile% (
mvn validate -Psetup
)
set MAVEN_OPTS=-javaagent:"%springloadedfile%" -noverify -Xms256m -Xmx2G
:: Use these settings if you're using JDK7
:: set MAVEN_OPTS=-javaagent:"%springloadedfile%" -noverify -Xms256m -Xmx2G -XX:PermSize=300m
:: Spring loaded does not work very well with 5.1 at the moment, breaks the H2 db after first run and then restart
:: set MAVEN_OPTS=-javaagent:"%springloadedfile%" -noverify -Xms256m -Xmx2G
set MAVEN_OPTS=-noverify -Xms256m -Xmx2G
mvn install -Prun -nsu
:: mvn install -Prun
mvn clean install -Prun -nsu
@@ -6,4 +6,10 @@ springloadedfile=~/.m2/repository/org/springframework/springloaded/@@springloade
if [ ! -f $springloadedfile ]; then
mvn validate -Psetup
fi
MAVEN_OPTS="-javaagent:$springloadedfile -noverify -Xms256m -Xmx2G" mvn install -Prun
# Use these settings if you're using JDK7
# MAVEN_OPTS="-javaagent:$springloadedfile -noverify -Xms256m -Xmx2G -XX:PermSize=300m" mvn install -Prun
# Spring loaded does not work very well with 5.1 at the moment, breaks the H2 db after first run and then restart
#MAVEN_OPTS="-javaagent:$springloadedfile -noverify -Xms256m -Xmx2G" mvn clean install -Prun
MAVEN_OPTS="-noverify -Xms256m -Xmx2G" mvn clean install -Prun
@@ -12,6 +12,11 @@
<version>${version}</version>
</parent>
<properties>
<!-- Bring in newer Spring with support for annotations, used for Page Object tests -->
<spring.version>4.1.6.RELEASE</spring.version>
</properties>
<profiles>
<profile>
<id>run</id>
@@ -19,8 +24,9 @@
<!-- TODO: figure out a way to define these properties in a parent POM, they are now also duplicated
in the solr-config/pom.xml -->
<properties>
<alfresco.solr.dir>${project.parent.basedir}/${alfresco.data.location}/solr4</alfresco.solr.dir>
<alfresco.solr.dir>${alfresco.data.location}/solr4</alfresco.solr.dir>
<alfresco.solr.home.dir>${alfresco.solr.dir}/config</alfresco.solr.home.dir>
<alfresco.solr.data.dir>${alfresco.solr.dir}/data</alfresco.solr.data.dir>
</properties>
<build>
@@ -56,6 +62,29 @@
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<dependencies>
<!-- Bring in the H2 Database scripts needed when running embedded, they are now
available from the standard generated artifacts, no longer needed to be picked
up from the alfresco-rad project -->
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-repository</artifactId>
<version>${alfresco.version}</version>
<classifier>h2scripts</classifier>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Explicitly bring in the Plexus Archiver so assembly goes quicker -->
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-archiver</artifactId>
<version>2.3</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>run-wars</id>
@@ -205,28 +234,17 @@
</build>
<dependencies>
<!-- Bring in the Share Page Objects (PO) used in the regression tests -->
<!-- Bring in the Share Page Objects (PO) used in our functional tests.
It contains page objects such as LoginPage and it also brings
in selenium-grid and selenium. -->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>share-po</artifactId>
<version>${alfresco.version}</version>
<scope>test</scope>
<!-- Exclude version 2.39.0 of selenium that does not work with latest FF browsers, we include
version 2.45 later on here in this profile -->
<exclusions>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
</exclusion>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Bring in the Share Page Object (PO) regression tests that comes with Alfresco.
These tests cover the Alfresco Share Web Application -->
<!-- Bring in the Share Page Object (PO) Tests that comes with Alfresco. It has
the org.alfresco.po.share.AbstractTest class that our custom tests extend. -->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>share-po</artifactId>
@@ -234,8 +252,7 @@
<classifier>tests</classifier>
<scope>test</scope>
<!-- Exclude version 2.39.0 of selenium that does not work with latest FF browsers, we include
version 2.45 later on here in this profile -->
<!-- Exclude selenium as it is already brought in by share-po dependency above -->
<exclusions>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
@@ -247,25 +264,6 @@
</exclusion>
</exclusions>
</dependency>
<!-- Make sure we are running with newer selenium that works with newest FF (newer than 2.39.0) -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.45.0-alfresco</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>2.45.0-alfresco</version>
<exclusions>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>servlet-api-2.5</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Test NG is defined with test scope in share-po, so need it here too -->
<!-- Alfresco code creates a wrapper around Test NG -->
<dependency>
@@ -280,6 +278,43 @@
</exclusion>
</exclusions>
</dependency>
<!-- Bring in newer selenium version if required
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.48.0</version>
<scope>test</scope>
</dependency>
-->
<!-- Need to bring in a newer Spring that supports annotations, Alfresco brings in older one -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${spring.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
</dependency>
</dependencies>
</profile>
@@ -306,9 +341,9 @@
<version>2.18.1</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>${project.parent.basedir}/share-amp/target/test-classes/testng.xml</suiteXmlFile>
<suiteXmlFile>${project.parent.basedir}/${rootArtifactId}-share-amp/target/test-classes/testng.xml</suiteXmlFile>
</suiteXmlFiles>
<testClassesDirectory>${project.parent.basedir}/share-amp/target/test-classes</testClassesDirectory>
<testClassesDirectory>${project.parent.basedir}/${rootArtifactId}-share-amp/target/test-classes</testClassesDirectory>
<systemPropertyVariables>
<!-- Where is the Alfresco Share Webapp that we are testing -->
<share.target>${share.client.url}</share.target>
@@ -336,30 +371,16 @@
<dependencies>
<!-- Bring in the Share Page Objects (PO) used in our functional tests.
Without it TestNG cannot load our test class when it uses page objects such as LoginPage -->
It contains page objects such as LoginPage and it also brings
in selenium-grid and selenium. -->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>share-po</artifactId>
<version>${alfresco.version}</version>
<scope>test</scope>
<!-- Exclude version 2.39.0 of selenium that does not work with latest FF browsers, we include
version 2.45 later on here in this profile -->
<exclusions>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
</exclusion>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Bring in the Share Page Object (PO) Tests that comes with Alfresco. It has
the org.alfresco.po.share.AbstractTest class that our custom tests extend.
Without it TestNG cannot load our test class -->
the org.alfresco.po.share.AbstractTest class that our custom tests extend. -->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>share-po</artifactId>
@@ -367,8 +388,7 @@
<classifier>tests</classifier>
<scope>test</scope>
<!-- Exclude version 2.39.0 of selenium that does not work with latest FF browsers, we include
version 2.45 later on here in this profile -->
<!-- Exclude selenium as it is already brought in by share-po dependency above -->
<exclusions>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
@@ -380,25 +400,6 @@
</exclusion>
</exclusions>
</dependency>
<!-- Make sure we are running with newer selenium that works with newest FF (newer than 2.39.0) -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.45.0-alfresco</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>2.45.0-alfresco</version>
<exclusions>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>servlet-api-2.5</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Test NG is defined with test scope in share-po, so need it here too -->
<!-- Alfresco code creates a wrapper around Test NG -->
<dependency>
@@ -413,6 +414,43 @@
</exclusion>
</exclusions>
</dependency>
<!-- Bring in newer selenium version if required
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.48.0</version>
<scope>test</scope>
</dependency>
-->
<!-- Need to bring in a newer Spring that supports annotations, Alfresco brings in older one -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${spring.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
</dependency>
</dependencies>
</profile>
@@ -38,13 +38,11 @@
<class name="org.alfresco.po.share.site.document.DocumentDetailsPageTest"/>
</classes>
</test>
<!-- TODO: fix this, currently does not work
<test name="DocumentLibraryPageTest">
<classes>
<class name="org.alfresco.po.share.site.document.DocumentLibraryPageTest"/>
</classes>
</test>
-->
<test name="FileDirectoryInfoTest">
<classes>
<class name="org.alfresco.po.share.site.document.FileDirectoryInfoTest">
@@ -13,19 +13,26 @@
<Context docBase="${project.parent.basedir}/alfresco-war/target/${project.build.finalName}">
<!-- Pick up static resource files from AMPs and other directories (this should not include docBase) -->
<Resources className="org.apache.naming.resources.VirtualDirContext"
extraResourcePaths="/=${project.parent.basedir}/repo-amp/target/repo-amp/web" />
extraResourcePaths="/=${project.parent.basedir}/${rootArtifactId}-repo-amp/target/amp/web" />
<!-- IMPORTANT! The extraResourcePaths string need to be on one continues line, so if we add another Repo AMP,
it would look something like this:
<Resources className="org.apache.naming.resources.VirtualDirContext"
extraResourcePaths="/=${project.parent.basedir}/${rootArtifactId}-repo-amp/target/amp/web,/=${project.parent.basedir}/component-a-repo/target/amp/web" />
-->
<!-- Configure where the Alfresco (alfresco.war) web application can load classes, test classes, and config files -->
<!-- Setup the virtual class path like this:
1) target/classes
2) target/${project.build.finalName}/config
2) target/amp/config
3) target/test-classes
This way mvn compile can be invoked and all changes will be picked up
-->
<Loader className="org.apache.catalina.loader.VirtualWebappLoader"
searchVirtualFirst="true"
virtualClasspath="${project.parent.basedir}/repo-amp/target/classes;${project.parent.basedir}/repo-amp/target/repo-amp/config;${project.parent.basedir}/repo-amp/target/test-classes" />
virtualClasspath="${project.parent.basedir}/${rootArtifactId}-repo-amp/target/classes;
${project.parent.basedir}/${rootArtifactId}-repo-amp/target/amp/config;
${project.parent.basedir}/${rootArtifactId}-repo-amp/target/test-classes" />
<!-- Load from all directories, not just when the META-INF directory is found in exploded JAR -->
<JarScanner scanAllDirectories="true" />
@@ -10,19 +10,29 @@
<!-- Pick up static resource files from any Share extensions, being it a JAR or an AMP
(this should not include docBase) -->
<Resources className="org.apache.naming.resources.VirtualDirContext"
extraResourcePaths="/=${project.parent.basedir}/share-amp/target/share-amp/web" />
extraResourcePaths="/=${project.parent.basedir}/${rootArtifactId}-share-amp/target/amp/web" />
<!-- IMPORTANT! The extraResourcePaths string need to be on one continues line, so if we add another Share AMP,
it would look something like this:
<Resources className="org.apache.naming.resources.VirtualDirContext"
extraResourcePaths="/=${project.parent.basedir}/${rootArtifactId}-share-amp/target/amp/web,/=${project.parent.basedir}/component-a-share/target/amp/web" />
-->
<!-- Configure where the Share (share.war) web application can load classes, test classes, and config -->
<!-- Configure where the Share (share.war) web application can load classes, config, and test classes (in that order) -->
<!-- Setup the virtual class path like this:
1) target/classes
2) target/${project.build.finalName}/config
3) target/test-classes
1) ${rootArtifactId}-share-amp/target/classes
2) ${rootArtifactId}-share-amp/target/amp/config
3) ${rootArtifactId}-share-amp/target/test-classes
4) Add other AMP paths here....
5) share/target/test-classes (loads the share-config-custom.xml used during test runs)
This way mvn compile can be invoked and all changes will be picked up
-->
<Loader className="org.apache.catalina.loader.VirtualWebappLoader"
searchVirtualFirst="true"
virtualClasspath="${project.parent.basedir}/share-amp/target/classes;${project.parent.basedir}/share-amp/target/share-amp/config;${project.parent.basedir}/share-amp/target/test-classes" />
virtualClasspath="${project.parent.basedir}/${rootArtifactId}-share-amp/target/classes;
${project.parent.basedir}/${rootArtifactId}-share-amp/target/amp/config;
${project.parent.basedir}/${rootArtifactId}-share-amp/target/test-classes;
${project.parent.basedir}/share/target/test-classes" />
<!-- Load from all directories, not just when the META-INF directory is found in exploded JAR -->
<JarScanner scanAllDirectories="true" />
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Context>
<Environment name="solr/home" type="java.lang.String" value="${project.parent.basedir}/alf_data_dev/solr4/config/" override="true"/>
<Environment name="solr/model/dir" type="java.lang.String" value="${project.parent.basedir}/alf_data_dev/solr4/config/alfrescoModels/" override="true"/>
<Environment name="solr/content/dir" type="java.lang.String" value="${project.parent.basedir}/alf_data_dev/solr4/data/content/" override="true"/>
<Environment name="solr/home" type="java.lang.String" value="${alfresco.solr.home.dir}/" override="true"/>
<Environment name="solr/model/dir" type="java.lang.String" value="${alfresco.solr.home.dir}/alfrescoModels/" override="true"/>
<Environment name="solr/content/dir" type="java.lang.String" value="${alfresco.solr.data.dir}/content/" override="true"/>
<!-- Pick up static resource files from any Solr extensions, being it a JAR or an AMP,
by default there are no extensions, just the standard Solr webapp files.
@@ -1,4 +0,0 @@
## If you are overriding out-of-the-box Alfresco web scripts put these files here.
## If you are defining new web scripts add them under resources/alfresco/site-webscripts.
##
@@ -13,6 +13,12 @@
<version>${version}</version>
</parent>
<properties>
<!-- Used in share-config-custom.xml when testing.
By default points to standard location (local) of Alfresco Repository -->
<alfresco.repo.url>http://localhost:8080/alfresco</alfresco.repo.url>
</properties>
<dependencies>
<dependency>
<groupId>${alfresco.groupId}</groupId>
@@ -23,12 +29,12 @@
<!-- Demonstrating the dependency / installation of the share AMP developed in the 'share-amp' module -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>share-amp</artifactId>
<artifactId>${rootArtifactId}-share-amp</artifactId>
<version>${project.version}</version>
<type>amp</type>
</dependency>
<!-- Uncomment if you are using RM (Records Management) module -->
<!--
<!-- Make sure to set the correct version for 5.1 with alfresco.rm.version property in parent POM
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-rm-share</artifactId>
@@ -40,9 +46,36 @@
<build>
<plugins>
<plugin>
<!-- Bring in the Maven Dependency plugin so we can unpack and store the MANIFEST.MF file.
It will be used in the custom Share WAR that is produced by the WAR plugin,
it otherwise gets overwritten by the overlay process. -->
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<phase>generate-sources</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<includeTypes>war</includeTypes>
<includeGroupIds>org.alfresco</includeGroupIds>
<includeArtifactIds>share</includeArtifactIds>
<includes>META-INF/MANIFEST.MF</includes>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<!-- Bring in the MANIFEST.MF file from the original share.war, it contains version information
that is needed for it to operate properly -->
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
<manifestFile>${project.build.directory}/dependency/META-INF/MANIFEST.MF</manifestFile>
</archive>
<!-- Here is can control the order of overlay of your (WAR, AMP, etc.) dependencies
| NOTE: At least one WAR dependency must be uncompressed first
| NOTE: In order to have a dependency effectively added to the WAR you need to
@@ -50,7 +83,7 @@
| NOTE: First-win resource strategy is used by the WAR plugin
-->
<overlays>
<!-- The current project customizations -->
<!-- Current project customizations. This is normally empty, since customizations come from the AMPs -->
<overlay/>
<!-- The Share WAR -->
<overlay>
@@ -63,7 +96,7 @@
<!-- Add / sort your AMPs here -->
<overlay>
<groupId>${project.groupId}</groupId>
<artifactId>share-amp</artifactId>
<artifactId>${rootArtifactId}-share-amp</artifactId>
<type>amp</type>
</overlay>
<!-- Uncomment if you are using RM module -->
@@ -9,11 +9,15 @@
</autowire>
<!--
We don't need to do this when we have the new refresh mojos in the Alfresco plug-in.
If resource caching has been disabled then all the dependency caches will be cleared
before processing the Aikau jsonModel request...
(i.e. this.dojoDependencyHandler.clearCaches() )
For more information see the Aikau source code: https://github.com/Alfresco/Aikau
-->
<disable-resource-caching>true</disable-resource-caching>
<disable-resource-caching>false</disable-resource-caching>
</web-framework>
</config>
@@ -21,7 +21,7 @@
<id>run</id>
<properties>
<alfresco.solr.dir>${project.parent.basedir}/${alfresco.data.location}/solr4</alfresco.solr.dir>
<alfresco.solr.dir>${alfresco.data.location}/solr4</alfresco.solr.dir>
<alfresco.solr.home.dir>${alfresco.solr.dir}/config</alfresco.solr.home.dir>
<alfresco.solr.data.dir>${alfresco.solr.dir}/data</alfresco.solr.data.dir>
</properties>
@@ -69,6 +69,30 @@
</executions>
</plugin>
<!-- For windows paths, convert single \ to / for the ${alfresco.solr.data.dir} path,
by default it will be c:\bla\, we need forward slash or double backslash. -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>regexp-property</id>
<phase>generate-resources</phase>
<goals>
<goal>regex-property</goal>
</goals>
</execution>
</executions>
<configuration>
<name>solrDataDir</name>
<value>${alfresco.solr.data.dir}</value>
<regex>\\</regex>
<replacement>/</replacement>
<failIfNoMatch>false</failIfNoMatch>
</configuration>
</plugin>
<!-- Run the goal replace and update configuration files for the
Solr cores to reflect our build structure -->
<plugin>
@@ -90,21 +114,9 @@
<include>${alfresco.solr.home.dir}/workspace-SpacesStore/conf/solrcore.properties</include>
</includes>
<replacements>
<replacement>
<token>@@ALFRESCO_SOLR4_DIR@@</token>
<value>${alfresco.solr.home.dir}/</value>
</replacement>
<replacement>
<token>@@ALFRESCO_SOLR4_MODEL_DIR@@</token>
<value>${alfresco.solr.home.dir}/alfrescoModels/</value>
</replacement>
<replacement>
<token>@@ALFRESCO_SOLR4_CONTENT_DIR@@</token>
<value>${alfresco.solr.data.dir}/content/</value>
</replacement>
<replacement>
<token>@@ALFRESCO_SOLR4_DATA_DIR@@</token>
<value>${alfresco.solr.data.dir}/index</value>
<value>${solrDataDir}/index</value>
</replacement>
</replacements>
</configuration>
@@ -16,9 +16,9 @@ Project layout
+---+
pom.xml
|-> repo-amp
|-> rootArtifactid-repo-amp
|-> rootArtifactid-share-amp
|-> repo
|-> share-amp
|-> share
|-> solr
|-> runner (a Tomcat embedded runner / integration test runner)
@@ -28,14 +28,14 @@ Project layout
The All-in-One Alfresco project is composed by the following modules:
* <<<repo-amp>>>: An Repository Tier AMP project, demonstrating sample project structure and demo component loading
* <<<rootArtifactid-repo-amp>>>: An Repository Tier AMP project, demonstrating sample project structure and demo component loading
* <<<repo>>>: An <<<alfresco.war>>> Repository Extension, overlaying the Alfresco WAR with custom resources / classes
and depending on the <<<amp>>> project
* <<<share-amp>>>: A Share Tier AMP project, demonstrating sample project structure and demo component loading
* <<<rootArtifactid-share-amp>>>: A Share Tier AMP project, demonstrating sample project structure and demo component loading
* <<<share>>>: A <<<share.war>>> extension, overlaying the Share WAR with the custom developed <<<share-amp>>>
* <<<share>>>: A <<<share.war>>> extension, overlaying the Share WAR with the custom developed <<<rootArtifactid-share-amp>>>
* <<<solr>>>: An Alfresco <<<alfresco-*-*-solr.zip>>> overlay / customization to configure {{{http://solr.apache.org}Apache Solr}} cores properties
+1 -1
View File
@@ -12,7 +12,7 @@
<parent>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-sdk-aggregator</artifactId>
<version>2.1.0-beta-1</version>
<version>2.2.0-beta-1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
@@ -29,8 +29,15 @@
</includes>
<excludes>
<exclude>**/*-context.xml</exclude>
<exclude>**/log4j.properties</exclude>
</excludes>
</fileSet>
<fileSet encoding="UTF-8" filtered="true">
<directory>src/main/amp/config/alfresco/module/__artifactId__</directory>
<includes>
<include>log4j.properties</include>
</includes>
</fileSet>
<fileSet encoding="UTF-8" filtered="true" packaged="false">
<directory>src/main/amp</directory>
<includes>
@@ -24,7 +24,7 @@
<!-- The following are default values for data location and Alfresco Community version.
Uncomment if you need to change (Note. current default version for Enterprise edition is @@alfresco.enterprise.default.version@@)
<alfresco.version>@@alfresco.community.default.version@@</alfresco.version>
<alfresco.data.location>alf_data_dev</alfresco.data.location> -->
<alfresco.data.location>/absolute/path/to/alf_data_dev</alfresco.data.location> -->
<!-- This control the root logging level for all apps uncomment and change, defaults to WARN
<app.log.root.level>WARN</app.log.root.level>
@@ -63,6 +63,22 @@
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-repository</artifactId>
</dependency>
<!-- If we are running tests then make the H2 Scripts available
Note. tests are skipped when you are running -Pamp-to-war -->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-repository</artifactId>
<version>${alfresco.version}</version>
<classifier>h2scripts</classifier>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<profiles>
@@ -81,23 +97,5 @@
</dependency>
</dependencies>
</profile>
<!--
If the 'amp-to-war' profile is enabled then make sure to bring in the alfresco-rad module,
which has the H2 scripts and other RAD features.
TODO: TO INVESTIGATE: This dependency is already defined in the parent SDK pom in the 'amp-to-war' profile
but this does not work, it is not include...
-->
<profile>
<id>amp-to-war</id>
<dependencies>
<dependency>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-rad</artifactId>
<version>${maven.alfresco.version}</version>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
@@ -13,7 +13,12 @@ if not exist %springloadedfile% (
mvn validate -Psetup
)
set MAVEN_OPTS=-javaagent:"%springloadedfile%" -noverify -Xms256m -Xmx2G
:: Use these settings if you're using JDK7
:: set MAVEN_OPTS=-javaagent:"%springloadedfile%" -noverify -Xms256m -Xmx2G -XX:PermSize=300m
:: Spring loaded does not work very well with 5.1 at the moment, breaks the H2 db after first run and then restart
::set MAVEN_OPTS=-javaagent:"%springloadedfile%" -noverify -Xms256m -Xmx2G
set MAVEN_OPTS=-noverify -Xms256m -Xmx2G
mvn integration-test -Pamp-to-war -nsu
:: mvn integration-test -Pamp-to-war
@@ -8,4 +8,9 @@ if [ ! -f $springloadedfile ]; then
mvn validate -Psetup
fi
MAVEN_OPTS="-javaagent:$springloadedfile -noverify -Xms256m -Xmx2G" mvn integration-test -Pamp-to-war
# Use these settings if you're using JDK7
# MAVEN_OPTS="-javaagent:$springloadedfile -noverify -Xms256m -Xmx2G -XX:PermSize=300m" mvn install -Prun
# Spring loaded does not work very well with 5.1 at the moment, breaks the H2 db after first run and then restart
#MAVEN_OPTS="-javaagent:$springloadedfile -noverify -Xms256m -Xmx2G" mvn integration-test -Pamp-to-war
MAVEN_OPTS="-noverify -Xms256m -Xmx2G" mvn integration-test -Pamp-to-war
@@ -1,5 +1,5 @@
<webscript>
<shortname>Javascript Sample Webscript</shortname>
<shortname>Hello World Sample Webscript</shortname>
<description>Hands back a greeting</description>
<url>/sample/helloworld</url>
<authentication>user</authentication>
@@ -12,7 +12,7 @@
<!-- Registration of new models -->
<bean id="${package}.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
<bean id="${artifactId}.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
<property name="models">
<list>
<value>alfresco/module/${project.artifactId}/model/content-model.xml</value>
@@ -22,17 +22,20 @@
<beans>
<!-- A simple class that is initialized by Spring -->
<bean id="${package}.exampleBean" class="${package}.demoamp.Demo" init-method="init" />
<bean id="${artifactId}.exampleBean" class="${package}.demoamp.Demo" init-method="init" />
<!-- A simple module component that will be executed once -->
<bean id="${package}.exampleComponent" class="${package}.demoamp.DemoComponent" parent="module.baseComponent" >
<property name="moduleId" value="${project.artifactId}" /> <!-- See module.properties -->
<!-- A simple module component that will be executed once.
Note. this module component will only be executed once, and then there will be an entry for it in the Repo.
So doing for example $ mvn clean install -Pamp-to-war twice will only execute this component the first time.
You need to remove /alf_data_dev for it to be executed again. -->
<bean id="${artifactId}.exampleComponent" class="${package}.demoamp.DemoComponent" parent="module.baseComponent" >
<property name="moduleId" value="${artifactId}" /> <!-- See module.properties -->
<property name="name" value="exampleComponent" />
<property name="description" value="A demonstration component" />
<property name="sinceVersion" value="2.0" />
<property name="appliesFromVersion" value="2.0" />
<property name="sinceVersion" value="1.0" />
<property name="appliesFromVersion" value="1.0" />
<property name="nodeService" ref="NodeService" />
<property name="nodeLocatorService" ref="nodeLocatorService" />
</bean>
</beans>
@@ -0,0 +1,27 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<beans>
<bean id="webscript.helloworld.get"
class="${package}.demoamp.HelloWorldWebScript"
parent="webscript">
</bean>
</beans>
@@ -1,3 +1,6 @@
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
@@ -37,4 +40,4 @@
# those in the webapp's main log4j.properties.
#
#-----------------------------------------------------------------------
log4j.logger.org.alfresco.demoamp.DemoComponent=${module.log.level}
log4j.logger.${package}.demoamp.DemoComponent=debug
@@ -19,7 +19,11 @@
<beans>
<!-- This is filtered by Maven at build time, so that module name is single sourced. -->
<!-- Note. The bootstrap-context.xml file has to be loaded first.
Otherwise your custom models are not yet loaded when your service beans are instantiated and you
cannot for example register policies on them. -->
<import resource="classpath:alfresco/module/${project.artifactId}/context/bootstrap-context.xml" />
<import resource="classpath:alfresco/module/${project.artifactId}/context/service-context.xml" />
<import resource="classpath:alfresco/module/${project.artifactId}/context/bootstrap-context.xml" />
<import resource="classpath:alfresco/module/${project.artifactId}/context/webscript-context.xml" />
</beans>
@@ -24,7 +24,7 @@ module.id=${project.artifactId}
#module.aliases=myModule-123, my-module
module.title=${project.name}
module.description=${project.description}
module.version=${noSnapshotVersion}
module.version=${project.version}
# The following optional properties can be used to prevent the module from being added
# to inappropriate versions of the WAR file.
@@ -0,0 +1,43 @@
#set($symbol_pound='#')
#set($symbol_dollar='$')
#set($symbol_escape='\' )
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package ${package}.demoamp;
import org.springframework.extensions.webscripts.Cache;
import org.springframework.extensions.webscripts.DeclarativeWebScript;
import org.springframework.extensions.webscripts.Status;
import org.springframework.extensions.webscripts.WebScriptRequest;
import java.util.HashMap;
import java.util.Map;
/**
* A demonstration Java controller for the Hello World Web Script.
*
* @author martin.bergljung@alfresco.com
* @since 2.1.0
*/
public class HelloWorldWebScript extends DeclarativeWebScript {
protected Map<String, Object> executeImpl(
WebScriptRequest req, Status status, Cache cache) {
Map<String, Object> model = new HashMap<String, Object>();
model.put("fromJava", "HelloFromJava");
return model;
}
}
@@ -4,26 +4,33 @@
it is never released with the Alfresco.war
=================================================================================================================-->
<!-- Setup docBase to something like repo-amp/target/repo-amp-war
and path to /alfresco
The Alfresco.war 5.0 does not have a webapp (it used to have Alfresco Explorer but not anymore)
that we will access, so this docBase might not be needed
-->
<Context docBase="${app.amp.client.war.folder}" path="${alfresco.client.contextPath}">
<!-- Setup a virtual context for the /alfresco webapp by specifying this as path for Context.
The amp-to-war profile uses the tomcat7-maven-plugin to kick off the webapp.
This profile is used for both the repo and share AMP archetypes, and has no config for path or resources,
so we need to specify here both the context path and where the webapp resources can be found.
<Resources className="org.apache.naming.resources.VirtualDirContext"
extraResourcePaths="/=${project.build.directory}/${project.build.finalName}/web" />
The webapp resources are located in the {repo-amp-dir}/target/amp-war directory, However, we
cannot just set this up as the docBase attribute for the Context as it would always be read
before any paths in the extraResourcePaths. So to allow for customizations to override
stuff in the alfresco.war webapp, such as the /images/logo/logo.png, we add the webapp resource
path last in the extraResourcePaths.
Note. Alfresco.war 5.0 does not have a webapp, just an index page, the Alfresco Explorer webapp is no longer available.
-->
<Context path="${alfresco.client.contextPath}">
<Resources className="org.apache.naming.resources.VirtualDirContext"
extraResourcePaths="/=${project.build.directory}/amp/web,${app.amp.client.war.folder}" />
<!-- Setup the virtual class path like this:
1) target/classes
2) target/${project.build.finalName}/config
2) target/amp/config
3) target/test-classes
This way mvn compile can be invoked and all changes will be picked up
-->
<Loader searchVirtualFirst="true"
className="org.apache.catalina.loader.VirtualWebappLoader"
virtualClasspath="${project.build.outputDirectory};${project.build.directory}/${project.build.finalName}/config;${project.build.testOutputDirectory}" />
virtualClasspath="${project.build.outputDirectory};${project.build.directory}/amp/config;${project.build.testOutputDirectory}" />
<!-- This enables hot reloading of web resources from uncompressed jars (while in prod they would be loaded from WEB-INF/lib/{\*.jar}/META-INF/resources -->
+1 -1
View File
@@ -14,7 +14,7 @@
<parent>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-sdk-aggregator</artifactId>
<version>2.1.0-beta-1</version>
<version>2.2.0-beta-1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
@@ -22,11 +22,27 @@
<include>**/*.java</include>
</includes>
</fileSet>
<fileSet filtered="true" packaged="false" encoding="UTF-8">
<directory>src/main/amp/config/alfresco/web-extension</directory>
<includes>
<include>__artifactId__-slingshot-application-context.xml</include>
</includes>
</fileSet>
<fileSet filtered="true" packaged="false" encoding="UTF-8">
<directory>src/main/amp/config/alfresco/web-extension/site-data/extensions</directory>
<includes>
<include>__artifactId__-example-widgets.xml</include>
</includes>
</fileSet>
<fileSet encoding="UTF-8" filtered="false">
<directory>src/main/amp</directory>
<includes>
<include>**</include>
</includes>
<excludes>
<exclude>**/__artifactId__-slingshot-application-context.xml</exclude>
<exclude>**/__artifactId__-example-widgets.xml</exclude>
</excludes>
</fileSet>
<fileSet encoding="UTF-8" filtered="false">
<directory>src/test/resources</directory>
@@ -89,22 +89,4 @@
</plugin>
</plugins>
</build>
<profiles>
<!--
Brings in the extra Enterprise specific share classes,
if the 'enterprise' profile has been activated, needs to be activated manually. -->
<profile>
<id>enterprise</id>
<dependencies>
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>share-enterprise</artifactId>
<version>${alfresco.version}</version>
<classifier>classes</classifier>
<scope>provided</scope>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
@@ -14,7 +14,8 @@ if not exist %springloadedfile% (
mvn validate -Psetup
)
set MAVEN_OPTS=-javaagent:"%springloadedfile%" -noverify
:: Spring loaded does not work very well with 5.1 at the moment, breaks the H2 db after first run and then restart
:: set MAVEN_OPTS=-javaagent:"%springloadedfile%" -noverify
set MAVEN_OPTS=-noverify
mvn integration-test -Pamp-to-war -nsu
:: mvn integration-test -Pamp-to-war
@@ -7,4 +7,6 @@ if [ ! -f $springloadedfile ]; then
mvn validate -Psetup
fi
MAVEN_OPTS="-javaagent:$springloadedfile -noverify" mvn integration-test -Pamp-to-war
# Spring loaded does not work very well with 5.1 at the moment, breaks the H2 db after first run and then restart
# MAVEN_OPTS="-javaagent:$springloadedfile -noverify" mvn integration-test -Pamp-to-war
MAVEN_OPTS="-noverify" mvn integration-test -Pamp-to-war
@@ -0,0 +1,29 @@
#set($symbol_pound='#')
#set($symbol_dollar='$')
#set($symbol_escape='\' )
<?xml version='1.0' encoding='UTF-8'?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
<!--
Define beans related to this Share extension here, such as
evaluators and resource bootstrapping.
Note. Any configuration related to the whole Share.war webapp
(i.e. not specific to this share extension) should be
placed in the tomcat/shared/classes/alfresco/web-extension/custom-slingshot-application-context.xml file
-->
<!-- Add module specific messages and labels -->
<bean id="${artifactId}.resources"
class="org.springframework.extensions.surf.util.ResourceBundleBootstrapComponent">
<property name="resourceBundles">
<list>
<value>alfresco.web-extension.messages.${artifactId}</value>
</list>
</property>
</bean>
</beans>
@@ -1,30 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:hz="http://www.hazelcast.com/schema/spring"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.hazelcast.com/schema/spring
http://www.hazelcast.com/schema/spring/hazelcast-spring-2.4.xsd">
<!--
Define beans related to this Share extension here, such as
evaluators and resource bootstrapping.
Note. Any configuration related to the whole Share.war webapp
(i.e. not specific to this share extension) should be
placed in the environment specific config:
alfresco/tomcat/shared/classes/alfresco/web-extension/custom-slingshot-application-context.xml file
-->
<!-- Add extension specific messages and labels -->
<bean id="com.mycompany.share-amp.resources"
class="org.springframework.extensions.surf.util.ResourceBundleBootstrapComponent">
<property name="resourceBundles">
<list>
<value>alfresco.messages.custom</value>
</list>
</property>
</bean>
</beans>
@@ -1,7 +1,10 @@
#set($symbol_pound='#')
#set($symbol_dollar='$')
#set($symbol_escape='\' )
<extension>
<modules>
<module>
<id>Example Aikau Widgets</id>
<id>${artifactId} - Example Aikau Widgets</id>
<version>1.0</version>
<auto-deploy>true</auto-deploy>
<configurations>
@@ -1,4 +1,6 @@
## If you are overriding out-of-the-box Alfresco web scripts put these files here.
## If you are defining new web scripts add them under resources/alfresco/site-webscripts.
## If you are overriding out-of-the-box Alfresco web scripts, put these files here
## in the correct org.alfresco... package.
## If you are defining a new custom web script, add it under
## resources/alfresco/web-extension/site-webscripts/{your domain path}.
##
@@ -24,7 +24,7 @@ module.id=${project.artifactId}
#module.aliases=myModule-123, my-module
module.title=${project.name}
module.description=${project.description}
module.version=${noSnapshotVersion}
module.version=${project.version}
# The following optional properties can be used to prevent the module from being added
# to inappropriate versions of the WAR file.
@@ -9,11 +9,15 @@
</autowire>
<!--
We don't need to do this when we have the new refresh mojos in the Alfresco plug-in.
If resource caching has been disabled then all the dependency caches will be cleared
before processing the Aikau jsonModel request...
(i.e. this.dojoDependencyHandler.clearCaches() )
For more information see the Aikau source code: https://github.com/Alfresco/Aikau
-->
<disable-resource-caching>true</disable-resource-caching>
<disable-resource-caching>false</disable-resource-caching>
</web-framework>
</config>
@@ -4,24 +4,34 @@
it is never released with the Alfresco.war
=================================================================================================================-->
<!-- Setup docBase to something like share-amp/target/share-amp-war
and path to /share -->
<Context docBase="${app.amp.client.war.folder}" path="${share.client.contextPath}">
<!-- Setup a virtual context for the /share webapp by specifying this as path for Context.
The amp-to-war profile uses the tomcat7-maven-plugin to kick off the webapp.
This profile is used for both the repo and share AMP archetypes, and has no config for path or resources,
so we need to specify here both the context path and where the webapp resources can be found.
The webapp resources are located in the {share-amp-dir}/target/amp-war directory, However, we
cannot just set this up as the docBase attribute for the Context as it would always be read
before any paths in the extraResourcePaths. So to allow for customizations to override
stuff in the share.war webapp, such as the /favicon.ico, we add the webapp resource
path last in the extraResourcePaths.
Note. most of the UI customizations for Share are done via custom themes.
-->
<Context path="${share.client.contextPath}">
<Resources className="org.apache.naming.resources.VirtualDirContext"
extraResourcePaths="/=${project.build.directory}/${project.build.finalName}/web" />
extraResourcePaths="/=${project.build.directory}/amp/web,${app.amp.client.war.folder}" />
<!-- Configure where the Share (share.war) web application can load classes, test classes, and config -->
<!-- Setup the virtual class path like this:
1) target/classes
2) target/${project.build.finalName}/config
2) target/amp/config
3) target/test-classes
This way mvn compile can be invoked and all changes will be picked up
-->
<Loader searchVirtualFirst="true"
className="org.apache.catalina.loader.VirtualWebappLoader"
virtualClasspath="${project.build.outputDirectory};${project.build.directory}/${project.build.finalName}/config;${project.build.testOutputDirectory}" />
virtualClasspath="${project.build.outputDirectory};${project.build.directory}/amp/config;${project.build.testOutputDirectory}" />
<!-- This enables hot reloading of web resources from uncompressed jars (while in prod they would be loaded from WEB-INF/lib/{\*.jar}/META-INF/resources -->
<JarScanner scanAllDirectories="true" />
+5 -90
View File
@@ -5,17 +5,15 @@
<packaging>jar</packaging>
<name>Rapid Application Development Support</name>
<description>SDK module for Rapid Development support</description>
<description>SDK module for Rapid Development support - allows remote unit testing and starts remote JUnit runner</description>
<parent>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-sdk-aggregator</artifactId>
<version>2.1.0-beta-1</version>
<version>2.2.0-beta-1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<properties>
<pgsql.dialect.folder>${project.build.directory}/pg-dialect-tmp</pgsql.dialect.folder>
</properties>
<dependencies>
<!-- Enables JUnit remote testing (using JRebel) -->
<dependency>
@@ -30,97 +28,14 @@
</exclusion>
</exclusions>
</dependency>
<!-- Required to have annotation based remote testing working -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>3.0.6.RELEASE</version>
<version>3.2.14.RELEASE</version>
<type>jar</type>
</dependency>
</dependencies>
<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>org.alfresco</groupId>
<artifactId>alfresco-repository</artifactId>
<version>${alfresco.community.default.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>${pgsql.dialect.folder}</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.outputDirectory}</outputDirectory>
<resources>
<resource>
<directory>${pgsql.dialect.folder}/alfresco/dbscripts/create/org.hibernate.dialect.PostgreSQLDialect</directory>
<includes>
<include>*</include>
</includes>
<targetPath>alfresco/dbscripts/create/org.hibernate.dialect.H2Dialect</targetPath>
</resource>
<resource>
<directory>${pgsql.dialect.folder}/alfresco/ibatis/org.hibernate.dialect.PostgreSQLDialect</directory>
<includes>
<include>*</include>
</includes>
<targetPath>alfresco/ibatis/org.hibernate.dialect.H2Dialect</targetPath>
</resource>
<!-- Upgrade scripts - does not seem to be picked up, so any changes you would make to them are not picked up...
<resource>
<directory>${pgsql.dialect.folder}/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>${pgsql.dialect.folder}/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>${pgsql.dialect.folder}/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>
</project>
+10 -19
View File
@@ -8,25 +8,16 @@
<parent>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-sdk-aggregator</artifactId>
<version>2.1.0-beta-1</version>
<version>2.2.0-beta-1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.2</version>
<version>3.4</version>
<executions>
<execution>
<id>generated-helpmojo</id>
@@ -82,7 +73,7 @@
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.2</version>
<version>3.4</version>
<!-- Annotations are not needed for plugin execution so you
can remove this dependency for execution by using provided scope. -->
<scope>provided</scope>
@@ -90,7 +81,7 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-archiver</artifactId>
<version>2.5</version>
<version>2.6</version>
<exclusions>
<exclusion>
<artifactId>maven-core</artifactId>
@@ -101,7 +92,7 @@
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-archiver</artifactId>
<version>2.3</version>
<version>2.10.3</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
@@ -116,17 +107,17 @@
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.3</version>
<version>4.5.1</version>
</dependency>
<dependency>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
<version>3.3</version>
<version>3.4</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.1</version>
<version>2.4</version>
</dependency>
<dependency>
<groupId>org.alfresco</groupId>
@@ -136,7 +127,7 @@
<dependency>
<groupId>org.alfrescolabs.alfresco-technical-validation</groupId>
<artifactId>org.alfrescolabs.alfresco-technical-validation</artifactId>
<version>0.4.0</version>
<version>0.6.0</version>
</dependency>
</dependencies>
@@ -145,7 +136,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.3</version>
<version>3.4</version>
</plugin>
</plugins>
</reporting>
@@ -67,58 +67,53 @@ public abstract class AbstractRefreshWebappMojo extends AbstractMojo {
* repo - Forces only to refresh repo
* none - Disables refreshing web scripts
*/
@Parameter(property = "maven.alfresco.refreshMode", defaultValue = "auto")
@Parameter(property = "maven.alfresco.refresh.mode", defaultValue = "auto")
protected String refreshMode;
/**
* The hostname for where the Alfresco Tomcat server is running.
*/
@Parameter(property = "maven.alfresco.refreshHost", defaultValue = "localhost")
@Parameter(property = "maven.alfresco.refresh.host", defaultValue = "localhost")
protected String refreshHost;
/**
* The port number for where the Alfresco Tomcat server is running.
*/
@Parameter(property = "maven.alfresco.refreshPort", defaultValue = "${maven.tomcat.port}")
@Parameter(property = "maven.alfresco.refresh.port", defaultValue = "${maven.tomcat.port}")
private String refreshPort;
/**
* The username for authenticating against Alfresco Repo.
*/
@Parameter(property = "maven.alfresco.refreshUsername", defaultValue = "admin")
@Parameter(property = "maven.alfresco.refresh.username", defaultValue = "admin")
private String refreshUsername;
/**
* The password for authenticating against Alfresco Repo.
*/
@Parameter(property = "maven.alfresco.refreshPassword", defaultValue = "admin")
@Parameter(property = "maven.alfresco.refresh.password", defaultValue = "admin")
protected String refreshPassword;
/**
* The URL to send the POST to when you want to refresh Alfresco Repo Web Scripts container.
*/
@Parameter(property = "maven.alfresco.refreshRepoUrl", defaultValue = "/alfresco/service/index")
@Parameter(property = "maven.alfresco.refresh.repoUrl", defaultValue = "/alfresco/service/index")
protected String refreshRepoUrl;
/**
* The URL to send the POST to when you want to refresh Alfresco Share Spring Surf Web Scripts container.
*/
@Parameter(property = "maven.alfresco.refreshShareUrl", defaultValue = "/share/page/index")
@Parameter(property = "maven.alfresco.refresh.shareUrl", defaultValue = "/share/page/index")
protected String refreshShareUrl;
/**
* The URL to send the POST to when you want to clear dependency caches for the Alfresco Share webapp.
*/
@Parameter(property = "maven.alfresco.clearCacheShareUrl", defaultValue = "/share/page/caches/dependency/clear")
@Parameter(property = "maven.alfresco.refresh.clearCacheShareUrl", defaultValue = "/share/page/caches/dependency/clear")
protected String clearCacheShareUrl;
/**
* The Clear Dependency Caches URL to call, currently only applicable to Share.
*/
protected String clearDependencyCachesUrl;
/**
* The name of the web application we are refreshing, just for logging purpose
*/
@@ -49,7 +49,7 @@ public class AmpMojo extends AbstractMojo {
/**
* Target folder used to aggregate content then packaged into the AMP
*
* @parameter property="maven.alfresco.ampBuildDirectory" default-value="${project.build.directory}/${project.build.finalName}"
* @parameter property="maven.alfresco.ampBuildDirectory" default-value="${app.amp.output.folder}"
* @required
*
*/

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