From b8377041a53ec53bbed640255b6afc1dc3b0e13c Mon Sep 17 00:00:00 2001 From: alfresco-build Date: Fri, 23 Jun 2017 10:17:52 +0100 Subject: [PATCH 01/10] [maven-release-plugin] prepare for next development iteration --- archetypes/activiti-jar-archetype/pom.xml | 2 +- archetypes/alfresco-allinone-archetype/pom.xml | 2 +- archetypes/alfresco-platform-jar-archetype/pom.xml | 2 +- archetypes/alfresco-share-jar-archetype/pom.xml | 2 +- modules/alfresco-rad/pom.xml | 2 +- plugins/alfresco-maven-plugin/pom.xml | 2 +- pom.xml | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/archetypes/activiti-jar-archetype/pom.xml b/archetypes/activiti-jar-archetype/pom.xml index 56fefd4f..f011168a 100644 --- a/archetypes/activiti-jar-archetype/pom.xml +++ b/archetypes/activiti-jar-archetype/pom.xml @@ -12,7 +12,7 @@ org.alfresco.maven alfresco-sdk-aggregator - 3.0.1 + 3.0.2-SNAPSHOT ../../pom.xml diff --git a/archetypes/alfresco-allinone-archetype/pom.xml b/archetypes/alfresco-allinone-archetype/pom.xml index 1e384825..bf051d62 100644 --- a/archetypes/alfresco-allinone-archetype/pom.xml +++ b/archetypes/alfresco-allinone-archetype/pom.xml @@ -11,7 +11,7 @@ org.alfresco.maven alfresco-sdk-aggregator - 3.0.1 + 3.0.2-SNAPSHOT ../../pom.xml diff --git a/archetypes/alfresco-platform-jar-archetype/pom.xml b/archetypes/alfresco-platform-jar-archetype/pom.xml index cd620e88..6c20d97f 100644 --- a/archetypes/alfresco-platform-jar-archetype/pom.xml +++ b/archetypes/alfresco-platform-jar-archetype/pom.xml @@ -12,7 +12,7 @@ org.alfresco.maven alfresco-sdk-aggregator - 3.0.1 + 3.0.2-SNAPSHOT ../../pom.xml diff --git a/archetypes/alfresco-share-jar-archetype/pom.xml b/archetypes/alfresco-share-jar-archetype/pom.xml index 1931aab1..fef0304c 100644 --- a/archetypes/alfresco-share-jar-archetype/pom.xml +++ b/archetypes/alfresco-share-jar-archetype/pom.xml @@ -14,7 +14,7 @@ org.alfresco.maven alfresco-sdk-aggregator - 3.0.1 + 3.0.2-SNAPSHOT ../../pom.xml diff --git a/modules/alfresco-rad/pom.xml b/modules/alfresco-rad/pom.xml index bcd89f87..2e5ca686 100644 --- a/modules/alfresco-rad/pom.xml +++ b/modules/alfresco-rad/pom.xml @@ -10,7 +10,7 @@ org.alfresco.maven alfresco-sdk-aggregator - 3.0.1 + 3.0.2-SNAPSHOT ../../pom.xml diff --git a/plugins/alfresco-maven-plugin/pom.xml b/plugins/alfresco-maven-plugin/pom.xml index 1c42bc4c..71028939 100644 --- a/plugins/alfresco-maven-plugin/pom.xml +++ b/plugins/alfresco-maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.alfresco.maven alfresco-sdk-aggregator - 3.0.1 + 3.0.2-SNAPSHOT ../../pom.xml diff --git a/pom.xml b/pom.xml index c0eda51a..c3a8f397 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 org.alfresco.maven alfresco-sdk-aggregator - 3.0.1 + 3.0.2-SNAPSHOT Alfresco SDK This aggregator Project builds all modules required for the Alfresco SDK pom @@ -30,7 +30,7 @@ scm:git:${scm.url.base}.git scm:git:${scm.url.base} ${scm.url.base} - alfresco-sdk-aggregator-3.0.1 + alfresco-sdk-aggregator-3.0.0-SNAPSHOT From 012dc70f43752e5289d5a58f5ec15761be220b1b Mon Sep 17 00:00:00 2001 From: Ole Hejlskov Date: Fri, 23 Jun 2017 11:29:07 +0200 Subject: [PATCH 02/10] Update with 3.0.1 release info --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 26df7fdf..9f192f04 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ This project is released under the [Apache License, Version 2.0](http://www.apac ## News +- 2017-06-23: Alfresco SDK 3.0.1 released, [containing a critial 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 - 2016-02-20: SDK 2.2.0 released to Maven Central. Docs for [Community](http://docs.alfresco.com/community/concepts/alfresco-sdk-intro.html), [Enterprise](http://docs.alfresco.com/5.1/concepts/alfresco-sdk-intro.html), [Release notes](https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-sdk-aggregator/latest/github-report.html) - 2015-10-19: SDK 2.1.1 released to Maven Central. Docs for [Community](http://docs.alfresco.com/community/concepts/alfresco-sdk-intro.html), [Enterprise](http://docs.alfresco.com/5.0/concepts/alfresco-sdk-intro.html) From 82b7886a51bbd1fddc85ef1e559772f49973e278 Mon Sep 17 00:00:00 2001 From: "Tom.Vandepoele" Date: Thu, 29 Jun 2017 15:15:54 +0200 Subject: [PATCH 03/10] Feature request: adding support for custom solr config #474 --- .../maven/plugin/AbstractRunMojo.java | 29 +++++++++++++++++++ .../org/alfresco/maven/plugin/RunMojo.java | 1 + 2 files changed, 30 insertions(+) diff --git a/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRunMojo.java b/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRunMojo.java index 187cc9e4..86a99d1c 100644 --- a/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRunMojo.java +++ b/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRunMojo.java @@ -449,6 +449,35 @@ public abstract class AbstractRunMojo extends AbstractMojo { ); } + /** + * Copy custom solr configuration files over, so a + * developer can overwrite any files needed + * + * @throws MojoExecutionException + */ + protected void copySolrCustomConfig() throws MojoExecutionException { + getLog().info("Copying custom Solr config"); + executeMojo( + plugin( + groupId("org.apache.maven.plugins"), + artifactId("maven-resources-plugin"), + version(MAVEN_RESOURCE_PLUGIN_VERSION) + ), + goal("copy-resources"), + configuration( + element(name("outputDirectory"), solrHome), + element(name("overwrite"), "true"), + element(name("resources"), + element(name("resource"), + element(name("directory"), "src/test/resources/solr"), + element(name("filtering"), "true") + ) + ) + ), + execEnv + ); + } + /** * Replace property placeholders in configuration files for the cores, so the * index files can be found for each core when Solr starts up. diff --git a/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/RunMojo.java b/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/RunMojo.java index 62973acd..0f6e1a08 100644 --- a/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/RunMojo.java +++ b/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/RunMojo.java @@ -49,6 +49,7 @@ public class RunMojo extends AbstractRunMojo { if (enableSolr) { unpackSolrConfig(); fixSolrHomePath(); + copySolrCustomConfig(); replaceSolrConfigProperties(); installSolr10InLocalRepo(); } From 228a98c5665baf6be39ca4538cfb292fa6d84796 Mon Sep 17 00:00:00 2001 From: nklomp Date: Sun, 9 Jul 2017 19:05:05 +0200 Subject: [PATCH 04/10] Message of Failure delegates to getMessage() of the throwable which can be null in some cases (Nullpointer for instance) causing the Freemarker template evaluation to fail which in turn hides the real problem in the integration test --- .../webscripts/org/alfresco/rad/test/runtest.get.html.ftl | 2 +- .../webscripts/org/alfresco/rad/test/runtest.get.xml.ftl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/alfresco-rad/src/main/resources/alfresco/extension/templates/webscripts/org/alfresco/rad/test/runtest.get.html.ftl b/modules/alfresco-rad/src/main/resources/alfresco/extension/templates/webscripts/org/alfresco/rad/test/runtest.get.html.ftl index a0021e8b..5fc8b1b6 100644 --- a/modules/alfresco-rad/src/main/resources/alfresco/extension/templates/webscripts/org/alfresco/rad/test/runtest.get.html.ftl +++ b/modules/alfresco-rad/src/main/resources/alfresco/extension/templates/webscripts/org/alfresco/rad/test/runtest.get.html.ftl @@ -25,7 +25,7 @@ <#if failures??> <#list failures as failure>
${failure.getTestHeader()?html}
- +
diff --git a/modules/alfresco-rad/src/main/resources/alfresco/extension/templates/webscripts/org/alfresco/rad/test/runtest.get.xml.ftl b/modules/alfresco-rad/src/main/resources/alfresco/extension/templates/webscripts/org/alfresco/rad/test/runtest.get.xml.ftl index c3e95303..5dce1938 100644 --- a/modules/alfresco-rad/src/main/resources/alfresco/extension/templates/webscripts/org/alfresco/rad/test/runtest.get.xml.ftl +++ b/modules/alfresco-rad/src/main/resources/alfresco/extension/templates/webscripts/org/alfresco/rad/test/runtest.get.xml.ftl @@ -7,7 +7,7 @@ <#list failures as failure> ${failure.getTrace()?html} ${failure.getException()?html} - ${failure.getMessage()?html} + ${failure.getMessage()!""?html} ${failure.getTestHeader()?html} From c25417e7025081727f53fa003c0ba2519a512842 Mon Sep 17 00:00:00 2001 From: Ole Hejlskov Date: Fri, 22 Sep 2017 16:40:51 +0200 Subject: [PATCH 05/10] Deprecate Activiti features. See #481 for more info --- archetypes/activiti-jar-archetype/pom.xml | 4 ++-- .../resources/archetype-resources/pom.xml | 9 +++++-- .../maven/plugin/AbstractRunMojo.java | 17 +++++++++++++ .../org/alfresco/maven/plugin/RunMojo.java | 24 +++++++++++++++++++ 4 files changed, 50 insertions(+), 4 deletions(-) diff --git a/archetypes/activiti-jar-archetype/pom.xml b/archetypes/activiti-jar-archetype/pom.xml index f011168a..9dd38c70 100644 --- a/archetypes/activiti-jar-archetype/pom.xml +++ b/archetypes/activiti-jar-archetype/pom.xml @@ -6,8 +6,8 @@ activiti-jar-archetype maven-archetype - Alfresco SDK - Activiti JAR Archetype - Sample project with full support for lifecycle and rapid development of Activiti JARs + DEPRECATED - UNSUPPORTED - EXPERIMENTAL: Alfresco SDK - Activiti JAR Archetype + DEPRECATED - UNSUPPORTED - EXPERIMENTAL org.alfresco.maven diff --git a/archetypes/activiti-jar-archetype/src/main/resources/archetype-resources/pom.xml b/archetypes/activiti-jar-archetype/src/main/resources/archetype-resources/pom.xml index d9b687f7..dfd3bb44 100644 --- a/archetypes/activiti-jar-archetype/src/main/resources/archetype-resources/pom.xml +++ b/archetypes/activiti-jar-archetype/src/main/resources/archetype-resources/pom.xml @@ -5,10 +5,15 @@ ${groupId} ${artifactId} ${version} - ${artifactId} Activiti Jar Module - SDK 3 - Activiti JAR Module that produces a JAR file with Java extensions such as service task delegates. It also produces an application ZIP with workflow definition, forms etc that can be deployed via /activiti-app - SDK 3 + DEPRECATED - UNSUPPORTED - EXPERIMENTAL ${artifactId} Activiti Jar Module - SDK 3 + DEPRECATED - UNSUPPORTED - EXPERIMENTAL Activiti JAR Module that produces a JAR file with Java extensions such as service task delegates. It also produces an application ZIP with workflow definition, forms etc that can be deployed via /activiti-app - SDK 3 jar + + + + + @@alfresco.sdk.parent.version@@ diff --git a/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRunMojo.java b/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRunMojo.java index 86a99d1c..92171f62 100644 --- a/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRunMojo.java +++ b/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRunMojo.java @@ -186,6 +186,7 @@ public abstract class AbstractRunMojo extends AbstractMojo { protected boolean enableApiExplorer; /** + * Deprecated as of SDK 3.1 * Switch to enable/disable Alfresco Activiti Workflow Engine (activiti-app.war) when running embedded Tomcat. * This contains the Alfresco Activiti webapp, including the workflow engine. * This webapp is also the user interface for people involved in the task and processes @@ -197,6 +198,7 @@ public abstract class AbstractRunMojo extends AbstractMojo { protected boolean enableActivitiApp; /** + * Deprecated as of SDK 3.1 * Switch to enable/disable Alfresco Activiti Admin (activiti-admin.war) when running embedded Tomcat. * This contains the Alfresco Activiti Administrator webapp. You use this to administer and monitor your * Alfresco Activiti engines. @@ -242,6 +244,7 @@ public abstract class AbstractRunMojo extends AbstractMojo { protected List shareModules; /** + * Deprecated as of SDK 3.1 * JARs that should be overlayed/applied to the Activiti App WAR (i.e. activiti-app.war) */ @Parameter(property = "maven.activiti.modules", defaultValue = "") @@ -296,6 +299,9 @@ public abstract class AbstractRunMojo extends AbstractMojo { @Parameter(property = "alfresco.groupId", defaultValue = "org.alfresco") protected String alfrescoGroupId; + /** + * Deprecated as of SDK 3.1 + */ @Parameter(property = "activiti.groupId", defaultValue = "com.activiti") protected String activitiGroupId; @@ -311,9 +317,16 @@ public abstract class AbstractRunMojo extends AbstractMojo { @Parameter(property = "alfresco.api.explorer.artifactId", defaultValue = "api-explorer") protected String alfrescoApiExplorerArtifactId; + /** + * Deprecated as of SDK 3.1 + */ + @Parameter(property = "activiti.app.war.artifactId", defaultValue = "activiti-app") protected String activitiAppWarArtifactId; + /** + * Deprecated as of SDK 3.1 + */ @Parameter(property = "activiti.admin.war.artifactId", defaultValue = "activiti-admin") protected String activitiAdminWarArtifactId; @@ -326,6 +339,9 @@ public abstract class AbstractRunMojo extends AbstractMojo { @Parameter(property = "alfresco.api.explorer.version", defaultValue = "5.2.e") protected String alfrescoApiExplorerVersion; + /** + * Deprecated as of SDK 3.1 + */ @Parameter(property = "activiti.version", defaultValue = "1.5.3") protected String activitiVersion; @@ -1348,6 +1364,7 @@ public abstract class AbstractRunMojo extends AbstractMojo { } if (enableActivitiApp) { + webapps2Deploy.add(createWebAppElement( runnerActivitiAppGroupId, runnerActivitiAppWarArtifactId, runnerActivitiAppVersion, "/activiti-app", null)); diff --git a/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/RunMojo.java b/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/RunMojo.java index 0f6e1a08..83b2c6fc 100644 --- a/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/RunMojo.java +++ b/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/RunMojo.java @@ -46,6 +46,30 @@ public class RunMojo extends AbstractRunMojo { pluginManager ); + if (enableActivitiApp || enableActivitiAdmin) { + getLog().warn("*************************************************************************************************************"); + getLog().warn("*"); + getLog().warn("*"); + getLog().warn("*"); + getLog().warn("*"); + getLog().warn("*"); + getLog().warn("*"); + getLog().warn("*"); + getLog().warn("*"); + getLog().warn("*\tWARNING" ); + getLog().warn("*\tThe Activiti features in SDK 3.x are UNSUPPORTED."); + getLog().warn("*\tIt has been marked for deprecation (SDK 3.1) and will be removed in SDK 4.0."); + getLog().warn("*"); + getLog().warn("*"); + getLog().warn("*"); + getLog().warn("*"); + getLog().warn("*"); + getLog().warn("*"); + getLog().warn("*"); + getLog().warn("*************************************************************************************************************"); + + } + if (enableSolr) { unpackSolrConfig(); fixSolrHomePath(); From 017dfcbff84b59a9cc99631fc4f33f8b2fc7920c Mon Sep 17 00:00:00 2001 From: Marcus Svartmark Date: Thu, 9 Nov 2017 16:32:35 +0100 Subject: [PATCH 06/10] Fix null check to work with assertEqual-failures and exception messages containing reserved xml characters --- .../org/alfresco/rad/test/runtest.get.xml.ftl | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/alfresco-rad/src/main/resources/alfresco/extension/templates/webscripts/org/alfresco/rad/test/runtest.get.xml.ftl b/modules/alfresco-rad/src/main/resources/alfresco/extension/templates/webscripts/org/alfresco/rad/test/runtest.get.xml.ftl index 5dce1938..a3bbda65 100644 --- a/modules/alfresco-rad/src/main/resources/alfresco/extension/templates/webscripts/org/alfresco/rad/test/runtest.get.xml.ftl +++ b/modules/alfresco-rad/src/main/resources/alfresco/extension/templates/webscripts/org/alfresco/rad/test/runtest.get.xml.ftl @@ -1,25 +1,25 @@ - ${test?html} - ${result?html} + ${test?xml} + ${result?xml} <#if failures??> <#list failures as failure> - ${failure.getTrace()?html} - ${failure.getException()?html} - ${failure.getMessage()!""?html} - ${failure.getTestHeader()?html} + ${failure.getTrace()?xml} + ${failure.getException()?xml} + ${failure.getMessage()!?xml} + ${failure.getTestHeader()?xml} - ${failureCount?html} - ${ignoreCount?html} - ${runCount?html} - ${runTime?html} + ${failureCount?xml} + ${ignoreCount?xml} + ${runCount?xml} + ${runTime?xml} <#if throwables??> <#list throwables as throwable> - ${throwable?html} + ${throwable?xml} From 3bced985d64dc26fb1d703a97c61ef577f2a8821 Mon Sep 17 00:00:00 2001 From: Francesco Corti Date: Mon, 4 Jun 2018 10:07:50 +0200 Subject: [PATCH 07/10] Typo in description. Suggested from the Community. (thank you Digicat and Yreg) --- archetypes/alfresco-allinone-archetype/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archetypes/alfresco-allinone-archetype/pom.xml b/archetypes/alfresco-allinone-archetype/pom.xml index bf051d62..896f58e4 100644 --- a/archetypes/alfresco-allinone-archetype/pom.xml +++ b/archetypes/alfresco-allinone-archetype/pom.xml @@ -6,7 +6,7 @@ alfresco-allinone-archetype maven-archetype Alfresco SDK - All-in-One Archetype - Sample multi-module project for All-in-One development on the Alfresco plaftorm. Includes modules for Platform/Repository JAR and Share JAR + Sample multi-module project for All-in-One development on the Alfresco platform. Includes modules for Platform/Repository JAR and Share JAR org.alfresco.maven From dced89eda6a2e9738edb54b7fb4e7f0625ebfa65 Mon Sep 17 00:00:00 2001 From: Gregory Melahn Date: Thu, 13 Sep 2018 16:16:19 -0400 Subject: [PATCH 08/10] Updated the readme to bring it up-to-date. See Issue #396 --- README.md | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 9f192f04..9ffbbfa6 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,12 @@ 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). ## License -This project is released under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html). If you are an Enterprise customer check the [Support](#alfresco-enterprise-customers-and-partners-support) section. +This project is released under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html) license. +If you are an Enterprise customer check the [Support](#alfresco-enterprise-customers-and-partners-support) section. ## News -- 2017-06-23: Alfresco SDK 3.0.1 released, [containing a critial bugfix](https://github.com/Alfresco/alfresco-sdk/issues/461) +- 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 - 2016-02-20: SDK 2.2.0 released to Maven Central. Docs for [Community](http://docs.alfresco.com/community/concepts/alfresco-sdk-intro.html), [Enterprise](http://docs.alfresco.com/5.1/concepts/alfresco-sdk-intro.html), [Release notes](https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-sdk-aggregator/latest/github-report.html) @@ -20,16 +21,15 @@ This project is released under the [Apache License, Version 2.0](http://www.apac ## User Getting Started ### Latest Documentation -To get started with Alfresco SDK 2.2.0 (latest) visit the offical Alfresco Documentation for: - -- [Alfresco Community 5.1 and above](http://docs.alfresco.com/community/concepts/alfresco-sdk-intro.html) -- [Alfresco Enterprise 5.1 and above](http://docs.alfresco.com/5.1/concepts/alfresco-sdk-intro.html) - -#### Previous versions Documentation -- Documentation for [Alfresco SDK 2.1](http://docs.alfresco.com/sdk2.1/concepts/alfresco-sdk-intro.html) (compatible with Alfresco 5.0.d Community and 5.0.1 Enterprise) -- Documentation for [Alfresco SDK 2.0](http://docs.alfresco.com/sdk2.0/concepts/alfresco-sdk-intro.html) (compatible with Alfresco 5.0.c Community and 5.0.0 Enterprise) -- Documentation for [Alfresco SDK 1.1.1](http://docs.alfresco.com/4.2/concepts/dev-extensions-maven-sdk-intro.html) (compatible with Alfresco 4.2) +To get started with **Alfresco SDK 3.0.x** (latest) visit the [Alfresco Documentation](https://docs.alfresco.com/5.2/concepts/sdk-intro.html) +#### Documentation about Previous Versions +| SDK Version | Alfresco Enterprise Version | Alfresco Community Version | Documentation | +| ------------- |:-------------:| :-----:|:-----| +| 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 | @@ -37,19 +37,22 @@ To get started with Alfresco SDK 2.2.0 (latest) visit the offical Alfresco Docum 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/). ## Alfresco Enterprise Customers and Partners Support -If you are an Alfresco Customer please check the [SDK Support status](http://www.alfresco.com/services/subscription/technical-support/product-support-status) for the version you are using and the [Compatibily Matrix](http://docs.alfresco.com/community/concepts/alfresco-sdk-compatibility.html) for the SDK / Alfresco compatibility. If your version is in Limited or Full Support, you can raise issues via the [Support Portal](http://support.alfresco.com). +If you are an Alfresco Customer +please check the [SDK Support status](http://www.alfresco.com/services/subscription/technical-support/product-support-status) +for the version you are using. 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/). - Alfresco (Community and Enterprise) artifacts are hosted in the [Alfresco Artifacts Repository](https://artifacts.alfresco.com/). - Alfresco Community artifacts (JARs, WARs, AMPs, poms) and SDK artifacts are publicly available. -*NOTE:* For Enterprise and Premiere licensed software access you need to get credential via the Alfresco Enterprise Support. See [Maven Alfresco Enterprise setup](http://docs.alfresco.com/5.0/concepts/alfresco-sdk-using-enterprise-edition.html). +*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) ### Alfresco Artifacts Repository #### Alfresco Releases -You can use the following snippet in your pom.xml to access releases on Alfresco Artifact repository: +You can use the following snippet in your pom.xml to access releases from the Alfresco Artifact repository: ```xml From 2871883c7d985861b49acb07263d493619b95818 Mon Sep 17 00:00:00 2001 From: Jose Luis Osorno Date: Fri, 18 Jan 2019 15:50:38 +0100 Subject: [PATCH 09/10] 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. --- .../maven/plugin/AbstractRunMojo.java | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRunMojo.java b/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRunMojo.java index 92171f62..2eff576c 100644 --- a/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRunMojo.java +++ b/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/AbstractRunMojo.java @@ -17,9 +17,11 @@ */ package org.alfresco.maven.plugin; +import com.google.common.collect.ImmutableSet; import org.alfresco.maven.plugin.config.ModuleDependency; import org.alfresco.maven.plugin.config.TomcatDependency; import org.alfresco.maven.plugin.config.TomcatWebapp; +import org.alfresco.util.Pair; import org.apache.commons.lang.StringUtils; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpGet; @@ -40,6 +42,7 @@ import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Set; import static org.twdata.maven.mojoexecutor.MojoExecutor.*; @@ -67,6 +70,29 @@ public abstract class AbstractRunMojo extends AbstractMojo { public static final String ALFRESCO_ENTERPRISE_EDITION = "enterprise"; public static final String ALFRESCO_COMMUNITY_EDITION = "community"; + private static final String TOMCAT_GROUP_ID = "org.apache.tomcat"; + private static final String TOMCAT_EMBED_GROUP_ID = "org.apache.tomcat.embed"; + private static final Set> TOMCAT_DEPENDENCIES = new ImmutableSet.Builder>() + .add(new Pair(TOMCAT_EMBED_GROUP_ID,"tomcat-embed-core")) + .add(new Pair(TOMCAT_GROUP_ID,"tomcat-util")) + .add(new Pair(TOMCAT_GROUP_ID,"tomcat-coyote")) + .add(new Pair(TOMCAT_GROUP_ID,"tomcat-api")) + .add(new Pair(TOMCAT_GROUP_ID,"tomcat-jdbc")) + .add(new Pair(TOMCAT_GROUP_ID,"tomcat-dbcp")) + .add(new Pair(TOMCAT_GROUP_ID,"tomcat-servlet-api")) + .add(new Pair(TOMCAT_GROUP_ID,"tomcat-jsp-api")) + .add(new Pair(TOMCAT_GROUP_ID,"tomcat-jasper")) + .add(new Pair(TOMCAT_GROUP_ID,"tomcat-jasper-el")) + .add(new Pair(TOMCAT_GROUP_ID,"tomcat-el-api")) + .add(new Pair(TOMCAT_GROUP_ID,"tomcat-catalina")) + .add(new Pair(TOMCAT_GROUP_ID,"tomcat-tribes")) + .add(new Pair(TOMCAT_GROUP_ID,"tomcat-catalina-ha")) + .add(new Pair(TOMCAT_GROUP_ID,"tomcat-annotations-api")) + .add(new Pair(TOMCAT_GROUP_ID,"tomcat-juli")) + .add(new Pair(TOMCAT_EMBED_GROUP_ID,"tomcat-embed-logging-juli")) + .add(new Pair(TOMCAT_EMBED_GROUP_ID,"tomcat-embed-logging-log4j")) + .build(); + @Component protected MavenProject project; @@ -351,6 +377,13 @@ public abstract class AbstractRunMojo extends AbstractMojo { @Parameter(property = "solr.home", defaultValue = "${project.basedir}/${alfresco.data.location}/solr") protected String solrHome; + /** + * Tomcat version to be used in the Maven Tomcat Plugin. If this parameter is not set, then the + * default Tomcat version will be used (it depends on the version of the Tomcat Maven Plugin). + */ + @Parameter(property = "maven.alfresco.tomcat.version") + protected String tomcatVersion; + /** * Maven GAV properties for customized alfresco.war, share.war, activiti-app.war * Used by the Maven Tomcat 7 Plugin @@ -1341,6 +1374,11 @@ public abstract class AbstractRunMojo extends AbstractMojo { dependency("org.postgresql", "postgresql", "9.4-1201-jdbc41")); } + // If a custom version of Tomcat is required add the corresponding dependencies + if(StringUtils.isNotBlank(tomcatVersion)) { + addTomcatDependencies(tomcatPluginDependencies); + } + if (enablePlatform) { webapps2Deploy.add(createWebAppElement( runnerAlfrescoGroupId, runnerAlfrescoPlatformWarArtifactId, runnerAlfrescoPlatformVersion, @@ -1788,4 +1826,16 @@ public abstract class AbstractRunMojo extends AbstractMojo { private String getWarName(String baseWarName) { return baseWarName + "-war"; } + + /** + * Add all the required maven dependencies to execute a specific version of Tomcat set by the property tomcatVersion to the list of + * dependencies of the Tomcat Maven Plugin. + * + * @param tomcatPluginDependencies current list of dependencies of the Tomcat Maven Plugin + */ + private void addTomcatDependencies(List tomcatPluginDependencies) { + for(Pair tomcatDependency : TOMCAT_DEPENDENCIES) { + tomcatPluginDependencies.add(dependency(tomcatDependency.getFirst(),tomcatDependency.getSecond(),tomcatVersion)); + } + } } From e3ae54be9ba88827dbb3daf3f6ccf5a80486b70c Mon Sep 17 00:00:00 2001 From: Jose Luis Osorno Date: Mon, 21 Jan 2019 08:28:41 +0100 Subject: [PATCH 10/10] 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. --- .../src/main/assembly/amp.xml | 5 +++++ .../alfresco/module/__artifactId__/log4j.properties | 1 + .../__rootArtifactId__-share-jar/src/main/assembly/amp.xml | 5 +++++ .../module/__rootArtifactId__-share-jar/log4j.properties | 1 + .../resources/archetype-resources/src/main/assembly/amp.xml | 5 +++++ .../alfresco/module/__artifactId__/log4j.properties | 1 + .../resources/archetype-resources/src/main/assembly/amp.xml | 5 +++++ .../alfresco/module/__artifactId__/log4j.properties | 1 + 8 files changed, 24 insertions(+) create mode 100644 archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/__rootArtifactId__-platform-jar/src/main/resources/alfresco/module/__artifactId__/log4j.properties create mode 100644 archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/__rootArtifactId__-share-jar/src/main/resources/alfresco/module/__rootArtifactId__-share-jar/log4j.properties create mode 100644 archetypes/alfresco-platform-jar-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/module/__artifactId__/log4j.properties create mode 100644 archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/module/__artifactId__/log4j.properties diff --git a/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/__rootArtifactId__-platform-jar/src/main/assembly/amp.xml b/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/__rootArtifactId__-platform-jar/src/main/assembly/amp.xml index e41c098c..447a6458 100644 --- a/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/__rootArtifactId__-platform-jar/src/main/assembly/amp.xml +++ b/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/__rootArtifactId__-platform-jar/src/main/assembly/amp.xml @@ -35,6 +35,11 @@ src/main/assembly/file-mapping.properties false + + + src/main/resources/alfresco/module/${project.artifactId}/log4j.properties + false + diff --git a/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/__rootArtifactId__-platform-jar/src/main/resources/alfresco/module/__artifactId__/log4j.properties b/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/__rootArtifactId__-platform-jar/src/main/resources/alfresco/module/__artifactId__/log4j.properties new file mode 100644 index 00000000..29523b48 --- /dev/null +++ b/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/__rootArtifactId__-platform-jar/src/main/resources/alfresco/module/__artifactId__/log4j.properties @@ -0,0 +1 @@ +# Add here module-specific custom log4j.properties configuration \ No newline at end of file diff --git a/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/__rootArtifactId__-share-jar/src/main/assembly/amp.xml b/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/__rootArtifactId__-share-jar/src/main/assembly/amp.xml index 512c9071..b8bef443 100644 --- a/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/__rootArtifactId__-share-jar/src/main/assembly/amp.xml +++ b/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/__rootArtifactId__-share-jar/src/main/assembly/amp.xml @@ -35,6 +35,11 @@ src/main/assembly/file-mapping.properties false + + + src/main/resources/alfresco/module/${project.artifactId}/log4j.properties + false + diff --git a/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/__rootArtifactId__-share-jar/src/main/resources/alfresco/module/__rootArtifactId__-share-jar/log4j.properties b/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/__rootArtifactId__-share-jar/src/main/resources/alfresco/module/__rootArtifactId__-share-jar/log4j.properties new file mode 100644 index 00000000..29523b48 --- /dev/null +++ b/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/__rootArtifactId__-share-jar/src/main/resources/alfresco/module/__rootArtifactId__-share-jar/log4j.properties @@ -0,0 +1 @@ +# Add here module-specific custom log4j.properties configuration \ No newline at end of file diff --git a/archetypes/alfresco-platform-jar-archetype/src/main/resources/archetype-resources/src/main/assembly/amp.xml b/archetypes/alfresco-platform-jar-archetype/src/main/resources/archetype-resources/src/main/assembly/amp.xml index ba989675..494331a5 100644 --- a/archetypes/alfresco-platform-jar-archetype/src/main/resources/archetype-resources/src/main/assembly/amp.xml +++ b/archetypes/alfresco-platform-jar-archetype/src/main/resources/archetype-resources/src/main/assembly/amp.xml @@ -35,6 +35,11 @@ src/main/assembly/file-mapping.properties false + + + src/main/resources/alfresco/module/${project.artifactId}/log4j.properties + false + diff --git a/archetypes/alfresco-platform-jar-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/module/__artifactId__/log4j.properties b/archetypes/alfresco-platform-jar-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/module/__artifactId__/log4j.properties new file mode 100644 index 00000000..29523b48 --- /dev/null +++ b/archetypes/alfresco-platform-jar-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/module/__artifactId__/log4j.properties @@ -0,0 +1 @@ +# Add here module-specific custom log4j.properties configuration \ No newline at end of file diff --git a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/assembly/amp.xml b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/assembly/amp.xml index 9f17de85..54556778 100644 --- a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/assembly/amp.xml +++ b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/assembly/amp.xml @@ -35,6 +35,11 @@ src/main/assembly/file-mapping.properties false + + + src/main/resources/alfresco/module/${project.artifactId}/log4j.properties + false + diff --git a/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/module/__artifactId__/log4j.properties b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/module/__artifactId__/log4j.properties new file mode 100644 index 00000000..29523b48 --- /dev/null +++ b/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/resources/alfresco/module/__artifactId__/log4j.properties @@ -0,0 +1 @@ +# Add here module-specific custom log4j.properties configuration \ No newline at end of file