From 3faee169ec10e5e2602c23b27119239277aa4732 Mon Sep 17 00:00:00 2001 From: Tuna Aksoy Date: Sat, 23 Jan 2016 19:06:25 +0000 Subject: [PATCH 1/3] RM-2950 (Update rm-community to use same maven sdk as enterprise) --- rm-community/README.txt | 53 -- rm-community/build.properties | 25 - rm-community/build.xml | 121 ---- rm-community/pom.xml | 203 ++---- rm-community/rm-server/build.properties | 8 - rm-community/rm-server/build.xml | 135 ---- .../rm-server/config/springloaded.properties | 1 - rm-community/rm-server/pom.xml | 602 +++++++++++------- rm-community/rm-server/run-community.sh | 9 - .../local/alfresco-global.properties | 72 +++ .../destroy/DestroyContentTest.java | 5 - .../rm-server/test/resources/testng.xml | 10 - rm-community/rm-server/tomcat/context.xml | 34 +- .../RecordedVersionConfigGetUnitTest.java | 4 +- .../RecordedVersionConfigPostUnitTest.java | 2 +- 15 files changed, 506 insertions(+), 778 deletions(-) delete mode 100644 rm-community/build.properties delete mode 100644 rm-community/build.xml delete mode 100644 rm-community/rm-server/build.properties delete mode 100644 rm-community/rm-server/build.xml delete mode 100644 rm-community/rm-server/config/springloaded.properties delete mode 100755 rm-community/rm-server/run-community.sh create mode 100644 rm-community/rm-server/src/test/properties/local/alfresco-global.properties delete mode 100644 rm-community/rm-server/test/resources/testng.xml diff --git a/rm-community/README.txt b/rm-community/README.txt index 6ba100ecd2..e69de29bb2 100644 --- a/rm-community/README.txt +++ b/rm-community/README.txt @@ -1,53 +0,0 @@ -== Alfresco Records Management - Development Environment Setup == - -Prerequisites - - - Maven 3.0.4 (or higher) - - Eclipse Maven Plugin (m2e) - - See Maven setup instructions https://ts.alfresco.com/share/page/site/eng/wiki-page?title=Maven_Setup - - -Initial Setup - - - Create a normal project using "create-project" - - Check out RM code into the "code" directory (eg "checkout https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD") - - Create the tomcat instances using "use-tomcat7" and "use-app-tomcat7" - - If you've got SOLR config in your $DEV_HOME/projects/repository.properties file, then you'll need to remove it or fix it in the RM project level properties file. - -Using Eclipse (or IntelliJ) - - - Import projects as Maven projects ("Import > Maven > Existing Maven Projects") - - Browse to the code directory of your project and select "rm-server/pom.xml" and "rm-share/pom.xml". DO NOT select the parent "/pom.xml" - - Open the Ant view and add the build files for both modules ("build.xml") - - If you are not working on a Windows machine you need to change the value of a property called "mvn.exec". - To do this create a file called "build.local.properties" under the code directory and change the value in that new file. - - Run the "prepareEnv" target for rm-server which will prepare the development environment. This target must be run just once. - - Now "fullBuildCommunity" or "fullBuildEnterprise" target (depending which version of Alfresco you want as dependency) can be run which will create the amp file, apply it to the war file and copy the war file to webapps folder. - - -Summary of Available Ant Targets - - - fullBuildCommunity : Creates the amp file and applies it to the Community war file - - fullBuildEnterprise : Creates the amp file and applies it to the Enterprise war file - - incrementalBuild : Creates the jar file and copies the jar file with other files like css, js, ftl, etc. files - - -Summary of Available Internal Ant Targets - - - alfresco:amp : Creates the amp file using alfresco maven plugin - - alfresco:install : Installs the amp file to the Community war file - - alfresco:installEnterprise : Installs the amp file to the Enterprise war file - - assembleIconPackage : Assembles an icons package for the module - - configureSolr4 : Configures Solr4 for Alfresco (creates two directories "solr4" and "solr4config" under the "data" directory) - - copyDBDriver : Copies the DB driver - - copyDevContextFile : Copies the dev-context.xml file - - copyWarFileToTomcat : Copies the war file (amp applied) to the webapp folder - - copyWebDirectory : Copies the source/web folder - - deleteExplodedWar : Deletes the exploded war file - - deleteWarFile : Deletes the war file - - fetchSolr : Gets the the Solr artifact - - fetchWarFile : Gets the "original" Community war file - - fetchEntpriseWarFile : Gets the "original" Enterprise war file - - package : Executes the "mvn package" command - - prepareEnv : Prepares the development environment (must be run just once) - - unitTest : Runs the unit tests \ No newline at end of file diff --git a/rm-community/build.properties b/rm-community/build.properties deleted file mode 100644 index aeefd2ae33..0000000000 --- a/rm-community/build.properties +++ /dev/null @@ -1,25 +0,0 @@ -# Do NOT change the values directly in this file. If you need to change the value of a property, -# create a file called "build.local.properties" in the same folder and change the value in that file. - -# The application war file properties -app.war.packaging=war - -# Executable properties -mvn.exec=${env.MAVEN_HOME}/bin/mvn.bat - -# Ant directory properties -ant.build.directory=target -ant.config.directory=config -ant.source.web.directory=source/web - -# Tomcat properties -app.tomcat.folder=${ant.build.directory}/../../../../software/${app.tomcat} -app.tomcat.webapps=${app.tomcat.folder}/webapps - -# Application properties -app.folder=${app.tomcat.webapps}/${app.war.artifactId} -app.package=${app.war.artifactId}.${app.war.packaging} -app.package.path=${app.tomcat.webapps}/${app.package} - -# Controls the minification process of js files -minifyjs=false \ No newline at end of file diff --git a/rm-community/build.xml b/rm-community/build.xml deleted file mode 100644 index 1fa09d7f52..0000000000 --- a/rm-community/build.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rm-community/pom.xml b/rm-community/pom.xml index 15ea90a171..48eb3dd904 100644 --- a/rm-community/pom.xml +++ b/rm-community/pom.xml @@ -1,32 +1,36 @@ + 4.0.0 org.alfresco alfresco-rm-parent pom 2.4-SNAPSHOT Alfresco Records Management + org.alfresco.maven alfresco-sdk-parent - 2.0.0 + 2.1.1 + http://www.alfresco.org/ 2005 Alfresco Software http://www.alfresco.org/ + LGPL 3 + - https://svn.alfresco.com/repos/alfresco-open-mirror/modules/recordsmanagement/HEAD - https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD - https://fisheye.alfresco.com/changelog/alfresco-enterprise + https://gitlab.alfresco.com/records-management/records-management.git + JIRA https://issues.alfresco.com/jira/browse/RM @@ -37,7 +41,7 @@ - 3.0.4 + 3.2.5 @@ -45,6 +49,11 @@ alfresco-internal https://artifacts.alfresco.com/nexus/content/groups/private + + + alfresco-internal-staging + https://artifacts.alfresco.com/nexus/content/repositories/5.1-EA + @@ -64,8 +73,14 @@ + + ${alfresco.groupId} alfresco-platform-distribution @@ -83,15 +98,7 @@ 5.1.d-EA - ${project.build.directory}/${webapp.id.name}.war - ${alfresco.version} - - - org.postgresql.Driver - jdbc:postgresql:${db.name} - jdbc:postgresql:template1 - alfresco - alfresco + ${project.version} false @@ -102,6 +109,7 @@ + ${project.artifactId}-${project.version} org.apache.maven.plugins @@ -124,27 +132,35 @@ - org.alfresco.maven.plugin - alfresco-maven-plugin - true + org.codehaus.mojo + build-helper-maven-plugin + ${maven.buildhelper.version} + + + add-test-source + + add-test-source + + + + src/unit-test/java + + + + + + + org.apache.maven.plugins + maven-surefire-plugin - true - ${project.build.directory}/${project.build.finalName}-amp.amp - ${app.war.location} - amp - true - true + + **/*UnitTest.java + - - - - maven-clean-plugin - 2.5 - maven-compiler-plugin 3.2 @@ -166,134 +182,7 @@ - - maven-deploy-plugin - 2.8.1 - - - maven-install-plugin - 2.5.1 - - - maven-resources-plugin - 2.6 - - - maven-site-plugin - 3.3 - - - maven-assembly-plugin - 2.4 - - - maven-dependency-plugin - 2.8 - - - maven-help-plugin - 2.2 - - - maven-release-plugin - 2.4.2 - - - maven-source-plugin - 2.2.1 - - - maven-failsafe-plugin - 2.16 - - - maven-surefire-plugin - 2.16 - - - true - alphabetical - - - ${db.url} - ${db.driver} - ${db.name} - ${db.username} - ${db.password} - ${basedir}/target/alf_test_data - - - - - maven-javadoc-plugin - 2.9.1 - - - maven-eclipse-plugin - 2.9 - - - maven-antrun-plugin - 1.7 - - - maven-jar-plugin - 2.4 - - - maven-war-plugin - 2.4 - - source/web - true - - - - org.mortbay.jetty - jetty-maven-plugin - 8.1.14.v20131031 - - source/web - - - - org.apache.tomcat.maven - tomcat7-maven-plugin - 2.2 - - - org.codehaus.plexus - plexus-archiver - 2.3 - - - - - org.codehaus.mojo - sql-maven-plugin - 1.5 - - - org.codehaus.mojo - versions-maven-plugin - 2.1 - - - org.codehaus.mojo - build-helper-maven-plugin - 1.8 - - - org.alfresco.maven.plugin - alfresco-maven-plugin - 1.1.1 - - - net.alchim31.maven - yuicompressor-maven-plugin - 1.3.2 - - + org.eclipse.m2e lifecycle-mapping diff --git a/rm-community/rm-server/build.properties b/rm-community/rm-server/build.properties deleted file mode 100644 index fa6182cc67..0000000000 --- a/rm-community/rm-server/build.properties +++ /dev/null @@ -1,8 +0,0 @@ -# Do NOT change the values directly in this file. If you need to change the value of a property, -# create a file called "build.local.properties" in the same folder and change the value in that file. - -# War file id for the alfresco application -app.war.artifactId=alfresco - -# Tomcat folder name used by the alfresco application -app.tomcat=tomcat \ No newline at end of file diff --git a/rm-community/rm-server/build.xml b/rm-community/rm-server/build.xml deleted file mode 100644 index e2323d9a82..0000000000 --- a/rm-community/rm-server/build.xml +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ]]> - ]]> - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/rm-community/rm-server/config/springloaded.properties b/rm-community/rm-server/config/springloaded.properties deleted file mode 100644 index 9f25b216c6..0000000000 --- a/rm-community/rm-server/config/springloaded.properties +++ /dev/null @@ -1 +0,0 @@ -exclusions=org.alfresco.repo..*,org.alfresco.util..*,org.alfresco.workflow..*,org.alfresco.service..* \ No newline at end of file diff --git a/rm-community/rm-server/pom.xml b/rm-community/rm-server/pom.xml index 3bd5626b11..64a7b351ab 100644 --- a/rm-community/rm-server/pom.xml +++ b/rm-community/rm-server/pom.xml @@ -1,22 +1,31 @@ - - + + + 4.0.0 + alfresco-rm-server + Alfresco RM Server + amp + Manages the lifecycle of the alfresco-rm-server amp + org.alfresco alfresco-rm-parent 2.4-SNAPSHOT - 4.0.0 - alfresco-rm-server - Alfresco RM Server - + - /alfresco + ${basedir}/target/alf_test_data + org.hibernate.dialect.H2Dialect + alfresco + alfresco + alfresco + localhost + alfresco 9.1-901.jdbc4 5.1.31 - alfresco - ${webapp.id.name} + alfresco-rm-server + true + ${project.build.directory}/solr/home source/java @@ -28,14 +37,13 @@ - test/resources + unit-test/resources - unit-test/resources + test/resources - org.codehaus.mojo build-helper-maven-plugin @@ -65,21 +73,137 @@ + maven-antrun-plugin + + + prepare-package + + run + + + + + + + + + + + + + + org.codehaus.mojo + properties-maven-plugin + 1.0-alpha-2 + + + initialize + + read-project-properties + + + + ${basedir}/src/main/resources/local.properties + + true + + + + + + org.apache.maven.plugins maven-surefire-plugin - - - usedefaultlisteners - false - - - listener - org.uncommons.reportng.HTMLReporter, org.uncommons.reportng.JUnitXMLReporter - - - - ${project.build.testOutputDirectory}/testng.xml - + + **/AllUnitTestSuite.class + + + + + org.apache.maven.plugins + maven-failsafe-plugin + 2.19 + + + integration-tests + + integration-test + verify + + + ${skip.integrationtests} + + **/AllTestSuite.class + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack-alfresco + prepare-package + + unpack + + + ${app.amp.client.war.folder} + + + ${alfresco.groupId} + ${app.amp.client.war.artifactId} + war + ${alfresco.version} + + + + + + + + + org.alfresco.maven.plugin + alfresco-maven-plugin + + + attach-rm-jar + + amp + + + true + true + + + + install-rm-amp + + install + + package + + true + ${project.build.directory}/${alfresco.rm.artifactId}-${alfresco.rm.version}.amp + + + + amps-to-war-overlay + package + + install + + + + + @@ -93,135 +217,154 @@ + + org.apache.maven.plugins + maven-source-plugin + 2.4 + + + attach-sources + + jar-no-fork + + + + + + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + org.codehaus.mojo + properties-maven-plugin + [1.0-alpha-2,) + + read-project-properties + + + + + + + + + + + + + + + + com.google.code.gson + gson + 2.3.1 + + + + ${alfresco.groupId} + alfresco-remote-api + + + + io.takari.junit + takari-cpsuite + 1.2.7 + test + + + junit + junit + test + + + org.springframework.extensions.surf + spring-webscripts + tests + test + + + org.mockito + mockito-all + test + + + org.springframework + spring-test + 2.5 + test + + + ${alfresco.groupId} + alfresco-repository + ${alfresco.version} + tests + test + + + ${alfresco.groupId} + alfresco-remote-api + ${alfresco.version} + tests + test + + + + postgresql + postgresql + ${alfresco.postgres.version} + + + mysql + mysql-connector-java + + + ${alfresco.groupId} + alfresco-repository + ${alfresco.version} + h2scripts + + + * + * + + + + + - wipeDB - - - - - org.codehaus.mojo - sql-maven-plugin - - true - ${db.driver} - ${db.master.url} - ${db.username} - ${db.password} - - - - postgresql - postgresql - ${alfresco.postgres.version} - - - mysql - mysql-connector-java - ${alfresco.mysql.version} - - - - - wipe-database - process-test-resources - - execute - - - drop database if exists alfresco - - - - create-database - process-test-resources - - execute - - - create database alfresco - - - - - - - - - fullBuild - - - - org.alfresco.maven.plugin - alfresco-maven-plugin - - - - amp - - - - - - org.apache.tomcat.maven - tomcat7-maven-plugin - - - postgresql - postgresql - ${alfresco.postgres.version} - - - mysql - mysql-connector-java - ${alfresco.mysql.version} - - - - - maven-antrun-plugin - - - prepare-package - - run - - - - - - - - - - - - - - - - - - appWarLocationSetting + use-mysql - ${project.build.directory}/${project.build.finalName}-war + ${my.db.name} + ${my.db.port} + org.hibernate.dialect.MySQLInnoDBDialect + + jdbc:mysql://${alfresco.db.host}:${alfresco.db.port}/${alfresco.db.name} + org.gjt.mm.mysql.Driver - enterprise + use-postgres - alfresco-enterprise + ${my.db.name} + ${my.db.port} + org.hibernate.dialect.PostgreSQLDialect + + jdbc:postgresql:${alfresco.db.name} + org.postgresql.Driver - amp-with-solr - - true - ${project.build.directory}/solr/home - + start-alfresco @@ -236,13 +379,13 @@ unpack - ${alfresco.client.war.folder} + ${app.amp.client.war.folder} - ${alfresco.client.war.groupId} - ${alfresco.client.war} + ${alfresco.groupId} + ${alfresco.repo.artifactId} war - ${alfresco.client.war.version} + ${alfresco.version} @@ -303,7 +446,7 @@ solrHomePath ${alfresco.solr.home} \\ - / + \\\\ false @@ -323,28 +466,29 @@ + false ${alfresco.solr.home}/context.xml ${alfresco.solr.home}/archive-SpacesStore/conf/solrcore.properties ${alfresco.solr.home}/workspace-SpacesStore/conf/solrcore.properties - ${alfresco.client.war.folder}/WEB-INF/web.xml + ${app.amp.client.war.folder}/WEB-INF/web.xml @@ALFRESCO_SOLR4_DIR@@ - ${alfresco.solr.home}/ + ${solrHomePath}/ @@ALFRESCO_SOLR4_MODEL_DIR@@ - ${alfresco.solr.home}/alfrescoModels/ + ${solrHomePath}/alfrescoModels/ @@ALFRESCO_SOLR4_CONTENT_DIR@@ - ${alfresco.solr.home}/data/content/ + ${solrHomePath}/data/content/ @@ALFRESCO_SOLR4_DATA_DIR@@ - ${alfresco.solr.home}/data/index/ + ${solrHomePath}/data/index/ ]]> @@ -393,6 +537,7 @@ + + + + wipeDB + + + + + org.codehaus.mojo + sql-maven-plugin + 1.5 + + true + ${alfresco.db.datasource.class} + ${alfresco.db.master.url} + ${alfresco.db.username} + ${alfresco.db.password} + + + + postgresql + postgresql + ${alfresco.postgres.version} + + + mysql + mysql-connector-java + ${alfresco.mysql.version} + + + + + wipe-database + process-test-resources + + execute + + + drop database if exists alfresco + + + + create-database + process-test-resources + + execute + + + create database alfresco + + + + + + + + - - - com.google.code.gson - gson - 2.3.1 - - - - org.alfresco - ${webapp.id} - ${alfresco.base.version} - war - - - org.alfresco - alfresco-remote-api - - - - io.takari.junit - takari-cpsuite - 1.2.7 - test - - - junit - junit - test - - - org.springframework.extensions.surf - spring-webscripts - tests - test - - - org.mockito - mockito-all - test - - - org.springframework - spring-test - 2.5 - test - - - org.alfresco - alfresco-repository - ${alfresco.base.version} - tests - test - - - org.alfresco - alfresco-remote-api - ${alfresco.base.version} - tests - test - - - org.alfresco.test - alfresco-testng - 1.1 - test - - - - postgresql - postgresql - ${alfresco.postgres.version} - test - - - mysql - mysql-connector-java - test - - - - org.uncommons - reportng - 1.1.4 - test - - - com.google.inject - guice - 3.0 - test - - \ No newline at end of file diff --git a/rm-community/rm-server/run-community.sh b/rm-community/rm-server/run-community.sh deleted file mode 100755 index 6d3f1024d1..0000000000 --- a/rm-community/rm-server/run-community.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -# Downloads the spring-loaded lib if not existing and runs repository AMP -springloadedfile=~/.m2/repository/org/springframework/springloaded/1.2.0.RELEASE/springloaded-1.2.0.RELEASE.jar - -if [ ! -f $springloadedfile ]; then -mvn validate -Psetup -fi - -MAVEN_OPTS="-javaagent:$springloadedfile -noverify -Xms256m -Xmx2G -XX:PermSize=300m" mvn clean integration-test -PappWarLocationSetting,fullBuild,amp-with-solr -Dsolr.secureComms=none \ No newline at end of file diff --git a/rm-community/rm-server/src/test/properties/local/alfresco-global.properties b/rm-community/rm-server/src/test/properties/local/alfresco-global.properties new file mode 100644 index 0000000000..0d262ecbfc --- /dev/null +++ b/rm-community/rm-server/src/test/properties/local/alfresco-global.properties @@ -0,0 +1,72 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# RUN TIME PROPERTIES +# ------------------- + +######################################################################################################################## +# Alfresco configuration for running locally +# +# Configuration when running Tomcat embedded from Maven. +# This will create the alf_data_dev directory relative to Tomcat run folder. +# Property values from the POM but it can also be edited here. +######################################################################################################################## + +dir.root=${alfresco.data.location} + +# Alfresco Repo Webapp (alfresco.war) context, ports etc +alfresco.context=alfresco +alfresco.host=localhost +alfresco.port=8080 +alfresco.protocol=http + +# Alfresco Share Webapp (share.war) context, ports etc +share.context=share +share.host=localhost +share.port=8080 +share.protocol=http + +# Validates and auto-recover if validation fails +index.recovery.mode=AUTO +# As we run embedded, we set Lucene +# TODO: Find a better solution for indexing, as buildonly (embedded Lucene) is deprecated and going to be removed soon +index.subsystem.name=buildonly + +# These jobs seem to require Lucene (Unsupported Operation with Solr) so we disable them / set to future date +# See https://forums.alfresco.com/en/viewtopic.php?f=52&t=41597 +# If you want to enable them (and so full WQS functionality), please also set index.subsystem.name=lucene +wcmqs.dynamicCollectionProcessor.schedule=0 30 2 * * ? 2060 +wcmqs.feedbackProcessor.schedule=0 40 2 * * ? 2060 +wcmqs.publishQueueProcessor.schedule=0 50 2 * * ? 2060 + +# Fail or not when there are node integrity checker errors +integrity.failOnError=true + +# Database connection properties +db.driver=${alfresco.db.datasource.class} +db.url=${alfresco.db.url} +db.username=${alfresco.db.username} +db.password=${alfresco.db.password} +db.pool.initial=10 +db.pool.max=100 +hibernate.dialect=${alfresco.db.hibernate.dialect} + +# File servers related properties +# For local runs we disable CIFS and FTP +cifs.enabled=false +ftp.enabled=false + +# Solr config +index.subsystem.name=solr4 +solr.secureComms=none \ No newline at end of file diff --git a/rm-community/rm-server/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/destroy/DestroyContentTest.java b/rm-community/rm-server/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/destroy/DestroyContentTest.java index 2a43dc3809..eab76a7c16 100644 --- a/rm-community/rm-server/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/destroy/DestroyContentTest.java +++ b/rm-community/rm-server/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/destroy/DestroyContentTest.java @@ -40,7 +40,6 @@ import org.alfresco.service.cmr.repository.ContentWriter; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.cmr.repository.StoreRef; import org.alfresco.service.namespace.QName; -import org.alfresco.test.AlfrescoTest; import org.alfresco.util.GUID; /** @@ -81,7 +80,6 @@ public class DestroyContentTest extends BaseRMTestCase * Then the record folder and records are ghosted * And the content is destroyed */ - @AlfrescoTest (jira="RM-2506") public void testRecordFolderDestroy() throws Exception { doBehaviourDrivenTest(new BehaviourDrivenTest() @@ -162,7 +160,6 @@ public class DestroyContentTest extends BaseRMTestCase * Then the record is ghosted * And the content is destroyed */ - @AlfrescoTest (jira="RM-2506") public void testRecordDestroy() throws Exception { doBehaviourDrivenTest(new BehaviourDrivenTest() @@ -232,7 +229,6 @@ public class DestroyContentTest extends BaseRMTestCase * And the content is cleansed * And then content is destroyed */ - @AlfrescoTest (jira="RM-2505") public void testRecordDestroyAndCleanse() throws Exception { doBehaviourDrivenTest(new BehaviourDrivenTest() @@ -303,7 +299,6 @@ public class DestroyContentTest extends BaseRMTestCase * When a unclassified document (non-record) is deleted * Then it is deleted but the the content is not immediately destroyed */ - @AlfrescoTest (jira="RM-2507") public void testContentDelete() throws Exception { doBehaviourDrivenTest(new BehaviourDrivenTest() diff --git a/rm-community/rm-server/test/resources/testng.xml b/rm-community/rm-server/test/resources/testng.xml deleted file mode 100644 index cc24c41946..0000000000 --- a/rm-community/rm-server/test/resources/testng.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/rm-community/rm-server/tomcat/context.xml b/rm-community/rm-server/tomcat/context.xml index 73015268e2..3a6aef298e 100644 --- a/rm-community/rm-server/tomcat/context.xml +++ b/rm-community/rm-server/tomcat/context.xml @@ -1,7 +1,31 @@ - + + + + + - - \ No newline at end of file + extraResourcePaths="/=${project.build.directory}/${project.build.finalName}/web" /> + + + + + + + + diff --git a/rm-community/rm-server/unit-test/java/org/alfresco/module/org_alfresco_module_rm/recorded/version/config/RecordedVersionConfigGetUnitTest.java b/rm-community/rm-server/unit-test/java/org/alfresco/module/org_alfresco_module_rm/recorded/version/config/RecordedVersionConfigGetUnitTest.java index 6304d30840..1394ced16e 100644 --- a/rm-community/rm-server/unit-test/java/org/alfresco/module/org_alfresco_module_rm/recorded/version/config/RecordedVersionConfigGetUnitTest.java +++ b/rm-community/rm-server/unit-test/java/org/alfresco/module/org_alfresco_module_rm/recorded/version/config/RecordedVersionConfigGetUnitTest.java @@ -21,10 +21,10 @@ package org.alfresco.module.org_alfresco_module_rm.recorded.version.config; import static org.alfresco.module.org_alfresco_module_rm.version.RecordableVersionPolicy.ALL; import static org.alfresco.module.org_alfresco_module_rm.version.RecordableVersionPolicy.MAJOR_ONLY; import static org.alfresco.module.org_alfresco_module_rm.version.RecordableVersionPolicy.NONE; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.doReturn; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertTrue; import java.util.ArrayList; import java.util.Arrays; diff --git a/rm-community/rm-server/unit-test/java/org/alfresco/module/org_alfresco_module_rm/recorded/version/config/RecordedVersionConfigPostUnitTest.java b/rm-community/rm-server/unit-test/java/org/alfresco/module/org_alfresco_module_rm/recorded/version/config/RecordedVersionConfigPostUnitTest.java index b9ca5591ce..5580a235df 100644 --- a/rm-community/rm-server/unit-test/java/org/alfresco/module/org_alfresco_module_rm/recorded/version/config/RecordedVersionConfigPostUnitTest.java +++ b/rm-community/rm-server/unit-test/java/org/alfresco/module/org_alfresco_module_rm/recorded/version/config/RecordedVersionConfigPostUnitTest.java @@ -20,9 +20,9 @@ package org.alfresco.module.org_alfresco_module_rm.recorded.version.config; import static org.alfresco.module.org_alfresco_module_rm.script.slingshot.RecordedVersionConfigPost.RECORDED_VERSION; import static org.alfresco.module.org_alfresco_module_rm.version.RecordableVersionPolicy.ALL; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.mockito.Mockito.doReturn; -import static org.testng.Assert.assertEquals; import java.util.Map; From 9ab1a13e2b94766adcc43c563a787e1d8ce57208 Mon Sep 17 00:00:00 2001 From: Tuna Aksoy Date: Sun, 24 Jan 2016 15:19:04 +0000 Subject: [PATCH 2/3] Remove alfresco-global.properties from the test jar file --- rm-community/rm-server/pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rm-community/rm-server/pom.xml b/rm-community/rm-server/pom.xml index 64a7b351ab..bdd0902bad 100644 --- a/rm-community/rm-server/pom.xml +++ b/rm-community/rm-server/pom.xml @@ -216,6 +216,11 @@ + + + **/alfresco-global.properties + + org.apache.maven.plugins From 27d4d6706cbc2ff7e32b87603a1bf9fbf0922e7c Mon Sep 17 00:00:00 2001 From: Tuna Aksoy Date: Sun, 24 Jan 2016 17:28:05 +0000 Subject: [PATCH 3/3] Fixed warnings --- .../module/org_alfresco_module_rm/util/RMCollectionUtils.java | 1 + 1 file changed, 1 insertion(+) diff --git a/rm-community/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/util/RMCollectionUtils.java b/rm-community/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/util/RMCollectionUtils.java index 8a1bf6ed6f..df353b35fb 100644 --- a/rm-community/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/util/RMCollectionUtils.java +++ b/rm-community/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/util/RMCollectionUtils.java @@ -106,6 +106,7 @@ public final class RMCollectionUtils * @param the element type. * @return a Serializable List containing all the provided elements. */ + @SuppressWarnings("unchecked") @SafeVarargs public static > LIST asSerializableList(T... elements)