diff --git a/README.md b/README.md index 26df7fdf..9ffbbfa6 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,13 @@ 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 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) - 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) @@ -18,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 | @@ -35,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 diff --git a/archetypes/activiti-jar-archetype/pom.xml b/archetypes/activiti-jar-archetype/pom.xml index 56fefd4f..9dd38c70 100644 --- a/archetypes/activiti-jar-archetype/pom.xml +++ b/archetypes/activiti-jar-archetype/pom.xml @@ -6,13 +6,13 @@ 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 alfresco-sdk-aggregator - 3.0.1 + 3.0.2-SNAPSHOT ../../pom.xml 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/archetypes/alfresco-allinone-archetype/pom.xml b/archetypes/alfresco-allinone-archetype/pom.xml index 1e384825..896f58e4 100644 --- a/archetypes/alfresco-allinone-archetype/pom.xml +++ b/archetypes/alfresco-allinone-archetype/pom.xml @@ -6,12 +6,12 @@ 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 alfresco-sdk-aggregator - 3.0.1 + 3.0.2-SNAPSHOT ../../pom.xml 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/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-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/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/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 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/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..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} diff --git a/plugins/alfresco-maven-plugin/pom.xml b/plugins/alfresco-maven-plugin/pom.xml index ed027a15..e86f26ab 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/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 43f70ab1..f80c79f8 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,11 +17,13 @@ */ package org.alfresco.maven.plugin; +import com.google.common.collect.ImmutableSet; import de.schlichtherle.truezip.file.TVFS; import de.schlichtherle.truezip.fs.FsSyncException; 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; @@ -42,6 +44,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.*; @@ -69,6 +72,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; @@ -188,6 +214,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 @@ -199,6 +226,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. @@ -244,6 +272,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 = "") @@ -298,6 +327,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; @@ -313,9 +345,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; @@ -328,6 +367,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; @@ -337,6 +379,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 @@ -451,6 +500,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. @@ -1305,6 +1383,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, @@ -1328,6 +1411,7 @@ public abstract class AbstractRunMojo extends AbstractMojo { } if (enableActivitiApp) { + webapps2Deploy.add(createWebAppElement( runnerActivitiAppGroupId, runnerActivitiAppWarArtifactId, runnerActivitiAppVersion, "/activiti-app", null)); @@ -1751,4 +1835,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)); + } + } } 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..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,9 +46,34 @@ 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(); + copySolrCustomConfig(); replaceSolrConfigProperties(); installSolr10InLocalRepo(); } 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