Alfresco / alfresco-sdk

The Alfresco In-Process SDK is based on Apache Maven, includes support for rapid and standard development, testing, packaging, versioning and release of your Alfresco integration and extension projects
Apache License 2.0
185 stars 113 forks source link

Sdk 4.0 build and docker fixes #547

Closed panderspl closed 5 years ago

panderspl commented 5 years ago

This change is: 1) Modifying the way artifacts are collected for deployment in docker for both integration testing and normal run. 1.1) The artifacts for normal run are now collected in the package phase and there is a documented solution to make them work properly for AMP extensions (or mixed extensions use). 1.2) The artifacts for integration testing are collected via maven dependencies and using scope 'test' minus 'compile' instead of directly listing the artifacts. 2) The run scrips are now using maven package and verify instead of install. And with unit tests enabled.

The above changes are fixing a set of interconnected issues that prevented developing and testing more complex extensions: 1) mvn install with skipped tests was: 1.1) inhibiting unit testing of the code; 1.2) unnecessarily installing modules in development to the local repository - this was necessary due to the way integration tests were being run; 1.3) preventing us from using maven property based versioning for CI environment. 2) Integration tests code was always deployed - even for a normal start. 3) As artifacts for integration tests were listed explicitly, this made very difficult to use additional external libraries in integration tests - especially if those had transitive dependencies. 4) When building AMP modules or using them as dependencies for additional extensions that need to be deployed with the platform, the transitive dependencies of AMP modules (additional libraries) would be also unnecessarily pulled-in and deployed aside from AMPs themselves (which contain those libraries). This was happening both to developed platform/share module as well any AMP from maven repository that had compile or runtime dependency defined in its pom.xml.

This pull request is based on (and contains) changes from pull request Sdk 4.0 modules rename #546: https://github.com/Alfresco/alfresco-sdk/pull/546 See the 6e5445a commit to see the changes which are unique to this PR.

Work has been done on AIO archetype only.

We have been in touch with Ole about this issue but had no chance to fully discuss it with him yet.