Compare commits

..

201 Commits

Author SHA1 Message Date
gevagel
48c1d4d3ee MNT-22384: Inline keystore settings to avoid invalid docker-compose file 2022-11-07 15:51:24 +00:00
pzurek
b57196f46e Add maven central repo configuration 2022-10-27 13:43:19 +02:00
Piotr Żurek
a565f66c76 Merge pull request #643 from Alfresco/configure-maven-central
Add maven central repo configuration
2022-10-27 13:04:25 +02:00
pzurek
b3808e3e8b Add maven central repo configuration 2022-10-27 12:43:00 +02:00
kmagdziarz
3f51507ea7 4.6.0-SNAPSHOT 2022-10-27 10:57:09 +02:00
Kacper Magdziarz
0a082f3bfc SDK 4.5
Add tests for ACS 7.3.
Add java 17 profile.

Co-authored-by: Grzegorz Oleksy <grzegorz.oleksy@hyland.com>
Co-authored-by: mstrankowski <marcin.strankowski@hyland.com>
2022-10-27 10:11:59 +02:00
Vítor Moreira
35e2800858 MNT-22946: version bump of acs-*-packaging and share (#637)
* MNT-22946: version bump of acs-*-packaging and share
* MNT-22946: updated ACS 7.2.1 versions
* MNT-22946: updated ACS 7.1.1 versions
* MNT-22946: updated ACS 7.0.1 versions
2022-09-29 13:52:39 +01:00
Kacper Magdziarz
4a56544cad ACS-3556 Add maven profile for Java 17 (#640)
* ACS-3556 Add maven profile for Java 17

* ACS-3556 Add range up to java 17 for java 11 profile.
2022-09-16 12:42:51 +02:00
Andrea Ligios
9c2ac0c956 Update README.md 2022-03-25 18:18:01 +01:00
Alex Mukha
8d407356b7 REPO-5711 Fix repository to Search services comms (#634)
The Search Services is now using a new default "secret" communication method.
The changes also have updates to use the latest Search Services version (2.0.3)
2022-03-23 18:18:22 +01:00
Andrea Ligios
42e5726313 4.5.0-SNAPSHOT 2022-03-22 13:07:16 +01:00
Andrea Ligios
9c28f38f9c SDK 4.4 (#633)
* Add 7.2 tests, remove 6.1 tests

* Fixed the version of Share in default build

* 7.2.0-A30

* Modification for solr properties.

* REPO-5709: adding alfresco-internal repository.

* REPO-5709: adding alfresco-internal repository.

* REPO-5709: adding alfresco-internal repository.

* REPO-5709: removing ACS 6.2 related tests.

* REPO-5709: adding alfresco-internal repository.

* 7.2.0

* Updated Docs and Tests versions

* Updated version in pom and documentation

* 4.4.0

Co-authored-by: mpichura <maciej.pichura@hyland.com>
2022-03-22 12:58:35 +01:00
Vítor Moreira
1aff0f2a01 Fix/mnt 22827 remove activemq all dependency (#631)
* MNT-22827: remove activemq-all dependency
2022-03-09 15:07:59 +00:00
Andrea Ligios
712eb22dd4 Getting ready for the next 4.4.0-SNAPSHOT version 2021-09-30 17:21:03 +02:00
Andrea Ligios
905f589169 Preparing for the release (4.3.0-SNAPSHOT to 4.3.0) 2021-09-30 15:44:05 +02:00
Andrea Ligios
b1139739b8 SDK 4.3 (#626)
* Improved the readability of the pom.xml

* Introduced 7.1 + upgrade others to the latest version

* Handled the new Share's versions separation

* Use a variable to set the user in the Dockerfile

* Final versions

* Updated README [ci skip]

* Fixed the broken URL to the new one

* Wildcard on the version to prevent further useless updates

Co-authored-by: gfertuso <giovanni.fertuso@alfresco.com>
2021-09-30 15:37:50 +02:00
Andrea Ligios
219389197a Revert "REPO-5641 - Allows localised file names"
This reverts commit 2319b4d1b5.
2021-09-09 17:39:19 +02:00
Andrea Ligios
782740ef99 REPO-5639 - Includes the ActiveMQ-All Jar 2021-09-09 17:39:19 +02:00
Andrea Ligios
2ce90ecc93 REPO-5641 - Allows localised file names 2021-09-09 17:39:19 +02:00
Andrea Ligios
b3a1dabf72 Upgraded the Build Tools to 1.1.5 2021-09-09 17:39:19 +02:00
Andrea Ligios
7928ae358b Activated branch sdk-4.3 on Travis 2021-09-09 17:39:19 +02:00
Andrea Ligios
a204305226 REPO-5677 - Updated HttpClient to 4.5.13 2021-09-09 17:39:19 +02:00
Andrea Ligios
0352e2fd07 Updated Commons IO from 2.5 (unsecure) to 2.11.0 2021-09-09 17:39:19 +02:00
Andrea Ligios
af396f70ac REPO-5676 - Removed the reference to the unsafe & unneeded repo 2021-09-09 17:39:19 +02:00
Nebil Kisa
8634cc1d37 Merge branch 'master' of github.com:Alfresco/alfresco-sdk 2021-06-03 13:06:07 +01:00
Andrea Ligios
a3a7e9f158 Fixed the SNAPSHOT version in SCM 2021-03-29 09:44:00 +02:00
Nebil Kisa
0d2c76cc0c Add pinentry-mode to gpg config 2021-03-19 15:33:55 +00:00
gfertuso
a39f4248a2 [maven-release-plugin][skip ci]prepare for next development iteration 2021-03-19 11:26:26 +00:00
gfertuso
97967c35e6 [maven-release-plugin][skip ci]prepare release alfresco-sdk-aggregator-4.2.0 2021-03-19 11:26:21 +00:00
gfertuso
d92a8d14e0 Revert pom.xml 2021-03-19 11:20:22 +00:00
gfertuso
c672e75db6 Revert "[maven-release-plugin][skip ci]prepare release alfresco-sdk-aggregator-4.2.0"
This reverts commit 5ea45fcc
2021-03-19 11:12:05 +00:00
gfertuso
5ea45fcca1 [maven-release-plugin][skip ci]prepare release alfresco-sdk-aggregator-4.2.0 2021-03-19 11:02:45 +00:00
gfertuso
df508d3535 Revert pom.xml 2021-03-19 10:56:27 +00:00
gfertuso
dc8ac36265 Revert "[maven-release-plugin][skip ci]prepare release alfresco-sdk-aggregator-4.2.0"
This reverts commit 232db55b
2021-03-19 10:54:17 +00:00
gfertuso
0464f9bd66 Revert "[maven-release-plugin][skip ci]prepare for next development iteration"
This reverts commit ce64b89d
2021-03-19 10:54:08 +00:00
gfertuso
ce64b89d1d [maven-release-plugin][skip ci]prepare for next development iteration 2021-03-19 10:34:33 +00:00
gfertuso
232db55be7 [maven-release-plugin][skip ci]prepare release alfresco-sdk-aggregator-4.2.0 2021-03-19 10:34:21 +00:00
Andrea Ligios
584e3e0339 SDK 4.2 - Final (#614)
* Added ActiveMQ to cope with Camel refactoring in 7.0.0-A24+
2021-03-18 14:13:16 +01:00
Andrea Ligios
a6f0b34074 Sdk 4.2 (#611)
* SDK 4.2 - Final adjustments

Co-authored-by: gfertuso <giovanni.fertuso@alfresco.com>
2021-02-12 18:59:56 +01:00
Andrea Ligios
bf853d72c8 SDK 4.2 (#609)
* migration to ACS and Share 7

* updated documentation to refer to version 4.2

* Migrated to Travis

* Dynamic Keystore settings + APL2 License fix

* Enterprise images pulled from quay.io

Co-authored-by: gfertuso <giovanni.fertuso@alfresco.com>
2021-02-09 13:18:12 +01:00
dependabot[bot]
7f19645f20 Bump junit (#603)
Bumps [junit](https://github.com/junit-team/junit4) from 4.12 to 4.13.1.
- [Release notes](https://github.com/junit-team/junit4/releases)
- [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.12.md)
- [Commits](https://github.com/junit-team/junit4/compare/r4.12...r4.13.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-05 16:42:00 +01:00
dependabot[bot]
e61146ea07 Bump junit from 4.8.1 to 4.13.1 in /archetypes/archetypes-it (#602)
Bumps [junit](https://github.com/junit-team/junit4) from 4.8.1 to 4.13.1.
- [Release notes](https://github.com/junit-team/junit4/releases)
- [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.13.1.md)
- [Commits](https://github.com/junit-team/junit4/compare/r4.8.1...r4.13.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-05 16:39:58 +01:00
dependabot[bot]
10809ad2ba Bump junit from 4.12 to 4.13.1 in /modules/alfresco-rad (#601)
Bumps [junit](https://github.com/junit-team/junit4) from 4.12 to 4.13.1.
- [Release notes](https://github.com/junit-team/junit4/releases)
- [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.12.md)
- [Commits](https://github.com/junit-team/junit4/compare/r4.12...r4.13.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-05 16:38:53 +01:00
Andrea Ligios
3d2ff7b1e8 travis migration (#607)
* Migrated to Travis

Co-authored-by: gfertuso <giovanni.fertuso@alfresco.com>
2021-02-02 19:05:55 +01:00
Ole Hejlskov
8998e37414 Merge pull request #598 from Alfresco/mwallach-amp-docs
Mwallach amp docs
2020-06-08 16:28:53 +02:00
Michael Wallach
c3ae5760e8 modified to reference extensions directory 2020-06-04 09:34:23 -04:00
Michael Wallach
89d4d3fd9a Added section 'another option for installing 3rd Party AMPs' 2020-06-03 10:34:14 -04:00
Jose Luis Osorno
372afc6ba4 Archetypes - Update ACS 6.2.0 version 2019-11-18 10:28:46 +01:00
Jose Luis Osorno
3908cc73b7 Archetypes - Update ACS enterprise version
Update version to 6.2.0-RC3.
2019-10-21 09:28:24 +02:00
Jose Luis Osorno
76d813f2f4 Archetypes - Update SDK and alfresco versions
- Update SDK version to 4.1.0-SNAPSHOT
- Update Alfresco versions for 6.2.0
2019-10-18 11:15:12 +02:00
Jose Luis Osorno
5edd1f7b43 Merge pull request #582 from Alfresco/sdk-4/doc-62-support
Documentation - Update documentation to SDK 4.1
2019-10-18 10:18:44 +02:00
Jose Luis Osorno
12db1fcb17 Documentation - Update documentation to SDK 4.1
- Update SDK and ACS versions
- New article how to setup ATS in alfresco community
- New troubleshooting section about configuring ATS
2019-10-18 10:16:18 +02:00
Jose Luis Osorno
3e4a793f5d Merge pull request #581 from Alfresco/bug/578
Archetypes - Fix deprecated use of maven project name
2019-10-18 08:22:21 +02:00
Jose Luis Osorno
fba08f9ab7 Archetypes - Fix deprecated use of maven project name
Fix the use of the deprecated maven key ${build.finalName}. Using ${project.build.finalName}
instead.
2019-10-18 08:20:31 +02:00
Jose Luis Osorno
56300e35aa Merge pull request #580 from Alfresco/sdk-4/workflow-sample-fix
Archetypes - Fix workflow sample
2019-10-18 08:17:55 +02:00
Jose Luis Osorno
b4b0be82ae Archetypes - Fix workflow sample
Fix workflow sample in aio and platform archetypes
2019-10-18 08:15:46 +02:00
Jose Luis Osorno
50f43f23d3 Merge pull request #579 from Alfresco/sdk-4/acs-62-support
Archetypes - Add support for ACS 6.2
2019-10-18 08:11:45 +02:00
Jose Luis Osorno
2ee5120413 Archetypes - Add support for ACS 6.2
- New alfresco community and enterprise 6.2.0 profiles
- Execute dockerfile as root to avoid issues applying AMPs
- Disable transformation service by default in archetypes
2019-10-18 08:06:00 +02:00
Ole Hejlskov
7f861a9672 Merge pull request #564 from nbarithel/pwd_whitespace
Allow working directory to include whitespaces
2019-04-16 15:24:13 +02:00
Nicolas Barithel
b199afcd7e Allow working directory to include whitespaces 2019-04-05 14:36:09 +02:00
Jose Luis Osorno
7baf3fb0a1 Merge pull request #563 from Alfresco/sdk-4.0
SDK 4.0 RELEASE
2019-03-27 15:41:34 +01:00
Jose Luis Osorno
54504b4962 Archetypes IT - Fix IT archetype version number
Modify the archetypes ITs to get the version number from the pom.xml
file instead of hardcode the version.
2019-03-27 15:09:00 +01:00
Jose Luis Osorno
1503134f77 Merge branch 'master' into sdk-4.0 2019-03-27 14:53:44 +01:00
Jose Luis Osorno
71ed669795 Merge pull request #562 from Alfresco/sdk-3.1
SDK 3.1 RELEASE
2019-03-27 14:46:25 +01:00
Jose Luis Osorno
7d9b7de8c8 Documentation - Update SDK-3.1 SDK-4.0 release versions 2019-03-27 14:42:43 +01:00
Martin Bergljung
7483212c1f Merge branch 'sdk-4.0' of https://github.com/Alfresco/alfresco-sdk into sdk-4.0 2019-03-27 10:42:29 +00:00
Martin Bergljung
3d30a5893b Added documentation around working with the projects 2019-03-27 10:25:53 +00:00
alfresco-build
32666d167f [maven-release-plugin] prepare for next development iteration 2019-03-26 20:19:31 +00:00
alfresco-build
b737483c18 [maven-release-plugin] prepare release alfresco-sdk-aggregator-4.0.0 2019-03-26 20:19:24 +00:00
alfresco-build
4cdc281f7f [maven-release-plugin] prepare for next development iteration 2019-03-26 18:50:32 +00:00
alfresco-build
f4c3ac7c84 [maven-release-plugin] prepare release alfresco-sdk-aggregator-3.1.0 2019-03-26 18:50:25 +00:00
alfresco-build
af8c6c42c4 [maven-release-plugin] prepare for next development iteration 2019-03-26 16:25:15 +00:00
alfresco-build
e61c08c650 [maven-release-plugin] prepare release alfresco-sdk-aggregator-3.1.0 2019-03-26 16:25:06 +00:00
Ole Hejlskov
cc14a39be4 Merge pull request #560 from Alfresco/sdk-4/platform-compile-approach
Archetypes - Change platform archetype build approach
2019-03-26 16:32:59 +01:00
Ole Hejlskov
c910fa2b40 Merge pull request #561 from Alfresco/sdk-4/share-compile-approach
Archetypes - Change share archetype build approach
2019-03-26 16:32:47 +01:00
Ole Hejlskov
3050c9deb4 Bump version to 3.1.0 2019-03-26 16:06:39 +01:00
Jose Luis Osorno
1ce98f09aa Archetypes - Change share archetype build approach
- Build the project using package goal instead of install
- Remove unused test tasks of the scripts
2019-03-26 13:45:33 +01:00
Jose Luis Osorno
6dc927e668 Archetypes - Update default enterprise version to 5.2.4 2019-03-26 13:12:35 +01:00
Jose Luis Osorno
68155ef5a6 Archetypes - Move assembly plugin up
In the platform archetype move the assembly plugin definition
before the maven resources plugin definition to be executed
always before the copy of the amp in the extensions folder.
2019-03-26 12:47:25 +01:00
Jose Luis Osorno
e5e0a7f76d Documentation - Update way of generating AMP in platform 2019-03-26 12:38:14 +01:00
Jose Luis Osorno
ea4c12a836 Archetypes - Change platform archetype build approach
- Build the project using package goal instead of install
- Copy the test dependencies only when IT is executed
- Add the build_start_it_supported task to execution scripts
2019-03-26 12:25:07 +01:00
Jose Luis Osorno
d949a778ef Merge pull request #559 from Alfresco/sdk-4/bug-reload-acs
Archetypes - Compile IT module to avoid fail reload ACS
2019-03-26 08:50:18 +01:00
Jose Luis Osorno
099ac2ddeb Archetypes - Compile IT module to avoid fail reload ACS
Add the compilation of the IT maven module to the reload_acs script
task to avoid a compilation failure if this module is not compiled
in this task.
2019-03-26 08:42:09 +01:00
Ole Hejlskov
b0bc6a38d5 Merge pull request #558 from Alfresco/sdk-4/acs-61-versions
Archetypes - Update Alfresco 6.1 versions
2019-03-25 16:56:04 +01:00
Jose Luis Osorno
1d1e89a86d Archetypes - Remove unnecessary properties 2019-03-25 16:51:05 +01:00
Jose Luis Osorno
517b20859e Documentation - Update Alfresco versions 2019-03-25 16:20:41 +01:00
Jose Luis Osorno
e27d6f1a70 Archetypes - Update ACS 6.1 versions
- Update the ACS and share versions to Alfresco 6.1.
- Set Alfresco community 6.1 as the default one.
- Create new profile to test Alfresco community 6.0.
2019-03-25 16:15:09 +01:00
Jose Luis Osorno
10557e500d Merge pull request #557 from Alfresco/bug/551
Archetypes - Make ACS containers optional in share archetype
2019-03-25 15:15:57 +01:00
Jose Luis Osorno
f7e4ea1b5c Archetypes - Make ACS containers optional in share archetype
Modify the docker-compose.yml file of the share-jar archetype in order to
comment out the unnecessary containers (ACS, ASS, DB). They're optional and
can be used simply removing the comments.
2019-03-25 15:10:51 +01:00
Ole Hejlskov
7838649c81 Merge pull request #556 from Alfresco/sdk-4/aio-build-it-supported
Archetypes - Add build with IT supported task
2019-03-25 12:27:37 +01:00
Jose Luis Osorno
deaf4c06b8 Archetypes - Add build with IT supported task
Modify the run scripts to add the task: build_start_it_supported. After the
last changes regarding the way the project is compiled and retrieves the
IT dependencies, it losted the ability to run the project in docker with
IT support (including the libraries required to execute IT) but without
executing the tests. It only had build_start (no IT supported) and build_test
(IT supported but started and stopped the environment after IT execution).

This new task allows the execution of the docker environment with IT execution
supported to cover the next use cases:
- Running IT classes from IDE (for instance, to debug the execution).
- Running IT classes with hot reload enabled.
2019-03-25 12:14:43 +01:00
Jose Luis Osorno
067d751193 Merge pull request #547 from it-novum/sdk-4.0-build-and-docker-fixes
Sdk 4.0 build and docker fixes
2019-03-25 10:28:15 +01:00
Jose Luis Osorno
c0658f3a94 Merge pull request #555 from Alfresco/bug/548-549
Archetypes - Update module dependency version
2019-03-25 08:23:20 +01:00
Jose Luis Osorno
e378eec194 Archetypes - Update project version in dependency
Change the share module dependency version to project.version in order
to avoid errors updating project version.

Fix minor typo.
2019-03-25 08:19:05 +01:00
Jose Luis Osorno
01e79d6953 Archetypes - Update project version in dependency
Change the platform module dependency version to project.version in order
to avoid errors updating project version.
2019-03-25 08:17:23 +01:00
Ole Hejlskov
b00ee7f5e5 Merge pull request #545 from it-novum/sdk-4.0-remove-duplicate-versions
Sdk 4.0 remove duplicate versions
2019-02-15 16:07:22 +01:00
Piotr Anders
6e5445a271 * Changing run scripts to execute maven package/verify instead of install (and to run unit tests during build).
* Changing artifacts collection for docker deployment in platform-docker module to use scopes (for integration tests) and adding comment how to deal with amps only or amps+jars extenstions.
2019-02-07 17:11:16 +01:00
Piotr Anders
388f74eea3 Removing duplicate library versions which are managed via imported acs-packaging pom. 2019-02-07 11:42:02 +01:00
Piotr Anders
2db3051599 Renaming modules in AIO archetype:
[artifactId]-plaform-jar -> [artifactId]-platform
[artifactId]-share-jar -> [artifactId]-share
integration-tests -> [artifactId]-integration-tests
2019-02-07 11:05:05 +01:00
panderspl
8bb094b61a Merge pull request #5 from Alfresco/sdk-4.0
Syncing upstream Sdk 4.0
2019-02-07 09:55:41 +01:00
Ole Hejlskov
a4e79cc569 Merge pull request #540 from jpotts/upgrade-to-4.0
Steps to upgrade to 4.0
2019-01-31 10:59:12 +01:00
Ole Hejlskov
c14887f549 Merge pull request #542 from Alfresco/bug/539
Archetypes - Remove redundant dependency copy
2019-01-31 10:58:32 +01:00
panderspl
4e225147ea Merge pull request #4 from Alfresco/sdk-4.0
Syncing upstream Alfresco/alfresco-sdk(sdk-4-0)
2019-01-30 11:12:13 +01:00
Jose Luis Osorno
c5e92bdc25 Archetypes - Remove redundant dependency copy
Modify the AIO archetype docker modules to remove the redundant copy
of the dependency to the corresponding jar module (share or platform).
2019-01-30 08:14:34 +01:00
jpotts
ef59a6a39a Add step to clean up project name references in run.sh and run.cmd 2019-01-29 14:16:41 +00:00
Jeff Potts
42dc3659bd Add more details around platform module and share module dependencies. Add a blurb about deleting alf_data_dev. Add a short section on how to test. 2019-01-29 14:04:05 +00:00
Jeff Potts
5d1fb4f4d9 Formatting tweaks and example project name change 2019-01-29 13:46:21 +00:00
Jeff Potts
185c4ad2bd Add new file to document upgrade steps
The new upgrading.md file documents steps necessary to upgrade from SDK 3.0.1 to SDK 4.0.0.
2019-01-29 07:26:48 -06:00
Ole Hejlskov
0b85afc6fd Merge pull request #536 from Alfresco/sdk-4/platform-it
Archetypes - Add ITs to platform jar archetype
2019-01-29 14:07:44 +01:00
Ole Hejlskov
9db0f5cff1 Merge pull request #534 from Alfresco/sdk-4/doc-change-db
Documentation - Switching ACS database
2019-01-29 14:07:35 +01:00
Ole Hejlskov
243f94227b Merge pull request #537 from Alfresco/bug/535
BUGFIX - Archetypes - Remove redundant license fileSet
2019-01-29 14:07:24 +01:00
Ole Hejlskov
330c66a1be Merge pull request #538 from Alfresco/sdk-4/gitignore
Archetypes - Add gitignore files to archetypes
2019-01-29 14:06:50 +01:00
Jose Luis Osorno
ab4927afeb Archetypes - Remove redundant license fileSet
Modify the AIO and platform-jar archetypes to remove a redundant fileSet
for the license folder.
2019-01-29 13:40:02 +01:00
Jose Luis Osorno
c48dffea69 Archetypes - Add gitignore files to archetypes
Add standard gitignore files to the archetypes.
2019-01-29 12:33:09 +01:00
Jose Luis Osorno
b3391a67c3 Archetypes - Add ITs to platform jar archetype
Modify the platform JAR archetype to include sample ITs.
2019-01-29 10:20:00 +01:00
Jose Luis Osorno
465aa3de5a Documentation - Switching ACS database
Add a new article to explain how to switch from the default
PostgreSQL database to another one (MySQL).
2019-01-29 08:48:14 +01:00
Jose Luis Osorno
b32a78b7b3 Merge branch 'master' into sdk-4.0 2019-01-28 15:38:49 +01:00
Jose Luis Osorno
7bd5c58136 Merge pull request #533 from Alfresco/sdk-4/acs-61-support
Archetypes - Add support for ACS 6.1
2019-01-28 13:53:56 +01:00
Jose Luis Osorno
5b21775793 Merge pull request #532 from Alfresco/sdk-4/documentation-update
Documentation - SDK 4 Documentation
2019-01-28 13:32:03 +01:00
Ole Hejlskov
1d551d1895 Merge pull request #531 from Alfresco/bug/sdk-3-bugfixing
BUGFIX - SDK 3.0.1 bug fixing
2019-01-28 12:36:36 +01:00
Jose Luis Osorno
766847585e Fix javadoc errors
- Fix the javadoc error raised by the javadoc-maven-plugin.
- Configure the javadoc-maven-plugin to accept custom javadoc annotations
from maven mojo development.
2019-01-28 12:30:05 +01:00
Ole Hejlskov
b366ae3ddd Merge pull request #530 from Alfresco/bug/255
BUGFIX - 255 - Archetypes - Add JS minification
2019-01-25 11:36:27 +01:00
Ole Hejlskov
19369a23b5 Merge pull request #529 from Alfresco/bug/457
BUGFIX - 457 - Archetypes - Modify IT company home assertion
2019-01-25 11:35:33 +01:00
Jose Luis Osorno
93c28f5dde 255 - Archetypes - Add JS minification
Modify the pom.xml files of the archetypes to include the
yuicompressor-maven-plugin in order to configure the minification
of the JS files.
2019-01-24 17:09:44 +01:00
Jose Luis Osorno
7792574dae 457 - Archetypes - Modify IT company home assertion
Modity the assertion about the name of the company home node in the
integration test DemoComponentIT to avoid issues with the language
in which the Alfresco environment is installed. It asserts now
about the path of the node which is independant from the language
of the application.
2019-01-24 12:34:50 +01:00
Ole Hejlskov
e8976addea Merge pull request #528 from Alfresco/bug/440
BUGFIX - 440 - Maven Plugin - Make Tomcat Maven Plugin version configurable
2019-01-24 11:48:55 +01:00
Jose Luis Osorno
a7f2db61e8 440 - Maven Plugin - Make Tomcat Maven Plugin version configurable
Add a new parameter (tomcatMavenPluginVersion) and maven property
(maven.alfresco.tomcat.maven.plugin.version) to be able to set the version of
the Tomcat Maven Plugin that is going to be used in the Alfresco Maven
Plugin to run the project.

This way, an integrator can create a patched version of the Tomcat Plugin to
solve any issue with it and tell the Alfresco Maven Plugin to use that fixed
version of the Tomcat Plugin. This is helpful with the reported issue about
the maxHttpHeaderSize (https://github.com/Alfresco/alfresco-sdk/issues/440).
2019-01-24 11:37:21 +01:00
Ole Hejlskov
2926a9ae83 Merge pull request #527 from Alfresco/bug/526
BUGFIX - 526 - Documentation - Installing 3rd party AMPs
2019-01-23 13:05:14 +01:00
Jose Luis Osorno
246ae7a138 526 - Documentation - Installing 3rd party AMPs
Fix the documentation about installing 3rd party AMPs because they
must be added as a dependency in the docker module and not in the
jar module.
2019-01-23 10:34:35 +01:00
Ole Hejlskov
387a584aa1 Merge pull request #525 from Alfresco/bug/420
BUGFIX - 420 - Maven Plugin - Add goal to generate WARs only
2019-01-22 15:15:55 +01:00
Ole Hejlskov
edd8d8317b Merge pull request #524 from Alfresco/bug/425
BUGFIX - 425 - Maven Plugin - Support for platform context file
2019-01-22 15:01:48 +01:00
Jose Luis Osorno
eb30a2d9e2 Merge pull request #491 from tartard/master
BUGFIX - Allow to write test methods in abstract classes
2019-01-22 11:01:33 +01:00
Jose Luis Osorno
cf777840be Merge pull request #496 from tartard/solr-cron
Make the Solr indexation frequency customizable
2019-01-22 10:01:15 +01:00
Jose Luis Osorno
efec137a10 Merge branch 'bug/sdk-3-bugfixing' into solr-cron 2019-01-22 10:00:46 +01:00
Jose Luis Osorno
210bee7d76 420 - Maven Plugin - Add goal to generate WARs only
Add a new goal to the Alfresco Mvane Plugin to be able to generate
the WAR files (platform, share and/or activity if they're enabled)
without the need of running the Tomcat server.
2019-01-22 09:33:39 +01:00
Jose Luis Osorno
534e70a2c4 425 - Maven Plugin - Support for platform context file
Code change migrated from PR https://github.com/Alfresco/alfresco-sdk/pull/431.

Change implemented by the user @pzrinscak.

Modify the Alfresco Maven Plugin to add the possibility to set
a custom Tomcat context file for the platform war. This features
enables the possibility to define custom JNDI resources in the
context of the Alfresco platform application.
2019-01-22 08:21:11 +01:00
Ole Hejlskov
0fcec384fd Merge pull request #523 from Alfresco/bug/469
BUGFIX - 469 - Maven Plugin - AMP files order
2019-01-21 15:59:02 +01:00
Jose Luis Osorno
9d1c2feaf2 469 - Maven Plugin - AMP files order
Modify the Alfresco Maven Plugin in order to take into
account the order in which the AMP modules were defined
as the same order of the AMPs to be applied to the war
files.
2019-01-21 15:16:46 +01:00
Ole Hejlskov
709b820f2c Merge pull request #520 from Alfresco/bug/MNT-19097
BUGFIX - MNT-19097 - Ensure unmount war files
2019-01-21 11:08:00 +01:00
Jose Luis Osorno
217f135006 Merge branch 'bug/sdk-3-bugfixing' into bug/MNT-19097 2019-01-21 11:04:49 +01:00
Ole Hejlskov
64843588f8 Merge pull request #521 from Alfresco/bug/499
BUGFIX - 499 - Maven Plugin - Add the ability to set Tomcat version
2019-01-21 10:59:56 +01:00
Ole Hejlskov
f1a7e645e4 Merge pull request #522 from Alfresco/bug/498
BUGFIX - 498 - Archetypes - Add module-specific log4j.properties to AMPs
2019-01-21 10:54:28 +01:00
Jose Luis Osorno
e3ae54be9b 498 - Archetypes - Add module-specific log4j.properties to AMPs
Add module-specific log4j.properties files to the archetypes and modify the assembly
files to include them in the AMPs. This way, it is possible to add custom log
configuration for each developed module.
2019-01-21 08:28:41 +01:00
Jose Luis Osorno
2871883c7d 499 - Maven Plugin - Add the ability to set Tomcat version
Add a new parameter to the Alfresco Maven Plugin in order to be able to set the
Tomcat version to be executed when running Tomcat through the Tomcat Maven Plugin.

The parameter "tomcatVersion" (or the Maven property "maven.alfresco.tomcat.version")
allows to modify the default Tomcat version used by the Tomcat Maven Plugin. The
default version currently is 7.0.47 (set by the Tomcat Maven Plugin v2.2). If the version
of Tomcat is not set via the plugin parameter or the maven property, then the default
one is used.
2019-01-18 15:56:26 +01:00
Jose Luis Osorno
3661a06206 Documentation - Remove not required param in markdown
Remove not required ?raw=true parameter in markdown images.
2019-01-18 14:36:06 +01:00
Ole Hejlskov
436b9a455a Update dev-env-eclipse.md 2019-01-18 14:23:55 +01:00
Ole Hejlskov
5418b57325 Update dev-env-eclipse.md
Quick change to image references to test with ABN
2019-01-18 14:22:36 +01:00
Jose Luis Osorno
376815c746 MNT-19097 - Ensure unmount war files
Ensure the unmount of the war files in the alfresco maven plugin to avoid
the exception thrown by the FsSyncShutdownHook.
2019-01-18 12:29:32 +01:00
Jose Luis Osorno
b76bb5730c Documentation - SDK 4 what's new
First version of the What's new article for SDK 4.0.
2019-01-17 16:15:07 +01:00
Jose Luis Osorno
7c4fc7a700 Documentation - Update root README file 2019-01-17 12:05:45 +01:00
Jose Luis Osorno
62dc99e9c6 Documentation - Add middle menu readme files
Add README.md files to the middle menu options to fit the requirements
of Alfresco Builder Network (ABN) in terms of structure.
2019-01-17 11:48:48 +01:00
Jose Luis Osorno
ccee83f92d Documentation - Reorganise documentation content
Reorganise the documentation content to fix the required folder structure
and file naming for the migration to ABN.
2019-01-17 11:32:21 +01:00
Jose Luis Osorno
0027ef3ec4 Documentation - Base SDK intro page
Add a new documentation article as the base entrypoint to the
SDK documentation.
2019-01-17 08:42:54 +01:00
Jose Luis Osorno
32d286cb50 Documentation - Switch ACS/Share versions
Add an article to explain how to switch from one version of
ACS/Share to another.
2019-01-16 16:31:13 +01:00
Ole Hejlskov
7017b057ea Update enterprise-docker-registry.md
Clarify that customers and partners can request access
2019-01-16 15:58:47 +01:00
Ole Hejlskov
bb3780d31d Update enterprise-mvn-repo.md
Clarify a bit that we're talking about artifacts.alfresco.com
2019-01-16 15:57:40 +01:00
Jose Luis Osorno
2954b72765 Documentation - Some fixes after review 2019-01-16 12:13:02 +01:00
Jose Luis Osorno
13f6457fbd Documentation - Integration tests
Add some articles to explain how integration tests works
and how to run these tests.
2019-01-16 11:59:45 +01:00
Jose Luis Osorno
29006d1e93 Documentation - Some fixes after review 2019-01-15 17:08:58 +01:00
Jose Luis Osorno
301d0e81a0 Documentation - Project structures
Complete project structure articles.
2019-01-15 14:36:17 +01:00
Jose Luis Osorno
4002c01134 Documentation - Project structures
Add articles to explain the SDK maven archetypes and the structure of
the projects generated with them.
2019-01-15 14:00:18 +01:00
Jose Luis Osorno
64d53e0fe6 Documentation - Working with Enterprise
Add some articles to explain how to properly configure the development
environment to work with Alfresco Enterprise instead of the Community
version.
2019-01-15 13:58:23 +01:00
Jose Luis Osorno
d1fb454772 Documentation - Control order AMPs applied
Add a new section to the article "Working with AMPs" to explain how you
can control the order the AMPs are applied.
2019-01-15 10:30:37 +01:00
Jose Luis Osorno
cdcf9c6a96 Documentation - Review fixes 2019-01-15 08:28:08 +01:00
Jose Luis Osorno
9d7c80a147 Documentation - Add metadata header
Modify the documentation articles to add a header with required
metadata.
2019-01-14 17:20:57 +01:00
Jose Luis Osorno
beae915836 Merge branch 'sdk-4/acs-61-support' into sdk-4/documentation-update 2019-01-14 16:19:21 +01:00
Jose Luis Osorno
a6a199ad50 Merge branch 'sdk-4.0' into sdk-4/acs-61-support 2019-01-14 16:15:56 +01:00
Ole Hejlskov
328faa3a5a Merge pull request #519 from Alfresco/sdk-4/avoid-error-msg
Archetypes - Logging improvements
2019-01-14 16:09:57 +01:00
Jose Luis Osorno
cdaa995422 Archetypes - Fix AIO run.bat 2019-01-14 16:01:48 +01:00
Jose Luis Osorno
8617c29300 Archetypes - Change postgresql log level
Change the log level of the postgresql container to avoid showing
needless messages.
2019-01-14 15:47:12 +01:00
Jose Luis Osorno
d2e21a38c6 Archetypes - Scripts improvement error messages
Improve the archetypes' run scripts to avoid needless error messages:
- Execute stop task only if the docker-compose file exists in the target folder
- Remove unnecessary docker rmi commands
2019-01-14 15:44:36 +01:00
Jose Luis Osorno
a01573eff8 Archetypes - Upgrade 6.1 enterprise versions
Upgrade the ACS 6.1 enterprise version to RC4.
2019-01-14 12:07:13 +01:00
Jose Luis Osorno
079b916d46 Documentation - Working with AMPs
Add a new article to explain how to work with AMPs instead of
JARs to deploy the developed Alfresco modules.
2019-01-14 08:10:54 +01:00
Jose Luis Osorno
37275bcbf1 Documentation - Dev env IntelliJ IDEA
Add a new article to explain how to setup the development
environment using IntelliJ IDEA IDE.
2019-01-14 08:10:04 +01:00
Jose Luis Osorno
7d521e9f27 Documentation - Dev env Eclipse
Add a new article to explain how to setup the development
environment using Eclipse IDE.
2019-01-14 08:08:42 +01:00
alfresco-build
a7211c206b [maven-release-plugin] prepare for next development iteration 2019-01-11 12:06:39 +00:00
Jose Luis Osorno
cb50841385 Merge branch 'sdk-4/acs-61-support' into sdk-4/documentation-update 2019-01-11 11:20:50 +01:00
Jose Luis Osorno
0d91902752 Merge branch 'sdk-4.0' into sdk-4/acs-61-support 2019-01-11 11:13:26 +01:00
Jose Luis Osorno
43405d037f Merge branch 'sdk-4.0' into sdk-4/documentation-update 2019-01-11 11:10:38 +01:00
Jose Luis Osorno
45cf124566 Documentation - Getting started
Add a new article to explain how to get started with the Alfresco
SDK 4.0. Mainly migrated from article http://docs.alfresco.com/5.2/concepts/sdk-getting-started.html.
2019-01-10 16:28:17 +01:00
Jose Luis Osorno
0f500fab25 Documentation - Projects usage 2019-01-10 15:58:24 +01:00
Jose Luis Osorno
26c4364063 Documentation - Projects usage
Initial version
2019-01-10 15:16:29 +01:00
Jose Luis Osorno
0c391693e4 Documentation - Troubleshooting 2019-01-10 13:32:33 +01:00
Jose Luis Osorno
92886f2ee9 Documentation - Troubleshooting
Add a new article to explain some troubleshooting.
2019-01-10 13:10:20 +01:00
Jose Luis Osorno
991caa2191 Documentation - How to remotely debug on IntelliJ IDEA
Add a new article to explain hot you can remotely debug the source code using
IntelliJ IDEA IDE.
2019-01-10 11:25:31 +01:00
Jose Luis Osorno
f99521a851 Documentation - How to remotely debug on Eclipse
Add a new article to explain hot you can remotely debug the source code using
Eclipse IDE.
2019-01-10 11:01:40 +01:00
Jose Luis Osorno
972c96ba0f Documentation - How to configure HotSwapAgent
Add a new article to explain how to set HotSwapAgent up in the projects
generated with the SDK.
2019-01-09 15:12:25 +01:00
Jose Luis Osorno
067473669b Documentation - Fixes and add images 2019-01-09 12:18:13 +01:00
Jose Luis Osorno
3b0c2ddc9b Documentation - How to configure JRebel
Add a new article to explain how to set JRebel up in the projects
generated with the SDK.
2019-01-09 11:56:42 +01:00
Jose Luis Osorno
9068c3209b Documentation - How to set up ATS
Add a new article to explain how to set up the Alfresco Transform Service
in the generated projects.
2019-01-09 11:54:40 +01:00
Jose Luis Osorno
4651f0a941 Archetypes - Do not filter gz files in resources 2019-01-08 09:51:39 +01:00
Jose Luis Osorno
6bef9222eb Archetypes - Add ACS 6.1 test profile
Add a new test profile named enterprise-61-tests to set the
properties required to use ACS 6.1 enterprise jars and docker
images in the integration tests.
2019-01-04 14:18:10 +01:00
Jose Luis Osorno
a97975acec Archetypes - Blank messaging broker url
Add a non persistent localhost messaging broker url to avoid
ACS 6.1 enterprise to get stuck waiting for the ActiveMQ service
that it is not configured in the SDK generated projects.

A new documentation article will be created to show how to configure
the transformation service with docker for ACS 6.1 enterprise.
2019-01-04 14:14:33 +01:00
Jose Luis Osorno
48a3eb6d7d Archetypes - Remote debug support for Java 11
From Java 9, the JDWP socket connector accept only local connections by default.
See: http://www.oracle.com/technetwork/java/javase/9-notes-3745703.html#JDK-8041435

So, to enable debug connections from outside, we needd to specify 0.0.0.0:8888 as
address in the CATALINA_OPTS of the ACS and share containers. This solution is
valid for both Java 8 and Java 11.
2019-01-04 08:36:00 +01:00
Jose Luis Osorno
0b79b0a71d Archetypes - Compilation profiles
Add new profiles activated by the jdk version in order to compile
the source code for Java 8 or Java 11 depending on the target platform.

For ACS 6.0 it should be used JDK 8-10, for ACS 6.1 it should be used
JDK 11.
2018-12-27 16:59:01 +01:00
Jose Luis Osorno
3b25a7549c Archetypes - Update maven plugins version
Update the version of the archetype projects maven plugin to the latests
stable one in order to avoid any issue with Java 11.
2018-12-27 16:50:27 +01:00
Fabian
1f18d34e8e Merge pull request #3 from Alfresco/sdk-4.0
Syncing changes from upstream (Alfresco/sdk 4.0)
2018-11-16 09:21:22 +01:00
Fabian
8ff7f929e2 Merge pull request #2 from it-novum/sdk-4.0_version_Bump
Bumping version number to 4.0 for documenation + descriptions
2018-11-12 11:50:22 +01:00
Fabian
a891119b84 Merge pull request #1 from it-novum/sdk-4.0_version_Bump
Bump version to 4.0.0
2018-11-09 15:51:32 +01:00
a.hausherr
f0210c173a Make the Solr indexation frequency customizable. 2018-04-06 15:21:05 +02:00
tartard
ea521ba7ee Avoid an InstantiationException to be thrown from RunTestWebscript when testing a class which inherits test methods from an abstract class. 2018-03-12 14:20:08 +01:00
168 changed files with 6588 additions and 1166 deletions

10
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,10 @@
default_language_version:
# force all unspecified python hooks to run python3
python: python3
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: check-yaml
args: [--allow-multiple-documents]

106
.travis.yml Normal file
View File

@@ -0,0 +1,106 @@
import:
- source: Alfresco/alfresco-build-tools:.travis.docker_login.yml@v1.1.5
- source: Alfresco/alfresco-build-tools:.travis.docker_hub_login.yml@v1.1.5
- source: Alfresco/alfresco-build-tools:.travis.java.yml@v1.1.5
- source: Alfresco/alfresco-build-tools:.travis.pre-commit.yml@v1.1.5
dist: focal
jdk:
- openjdk17
- openjdk11
git:
depth: false
quiet: true
branches:
only:
- master
- /feature\/.*/
- /fix\/.*/
- sdk-4.5
stages:
- name: test
if: commit_message !~ /\[skip tests\]/
- name: release
if: commit_message ~= /\[release\]/ AND branch = master AND type != push AND type != pull_request AND fork = false
env:
global:
- MAVEN_INSTALL_CMD="mvn clean install -B"
jobs:
include:
- name: "current version Java 17"
stage: test
jdk: openjdk17
script:
- ${MAVEN_INSTALL_CMD}
- name: "current version Java 11"
stage: test
jdk: openjdk11
script:
- ${MAVEN_INSTALL_CMD}
- name: "7.3 Enterprise Java 17"
stage: test
jdk: openjdk17
script:
- ${MAVEN_INSTALL_CMD} -Penterprise-73-tests
- name: "7.3 Community Java 17"
stage: test
jdk: openjdk17
script:
- ${MAVEN_INSTALL_CMD} -Pcommunity-73-tests
- name: "7.3 Enterprise Java 11"
stage: test
jdk: openjdk11
script:
- ${MAVEN_INSTALL_CMD} -Penterprise-73-tests
- name: "7.3 Community Java 11"
stage: test
jdk: openjdk11
script:
- ${MAVEN_INSTALL_CMD} -Pcommunity-73-tests
- name: "7.2 Enterprise"
stage: test
jdk: openjdk11
script:
- ${MAVEN_INSTALL_CMD} -Penterprise-72-tests
- name: "7.2 Community"
stage: test
jdk: openjdk11
script:
- ${MAVEN_INSTALL_CMD} -Pcommunity-72-tests
- name: "7.1 Enterprise"
stage: test
jdk: openjdk11
script:
- ${MAVEN_INSTALL_CMD} -Penterprise-71-tests
- name: "7.1 Community"
stage: test
jdk: openjdk11
script:
- ${MAVEN_INSTALL_CMD} -Pcommunity-71-tests
- name: "7.0 Enterprise"
stage: test
jdk: openjdk11
script:
- ${MAVEN_INSTALL_CMD} -Penterprise-70-tests
- name: "7.0 Community"
stage: test
jdk: openjdk11
script:
- ${MAVEN_INSTALL_CMD} -Pcommunity-70-tests

107
README.md
View File

@@ -1,6 +1,13 @@
# [![Alfresco SDK logo](https://github.com/Alfresco/alfresco-sdk/raw/master/src/site/resources/img/alfresco-maven-logo.jpg)](#features) Alfresco SDK
This is the home of the Alfresco SDK. The Alfresco SDK is used by developers to build extensions for the Alfresco Digital Business Platform. 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).
[![Build Status](https://travis-ci.com/Alfresco/alfresco-sdk.svg?branch=master)](https://travis-ci.com/Alfresco/alfresco-sdk)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
![GitHub](https://img.shields.io/github/license/Alfresco/alfresco-sdk?color=brightgreen)
This is the home of the Alfresco SDK. The Alfresco SDK is used by developers to build extensions for the Alfresco Digital Business Platform. It is based on
[Apache Maven](http://maven.apache.org/), compatible with major IDEs and enables [Rapid Application Development (RAD)](https://en.wikipedia.org/wiki/Rapid_application_development)
and [Test Driven Development (TDD)](https://en.wikipedia.org/wiki/Test-driven_development).
## License
This project is released under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html) license.
@@ -8,6 +15,13 @@ If you are an Enterprise customer check the [Support](#alfresco-enterprise-custo
## News
- 2022-10: Alfresco SDK 4.5.0 released
- 2022-03: Alfresco SDK 4.4.0 released
- 2021-10: Alfresco SDK 4.3.0 released
- 2021-02: Alfresco SDK 4.2.0 released
- 2019-10: Alfresco SDK 4.1.0 released
- 2019-03: Alfresco SDK 4.0.0 released
- 2019-03: Alfresco SDK 3.1.0 released
- 2017-06-23: Alfresco SDK 3.0.1 released, [containing a critical bugfix](https://github.com/Alfresco/alfresco-sdk/issues/461)
- 2017-04-01: Alfresco SDK 3.0.0 released
- 2017-03-27: After years of hard work, countless iterations and gathering feedback, SDK 3.0 has finally been merged into the master branch, ready for release in the coming days
@@ -20,19 +34,79 @@ If you are an Enterprise customer check the [Support](#alfresco-enterprise-custo
## User Getting Started
### Important Notice about ACS 7.2
Please refer to https://github.com/Alfresco/alfresco-sdk/issues/635 to fix the Search Services 403 problem.
### Important Notice about ACS 7.1
#### Share Version Number
Since ACS 7.1, Share build pipeline has been refactored, and you now have to specify the internal
Share version number, in addition to the version of the image, because they are not the same anymore.
This number can be located in the main pom.xml of the project used to build Share, hence:
- property `<alfresco-community-share.version>` of [acs-community-packaging](https://github.com/Alfresco/acs-community-packaging/blob/7.1.0/pom.xml#L17) (Community)
- property `<alfresco-enterprise-share.version>`of [acs-packaging](https://github.com/Alfresco/acs-packaging/blob/7.1.0.1/pom.xml#L18) (Enterprise)
So, if for example you want to use the community version of `7.1.0.1`, you can go on acs-community-packaging,
open the `7.1.0.1` release tag, browse its files, open the pom.xml in the root,
then copy the value of `<alfresco-community-share.version>`.
You'll then need to paste this value inside the SDK property `<alfresco.share.version>`.
#### Alternate Docker User
- ACS 6 used to run everything as `root`.
- ACS 7 introduced an `alfresco` user, that should've been used after the `root` user completed its configurations in the Dockerfile.
Due to a bug, this wasn't working in earlier SDKs, and has been fixed in SDK 4.3.
In order to be retro-compatible with ACS 6, however, the user is specified in the SDK property `<alfresco.platform.docker.user>`.
Hence, its values (already in place) are `root` for ACS 6, and `alfresco` for ACS 7+.
#### Log file location
To prevent writing permission problems when logging with the non-root user,
the `alfresco.log` file has also been moved to a more appropriate location (Tomcat logs instead of Tomcat root).
### Important Notice about Version Numbers
In Q4 2020, Alfresco Platform has undergone a major structural refactoring.
Depending on the Platform version desired, you might need to use SDK 4.1, 4.3 or SDK 4.4 instead of SDK 4.5.
- For Enterprise and Community versions of 7.x, SDK 4.4 or higher must be used
- For Enterprise versions of 6.0.x, 6.1.x, 6.2.x newer than November 2020, SDK 4.3 must be used
- For Enterprise and Community versions of 6.0.x, 6.1.x, 6.2.x older than November 2020, SDK 4.1 must be used
It's also important to remember that:
- Community Platform versions are built by [acs-community-packaging](https://github.com/Alfresco/acs-community-packaging)
- Community Docker images are published on [Docker Hub](https://hub.docker.com/r/alfresco/alfresco-content-repository-community/tags?page=1&ordering=last_updated)
- Enterprise Platform versions are built by [acs-packaging](https://github.com/Alfresco/acs-packaging)
- Enterprise Docker images are published on *Quay.io*
### Latest Documentation
To get started with **Alfresco SDK 4.0.x** (latest) visit the [Alfresco Documentation](https://docs.alfresco.com/6.0/concepts/dev-for-developers.html) (documentation pending).
To get started with **Alfresco SDK 4.5.x** (latest) visit the [Alfresco Documentation](docs/README.md).
#### Documentation about Previous Versions
| SDK Version | Alfresco Enterprise Version | Alfresco Community Version | Documentation |
| ------------- |:-------------:| :-----:|:-----|
| SDK 3.0 | Alfresco 5.2.x | Alfresco 5.2.x | http://docs.alfresco.com/5.2/concepts/sdk-intro.html |
| SDK 2.2 | Alfresco 5.1.x | Alfresco 5.1.x | https://docs.alfresco.com/5.1/concepts/alfresco-sdk-intro.html |
| SDK 2.1 | Alfresco 5.0.1 | Alfresco 5.0.d | https://docs.alfresco.com/sdk2.1/concepts/alfresco-sdk-intro.html |
| SDK 2.0 | Alfresco 5.0.0 | Alfresco 5.0.c | https://docs.alfresco.com/sdk2.0/concepts/alfresco-sdk-intro.html |
| SDK 1.1.1 | Alfresco 4.2.x | Alfresco 4.2.x | https://docs.alfresco.com/4.2/concepts/dev-extensions-maven-sdk-intro.html |
| SDK Version | Alfresco Enterprise Version | Alfresco Community Version | Documentation |
|-------------|:----------------------------------------------:|:--------------------------------------:|:-----|
| SDK 4.5 | Alfresco 7.0.x / 7.1.x / 7.2.x / 7.3.x | Alfresco 7.0.x / 7.1.x / 7.2.x / 7.3.x | https://github.com/Alfresco/alfresco-sdk/tree/master/docs/README.md |
| SDK 4.4 | Alfresco 7.0.x / 7.1.x / 7.2.x | Alfresco 7.0.x / 7.1.x / 7.2.x | https://github.com/Alfresco/alfresco-sdk/tree/master/docs/README.md |
| SDK 4.3 | Alfresco 6.0.x / 6.1.x / 6.2.x / 7.0.x / 7.1.x | Alfresco 7.0.x / 7.1.x | https://github.com/Alfresco/alfresco-sdk/tree/master/docs/README.md |
| SDK 4.2 | Alfresco 6.0.x / 6.1.x / 6.2.x / 7.0.x | Alfresco 7.0.x | https://github.com/Alfresco/alfresco-sdk/tree/master/docs/README.md |
| SDK 4.1 | Alfresco 6.0.x / 6.1.x / 6.2.x | Alfresco 6.0.x / 6.1.x / 6.2.x | https://github.com/Alfresco/alfresco-sdk/blob/sdk-4.1/docs/README.md |
| SDK 4.0 | Alfresco 6.0.x / 6.1.x | Alfresco 6.0.x / 6.1.x | https://github.com/Alfresco/alfresco-sdk/blob/sdk-4.0/docs/README.md |
| SDK 3.1 | Alfresco 5.2.x | Alfresco 5.2.x | http://docs.alfresco.com/5.2/concepts/sdk-intro.html |
| SDK 3.0 | Alfresco 5.2.x | Alfresco 5.2.x | http://docs.alfresco.com/5.2/concepts/sdk-intro.html |
| SDK 2.2 | Alfresco 5.1.x | Alfresco 5.1.x | https://docs.alfresco.com/5.1/concepts/alfresco-sdk-intro.html |
| SDK 2.1 | Alfresco 5.0.1 | Alfresco 5.0.d | https://docs.alfresco.com/sdk2.1/concepts/alfresco-sdk-intro.html |
| SDK 2.0 | Alfresco 5.0.0 | Alfresco 5.0.c | https://docs.alfresco.com/sdk2.0/concepts/alfresco-sdk-intro.html |
| SDK 1.1.1 | Alfresco 4.2.x | Alfresco 4.2.x | https://docs.alfresco.com/4.2/concepts/dev-extensions-maven-sdk-intro.html |
## Reporting Issues and Community Support
Report issues (and contribute!) [here](https://github.com/Alfresco/alfresco-sdk/issues?milestone=1&state=open) or join us on the [IRC Channel](http://chat.alfresco.com/).
@@ -43,12 +117,13 @@ please check the [SDK Support status](http://www.alfresco.com/services/subscript
for the version you are using. If your version is in Limited or Full Support and you need help, visit 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/).
- 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:* By default the Alfresco SDK will use Community Edition releases but it can be configured to use Enterprise Edition releases. Enterprise and Premier customers can use the SDK with
Enterprise Edition releases by following the process described in [Working with Enterprise](https://docs.alfresco.com/5.2/concepts/sdk-using-enterprise.html)
*NOTE:* By default the Alfresco SDK will use Community Edition releases but it can be configured to use Enterprise Edition releases. Enterprise and Premier
customers can use the SDK with Enterprise Edition releases by following the process described in [Working with Enterprise](docs/advanced-topics/working-with-enterprise/README.md).
### Alfresco Artifacts Repository
@@ -72,5 +147,9 @@ To test new unreleased (unsupported) features, you can use the following snippet
</repository>
```
## Docker registries
- Alfresco Community Docker images are publicly available at the [Alfresco's Docker Hub profile](https://hub.docker.com/u/alfresco/).
- Alfresco Enterprise Docker images are hosted at [Quay.io](https://quay.io/). Its configuration process is described in detail in [How to configure private Alfresco Docker registry](docs/advanced-topics/working-with-enterprise/enterprise-docker-registry.md).
## For Developers that want to contribute to the SDK
See the [Developers Wiki page](https://github.com/Alfresco/alfresco-sdk/wiki/Developer-Wiki).

View File

@@ -11,7 +11,7 @@
<parent>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-sdk-aggregator</artifactId>
<version>4.0.0-beta-1</version>
<version>4.6.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
@@ -48,6 +48,7 @@
<delimiters>
<delimiter>@@</delimiter>
</delimiters>
<addDefaultExcludes>false</addDefaultExcludes>
</configuration>
</plugin>
</plugins>

View File

@@ -10,9 +10,9 @@
</requiredProperty>
</requiredProperties>
<modules>
<module id="${rootArtifactId}-platform-jar"
name="${rootArtifactId}-platform-jar"
dir="__rootArtifactId__-platform-jar">
<module id="${rootArtifactId}-platform"
name="${rootArtifactId}-platform"
dir="__rootArtifactId__-platform">
<fileSets>
<fileSet filtered="false" packaged="false" encoding="UTF-8">
<directory>src/main/assembly</directory>
@@ -50,9 +50,9 @@
</fileSets>
</module>
<module id="${rootArtifactId}-share-jar"
name="${rootArtifactId}-share-jar"
dir="__rootArtifactId__-share-jar">
<module id="${rootArtifactId}-share"
name="${rootArtifactId}-share"
dir="__rootArtifactId__-share">
<fileSets>
<fileSet filtered="false" packaged="false" encoding="UTF-8">
<directory>src/main/assembly</directory>
@@ -97,7 +97,9 @@
</fileSets>
</module>
<module id="integration-tests" name="integration-tests" dir="integration-tests">
<module id="${rootArtifactId}-integration-tests"
name="${rootArtifactId}-integration-tests"
dir="__rootArtifactId__-integration-tests">
<fileSets>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/main/java</directory>
@@ -118,12 +120,6 @@
name="${rootArtifactId}-platform-docker"
dir="__rootArtifactId__-platform-docker">
<fileSets>
<fileSet encoding="UTF-8" filtered="false">
<directory>src/main/docker/license</directory>
<includes>
<include>**</include>
</includes>
</fileSet>
<fileSet encoding="UTF-8" filtered="false">
<directory>src/main/docker</directory>
<includes>
@@ -187,6 +183,7 @@
<fileSet encoding="UTF-8" filtered="true">
<directory></directory>
<includes>
<include>.gitignore</include>
<include>run.sh</include>
<include>run.bat</include>
<include>README.md</include>

View File

@@ -0,0 +1,38 @@
**.log*
# Maven
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
.mvn/wrapper/maven-wrapper.jar
# Eclipse
.metadata
.project
.classpath
bin/
tmp/
*.tmp
.settings/
.loadpath
.recommenders
# IntelliJ IDEA
**.idea
**.iml
# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
# macOS
*.DS_Store

View File

@@ -1,6 +1,6 @@
# Alfresco AIO Project - SDK 4.0
# Alfresco AIO Project - SDK 4.5
This is an All-In-One (AIO) project for Alfresco SDK 4.0.
This is an All-In-One (AIO) project for Alfresco SDK 4.5.
Run with `./run.sh build_start` or `./run.bat build_start` and verify that it
@@ -14,6 +14,8 @@ All the services of the project are now run as docker containers. The run script
* `build_start`. Build the whole project, recreate the ACS and Share docker images, start the dockerised environment composed by ACS, Share, ASS and
PostgreSQL and tail the logs of all the containers.
* `build_start_it_supported`. Build the whole project including dependencies required for IT execution, recreate the ACS and Share docker images, start the
dockerised environment composed by ACS, Share, ASS and PostgreSQL and tail the logs of all the containers.
* `start`. Start the dockerised environment without building the project and tail the logs of all the containers.
* `stop`. Stop the dockerised environment.
* `purge`. Stop the dockerised container and delete all the persistent data (docker volumes).

View File

@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>${artifactId}</artifactId>
<name>Integration Tests Module</name>
<description>Integration Tests module for in-container integration testing - part of AIO - SDK 4.0</description>
<description>Integration Tests module for in-container integration testing - part of AIO - SDK 4.5</description>
<packaging>jar</packaging> <!-- Note. this just runs Integration Tests, but it needs to be a JAR otherwise
nothing is compiled (i.e. you cannot set it to pom) -->
@@ -22,7 +22,7 @@
that is generated for the AIO project -->
<dependency>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}-platform-jar</artifactId>
<artifactId>${rootArtifactId}-platform</artifactId>
<version>${version}</version>
<scope>test</scope>
</dependency>
@@ -42,7 +42,6 @@
<plugin>
<groupId>org.zeroturnaround</groupId>
<artifactId>jrebel-maven-plugin</artifactId>
<version>${jrebel.version}</version>
<configuration>
<rebelXmlDirectory>${project.build.testOutputDirectory}</rebelXmlDirectory>
</configuration>
@@ -52,7 +51,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<executions>
<execution>
<goals>
@@ -67,35 +65,11 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<systemPropertyVariables>
<acs.endpoint.path>${test.acs.endpoint.path}</acs.endpoint.path>
</systemPropertyVariables>
</configuration>
<executions>
<execution>
<id>integration-test</id>
<phase>integration-test</phase>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
<execution>
<id>verify-test</id>
<phase>verify</phase>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.19.1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>

View File

@@ -50,10 +50,9 @@ public class DemoComponentIT extends AbstractAlfrescoIT {
DemoComponent demoComponent = (DemoComponent) getApplicationContext().getBean("${package}.DemoComponent");
NodeRef companyHome = demoComponent.getCompanyHome();
assertNotNull(companyHome);
String companyHomeName = (String) getServiceRegistry().getNodeService().getProperty(
companyHome, ContentModel.PROP_NAME);
assertNotNull(companyHomeName);
assertEquals("Company Home", companyHomeName);
String companyHomePath = getServiceRegistry().getNodeService().getPath(companyHome).toPrefixString(getServiceRegistry().getNamespaceService());
assertNotNull(companyHomePath);
assertEquals("/app:company_home", companyHomePath);
}
@Test

View File

@@ -19,9 +19,28 @@
<dependencies>
<dependency>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}-platform-jar</artifactId>
<artifactId>${rootArtifactId}-platform</artifactId>
<version>${version}</version>
</dependency>
<dependency>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}-integration-tests</artifactId>
<version>${version}</version>
<scope>test</scope>
<classifier>tests</classifier>
</dependency>
<!-- Add any additional AMPs or extension JARs here that you want to be deployed in Alfresco -->
<!-- IMPORTANT:
If using amp extensions only, add <includeTypes>amp</includeTypes> to the "collect-extensions" execution below.
If using both amp and jar extensions, you have to add:
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
to each amp dependency definition.
-->
</dependencies>
<build>
@@ -29,75 +48,30 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.0.2</version>
<executions>
<!-- Copy the repository extension and the dependencies required for execute integration tests -->
<execution>
<id>copy-repo-extension</id>
<phase>pre-integration-test</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}-platform-jar</artifactId>
<version>${version}</version>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/extensions</outputDirectory>
</artifactItem>
<!-- Test dependencies -->
<!-- We need these dependencies installed in ACS in order to execute the test remotely making use of the Alfresco RAD module -->
<artifactItem>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-rad</artifactId>
<version>${alfresco.sdk.version}</version>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/extensions</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>${groupId}</groupId>
<artifactId>integration-tests</artifactId>
<version>${version}</version>
<classifier>tests</classifier>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/extensions</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/extensions</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/extensions</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.2</version>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/extensions</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
<!-- Copy other dependencies (JARs or AMPs) declared in the platform module -->
<execution>
<id>copy-third-party-dependencies</id>
<id>collect-test-artifacts</id>
<phase>pre-integration-test</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/extensions</outputDirectory>
<excludeScope>compile</excludeScope>
</configuration>
</execution>
<!-- Collect extensions (JARs or AMPs) declared in this module do be deployed to docker -->
<execution>
<id>collect-extensions</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/extensions</outputDirectory>
<includeScope>runtime</includeScope>
<!-- IMPORTANT: if using amp dependencies only, add <includeTypes>amp</includeTypes> -->
</configuration>
</execution>
</executions>
@@ -106,7 +80,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>copy-and-filter-docker-resources</id>
@@ -123,6 +96,7 @@
<excludes>
<exclude>**/*.jar</exclude>
<exclude>**/*.so</exclude>
<exclude>**/*.gz</exclude>
</excludes>
</resource>
</resources>
@@ -143,6 +117,7 @@
<includes>
<include>**/*.jar</include>
<include>**/*.so</include>
<include>**/*.gz</include>
</includes>
</resource>
</resources>

View File

@@ -1,6 +1,9 @@
FROM ${docker.acs.image}:${alfresco.platform.version}
ARG TOMCAT_DIR=/usr/local/tomcat
ARG USERNAME=${alfresco.platform.docker.user}
USER root
# Copy Dockerfile to avoid an error if no JARs exist
COPY Dockerfile extensions/*.jar $TOMCAT_DIR/webapps/alfresco/WEB-INF/lib/
@@ -15,4 +18,6 @@ COPY dev-log4j.properties $TOMCAT_DIR/shared/classes/alfresco/extension
COPY disable-webscript-caching-context.xml $TOMCAT_DIR/shared/classes/alfresco/extension
# Copy Dockerfile to avoid an error if no license file exists
COPY Dockerfile license/*.* $TOMCAT_DIR/webapps/alfresco/WEB-INF/classes/alfresco/extension/license/
COPY Dockerfile license/*.* $TOMCAT_DIR/webapps/alfresco/WEB-INF/classes/alfresco/extension/license/
USER ${USERNAME}

View File

@@ -62,7 +62,8 @@ db.driver=org.postgresql.Driver
index.subsystem.name=solr6
solr.host=${rootArtifactId}-ass
solr.port=8983
solr.secureComms=none
solr.secureComms=secret
solr.sharedSecret=secret
db.username=alfresco
db.password=alfresco
@@ -76,4 +77,12 @@ db.url=jdbc:postgresql://${rootArtifactId}-postgres:5432/alfresco
cifs.enabled=false
ftp.enabled=false
csrf.filter.enabled=false
csrf.filter.enabled=false
# Embedded broker without persistence
messaging.broker.url=vm://localhost?broker.persistent=false
# Disable ATS
transform.service.enabled=false
local.transform.service.enabled=false
legacy.transform.service.enabled=false

View File

@@ -14,7 +14,7 @@ log4j.appender.Console.layout.ConversionPattern=%d{ISO8601} %x %-5p [%c{3}] [%t]
#log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c] %m%n
log4j.appender.File=org.apache.log4j.DailyRollingFileAppender
log4j.appender.File.File=alfresco.log
log4j.appender.File.File=logs/alfresco.log
log4j.appender.File.Append=true
log4j.appender.File.DatePattern='.'yyyy-MM-dd
log4j.appender.File.layout=org.apache.log4j.PatternLayout

View File

@@ -26,12 +26,12 @@ disabledPlugins=Hibernate,Spring
#
# Load web application resources (such as HTML, JSP, CSS, ...) from this directory prior to default processing.
# Use this setting to set to serve resources from source directory directly (e.g. src/main/webapp).
extraWebappContext=/usr/local/tomcat/hotswap-agent/${rootArtifactId}-platform-jar/target/classes/META-INF/resources;
extraWebappContext=/usr/local/tomcat/hotswap-agent/${rootArtifactId}-platform/target/classes/META-INF/resources;
# Load static web resources from different directory.
#
# This setting is dependent on application server plugin(Jetty, Tomcat, JBoss, ...)
webappDir=/usr/local/tomcat/hotswap-agent/${rootArtifactId}-platform-jar/target/classes/META-INF/resources;
webappDir=/usr/local/tomcat/hotswap-agent/${rootArtifactId}-platform/target/classes/META-INF/resources;
# Watch for changes in a directory (resources only).
#

View File

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

View File

@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>${artifactId}</artifactId>
<name>Alfresco Platform/Repository JAR Module</name>
<description>Platform/Repo JAR Module (to be included in the alfresco.war) - part of AIO - SDK 4.0
<description>Platform/Repo JAR Module (to be included in the alfresco.war) - part of AIO - SDK 4.5
</description>
<packaging>jar</packaging>
@@ -17,7 +17,6 @@
</properties>
<dependencies>
<!-- Add here any JAR or AMP dependency that needs to be deployed to ACS -->
</dependencies>
<build>

View File

@@ -10,7 +10,7 @@
<platformModules>
<moduleDependency>
<groupId>${project.groupId}</groupId>
<artifactId>some-platform-jar</artifactId>
<artifactId>some-platform</artifactId>
<version>${project.version}</version>
<type>amp</type>
</moduleDependency>
@@ -35,6 +35,11 @@
<source>src/main/assembly/file-mapping.properties</source>
<filtered>false</filtered>
</file>
<!-- Add module-specific log4j.properties configuration at top level in the AMP -->
<file>
<source>src/main/resources/alfresco/module/${project.artifactId}/log4j.properties</source>
<filtered>false</filtered>
</file>
</files>
<fileSets>

View File

@@ -10,7 +10,7 @@ any existing web resources in the Alfresco.WAR.
`
<moduleDependency>
<groupId>${project.groupId}</groupId>
<artifactId>some-platform-jar</artifactId>
<artifactId>some-platform</artifactId>
<version>${project.version}</version>
<type>amp</type>
</moduleDependency>

View File

@@ -0,0 +1,5 @@
#
# Activiti My Process Workflow
#
my-process.workflow.title=My Process
my-process.workflow.description=This is my custom process

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<definitions
xmlns:activiti="http://activiti.org/bpmn"
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" typeLanguage="http://www.w3.org/2001/XMLSchema"
expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
<process id="my-process">
<startEvent id="start" activiti:formKey="wf:submitAdhocTask"/>
<sequenceFlow id="flow1" sourceRef="start" targetRef="someTask"/>
<userTask id="someTask" name="Activiti is awesome!" activiti:formKey="wf:adhocTask">
<humanPerformer>
<resourceAssignmentExpression>
<formalExpression>${bpm_assignee.properties.userName}</formalExpression>
</resourceAssignmentExpression>
</humanPerformer>
</userTask>
<sequenceFlow id="flow2" sourceRef="someTask" targetRef="end"/>
<endEvent id="end"/>
</process>
</definitions>

View File

@@ -19,7 +19,7 @@
<dependencies>
<dependency>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}-share-jar</artifactId>
<artifactId>${rootArtifactId}-share</artifactId>
<version>${version}</version>
</dependency>
</dependencies>
@@ -29,37 +29,18 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.0.2</version>
<executions>
<!-- Copy the share extension -->
<!-- Collect extensions (JARs or AMPs) declared in this module do be deployed to docker -->
<execution>
<id>copy-repo-extension</id>
<phase>pre-integration-test</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}-share-jar</artifactId>
<version>${version}</version>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/extensions</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
<!-- Copy other dependencies (JARs or AMPs) declared in the share module -->
<execution>
<id>copy-third-party-dependencies</id>
<phase>pre-integration-test</phase>
<id>collect-extensions</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/extensions</outputDirectory>
<includeScope>runtime</includeScope>
<!-- IMPORTANT: if using amp dependencies only, add <includeTypes>amp</includeTypes> -->
</configuration>
</execution>
</executions>
@@ -68,7 +49,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>copy-and-filter-docker-resources</id>

View File

@@ -1,4 +1,4 @@
FROM ${docker.share.image}:${alfresco.share.version}
FROM ${docker.share.image}:${alfresco.share.docker.version}
ARG TOMCAT_DIR=/usr/local/tomcat
@@ -13,4 +13,4 @@ RUN java -jar $TOMCAT_DIR/alfresco-mmt/alfresco-mmt*.jar install \
COPY share-config-custom.xml $TOMCAT_DIR/shared/classes/alfresco/web-extension
COPY log4j.properties $TOMCAT_DIR/webapps/share/WEB-INF/classes
COPY hotswap-agent.properties $TOMCAT_DIR/webapps/share/WEB-INF/classes
COPY hotswap-agent.properties $TOMCAT_DIR/webapps/share/WEB-INF/classes

View File

@@ -27,12 +27,12 @@ disabledPlugins=Hibernate,Spring
#
# Load web application resources (such as HTML, JSP, CSS, ...) from this directory prior to default processing.
# Use this setting to set to serve resources from source directory directly (e.g. src/main/webapp).
extraWebappContext=/usr/local/tomcat/hotswap-agent/${rootArtifactId}-share-jar/target/classes/META-INF/resources;
extraWebappContext=/usr/local/tomcat/hotswap-agent/${rootArtifactId}-share/target/classes/META-INF/resources;
# Load static web resources from different directory.
#
# This setting is dependent on application server plugin(Jetty, Tomcat, JBoss, ...)
webappDir=/usr/local/tomcat/hotswap-agent/${rootArtifactId}-share-jar/target/classes/META-INF/resources;
webappDir=/usr/local/tomcat/hotswap-agent/${rootArtifactId}-share/target/classes/META-INF/resources;
# Watch for changes in a directory (resources only).
#

View File

@@ -39,7 +39,7 @@
<!--
Disable CSRF completely for now
It seems Share has issues on 4.2.x with the embedded tomcat and CSRFPolicy
It seems Share has issues on 4.x with the embedded tomcat and CSRFPolicy
-->
<config evaluator="string-compare" condition="CSRFPolicy" replace="true">
<filter/>

View File

@@ -5,7 +5,7 @@
<artifactId>${artifactId}</artifactId>
<name>Alfresco Share JAR Module</name>
<packaging>jar</packaging>
<description>Sample Share JAR Module (to be included in the share.war) - part of AIO - SDK 4.0</description>
<description>Sample Share JAR Module (to be included in the share.war) - part of AIO - SDK 4.5</description>
<parent>
<groupId>${groupId}</groupId>
@@ -25,7 +25,6 @@
<artifactId>share</artifactId>
<classifier>classes</classifier>
</dependency>
<!-- Add here any JAR or AMP dependency that needs to be deployed to share -->
</dependencies>
<build>

View File

@@ -10,7 +10,7 @@
<shareModules>
<moduleDependency>
<groupId>${project.groupId}</groupId>
<artifactId>some-share-jar</artifactId>
<artifactId>some-share</artifactId>
<version>${project.version}</version>
<type>amp</type>
</moduleDependency>
@@ -35,6 +35,11 @@
<source>src/main/assembly/file-mapping.properties</source>
<filtered>false</filtered>
</file>
<!-- Add module-specific log4j.properties configuration at top level in the AMP -->
<file>
<source>src/main/resources/alfresco/module/${project.artifactId}/log4j.properties</source>
<filtered>false</filtered>
</file>
</files>
<fileSets>

View File

@@ -10,7 +10,7 @@ any existing web resources in the Share.WAR.
`
<moduleDependency>
<groupId>${project.groupId}</groupId>
<artifactId>some-share-jar</artifactId>
<artifactId>some-share</artifactId>
<version>${project.version}</version>
<type>amp</type>
</moduleDependency>

View File

@@ -7,7 +7,7 @@ services:
dockerfile: ./Dockerfile
context: ../../../${rootArtifactId}-share-docker/target
environment:
CATALINA_OPTS: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8888"
CATALINA_OPTS: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=0.0.0.0:8888"
REPO_HOST: ${rootArtifactId}-acs
REPO_PORT: 8080
ports:
@@ -19,7 +19,13 @@ services:
dockerfile: ./Dockerfile
context: ../../../${rootArtifactId}-platform-docker/target
environment:
CATALINA_OPTS: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8888"
JAVA_TOOL_OPTIONS: "${symbol_dollar}{keystore.settings}"
JAVA_OPTS: "
-Dsolr.secureComms=secret
-Dsolr.sharedSecret=secret
-Dmessaging.broker.url=\"failover:(nio://${rootArtifactId}-activemq:61616)?timeout=3000&jms.useCompression=true\"
"
CATALINA_OPTS: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=0.0.0.0:8888"
ports:
- "${symbol_dollar}{acs.port}:8080"
- "${symbol_dollar}{acs.debug.port}:8888"
@@ -33,27 +39,39 @@ services:
POSTGRES_DB: alfresco
POSTGRES_USER: alfresco
POSTGRES_PASSWORD: alfresco
command: postgres -c max_connections=300 -c log_min_messages=LOG
ports:
- "${symbol_dollar}{postgres.port}:5432"
volumes:
- ${rootArtifactId}-db-volume:/var/lib/postgresql/data
${rootArtifactId}-ass:
image: alfresco/alfresco-search-services:1.2.0
image: alfresco/alfresco-search-services:2.0.3
environment:
SOLR_ALFRESCO_HOST: ${rootArtifactId}-acs
SOLR_ALFRESCO_PORT: 8080
SOLR_SOLR_HOST: ${rootArtifactId}-ass
SOLR_SOLR_PORT: 8983
SOLR_CREATE_ALFRESCO_DEFAULTS: alfresco,archive
ALFRESCO_SECURE_COMMS: "secret"
JAVA_TOOL_OPTIONS: "-Dalfresco.secureComms.secret=secret"
ports:
- "8983:8983"
volumes:
- ${rootArtifactId}-ass-volume:/opt/alfresco-search-services/contentstore
- ${rootArtifactId}-ass-volume:/opt/alfresco-search-services/data
${rootArtifactId}-activemq:
image: alfresco/alfresco-activemq:5.16.1
mem_limit: 1g
ports:
- 8161:8161 # Web Console
- 5672:5672 # AMQP
- 61616:61616 # OpenWire
- 61613:61613 # STOMP
volumes:
${rootArtifactId}-acs-volume:
external: true
${rootArtifactId}-db-volume:
external: true
${rootArtifactId}-ass-volume:
external: true
external: true

View File

@@ -5,10 +5,14 @@
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${version}</version>
<name>AIO - SDK 4.0</name>
<description>All-In-One (AIO) project for SDK 4.0</description>
<name>AIO - SDK 4.5</name>
<description>All-In-One (AIO) project for SDK 4.5</description>
<packaging>pom</packaging>
<prerequisites>
<maven>3.3.0</maven>
</prerequisites>
<properties>
<!-- Alfresco Maven Plugin version to use -->
<alfresco.sdk.version>@@alfresco.sdk.parent.version@@</alfresco.sdk.version>
@@ -19,18 +23,18 @@
<alfresco.groupId>org.alfresco</alfresco.groupId>
<alfresco.bomDependencyArtifactId>@@alfresco.bomDependency.artifactId@@</alfresco.bomDependencyArtifactId>
<alfresco.platform.version>@@alfresco.platform.version@@</alfresco.platform.version>
<alfresco.platform.docker.user>@@alfresco.platform.docker.user@@</alfresco.platform.docker.user>
<alfresco.share.version>@@alfresco.share.version@@</alfresco.share.version>
<alfresco.share.docker.version>@@alfresco.share.docker.version@@</alfresco.share.docker.version>
<!-- Docker images -->
<docker.acs.image>@@alfresco.platform.docker.image@@</docker.acs.image>
<docker.share.image>@@alfresco.share.docker.image@@</docker.share.image>
<!-- JRebel Hot reloading of classpath stuff and web resource stuff -->
<jrebel.version>1.1.6</jrebel.version>
<keystore.settings>@@keystore.settings@@</keystore.settings>
<!-- Compile with Java 8, default is 5 -->
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<!-- JRebel Hot reloading of classpath stuff and web resource stuff -->
<jrebel.version>1.1.8</jrebel.version>
<!-- Environment configuration properties -->
<share.port>8180</share.port>
@@ -51,19 +55,17 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
<artifactId>mockito-core</artifactId>
<version>4.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.2</version>
<scope>test</scope>
</dependency>
@@ -81,6 +83,7 @@
<version>${alfresco.sdk.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<dependencyManagement>
@@ -167,7 +170,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.1</version>
<version>3.1.0</version>
<configuration>
<encoding>UTF-8</encoding>
<nonFilteredFileExtensions> <!-- jpg, jpeg, gif, bmp and png are added automatically -->
@@ -198,6 +201,53 @@
</nonFilteredFileExtensions>
</configuration>
</plugin>
<plugin>
<groupId>org.zeroturnaround</groupId>
<artifactId>jrebel-maven-plugin</artifactId>
<version>${jrebel.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0-M1</version>
<executions>
<execution>
<id>integration-test</id>
<phase>integration-test</phase>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
<execution>
<id>verify-test</id>
<phase>verify</phase>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>3.0.0-M1</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.1</version>
</plugin>
</plugins>
</pluginManagement>
@@ -209,14 +259,12 @@
</resource>
</resources>
<plugins>
<!-- Filter the test resource files in the AIO parent project, and do property substitutions.
We need this config so this is done before the Alfresco Maven Plugin 'run' is executed. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.1</version>
<inherited>false</inherited>
<!-- Run only for the AIO parent Project -->
<executions>
@@ -239,11 +287,60 @@
</executions>
</plugin>
<!-- Compress JavaScript files and store as *-min.js -->
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
<version>1.5.1</version>
<executions>
<!-- Compress the JS files under the assembly folder -->
<execution>
<id>compress-assembly</id>
<goals>
<goal>compress</goal>
</goals>
<configuration>
<sourceDirectory>${project.basedir}/src/main/assembly/web</sourceDirectory>
<outputDirectory>${project.basedir}/src/main/assembly/web</outputDirectory>
<excludes>
<exclude>**/webscripts/**</exclude>
<exclude>**/site-webscripts/**</exclude>
<exclude>**/META-INF/**</exclude>
<exclude>**/*.lib.js</exclude>
<exclude>**/*.css</exclude>
<exclude>**/*-min.js</exclude>
<exclude>**/*-min.css</exclude>
</excludes>
<force>true</force>
<jswarn>false</jswarn>
</configuration>
</execution>
<!-- Compress the JS files under the resources folder -->
<execution>
<id>compress-resources</id>
<goals>
<goal>compress</goal>
</goals>
<configuration>
<excludes>
<exclude>**/webscripts/**</exclude>
<exclude>**/site-webscripts/**</exclude>
<exclude>**/*.lib.js</exclude>
<exclude>**/*.css</exclude>
<exclude>**/*-min.js</exclude>
<exclude>**/*-min.css</exclude>
</excludes>
<force>true</force>
<jswarn>false</jswarn>
</configuration>
</execution>
</executions>
</plugin>
<!-- Hot reloading with JRebel -->
<plugin>
<groupId>org.zeroturnaround</groupId>
<artifactId>jrebel-maven-plugin</artifactId>
<version>${jrebel.version}</version>
<executions>
<execution>
<id>generate-rebel-xml</id>
@@ -277,6 +374,64 @@
</plugins>
</build>
<profiles>
<profile>
<id>java8</id>
<activation>
<jdk>[1.8,11.0)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>java11</id>
<activation>
<jdk>[11.0,17)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<release>11</release>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>java17</id>
<activation>
<jdk>[17,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<release>17</release>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<!--
Alfresco Maven Repositories
-->
@@ -298,6 +453,10 @@
<id>alfresco-private-repository</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/private</url>
</repository>
<repository>
<id>alfresco-internal</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/internal</url>
</repository>
</repositories>
<pluginRepositories>

View File

@@ -12,7 +12,7 @@ IF NOT [%M2_HOME%]==[] (
)
IF [%1]==[] (
echo "Usage: %0 {build_start|start|stop|purge|tail|reload_share|reload_acs|build_test|test}"
echo "Usage: %0 {build_start|build_start_it_supported|start|stop|purge|tail|reload_share|reload_acs|build_test|test}"
GOTO END
)
@@ -23,6 +23,14 @@ IF %1==build_start (
CALL :tail
GOTO END
)
IF %1==build_start_it_supported (
CALL :down
CALL :build
CALL :prepare-test
CALL :start
CALL :tail
GOTO END
)
IF %1==start (
CALL :start
CALL :tail
@@ -56,6 +64,7 @@ IF %1==reload_acs (
IF %1==build_test (
CALL :down
CALL :build
CALL :prepare-test
CALL :start
CALL :test
CALL :tail_all
@@ -83,24 +92,22 @@ EXIT /B 0
docker-compose -f "%COMPOSE_FILE_PATH%" up --build -d ${rootArtifactId}-acs
EXIT /B 0
:down
docker-compose -f "%COMPOSE_FILE_PATH%" down
if exist "%COMPOSE_FILE_PATH%" (
docker-compose -f "%COMPOSE_FILE_PATH%" down
)
EXIT /B 0
:build
docker rmi alfresco-content-services-${rootArtifactId}:development
docker rmi alfresco-share-${rootArtifactId}:development
call %MVN_EXEC% clean install -DskipTests
call %MVN_EXEC% clean package
EXIT /B 0
:build_share
docker-compose -f "%COMPOSE_FILE_PATH%" kill ${rootArtifactId}-share
docker-compose -f "%COMPOSE_FILE_PATH%" rm -f ${rootArtifactId}-share
docker rmi alfresco-share-${rootArtifactId}:development
call %MVN_EXEC% clean install -DskipTests -pl ${rootArtifactId}-share-jar
call %MVN_EXEC% clean package -pl ${rootArtifactId}-share,${rootArtifactId}-share-docker
EXIT /B 0
:build_acs
docker-compose -f "%COMPOSE_FILE_PATH%" kill ${rootArtifactId}-acs
docker-compose -f "%COMPOSE_FILE_PATH%" rm -f ${rootArtifactId}-acs
docker rmi alfresco-content-services-${rootArtifactId}:development
call %MVN_EXEC% clean install -DskipTests -pl ${rootArtifactId}-platform-jar
call %MVN_EXEC% clean package -pl ${rootArtifactId}-integration-tests,${rootArtifactId}-platform,${rootArtifactId}-platform-docker
EXIT /B 0
:tail
docker-compose -f "%COMPOSE_FILE_PATH%" logs -f
@@ -108,11 +115,14 @@ EXIT /B 0
:tail_all
docker-compose -f "%COMPOSE_FILE_PATH%" logs --tail="all"
EXIT /B 0
:prepare-test
call %MVN_EXEC% verify -DskipTests=true -pl ${rootArtifactId}-platform,${rootArtifactId}-integration-tests,${rootArtifactId}-platform-docker
EXIT /B 0
:test
call %MVN_EXEC% verify -pl integration-tests
call %MVN_EXEC% verify -pl ${rootArtifactId}-platform,${rootArtifactId}-integration-tests
EXIT /B 0
:purge
docker volume rm ${rootArtifactId}-acs-volume
docker volume rm ${rootArtifactId}-db-volume
docker volume rm ${rootArtifactId}-ass-volume
docker volume rm -f ${rootArtifactId}-acs-volume
docker volume rm -f ${rootArtifactId}-db-volume
docker volume rm -f ${rootArtifactId}-ass-volume
EXIT /B 0

View File

@@ -1,7 +1,7 @@
#set( $symbol_dollar = '$' )
#!/bin/sh
export COMPOSE_FILE_PATH=${symbol_dollar}{PWD}/target/classes/docker/docker-compose.yml
export COMPOSE_FILE_PATH="${symbol_dollar}{PWD}/target/classes/docker/docker-compose.yml"
if [ -z "${symbol_dollar}{M2_HOME}" ]; then
export MVN_EXEC="mvn"
@@ -13,57 +13,59 @@ start() {
docker volume create ${rootArtifactId}-acs-volume
docker volume create ${rootArtifactId}-db-volume
docker volume create ${rootArtifactId}-ass-volume
docker-compose -f ${symbol_dollar}COMPOSE_FILE_PATH up --build -d
docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" up --build -d
}
start_share() {
docker-compose -f ${symbol_dollar}COMPOSE_FILE_PATH up --build -d ${rootArtifactId}-share
docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" up --build -d ${rootArtifactId}-share
}
start_acs() {
docker-compose -f ${symbol_dollar}COMPOSE_FILE_PATH up --build -d ${rootArtifactId}-acs
docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" up --build -d ${rootArtifactId}-acs
}
down() {
docker-compose -f ${symbol_dollar}COMPOSE_FILE_PATH down
if [ -f "${symbol_dollar}COMPOSE_FILE_PATH" ]; then
docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" down
fi
}
purge() {
docker volume rm ${rootArtifactId}-acs-volume
docker volume rm ${rootArtifactId}-db-volume
docker volume rm ${rootArtifactId}-ass-volume
docker volume rm -f ${rootArtifactId}-acs-volume
docker volume rm -f ${rootArtifactId}-db-volume
docker volume rm -f ${rootArtifactId}-ass-volume
}
build() {
docker rmi alfresco-content-services-${rootArtifactId}:development
docker rmi alfresco-share-${rootArtifactId}:development
${symbol_dollar}MVN_EXEC clean install -DskipTests=true
${symbol_dollar}MVN_EXEC clean package
}
build_share() {
docker-compose -f ${symbol_dollar}COMPOSE_FILE_PATH kill ${rootArtifactId}-share
yes | docker-compose -f ${symbol_dollar}COMPOSE_FILE_PATH rm -f ${rootArtifactId}-share
docker rmi alfresco-share-${rootArtifactId}:development
${symbol_dollar}MVN_EXEC clean install -DskipTests=true -pl ${rootArtifactId}-share-jar
docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" kill ${rootArtifactId}-share
yes | docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" rm -f ${rootArtifactId}-share
${symbol_dollar}MVN_EXEC clean package -pl ${rootArtifactId}-share,${rootArtifactId}-share-docker
}
build_acs() {
docker-compose -f ${symbol_dollar}COMPOSE_FILE_PATH kill ${rootArtifactId}-acs
yes | docker-compose -f ${symbol_dollar}COMPOSE_FILE_PATH rm -f ${rootArtifactId}-acs
docker rmi alfresco-content-services-${rootArtifactId}:development
${symbol_dollar}MVN_EXEC clean install -DskipTests=true -pl ${rootArtifactId}-platform-jar
docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" kill ${rootArtifactId}-acs
yes | docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" rm -f ${rootArtifactId}-acs
${symbol_dollar}MVN_EXEC clean package -pl ${rootArtifactId}-integration-tests,${rootArtifactId}-platform,${rootArtifactId}-platform-docker
}
tail() {
docker-compose -f ${symbol_dollar}COMPOSE_FILE_PATH logs -f
docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" logs -f
}
tail_all() {
docker-compose -f ${symbol_dollar}COMPOSE_FILE_PATH logs --tail="all"
docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" logs --tail="all"
}
prepare_test() {
${symbol_dollar}MVN_EXEC verify -DskipTests=true -pl ${rootArtifactId}-platform,${rootArtifactId}-integration-tests,${rootArtifactId}-platform-docker
}
test() {
${symbol_dollar}MVN_EXEC verify -pl integration-tests
${symbol_dollar}MVN_EXEC verify -pl ${rootArtifactId}-platform,${rootArtifactId}-integration-tests
}
case "${symbol_dollar}1" in
@@ -73,6 +75,13 @@ case "${symbol_dollar}1" in
start
tail
;;
build_start_it_supported)
down
build
prepare_test
start
tail
;;
start)
start
tail
@@ -100,6 +109,7 @@ case "${symbol_dollar}1" in
build_test)
down
build
prepare_test
start
test
tail_all
@@ -109,5 +119,5 @@ case "${symbol_dollar}1" in
test
;;
*)
echo "Usage: ${symbol_dollar}0 {build_start|start|stop|purge|tail|reload_share|reload_acs|build_test|test}"
echo "Usage: ${symbol_dollar}0 {build_start|build_start_it_supported|start|stop|purge|tail|reload_share|reload_acs|build_test|test}"
esac

View File

@@ -12,7 +12,7 @@
<parent>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-sdk-aggregator</artifactId>
<version>4.0.0-beta-1</version>
<version>4.6.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
@@ -49,6 +49,7 @@
<delimiters>
<delimiter>@@</delimiter>
</delimiters>
<addDefaultExcludes>false</addDefaultExcludes>
</configuration>
</plugin>
</plugins>

View File

@@ -23,12 +23,6 @@
<include>**</include>
</includes>
</fileSet>
<fileSet encoding="UTF-8" filtered="false">
<directory>src/main/docker/license</directory>
<includes>
<include>**</include>
</includes>
</fileSet>
<fileSet encoding="UTF-8" filtered="false">
<directory>src/main/docker</directory>
<includes>
@@ -81,6 +75,7 @@
<fileSet encoding="UTF-8" filtered="true">
<directory></directory>
<includes>
<include>.gitignore</include>
<include>run.sh</include>
<include>run.bat</include>
<include>README.md</include>

View File

@@ -0,0 +1,38 @@
**.log*
# Maven
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
.mvn/wrapper/maven-wrapper.jar
# Eclipse
.metadata
.project
.classpath
bin/
tmp/
*.tmp
.settings/
.loadpath
.recommenders
# IntelliJ IDEA
**.idea
**.iml
# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
# macOS
*.DS_Store

View File

@@ -1,6 +1,6 @@
# Alfresco ACS JAR Module - SDK 4.0
# Alfresco ACS JAR Module - SDK 4.5
This is an ACS project for Alfresco SDK 4.0.
This is an ACS project for Alfresco SDK 4.5.
Run with `./run.sh build_start` or `./run.bat build_start` and verify that it
@@ -14,6 +14,8 @@ All the services of the project are now run as docker containers. The run script
* `build_start`. Build the whole project, recreate the ACS docker image, start the dockerised environment composed by ACS, Share (optional), ASS
and PostgreSQL and tail the logs of all the containers.
* `build_start_it_supported`. Build the whole project including dependencies required for IT execution, recreate the ACS docker image, start the dockerised environment
composed by ACS, Share (optional), ASS and PostgreSQL and tail the logs of all the containers.
* `start`. Start the dockerised environment without building the project and tail the logs of all the containers.
* `stop`. Stop the dockerised environment.
* `purge`. Stop the dockerised container and delete all the persistent data (docker volumes).

View File

@@ -15,7 +15,13 @@ services:
dockerfile: ./Dockerfile
context: ../../../target
environment:
CATALINA_OPTS: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8888"
JAVA_TOOL_OPTIONS: "${symbol_dollar}{keystore.settings}"
JAVA_OPTS: "
-Dsolr.secureComms=secret
-Dsolr.sharedSecret=secret
-Dmessaging.broker.url=\"failover:(nio://${rootArtifactId}-activemq:61616)?timeout=3000&jms.useCompression=true\"
"
CATALINA_OPTS: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=0.0.0.0:8888"
ports:
- "${symbol_dollar}{acs.port}:8080"
- "${symbol_dollar}{acs.debug.port}:8888"
@@ -29,27 +35,39 @@ services:
POSTGRES_DB: alfresco
POSTGRES_USER: alfresco
POSTGRES_PASSWORD: alfresco
command: postgres -c max_connections=300 -c log_min_messages=LOG
ports:
- "${symbol_dollar}{postgres.port}:5432"
volumes:
- ${rootArtifactId}-db-volume:/var/lib/postgresql/data
${rootArtifactId}-ass:
image: alfresco/alfresco-search-services:1.2.0
image: alfresco/alfresco-search-services:2.0.3
environment:
SOLR_ALFRESCO_HOST: ${rootArtifactId}-acs
SOLR_ALFRESCO_PORT: 8080
SOLR_SOLR_HOST: ${rootArtifactId}-ass
SOLR_SOLR_PORT: 8983
SOLR_CREATE_ALFRESCO_DEFAULTS: alfresco,archive
ALFRESCO_SECURE_COMMS: "secret"
JAVA_TOOL_OPTIONS: "-Dalfresco.secureComms.secret=secret"
ports:
- "8983:8983"
volumes:
- ${rootArtifactId}-ass-volume:/opt/alfresco-search-services/contentstore
- ${rootArtifactId}-ass-volume:/opt/alfresco-search-services/data
${rootArtifactId}-activemq:
image: alfresco/alfresco-activemq:5.16.1
mem_limit: 1g
ports:
- 8161:8161 # Web Console
- 5672:5672 # AMQP
- 61616:61616 # OpenWire
- 61613:61613 # STOMP
volumes:
${rootArtifactId}-acs-volume:
external: true
${rootArtifactId}-db-volume:
external: true
${rootArtifactId}-ass-volume:
external: true
external: true

View File

@@ -1,430 +1,560 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${version}</version>
<name>${artifactId} Platform/Repository JAR Module</name>
<description>Platform/Repo JAR Module (to be included in the alfresco.war)</description>
<packaging>jar</packaging>
<properties>
<!-- Alfresco Maven Plugin version to use -->
<alfresco.sdk.version>@@alfresco.sdk.parent.version@@</alfresco.sdk.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- Properties used in dependency declarations, you don't need to change these -->
<alfresco.groupId>org.alfresco</alfresco.groupId>
<alfresco.bomDependencyArtifactId>@@alfresco.bomDependency.artifactId@@</alfresco.bomDependencyArtifactId>
<alfresco.platform.version>@@alfresco.platform.version@@</alfresco.platform.version>
<alfresco.share.version>@@alfresco.share.version@@</alfresco.share.version>
<!-- Docker images -->
<docker.acs.image>@@alfresco.platform.docker.image@@</docker.acs.image>
<docker.share.image>@@alfresco.share.docker.image@@</docker.share.image>
<!-- JRebel Hot reloading of classpath stuff and web resource stuff -->
<jrebel.version>1.1.6</jrebel.version>
<!-- Compile with Java 8, default is 5 -->
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<!-- Environment configuration properties -->
<share.port>8180</share.port>
<acs.host>${artifactId}-acs</acs.host>
<acs.port>8080</acs.port>
<acs.debug.port>8888</acs.debug.port>
<postgres.port>5555</postgres.port>
<!-- This parameter is only required for those cases in which ACS is not exposed in http://localhost:8080/alfresco (i.e. Windows Docker) -->
<test.acs.endpoint.path></test.acs.endpoint.path>
</properties>
<!-- Libs used in Unit and Integration tests -->
<!-- IMPORTANT - Test dependencies need to be here in the top parent POM as
the Alfresco Maven IT Mojo runs as part of the parent project ... -->
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.2</version>
<scope>test</scope>
</dependency>
<!-- The main Alfresco Repo dependency for compiling Java code in src/main/java -->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-remote-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- Bring in Alfresco RAD so we get access to AlfrescoTestRunner classes -->
<dependency>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-rad</artifactId>
<version>${alfresco.sdk.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<!-- This will import the dependencyManagement for all artifacts in the selected Alfresco platform.
NOTE: You still need to define dependencies in your POM, but you can omit version as
it's enforced by this dependencyManagement.
NOTE: It defaults to the latest version this SDK pom has been tested with,
but alfresco version can/should be overridden in your project's pom
-->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>${alfresco.bomDependencyArtifactId}</artifactId>
<version>${alfresco.platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<!-- Filter the test resource files in the AIO parent project, and do property substitutions.
We need this config so this is done before the Alfresco Maven Plugin 'run' is executed. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.1</version>
<configuration>
<encoding>UTF-8</encoding>
<nonFilteredFileExtensions> <!-- jpg, jpeg, gif, bmp and png are added automatically -->
<nonFilteredFileExtension>ftl</nonFilteredFileExtension>
<nonFilteredFileExtension>acp</nonFilteredFileExtension>
<nonFilteredFileExtension>svg</nonFilteredFileExtension>
<nonFilteredFileExtension>pdf</nonFilteredFileExtension>
<nonFilteredFileExtension>doc</nonFilteredFileExtension>
<nonFilteredFileExtension>docx</nonFilteredFileExtension>
<nonFilteredFileExtension>xls</nonFilteredFileExtension>
<nonFilteredFileExtension>xlsx</nonFilteredFileExtension>
<nonFilteredFileExtension>ppt</nonFilteredFileExtension>
<nonFilteredFileExtension>pptx</nonFilteredFileExtension>
<nonFilteredFileExtension>bin</nonFilteredFileExtension>
<nonFilteredFileExtension>lic</nonFilteredFileExtension>
<nonFilteredFileExtension>swf</nonFilteredFileExtension>
<nonFilteredFileExtension>zip</nonFilteredFileExtension>
<nonFilteredFileExtension>msg</nonFilteredFileExtension>
<nonFilteredFileExtension>jar</nonFilteredFileExtension>
<nonFilteredFileExtension>ttf</nonFilteredFileExtension>
<nonFilteredFileExtension>eot</nonFilteredFileExtension>
<nonFilteredFileExtension>woff</nonFilteredFileExtension>
<nonFilteredFileExtension>woff2</nonFilteredFileExtension>
<nonFilteredFileExtension>css</nonFilteredFileExtension>
<nonFilteredFileExtension>ico</nonFilteredFileExtension>
<nonFilteredFileExtension>psd</nonFilteredFileExtension>
<nonFilteredFileExtension>js</nonFilteredFileExtension>
</nonFilteredFileExtensions>
</configuration>
<executions>
<execution>
<id>copy-and-filter-docker-compose-resources</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.outputDirectory}/docker</outputDirectory>
<resources>
<resource>
<directory>docker</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-and-filter-docker-resources</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
<resources>
<resource>
<directory>src/main/docker</directory>
<filtering>true</filtering>
<excludes>
<exclude>**/*.jar</exclude>
<exclude>**/*.so</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-and-filter-docker-resources-non-filtered</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
<resources>
<resource>
<directory>src/main/docker</directory>
<filtering>false</filtering>
<includes>
<include>**/*.jar</include>
<include>**/*.so</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.0.2</version>
<executions>
<!-- Copy the repository extension and the dependencies required for execute integration tests -->
<execution>
<id>copy-repo-extension</id>
<phase>pre-integration-test</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${version}</version>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/extensions</outputDirectory>
</artifactItem>
<!-- Test dependencies -->
<!-- We need these dependencies installed in ACS in order to execute the test remotely making use of the Alfresco RAD module -->
<artifactItem>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-rad</artifactId>
<version>${alfresco.sdk.version}</version>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/extensions</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/extensions</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/extensions</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.2</version>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/extensions</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
<!-- Copy other dependencies (JARs or AMPs) declared in the platform module -->
<execution>
<id>copy-third-party-dependencies</id>
<phase>pre-integration-test</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/extensions</outputDirectory>
<includeScope>runtime</includeScope>
</configuration>
</execution>
</executions>
</plugin>
<!-- Runs the integration tests, any class that follows naming convention
"**/IT*.java", "**/*IT.java", and "**/*ITCase.java" will be considered an integration test -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<systemPropertyVariables>
<acs.endpoint.path>${test.acs.endpoint.path}</acs.endpoint.path>
</systemPropertyVariables>
</configuration>
<executions>
<execution>
<id>integration-test</id>
<phase>integration-test</phase>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
<execution>
<id>verify-test</id>
<phase>verify</phase>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.19.1</version>
</dependency>
</dependencies>
</plugin>
<!--
Build an AMP if 3rd party libs are needed by the extensions
JARs are the default artifact produced in your modules, if you want to build an amp for each module
you have to enable this plugin and inspect the src/main/assembly.xml file if you want to customize
the layout of your AMP. The end result is that Maven will produce both a JAR file and an AMP with your
module.
-->
<!--
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>build-amp-file</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptor>src/main/assembly/amp.xml</descriptor>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.alfresco.maven.plugin</groupId>
<artifactId>alfresco-maven-plugin</artifactId>
<version>${alfresco.sdk.version}</version>
</dependency>
</dependencies>
</plugin>
-->
<!-- Hot reloading with JRebel -->
<plugin>
<groupId>org.zeroturnaround</groupId>
<artifactId>jrebel-maven-plugin</artifactId>
<version>${jrebel.version}</version>
<executions>
<execution>
<id>generate-rebel-xml</id>
<phase>process-resources</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<!-- For more information about how to configure JRebel plugin see:
http://manuals.zeroturnaround.com/jrebel/standalone/maven.html#maven-rebel-xml -->
<classpath>
<fallback>all</fallback>
<resources>
<resource>
<directory>${project.build.outputDirectory}</directory>
<directory>${project.build.testOutputDirectory}</directory>
</resource>
</resources>
</classpath>
<!--
alwaysGenerate - default is false
If 'false' - rebel.xml is generated if timestamps of pom.xml and the current rebel.xml file are not equal.
If 'true' - rebel.xml will always be generated
-->
<alwaysGenerate>true</alwaysGenerate>
</configuration>
</plugin>
</plugins>
<resources>
<!-- Filter the resource files in this project and do property substitutions -->
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<testResources>
<!-- Filter the test resource files in this project and do property substitutions -->
<testResource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
</testResource>
</testResources>
</build>
<!--
Alfresco Maven Repositories
-->
<repositories>
<repository>
<id>alfresco-public</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
</repository>
<repository>
<id>alfresco-public-snapshots</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/public-snapshots</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
</snapshots>
</repository>
<!-- Alfresco Enterprise Edition Artifacts, put username/pwd for server in settings.xml -->
<repository>
<id>alfresco-private-repository</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/private</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>alfresco-plugin-public</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
</pluginRepository>
<pluginRepository>
<id>alfresco-plugin-public-snapshots</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/public-snapshots</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${version}</version>
<name>${artifactId} Platform/Repository JAR Module</name>
<description>Platform/Repo JAR Module (to be included in the alfresco.war)</description>
<packaging>jar</packaging>
<properties>
<!-- Alfresco Maven Plugin version to use -->
<alfresco.sdk.version>@@alfresco.sdk.parent.version@@</alfresco.sdk.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- Properties used in dependency declarations, you don't need to change these -->
<alfresco.groupId>org.alfresco</alfresco.groupId>
<alfresco.bomDependencyArtifactId>@@alfresco.bomDependency.artifactId@@</alfresco.bomDependencyArtifactId>
<alfresco.platform.version>@@alfresco.platform.version@@</alfresco.platform.version>
<alfresco.platform.docker.user>@@alfresco.platform.docker.user@@</alfresco.platform.docker.user>
<alfresco.share.version>@@alfresco.share.version@@</alfresco.share.version>
<alfresco.share.docker.version>@@alfresco.share.docker.version@@</alfresco.share.docker.version>
<!-- Docker images -->
<docker.acs.image>@@alfresco.platform.docker.image@@</docker.acs.image>
<docker.share.image>@@alfresco.share.docker.image@@</docker.share.image>
<keystore.settings>@@keystore.settings@@</keystore.settings>
<!-- JRebel Hot reloading of classpath stuff and web resource stuff -->
<jrebel.version>1.1.8</jrebel.version>
<!-- Environment configuration properties -->
<share.port>8180</share.port>
<acs.host>${artifactId}-acs</acs.host>
<acs.port>8080</acs.port>
<acs.debug.port>8888</acs.debug.port>
<postgres.port>5555</postgres.port>
<!-- This parameter is only required for those cases in which ACS is not exposed in http://localhost:8080/alfresco (i.e. Windows Docker) -->
<test.acs.endpoint.path></test.acs.endpoint.path>
</properties>
<!-- Libs used in Unit and Integration tests -->
<!-- IMPORTANT - Test dependencies need to be here in the top parent POM as
the Alfresco Maven IT Mojo runs as part of the parent project ... -->
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<scope>test</scope>
</dependency>
<!-- The main Alfresco Repo dependency for compiling Java code in src/main/java -->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-remote-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- Bring in Alfresco RAD so we get access to AlfrescoTestRunner classes -->
<dependency>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-rad</artifactId>
<version>${alfresco.sdk.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<!-- This will import the dependencyManagement for all artifacts in the selected Alfresco platform.
NOTE: You still need to define dependencies in your POM, but you can omit version as
it's enforced by this dependencyManagement.
NOTE: It defaults to the latest version this SDK pom has been tested with,
but alfresco version can/should be overridden in your project's pom
-->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>${alfresco.bomDependencyArtifactId}</artifactId>
<version>${alfresco.platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<!--
Build an AMP if 3rd party libs are needed by the extensions
JARs are the default artifact produced in your modules, if you want to build an amp for each module
you have to enable this plugin and inspect the src/main/assembly.xml file if you want to customize
the layout of your AMP. The end result is that Maven will produce both a JAR file and an AMP with your
module.
-->
<!--
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>build-amp-file</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptor>src/main/assembly/amp.xml</descriptor>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.alfresco.maven.plugin</groupId>
<artifactId>alfresco-maven-plugin</artifactId>
<version>${alfresco.sdk.version}</version>
</dependency>
</dependencies>
</plugin>
-->
<!-- Filter the test resource files in the AIO parent project, and do property substitutions.
We need this config so this is done before the Alfresco Maven Plugin 'run' is executed. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<encoding>UTF-8</encoding>
<nonFilteredFileExtensions> <!-- jpg, jpeg, gif, bmp and png are added automatically -->
<nonFilteredFileExtension>ftl</nonFilteredFileExtension>
<nonFilteredFileExtension>acp</nonFilteredFileExtension>
<nonFilteredFileExtension>svg</nonFilteredFileExtension>
<nonFilteredFileExtension>pdf</nonFilteredFileExtension>
<nonFilteredFileExtension>doc</nonFilteredFileExtension>
<nonFilteredFileExtension>docx</nonFilteredFileExtension>
<nonFilteredFileExtension>xls</nonFilteredFileExtension>
<nonFilteredFileExtension>xlsx</nonFilteredFileExtension>
<nonFilteredFileExtension>ppt</nonFilteredFileExtension>
<nonFilteredFileExtension>pptx</nonFilteredFileExtension>
<nonFilteredFileExtension>bin</nonFilteredFileExtension>
<nonFilteredFileExtension>lic</nonFilteredFileExtension>
<nonFilteredFileExtension>swf</nonFilteredFileExtension>
<nonFilteredFileExtension>zip</nonFilteredFileExtension>
<nonFilteredFileExtension>msg</nonFilteredFileExtension>
<nonFilteredFileExtension>jar</nonFilteredFileExtension>
<nonFilteredFileExtension>ttf</nonFilteredFileExtension>
<nonFilteredFileExtension>eot</nonFilteredFileExtension>
<nonFilteredFileExtension>woff</nonFilteredFileExtension>
<nonFilteredFileExtension>woff2</nonFilteredFileExtension>
<nonFilteredFileExtension>css</nonFilteredFileExtension>
<nonFilteredFileExtension>ico</nonFilteredFileExtension>
<nonFilteredFileExtension>psd</nonFilteredFileExtension>
<nonFilteredFileExtension>js</nonFilteredFileExtension>
</nonFilteredFileExtensions>
</configuration>
<executions>
<execution>
<id>copy-and-filter-docker-compose-resources</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.outputDirectory}/docker</outputDirectory>
<resources>
<resource>
<directory>docker</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-and-filter-docker-resources</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
<resources>
<resource>
<directory>src/main/docker</directory>
<filtering>true</filtering>
<excludes>
<exclude>**/*.jar</exclude>
<exclude>**/*.so</exclude>
<exclude>**/*.gz</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-and-filter-docker-resources-non-filtered</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
<resources>
<resource>
<directory>src/main/docker</directory>
<filtering>false</filtering>
<includes>
<include>**/*.jar</include>
<include>**/*.so</include>
<include>**/*.gz</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-repository-extension</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/extensions</outputDirectory>
<resources>
<resource>
<directory>target</directory>
<includes>
<include>${project.build.finalName}.jar</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-repository-tests</id>
<phase>pre-integration-test</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/extensions</outputDirectory>
<resources>
<resource>
<directory>target</directory>
<includes>
<include>${project.build.finalName}-tests.jar</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.1</version>
<executions>
<!-- Copy the dependencies required for execute integration tests -->
<execution>
<id>collect-test-artifacts</id>
<phase>pre-integration-test</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/extensions</outputDirectory>
<excludeScope>compile</excludeScope>
</configuration>
</execution>
<!-- Collect extensions (JARs or AMPs) declared in this module to be deployed to docker -->
<execution>
<id>collect-extensions</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/extensions</outputDirectory>
<includeScope>runtime</includeScope>
<!-- IMPORTANT: if using amp dependencies only, add <includeTypes>amp</includeTypes> -->
</configuration>
</execution>
</executions>
</plugin>
<!-- Make sure we attach the tests so we can include them when running -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Runs the integration tests, any class that follows naming convention
"**/IT*.java", "**/*IT.java", and "**/*ITCase.java" will be considered an integration test -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0-M1</version>
<configuration>
<systemPropertyVariables>
<acs.endpoint.path>${test.acs.endpoint.path}</acs.endpoint.path>
</systemPropertyVariables>
</configuration>
<executions>
<execution>
<id>integration-test</id>
<phase>integration-test</phase>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
<execution>
<id>verify-test</id>
<phase>verify</phase>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>3.0.0-M1</version>
</dependency>
</dependencies>
</plugin>
<!-- Compress JavaScript files and store as *-min.js -->
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
<version>1.5.1</version>
<executions>
<!-- Compress the JS files under the assembly folder -->
<execution>
<id>compress-assembly</id>
<goals>
<goal>compress</goal>
</goals>
<configuration>
<sourceDirectory>${project.basedir}/src/main/assembly/web</sourceDirectory>
<outputDirectory>${project.basedir}/src/main/assembly/web</outputDirectory>
<excludes>
<exclude>**/webscripts/**</exclude>
<exclude>**/site-webscripts/**</exclude>
<exclude>**/META-INF/**</exclude>
<exclude>**/*.lib.js</exclude>
<exclude>**/*.css</exclude>
<exclude>**/*-min.js</exclude>
<exclude>**/*-min.css</exclude>
</excludes>
<force>true</force>
<jswarn>false</jswarn>
</configuration>
</execution>
<!-- Compress the JS files under the resources folder -->
<execution>
<id>compress-resources</id>
<goals>
<goal>compress</goal>
</goals>
<configuration>
<excludes>
<exclude>**/webscripts/**</exclude>
<exclude>**/site-webscripts/**</exclude>
<exclude>**/*.lib.js</exclude>
<exclude>**/*.css</exclude>
<exclude>**/*-min.js</exclude>
<exclude>**/*-min.css</exclude>
</excludes>
<force>true</force>
<jswarn>false</jswarn>
</configuration>
</execution>
</executions>
</plugin>
<!-- Hot reloading with JRebel -->
<plugin>
<groupId>org.zeroturnaround</groupId>
<artifactId>jrebel-maven-plugin</artifactId>
<version>${jrebel.version}</version>
<executions>
<execution>
<id>generate-rebel-xml</id>
<phase>process-resources</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<!-- For more information about how to configure JRebel plugin see:
http://manuals.zeroturnaround.com/jrebel/standalone/maven.html#maven-rebel-xml -->
<classpath>
<fallback>all</fallback>
<resources>
<resource>
<directory>${project.build.outputDirectory}</directory>
<directory>${project.build.testOutputDirectory}</directory>
</resource>
</resources>
</classpath>
<!--
alwaysGenerate - default is false
If 'false' - rebel.xml is generated if timestamps of pom.xml and the current rebel.xml file are not equal.
If 'true' - rebel.xml will always be generated
-->
<alwaysGenerate>true</alwaysGenerate>
</configuration>
</plugin>
</plugins>
<resources>
<!-- Filter the resource files in this project and do property substitutions -->
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<testResources>
<!-- Filter the test resource files in this project and do property substitutions -->
<testResource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
</testResource>
</testResources>
</build>
<profiles>
<profile>
<id>java8</id>
<activation>
<jdk>[1.8,11.0)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>java11</id>
<activation>
<jdk>[11.0, 17)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<release>11</release>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>java17</id>
<activation>
<jdk>[17,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<release>17</release>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<!--
Alfresco Maven Repositories
-->
<repositories>
<repository>
<id>alfresco-public</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
</repository>
<repository>
<id>alfresco-public-snapshots</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/public-snapshots</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
</snapshots>
</repository>
<!-- Alfresco Enterprise Edition Artifacts, put username/pwd for server in settings.xml -->
<repository>
<id>alfresco-private-repository</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/private</url>
</repository>
<repository>
<id>alfresco-internal</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/internal</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>alfresco-plugin-public</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
</pluginRepository>
<pluginRepository>
<id>alfresco-plugin-public-snapshots</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/public-snapshots</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>

View File

@@ -12,7 +12,7 @@ IF NOT [%M2_HOME%]==[] (
)
IF [%1]==[] (
echo "Usage: %0 {build_start|start|stop|purge|tail|build_test|test}"
echo "Usage: %0 {build_start|build_start_it_supported|start|stop|purge|tail|build_test|test}"
GOTO END
)
@@ -23,6 +23,14 @@ IF %1==build_start (
CALL :tail
GOTO END
)
IF %1==build_start_it_supported (
CALL :down
CALL :build
CALL :prepare_test
CALL :start
CALL :tail
GOTO END
)
IF %1==start (
CALL :start
CALL :tail
@@ -44,6 +52,7 @@ IF %1==tail (
IF %1==build_test (
CALL :down
CALL :build
CALL :prepare_test
CALL :start
CALL :test
CALL :tail_all
@@ -65,11 +74,12 @@ EXIT /B %ERRORLEVEL%
docker-compose -f "%COMPOSE_FILE_PATH%" up --build -d
EXIT /B 0
:down
docker-compose -f "%COMPOSE_FILE_PATH%" down
if exist "%COMPOSE_FILE_PATH%" (
docker-compose -f "%COMPOSE_FILE_PATH%" down
)
EXIT /B 0
:build
docker rmi alfresco-content-services-${rootArtifactId}:development
call %MVN_EXEC% clean install -DskipTests
call %MVN_EXEC% clean package
EXIT /B 0
:tail
docker-compose -f "%COMPOSE_FILE_PATH%" logs -f
@@ -77,11 +87,14 @@ EXIT /B 0
:tail_all
docker-compose -f "%COMPOSE_FILE_PATH%" logs --tail="all"
EXIT /B 0
:prepare_test
call %MVN_EXEC% verify -DskipTests=true
EXIT /B 0
:test
call %MVN_EXEC% verify
EXIT /B 0
:purge
docker volume rm ${rootArtifactId}-acs-volume
docker volume rm ${rootArtifactId}-db-volume
docker volume rm ${rootArtifactId}-ass-volume
docker volume rm -f ${rootArtifactId}-acs-volume
docker volume rm -f ${rootArtifactId}-db-volume
docker volume rm -f ${rootArtifactId}-ass-volume
EXIT /B 0

View File

@@ -1,7 +1,7 @@
#set( $symbol_dollar = '$' )
#!/bin/sh
export COMPOSE_FILE_PATH=${symbol_dollar}{PWD}/target/classes/docker/docker-compose.yml
export COMPOSE_FILE_PATH="${symbol_dollar}{PWD}/target/classes/docker/docker-compose.yml"
if [ -z "${symbol_dollar}{M2_HOME}" ]; then
export MVN_EXEC="mvn"
@@ -13,30 +13,35 @@ start() {
docker volume create ${rootArtifactId}-acs-volume
docker volume create ${rootArtifactId}-db-volume
docker volume create ${rootArtifactId}-ass-volume
docker-compose -f ${symbol_dollar}COMPOSE_FILE_PATH up --build -d
docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" up --build -d
}
down() {
docker-compose -f ${symbol_dollar}COMPOSE_FILE_PATH down
if [ -f "${symbol_dollar}COMPOSE_FILE_PATH" ]; then
docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" down
fi
}
purge() {
docker volume rm ${rootArtifactId}-acs-volume
docker volume rm ${rootArtifactId}-db-volume
docker volume rm ${rootArtifactId}-ass-volume
docker volume rm -f ${rootArtifactId}-acs-volume
docker volume rm -f ${rootArtifactId}-db-volume
docker volume rm -f ${rootArtifactId}-ass-volume
}
build() {
docker rmi alfresco-content-services-${rootArtifactId}:development
${symbol_dollar}MVN_EXEC clean install -DskipTests=true
${symbol_dollar}MVN_EXEC clean package
}
tail() {
docker-compose -f ${symbol_dollar}COMPOSE_FILE_PATH logs -f
docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" logs -f
}
tail_all() {
docker-compose -f ${symbol_dollar}COMPOSE_FILE_PATH logs --tail="all"
docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" logs --tail="all"
}
prepare_test() {
${symbol_dollar}MVN_EXEC verify -DskipTests=true
}
test() {
@@ -50,6 +55,13 @@ case "${symbol_dollar}1" in
start
tail
;;
build_start_it_supported)
down
build
prepare_test
start
tail
;;
start)
start
tail
@@ -67,6 +79,7 @@ case "${symbol_dollar}1" in
build_test)
down
build
prepare_test
start
test
tail_all
@@ -76,5 +89,5 @@ case "${symbol_dollar}1" in
test
;;
*)
echo "Usage: ${symbol_dollar}0 {build_start|start|stop|purge|tail|build_test|test}"
echo "Usage: ${symbol_dollar}0 {build_start|build_start_it_supported|start|stop|purge|tail|build_test|test}"
esac

View File

@@ -35,6 +35,11 @@
<source>src/main/assembly/file-mapping.properties</source>
<filtered>false</filtered>
</file>
<!-- Add module-specific log4j.properties configuration at top level in the AMP -->
<file>
<source>src/main/resources/alfresco/module/${project.artifactId}/log4j.properties</source>
<filtered>false</filtered>
</file>
</files>
<fileSets>

View File

@@ -1,6 +1,9 @@
FROM ${docker.acs.image}:${alfresco.platform.version}
ARG TOMCAT_DIR=/usr/local/tomcat
ARG USERNAME=${alfresco.platform.docker.user}
USER root
# Copy Dockerfile to avoid an error if no JARs exist
COPY Dockerfile extensions/*.jar $TOMCAT_DIR/webapps/alfresco/WEB-INF/lib/
@@ -15,4 +18,6 @@ COPY dev-log4j.properties $TOMCAT_DIR/shared/classes/alfresco/extension
COPY disable-webscript-caching-context.xml $TOMCAT_DIR/shared/classes/alfresco/extension
# Copy Dockerfile to avoid an error if no license file exists
COPY Dockerfile license/*.* $TOMCAT_DIR/webapps/alfresco/WEB-INF/classes/alfresco/extension/license/
COPY Dockerfile license/*.* $TOMCAT_DIR/webapps/alfresco/WEB-INF/classes/alfresco/extension/license/
USER ${USERNAME}

View File

@@ -62,7 +62,8 @@ db.driver=org.postgresql.Driver
index.subsystem.name=solr6
solr.host=${rootArtifactId}-ass
solr.port=8983
solr.secureComms=none
solr.secureComms=secret
solr.sharedSecret=secret
db.username=alfresco
db.password=alfresco
@@ -76,4 +77,12 @@ db.url=jdbc:postgresql://${rootArtifactId}-postgres:5432/alfresco
cifs.enabled=false
ftp.enabled=false
csrf.filter.enabled=false
csrf.filter.enabled=false
# Embedded broker without persistence
messaging.broker.url=vm://localhost?broker.persistent=false
# Disable ATS
transform.service.enabled=false
local.transform.service.enabled=false
legacy.transform.service.enabled=false

View File

@@ -14,7 +14,7 @@ log4j.appender.Console.layout.ConversionPattern=%d{ISO8601} %x %-5p [%c{3}] [%t]
#log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c] %m%n
log4j.appender.File=org.apache.log4j.DailyRollingFileAppender
log4j.appender.File.File=alfresco.log
log4j.appender.File.File=logs/alfresco.log
log4j.appender.File.Append=true
log4j.appender.File.DatePattern='.'yyyy-MM-dd
log4j.appender.File.layout=org.apache.log4j.PatternLayout

View File

@@ -36,5 +36,10 @@
</props>
</list>
</property>
<property name="labels">
<list>
<value>alfresco/module/${project.artifactId}/messages/workflow-messages</value>
</list>
</property>
</bean>
</beans>

View File

@@ -0,0 +1 @@
# Add here module-specific custom log4j.properties configuration

View File

@@ -0,0 +1,5 @@
#
# Activiti My Process Workflow
#
my-process.workflow.title=My Process
my-process.workflow.description=This is my custom process

View File

@@ -1,20 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn"
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"
xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema"
expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
<definitions
xmlns:activiti="http://activiti.org/bpmn"
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" typeLanguage="http://www.w3.org/2001/XMLSchema"
expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
<process id="my-process">
<startEvent id="start" />
<sequenceFlow id="flow1" sourceRef="start" targetRef="someTask" />
<userTask id="someTask" name="Activiti is awesome!" />
<sequenceFlow id="flow2" sourceRef="someTask" targetRef="end" />
<startEvent id="start" activiti:formKey="wf:submitAdhocTask"/>
<sequenceFlow id="flow1" sourceRef="start" targetRef="someTask"/>
<endEvent id="end" />
<userTask id="someTask" name="Activiti is awesome!" activiti:formKey="wf:adhocTask">
<humanPerformer>
<resourceAssignmentExpression>
<formalExpression>${bpm_assignee.properties.userName}</formalExpression>
</resourceAssignmentExpression>
</humanPerformer>
</userTask>
<sequenceFlow id="flow2" sourceRef="someTask" targetRef="end"/>
<endEvent id="end"/>
</process>

View File

@@ -0,0 +1,191 @@
#set($symbol_pound='#')
#set($symbol_dollar='$')
#set($symbol_escape='\' )
/**
* Copyright (C) 2017 Alfresco Software Limited.
* <p/>
* This file is part of the Alfresco SDK project.
* <p/>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* 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}.platformsample;
import org.alfresco.model.ContentModel;
import org.alfresco.rad.test.AbstractAlfrescoIT;
import org.alfresco.rad.test.AlfrescoTestRunner;
import org.alfresco.repo.content.MimetypeMap;
import org.alfresco.repo.nodelocator.CompanyHomeNodeLocator;
import org.alfresco.service.cmr.repository.ChildAssociationRef;
import org.alfresco.service.cmr.repository.ContentReader;
import org.alfresco.service.cmr.repository.ContentWriter;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName;
import org.apache.commons.io.IOUtils;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.io.IOException;
import java.io.InputStream;
import java.io.Serializable;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
/**
* Integration Test sample for a custom content model.
* See {@link DemoComponentIT} for more info.
*
* @author martin.bergljung@alfresco.com
* @since 3.0
*/
@RunWith(value = AlfrescoTestRunner.class)
public class CustomContentModelIT extends AbstractAlfrescoIT {
private static final String ACME_MODEL_NS = "{http://www.acme.org/model/content/1.0}";
private static final String ACME_MODEL_LOCALNAME = "contentModel";
private static final String ACME_DOCUMENT_TYPE = "document";
private static final String ACME_SECURITY_CLASSIFIED_ASPECT = "securityClassified";
private static final String ACME_DOCUMENT_ID_PROPNAME = "documentId";
@Test
public void testCustomContentModelPresence() {
Collection<QName> allContentModels = getServiceRegistry().getDictionaryService().getAllModels();
QName customContentModelQName = createQName(ACME_MODEL_LOCALNAME);
assertTrue("Custom content model " + customContentModelQName.toString() +
" is not present", allContentModels.contains(customContentModelQName));
}
@Test
public void testCreateAcmeDocument() {
// Create the ACME Doc file
QName type = createQName(ACME_DOCUMENT_TYPE);
String textContent = "Hello World!";
String documentId = "DOC001";
Map<QName, Serializable> nodeProperties = new HashMap<>();
nodeProperties.put(createQName(ACME_DOCUMENT_ID_PROPNAME), documentId);
nodeProperties.put(createQName("securityClassification"), "Company Confidential");
NodeRef nodeRef = createNode("AcmeFile.txt", type, nodeProperties);
addFileContent(nodeRef, textContent);
// Add an Aspect to the file (could be a custom aspect...)
Map<QName, Serializable> aspectProperties = new HashMap<>();
aspectProperties.put(ContentModel.PROP_TITLE, "Some Doc Title");
aspectProperties.put(ContentModel.PROP_DESCRIPTION, "Some Doc Description");
getServiceRegistry().getNodeService().addAspect(nodeRef, ContentModel.ASPECT_TITLED, aspectProperties);
// Assert that the file is created correctly
assertEquals("Invalid type", type, getServiceRegistry().getNodeService().getType(nodeRef));
assertTrue("Missing security aspect",
getServiceRegistry().getNodeService().hasAspect(nodeRef, createQName(ACME_SECURITY_CLASSIFIED_ASPECT)));
assertTrue("Missing titled aspect",
getServiceRegistry().getNodeService().hasAspect(nodeRef, ContentModel.ASPECT_TITLED));
assertEquals("Invalid property value", documentId,
getServiceRegistry().getNodeService().getProperty(nodeRef, createQName(ACME_DOCUMENT_ID_PROPNAME)));
readTextContent(nodeRef).equals(textContent);
// Clean up node
if (nodeRef != null) {
getServiceRegistry().getNodeService().deleteNode(nodeRef);
}
}
/**
* ==================== Helper Methods ============================================================================
*/
/**
* Create a QName for the ACME content model
*
* @param localname the local content model name without namespace specified
* @return the full ACME QName including namespace
*/
private QName createQName(String localname) {
return QName.createQName(ACME_MODEL_NS + localname);
}
/**
* Create a new node, such as a file or a folder, with passed in type and properties
*
* @param name the name of the file or folder
* @param type the content model type
* @param properties the properties from the content model
* @return the Node Reference for the newly created node
*/
private NodeRef createNode(String name, QName type, Map<QName, Serializable> properties) {
NodeRef parentFolderNodeRef = getCompanyHomeNodeRef();
QName associationType = ContentModel.ASSOC_CONTAINS;
QName associationQName = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI,
QName.createValidLocalName(name));
properties.put(ContentModel.PROP_NAME, name);
ChildAssociationRef parentChildAssocRef = getServiceRegistry().getNodeService().createNode(
parentFolderNodeRef, associationType, associationQName, type, properties);
return parentChildAssocRef.getChildRef();
}
/**
* Add some text content to a file node
*
* @param nodeRef the node reference for the file that should have some text content added to it
* @param fileContent the text content
*/
private void addFileContent(NodeRef nodeRef, String fileContent) {
boolean updateContentPropertyAutomatically = true;
ContentWriter writer = getServiceRegistry().getContentService().getWriter(nodeRef, ContentModel.PROP_CONTENT,
updateContentPropertyAutomatically);
writer.setMimetype(MimetypeMap.MIMETYPE_TEXT_PLAIN);
writer.setEncoding("UTF-8");
writer.putContent(fileContent);
}
/**
* Read text content for passed in file Node Reference
*
* @param nodeRef the node reference for a file containing text
* @return the text content
*/
private String readTextContent(NodeRef nodeRef) {
ContentReader reader = getServiceRegistry().getContentService().getReader(nodeRef, ContentModel.PROP_CONTENT);
if (reader == null) {
return ""; // Maybe it was a folder after all
}
InputStream is = reader.getContentInputStream();
try {
return IOUtils.toString(is, "UTF-8");
} catch (IOException ioe) {
throw new RuntimeException(ioe);
} finally {
if (is != null) {
try {
is.close();
} catch (Throwable e) {
e.printStackTrace();
}
}
}
}
/**
* Get the node reference for the /Company Home top folder in Alfresco.
* Use the standard node locator service.
*
* @return the node reference for /Company Home
*/
private NodeRef getCompanyHomeNodeRef() {
return getServiceRegistry().getNodeLocatorService().getNode(CompanyHomeNodeLocator.NAME, null, null);
}
}

View File

@@ -0,0 +1,67 @@
#set($symbol_pound='#')
#set($symbol_dollar='$')
#set($symbol_escape='\' )
/**
* Copyright (C) 2017 Alfresco Software Limited.
* <p/>
* This file is part of the Alfresco SDK project.
* <p/>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* 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}.platformsample;
import org.alfresco.rad.test.AbstractAlfrescoIT;
import org.alfresco.rad.test.AlfrescoTestRunner;
import org.alfresco.rad.test.Remote;
import org.alfresco.model.ContentModel;
import org.alfresco.service.cmr.repository.NodeRef;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
/**
* Integration Test of the DemoComponent using the Alfresco Test Runner.
* The Alfresco Test Runner (i.e. AlfrescoTestRunner.class) will check if it is running in an Alfresco instance,
* if so it will execute normally locally. On the other hand, if it detects no
* Alfresco Spring context, then it will make a call to a custom Web Script that
* will execute this test in the running container remotely. The remote location is
* determined by the @Remote config.
*
* @author martin.bergljung@alfresco.com
* @since 3.0
*/
@RunWith(value = AlfrescoTestRunner.class)
public class DemoComponentIT extends AbstractAlfrescoIT {
@Test
public void testGetCompanyHome() {
DemoComponent demoComponent = (DemoComponent) getApplicationContext().getBean("${package}.DemoComponent");
NodeRef companyHome = demoComponent.getCompanyHome();
assertNotNull(companyHome);
String companyHomePath = getServiceRegistry().getNodeService().getPath(companyHome).toPrefixString(getServiceRegistry().getNamespaceService());
assertNotNull(companyHomePath);
assertEquals("/app:company_home", companyHomePath);
}
@Test
public void testChildNodesCount() {
DemoComponent demoComponent = (DemoComponent) getApplicationContext().getBean("${package}.DemoComponent");
NodeRef companyHome = demoComponent.getCompanyHome();
int childNodeCount = demoComponent.childNodesCount(companyHome);
assertNotNull(childNodeCount);
// There are 7 folders by default under Company Home
assertEquals(7, childNodeCount);
}
}

View File

@@ -0,0 +1,85 @@
#set($symbol_pound='#')
#set($symbol_dollar='$')
#set($symbol_escape='\' )
/**
* Copyright (C) 2017 Alfresco Software Limited.
* <p/>
* This file is part of the Alfresco SDK project.
* <p/>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* 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}.platformsample;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.auth.AuthScope;
import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.client.CredentialsProvider;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.BasicCredentialsProvider;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.util.EntityUtils;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
/**
* Integration Test (IT) for Hello World web script.
*
* @author martin.bergljung@alfresco.com
* @version 1.0
* @since 3.0
*/
public class HelloWorldWebScriptIT {
private static final String ACS_ENDPOINT_PROP = "acs.endpoint.path";
private static final String ACS_DEFAULT_ENDPOINT = "http://localhost:8080/alfresco";
@Test
public void testWebScriptCall() throws Exception {
String webscriptURL = getPlatformEndpoint() + "/service/sample/helloworld";
String expectedResponse = "Message: 'Hello from JS!' 'HelloFromJava'";
// Login credentials for Alfresco Repo
CredentialsProvider provider = new BasicCredentialsProvider();
UsernamePasswordCredentials credentials = new UsernamePasswordCredentials("admin", "admin");
provider.setCredentials(AuthScope.ANY, credentials);
// Create HTTP Client with credentials
CloseableHttpClient httpclient = HttpClientBuilder.create()
.setDefaultCredentialsProvider(provider)
.build();
// Execute Web Script call
try {
HttpGet httpget = new HttpGet(webscriptURL);
HttpResponse httpResponse = httpclient.execute(httpget);
assertEquals("Incorrect HTTP Response Status",
HttpStatus.SC_OK, httpResponse.getStatusLine().getStatusCode());
HttpEntity entity = httpResponse.getEntity();
assertNotNull("Response from Web Script is null", entity);
assertEquals("Incorrect Web Script Response", expectedResponse, EntityUtils.toString(entity));
} finally {
httpclient.close();
}
}
private String getPlatformEndpoint() {
final String platformEndpoint = System.getProperty(ACS_ENDPOINT_PROP);
return StringUtils.isNotBlank(platformEndpoint) ? platformEndpoint : ACS_DEFAULT_ENDPOINT;
}
}

View File

@@ -14,7 +14,7 @@
<parent>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-sdk-aggregator</artifactId>
<version>4.0.0-beta-1</version>
<version>4.6.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
@@ -51,6 +51,7 @@
<delimiters>
<delimiter>@@</delimiter>
</delimiters>
<addDefaultExcludes>false</addDefaultExcludes>
</configuration>
</plugin>
</plugins>

View File

@@ -80,6 +80,7 @@
<fileSet encoding="UTF-8" filtered="true">
<directory></directory>
<includes>
<include>.gitignore</include>
<include>run.sh</include>
<include>run.bat</include>
<include>README.md</include>

View File

@@ -0,0 +1,38 @@
**.log*
# Maven
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
.mvn/wrapper/maven-wrapper.jar
# Eclipse
.metadata
.project
.classpath
bin/
tmp/
*.tmp
.settings/
.loadpath
.recommenders
# IntelliJ IDEA
**.idea
**.iml
# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
# macOS
*.DS_Store

View File

@@ -1,6 +1,6 @@
# Alfresco Share JAR Module - SDK 4.0
# Alfresco Share JAR Module - SDK 4.5
This is a Share project for Alfresco SDK 4.0.
This is a Share project for Alfresco SDK 4.5.
Run with `./run.sh build_start` or `./run.bat build_start` and verify that it
@@ -20,9 +20,6 @@ All the services of the project are now run as docker containers. The run script
* `tail`. Tail the logs of all the containers.
* `reload_share`. Build the Share module, recreate the Share docker image and restart the Share container.
* `reload_acs`. Build the ACS module, recreate the ACS docker image and restart the ACS container.
* `build_test`. Build the whole project, recreate the Share docker image, start the dockerised environment, execute the integration tests from the
`integration-tests` module and stop the environment.
* `test`. Execute the integration tests (the environment must be already started).
# Few things to notice

View File

@@ -7,60 +7,70 @@ services:
dockerfile: ./Dockerfile
context: ../../../target
environment:
CATALINA_OPTS: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8888"
REPO_HOST: ${rootArtifactId}-acs
REPO_PORT: 8080
CATALINA_OPTS: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=0.0.0.0:8888"
REPO_HOST: ${symbol_dollar}{acs.host}
REPO_PORT: ${symbol_dollar}{acs.port}
ports:
- "${symbol_dollar}{share.port}:8080"
- "${symbol_dollar}{share.debug.port}:8888"
${rootArtifactId}-acs:
image: ${symbol_dollar}{docker.acs.image}:${symbol_dollar}{alfresco.platform.version}
environment:
JAVA_OPTS: "
-Ddb.driver=org.postgresql.Driver
-Ddb.username=alfresco
-Ddb.password=alfresco
-Ddb.url=jdbc:postgresql://${rootArtifactId}-postgres:5432/alfresco
-Dsolr.host=${rootArtifactId}-ass
-Dsolr.port=8983
-Dsolr.secureComms=none
-Dsolr.base.url=/solr
-Dindex.subsystem.name=solr6
-Dcsrf.filter.enabled=false
"
ports:
- "${symbol_dollar}{acs.port}:8080"
volumes:
- ${rootArtifactId}-acs-volume:/usr/local/tomcat/alf_data
depends_on:
- ${rootArtifactId}-postgres
${rootArtifactId}-postgres:
image: postgres:9.6
environment:
POSTGRES_DB: alfresco
POSTGRES_USER: alfresco
POSTGRES_PASSWORD: alfresco
ports:
- "${symbol_dollar}{postgres.port}:5432"
volumes:
- ${rootArtifactId}-db-volume:/var/lib/postgresql/data
${rootArtifactId}-ass:
image: alfresco/alfresco-search-services:1.2.0
environment:
SOLR_ALFRESCO_HOST: ${rootArtifactId}-acs
SOLR_ALFRESCO_PORT: 8080
SOLR_SOLR_HOST: ${rootArtifactId}-ass
SOLR_SOLR_PORT: 8983
SOLR_CREATE_ALFRESCO_DEFAULTS: alfresco,archive
ports:
- "8983:8983"
volumes:
- ${rootArtifactId}-ass-volume:/opt/alfresco-search-services/contentstore
- ${rootArtifactId}-ass-volume:/opt/alfresco-search-services/data
volumes:
${rootArtifactId}-acs-volume:
external: true
${rootArtifactId}-db-volume:
external: true
${rootArtifactId}-ass-volume:
external: true
# Optional
# ${rootArtifactId}-acs:
# image: ${symbol_dollar}{docker.acs.image}:${symbol_dollar}{alfresco.platform.version}
# environment:
# JAVA_OPTS: "
# -Ddb.driver=org.postgresql.Driver
# -Ddb.username=alfresco
# -Ddb.password=alfresco
# -Ddb.url=jdbc:postgresql://${rootArtifactId}-postgres:5432/alfresco
# -Dsolr.host=${rootArtifactId}-ass
# -Dsolr.port=8983
# -Dsolr.secureComms=secret
# -Dsolr.sharedSecret=secret
# -Dsolr.base.url=/solr
# -Dindex.subsystem.name=solr6
# -Dcsrf.filter.enabled=false
# -Dmessaging.broker.url=\"vm://localhost?broker.persistent=false\"
# -Dtransform.service.enabled=false
# -Dlocal.transform.service.enabled=false
# -Dlegacy.transform.service.enabled=false
# ${symbol_dollar}{keystore.settings}
# "
# ports:
# - "${symbol_dollar}{acs.port}:8080"
# volumes:
# - ${rootArtifactId}-acs-volume:/usr/local/tomcat/alf_data
# depends_on:
# - ${rootArtifactId}-postgres
# ${rootArtifactId}-postgres:
# image: postgres:9.6
# environment:
# POSTGRES_DB: alfresco
# POSTGRES_USER: alfresco
# POSTGRES_PASSWORD: alfresco
# command: postgres -c max_connections=300 -c log_min_messages=LOG
# ports:
# - "${symbol_dollar}{postgres.port}:5432"
# volumes:
# - ${rootArtifactId}-db-volume:/var/lib/postgresql/data
# ${rootArtifactId}-ass:
# image: alfresco/alfresco-search-services:2.0.3
# environment:
# SOLR_ALFRESCO_HOST: ${rootArtifactId}-acs
# SOLR_ALFRESCO_PORT: 8080
# SOLR_SOLR_HOST: ${rootArtifactId}-ass
# SOLR_SOLR_PORT: 8983
# SOLR_CREATE_ALFRESCO_DEFAULTS: alfresco,archive
# ALFRESCO_SECURE_COMMS: "secret"
# JAVA_TOOL_OPTIONS: "-Dalfresco.secureComms.secret=secret"
# ports:
# - "8983:8983"
# volumes:
# - ${rootArtifactId}-ass-volume:/opt/alfresco-search-services/contentstore
# - ${rootArtifactId}-ass-volume:/opt/alfresco-search-services/data
#volumes:
# ${rootArtifactId}-acs-volume:
# external: true
# ${rootArtifactId}-db-volume:
# external: true
# ${rootArtifactId}-ass-volume:
# external: true

View File

@@ -19,18 +19,18 @@
<alfresco.groupId>org.alfresco</alfresco.groupId>
<alfresco.bomDependencyArtifactId>@@alfresco.bomDependency.artifactId@@</alfresco.bomDependencyArtifactId>
<alfresco.platform.version>@@alfresco.platform.version@@</alfresco.platform.version>
<alfresco.platform.docker.user>@@alfresco.platform.docker.user@@</alfresco.platform.docker.user>
<alfresco.share.version>@@alfresco.share.version@@</alfresco.share.version>
<alfresco.share.docker.version>@@alfresco.share.docker.version@@</alfresco.share.docker.version>
<!-- Docker images -->
<docker.acs.image>@@alfresco.platform.docker.image@@</docker.acs.image>
<docker.share.image>@@alfresco.share.docker.image@@</docker.share.image>
<!-- JRebel Hot reloading of classpath stuff and web resource stuff -->
<jrebel.version>1.1.6</jrebel.version>
<keystore.settings>@@keystore.settings@@</keystore.settings>
<!-- Compile with Java 8, default is 5 -->
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<!-- JRebel Hot reloading of classpath stuff and web resource stuff -->
<jrebel.version>1.1.8</jrebel.version>
<!-- Environment configuration properties -->
<share.port>8180</share.port>
@@ -96,12 +96,47 @@
<build>
<plugins>
<!--
Build an AMP if 3rd party libs are needed by the extensions
JARs are the default artifact produced in your modules, if you want to build an amp for each module
you have to enable this plugin and inspect the src/main/assembly.xml file if you want to customize
the layout of your AMP. The end result is that Maven will produce both a JAR file and an AMP with your
module.
-->
<!--
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>build-amp-file</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptor>src/main/assembly/amp.xml</descriptor>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.alfresco.maven.plugin</groupId>
<artifactId>alfresco-maven-plugin</artifactId>
<version>${alfresco.sdk.version}</version>
</dependency>
</dependencies>
</plugin>
-->
<!-- Filter the test resource files in the AIO parent project, and do property substitutions.
We need this config so this is done before the Alfresco Maven Plugin 'run' is executed. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.1</version>
<version>3.1.0</version>
<configuration>
<encoding>UTF-8</encoding>
<nonFilteredFileExtensions> <!-- jpg, jpeg, gif, bmp and png are added automatically -->
@@ -164,83 +199,99 @@
</resources>
</configuration>
</execution>
<execution>
<id>copy-share-extension</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/extensions</outputDirectory>
<resources>
<resource>
<directory>target</directory>
<includes>
<include>${project.build.finalName}.jar</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<!-- Compress JavaScript files and store as *-min.js -->
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
<version>1.5.1</version>
<executions>
<!-- Compress the JS files under the assembly folder -->
<execution>
<id>compress-assembly</id>
<goals>
<goal>compress</goal>
</goals>
<configuration>
<sourceDirectory>${project.basedir}/src/main/assembly/web</sourceDirectory>
<outputDirectory>${project.basedir}/src/main/assembly/web</outputDirectory>
<excludes>
<exclude>**/webscripts/**</exclude>
<exclude>**/site-webscripts/**</exclude>
<exclude>**/META-INF/**</exclude>
<exclude>**/*.lib.js</exclude>
<exclude>**/*.css</exclude>
<exclude>**/*-min.js</exclude>
<exclude>**/*-min.css</exclude>
</excludes>
<force>true</force>
<jswarn>false</jswarn>
</configuration>
</execution>
<!-- Compress the JS files under the resources folder -->
<execution>
<id>compress-resources</id>
<goals>
<goal>compress</goal>
</goals>
<configuration>
<excludes>
<exclude>**/webscripts/**</exclude>
<exclude>**/site-webscripts/**</exclude>
<exclude>**/*.lib.js</exclude>
<exclude>**/*.css</exclude>
<exclude>**/*-min.js</exclude>
<exclude>**/*-min.css</exclude>
</excludes>
<force>true</force>
<jswarn>false</jswarn>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.0.2</version>
<version>3.1.1</version>
<executions>
<!-- Copy the share extension -->
<!-- Collect extensions (JARs or AMPs) declared in this module to be deployed to docker -->
<execution>
<id>copy-repo-extension</id>
<phase>pre-integration-test</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${version}</version>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/extensions</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
<!-- Copy other dependencies (JARs or AMPs) declared in the share module -->
<execution>
<id>copy-third-party-dependencies</id>
<phase>pre-integration-test</phase>
<id>collect-extensions</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/extensions</outputDirectory>
<includeScope>runtime</includeScope>
<!-- IMPORTANT: if using amp dependencies only, add <includeTypes>amp</includeTypes> -->
</configuration>
</execution>
</executions>
</plugin>
<!--
Build an AMP if 3rd party libs are needed by the extensions
JARs are the default artifact produced in your modules, if you want to build an amp for each module
you have to enable this plugin and inspect the src/main/assembly.xml file if you want to customize
the layout of your AMP. The end result is that Maven will produce both a JAR file and an AMP with your
module.
-->
<!--
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>build-amp-file</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptor>src/main/assembly/amp.xml</descriptor>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.alfresco.maven.plugin</groupId>
<artifactId>alfresco-maven-plugin</artifactId>
<version>${alfresco.sdk.version}</version>
</dependency>
</dependencies>
</plugin>
-->
<!-- Hot reloading with JRebel -->
<plugin>
<groupId>org.zeroturnaround</groupId>
@@ -294,6 +345,64 @@
</testResources>
</build>
<profiles>
<profile>
<id>java8</id>
<activation>
<jdk>[1.8,11.0)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>java11</id>
<activation>
<jdk>[11.0,17)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<release>11</release>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>java17</id>
<activation>
<jdk>[17,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<release>17</release>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<!--
Alfresco Maven Repositories
-->
@@ -315,6 +424,10 @@
<id>alfresco-private-repository</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/private</url>
</repository>
<repository>
<id>alfresco-internal</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/internal</url>
</repository>
</repositories>
<pluginRepositories>
@@ -331,4 +444,4 @@
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>
</project>

View File

@@ -47,20 +47,7 @@ IF %1==reload_share (
CALL :tail
GOTO END
)
IF %1==build_test (
CALL :down
CALL :build
CALL :start
CALL :test
CALL :tail_all
CALL :down
GOTO END
)
IF %1==test (
CALL :test
GOTO END
)
echo "Usage: %0 {build_start|start|stop|purge|tail|reload_share|build_test|test}"
echo "Usage: %0 {build_start|start|stop|purge|tail|reload_share}"
:END
EXIT /B %ERRORLEVEL%
@@ -74,18 +61,17 @@ EXIT /B 0
docker-compose -f "%COMPOSE_FILE_PATH%" up --build -d ${rootArtifactId}-share
EXIT /B 0
:down
docker-compose -f "%COMPOSE_FILE_PATH%" down
if exist "%COMPOSE_FILE_PATH%" (
docker-compose -f "%COMPOSE_FILE_PATH%" down
)
EXIT /B 0
:build
docker rmi alfresco-content-services-${rootArtifactId}:development
docker rmi alfresco-share-${rootArtifactId}:development
call %MVN_EXEC% clean install -DskipTests
call %MVN_EXEC% clean package
EXIT /B 0
:build_share
docker-compose -f "%COMPOSE_FILE_PATH%" kill ${rootArtifactId}-share
docker-compose -f "%COMPOSE_FILE_PATH%" rm -f ${rootArtifactId}-share
docker rmi alfresco-share-${rootArtifactId}:development
call %MVN_EXEC% clean install -DskipTests
call %MVN_EXEC% clean package
EXIT /B 0
:tail
docker-compose -f "%COMPOSE_FILE_PATH%" logs -f
@@ -93,11 +79,8 @@ EXIT /B 0
:tail_all
docker-compose -f "%COMPOSE_FILE_PATH%" logs --tail="all"
EXIT /B 0
:test
call %MVN_EXEC% verify
EXIT /B 0
:purge
docker volume rm ${rootArtifactId}-acs-volume
docker volume rm ${rootArtifactId}-db-volume
docker volume rm ${rootArtifactId}-ass-volume
docker volume rm -f ${rootArtifactId}-acs-volume
docker volume rm -f ${rootArtifactId}-db-volume
docker volume rm -f ${rootArtifactId}-ass-volume
EXIT /B 0

View File

@@ -1,7 +1,7 @@
#set( $symbol_dollar = '$' )
#!/bin/sh
export COMPOSE_FILE_PATH=${symbol_dollar}{PWD}/target/classes/docker/docker-compose.yml
export COMPOSE_FILE_PATH="${symbol_dollar}{PWD}/target/classes/docker/docker-compose.yml"
if [ -z "${symbol_dollar}{M2_HOME}" ]; then
export MVN_EXEC="mvn"
@@ -13,45 +13,41 @@ start() {
docker volume create ${rootArtifactId}-acs-volume
docker volume create ${rootArtifactId}-db-volume
docker volume create ${rootArtifactId}-ass-volume
docker-compose -f ${symbol_dollar}COMPOSE_FILE_PATH up --build -d
docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" up --build -d
}
start_share() {
docker-compose -f ${symbol_dollar}COMPOSE_FILE_PATH up --build -d ${rootArtifactId}-share
docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" up --build -d ${rootArtifactId}-share
}
down() {
docker-compose -f ${symbol_dollar}COMPOSE_FILE_PATH down
if [ -f "${symbol_dollar}COMPOSE_FILE_PATH" ]; then
docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" down
fi
}
purge() {
docker volume rm ${rootArtifactId}-acs-volume
docker volume rm ${rootArtifactId}-db-volume
docker volume rm ${rootArtifactId}-ass-volume
docker volume rm -f ${rootArtifactId}-acs-volume
docker volume rm -f ${rootArtifactId}-db-volume
docker volume rm -f ${rootArtifactId}-ass-volume
}
build() {
docker rmi alfresco-share-${rootArtifactId}:development
${symbol_dollar}MVN_EXEC clean install -DskipTests=true
${symbol_dollar}MVN_EXEC clean package
}
build_share() {
docker-compose -f ${symbol_dollar}COMPOSE_FILE_PATH kill ${rootArtifactId}-share
yes | docker-compose -f ${symbol_dollar}COMPOSE_FILE_PATH rm -f ${rootArtifactId}-share
docker rmi alfresco-share-${rootArtifactId}:development
${symbol_dollar}MVN_EXEC clean install -DskipTests=true
docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" kill ${rootArtifactId}-share
yes | docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" rm -f ${rootArtifactId}-share
${symbol_dollar}MVN_EXEC clean package
}
tail() {
docker-compose -f ${symbol_dollar}COMPOSE_FILE_PATH logs -f
docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" logs -f
}
tail_all() {
docker-compose -f ${symbol_dollar}COMPOSE_FILE_PATH logs --tail="all"
}
test() {
${symbol_dollar}MVN_EXEC verify
docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" logs --tail="all"
}
case "${symbol_dollar}1" in
@@ -80,17 +76,6 @@ case "${symbol_dollar}1" in
start_share
tail
;;
build_test)
down
build
start
test
tail_all
down
;;
test)
test
;;
*)
echo "Usage: ${symbol_dollar}0 {build_start|start|stop|purge|tail|reload_share|build_test|test}"
echo "Usage: ${symbol_dollar}0 {build_start|start|stop|purge|tail|reload_share}"
esac

View File

@@ -35,6 +35,11 @@
<source>src/main/assembly/file-mapping.properties</source>
<filtered>false</filtered>
</file>
<!-- Add module-specific log4j.properties configuration at top level in the AMP -->
<file>
<source>src/main/resources/alfresco/module/${project.artifactId}/log4j.properties</source>
<filtered>false</filtered>
</file>
</files>
<fileSets>

View File

@@ -1,4 +1,4 @@
FROM ${docker.share.image}:${alfresco.share.version}
FROM ${docker.share.image}:${alfresco.share.docker.version}
ARG TOMCAT_DIR=/usr/local/tomcat
@@ -13,4 +13,4 @@ RUN java -jar $TOMCAT_DIR/alfresco-mmt/alfresco-mmt*.jar install \
COPY share-config-custom.xml $TOMCAT_DIR/shared/classes/alfresco/web-extension
COPY log4j.properties $TOMCAT_DIR/webapps/share/WEB-INF/classes
COPY hotswap-agent.properties $TOMCAT_DIR/webapps/share/WEB-INF/classes
COPY hotswap-agent.properties $TOMCAT_DIR/webapps/share/WEB-INF/classes

View File

@@ -39,7 +39,7 @@
<!--
Disable CSRF completely for now
It seems Share has issues on 4.2.x with the embedded tomcat and CSRFPolicy
It seems Share has issues on 4.x with the embedded tomcat and CSRFPolicy
-->
<config evaluator="string-compare" condition="CSRFPolicy" replace="true">
<filter/>

View File

@@ -0,0 +1 @@
# Add here module-specific custom log4j.properties configuration

View File

@@ -17,7 +17,7 @@
<parent>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-sdk-aggregator</artifactId>
<version>4.0.0-beta-1</version>
<version>4.6.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
@@ -31,7 +31,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -78,6 +78,7 @@
<org.slf4j.simpleLogger.showDateTime>false</org.slf4j.simpleLogger.showDateTime>
<org.slf4j.simpleLogger.showThreadName>false</org.slf4j.simpleLogger.showThreadName>
<org.slf4j.simpleLogger.showLogName>false</org.slf4j.simpleLogger.showLogName>
<projectArtifactId>${project.version}</projectArtifactId>
</systemPropertyVariables>
</configuration>
</plugin>

View File

@@ -17,7 +17,7 @@ public class AllInOneArchetypeIT extends AbstractArchetypeIT {
return ArchetypeProperties.builder()
.withArchetypeGroupId("org.alfresco.maven.archetype")
.withArchetypeArtifactId("alfresco-allinone-archetype")
.withArchetypeVersion("4.0.0-SNAPSHOT")
.withArchetypeVersion(System.getProperty("projectArtifactId"))
.withProjectGroupId("archetype.it")
.withProjectArtifactId("allinone-test-run")
.withProjectVersion("0.1-SNAPSHOT")

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