diff --git a/.travis.yml b/.travis.yml index a4702ab6d..5a80178ed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,7 +30,7 @@ env: - TAS_SCRIPTS=../alfresco-community-repo/packaging/tests/scripts - TAS_ENVIRONMENT=./tests/environment # Release version has to start with real version (7.0.0-....) for the docker image to build successfully. - - RELEASE_VERSION=7.0.0-A9 + - RELEASE_VERSION=7.0.0-A10 - DEVELOPMENT_VERSION=7.0.0-SNAPSHOT stages: diff --git a/dev/README.md b/dev/README.md new file mode 100644 index 000000000..0930051a1 --- /dev/null +++ b/dev/README.md @@ -0,0 +1,104 @@ +# Development Tomcat Environment + + +It is possible to use Docker containers to test your code, but it is normally more convenient to simply run the +repository webapp (`alfresco.war`) in a tomcat instance. + +## Build -repo projects +Build the `alfresco-community-repo` (if you have not done so already), so that your changes are in the enterprise alfresco.war file. +~~~ +cd alfresco-community-repo +mvn clean install -PcommunityDocker -DskipTests=true -Dversion.edition=Community +cd .. + +cd alfresco-enterprise-repo +mvn clean install -PenterpriseDocker -DskipTests=true -Dmaven.javadoc.skip=true +cd .. +~~~ + +## Docker test environment +The repository code will need to talk to other ACS components, such as a databases, message queue and transformers. +The simplest way to create these, is to use the `docker-compose.yml` file in the `dev` directory. +~~~ +cd acs-community-packaging +docker-compose -f dev/docker-compose.yml up -d +~~~ + +## Alfresco Global Properties and Log4j +Set any alfresco-global.properties or log4j properties you may need in the following files. They will be copied +to the `dev/dev-acs-amps-overlay/target` directory. Other customisations may also be placed in the `extension` directory. +~~~ +dev/dev-tomcat/src/main/tomcat/shared/classes/alfresco/extension/custom-log4j.properties +dev/dev-tomcat/src/main/tomcat/shared/classes/alfresco-global.properties +~~~ + +## Tomcat +Create the development tomcat environment, apply AMPs on top of the repository code, and +run tomcat. The `run` profile is what starts tomcat. The `withShare` applies +the Share services AMP and adds the `share.war` to tomcat. +Once started, you will be able to access Share on `http://localhost:8080/share` and various repository +endpoints via `http://localhost:8080/alfresco/`. `entT` is an alias for the +following command and `entTDebug` will allow a debugger to be attached. +~~~ +$ # The alias entT is the same as the following mvn command. entTDebug may also be used. +$ mvn clean install -Prun,withShare +[INFO] ------------------------------------------------------------------------ +[INFO] Reactor Build Order: +[INFO] +[INFO] Alfresco Content Services Community Packaging [pom] +[INFO] Alfresco Content Services Community Distribution zip [jar] +[INFO] Alfresco Content Services Public API Javadoc [pom] +[INFO] ACS Community Docker Image Builder for Alfresco Community [pom] +[INFO] Scanning for projects... +[INFO] --------------------------------[ pom ]--------------------------------- +... +INFO: Starting ProtocolHandler ["http-bio-8080"] +~~~ + +If you kill the tomcat instance (^C) and wish to restart it, use the following command +or the `entO` alias, or `entODebug` to attach a debuger. +~~~ +$ mvn install -Prun,withShare -rf dev-acs-amps-overlay +~~~ + + +## Clean up +When finished, kill the tomcat instance and stop the Docker instances. You will normally also +remove the Docker containers, as you will need a clean database if you are going to issue +another `mvn clean install` command. +~~~ +$ ^C +... Stopped 'sysAdmin' subsystem, ID: [sysAdmin, default] + +$ docker-compose -f dev/docker-compose.yml stop +Stopping dev_transform-core-aio_1 ... done +Stopping dev_transform-router_1 ... done +Stopping dev_solr6_1 ... done +Stopping dev_postgres_1 ... done +Stopping dev_activemq_1 ... done +Stopping dev_shared-file-store_1 ... done + +$ docker-compose -f dev/docker-compose.yml rm +Going to remove dev_transform-core-aio_1, dev_transform-router_1, dev_solr6_1, dev_postgres_1, dev_activemq_1, dev_shared-file-store_1 +Are you sure? [yN] y +Removing dev_transform-core-aio_1 ... done +Removing dev_transform-router_1 ... done +Removing dev_solr6_1 ... done +Removing dev_postgres_1 ... done +Removing dev_activemq_1 ... done +Removing dev_shared-file-store_1 ... done +~~~ + +If you have not removed the containers, it is possible to restart the tomcat instance with +a `mvn install` (no `clean`), but this may result in failures if there are incompatibilities +between the code, database and content in `dev/dev-acs-amps-overlay/target/dev-instance/runtime/alf_data`. +Any changes made to alfresco-global properties or log4j will not be picked up, unless you +directly edit `dev/dev-acs-amps-overlay/target/dev-instance/tomcat/shared/classes/alfresco/extension/custom-log4j.properties` +and `dev/dev-acs-amps-overlay/target/dev-instance/tomcat/shared/classes/alfresco-global.properties`, but they will be thrown away +on the next `mvn clean`. + +## Aliases +You may also find the aliases specified in the following file useful, as they may save you some typing. +~~~ +$ source acs-community-packaging/dev/aliases +~~~ \ No newline at end of file diff --git a/dev/aliases b/dev/aliases new file mode 100755 index 000000000..958ee3033 --- /dev/null +++ b/dev/aliases @@ -0,0 +1,53 @@ +# The aliases in this script provide simple commands to build projects, start tomcat and combinations of these. This +# give the flexibility to only rebuild or repackage parts of the codebase that have changed. +# +# Once the repository component has been built, it will need to be combined with other ACS components in the +# acs_community_packaging projects. +# +# When developing code, you will normally not be creating repository docker images, but will be creating war files and +# then running them in a local tomcat instance. To provide the environment needed to do this you will need to start a +# docker-compose environment to provide access to a databases and other ACS components. +# +# Aliases to build a sequence of projects and start tomcat - remember to start a CLEAN docker-compose environment - see envUp +# com - builds alfresco-community-repo & acs-community-packaging +# +# Aliases to build projects WITHOUT creating docker images +# comR - alfresco-community-repo +# comP - acs-community-packaging +# +# Aliases to build projects including DOCKER images +# comRD - alfresco-community-repo +# comPD - acs-community-packaging + +# Aliases to start tomcat in a CLEAN environment - remember to start a docker-compose environment - see envUp +# comT - acs-community-packaging +# comTDebug - acs-community-packaging (uses mvnDebug to allow a debugger to be attached) + +# Aliases to start tomcat REUSING an existing environment (database and alf_data directory) +# comO - acs-community-packaging +# comODebug - acs-community-packaging (uses mvnDebug to allow a debugger to be attached) + +export TAG=latest + +alias comR='(cd alfresco-community-repo && mvn clean install -DskipTests=true -Dversion.edition=Community)' +alias comP='(cd acs-community-packaging && mvn clean install -Dmaven.javadoc.skip=true)' + +alias comRD="(cd alfresco-community-repo && mvn clean install -PcommunityDocker -Dimage.tag=$TAG -DskipTests=true -Dversion.edition=Community)" +alias comPD="(cd acs-community-packaging && mvn clean install -PcommunityDocker -Dimage.tag=$TAG -Drepo.image.tag=$TAG -Dmaven.javadoc.skip=true)" + +alias comT=' (cd acs-community-packaging && mvn clean install -Prun,withShare)' +alias comTDebug='(cd acs-community-packaging && mvnDebug clean install -Prun,withShare)' +alias comO=' (cd acs-community-packaging && mvn install -Prun,withShare -rf dev/dev-acs-amps-overlay)' +alias comODebug='(cd acs-community-packaging && mvnDebug install -Prun,withShare -rf dev/dev-acs-amps-overlay)' + +alias com='comR && comP && comT' +alias comD='comRD && comPD' + +# Clean up of docker images and content stores (alf_data directories) +alias drm='docker rm -f $(docker ps -q)' +alias arm='rm -rf `find . -name alf_data`' +alias envUp='docker-compose -f acs-community-packaging/dev/docker-compose.yml up' +alias envStop='docker-compose -f acs-community-packaging/dev/docker-compose.yml stop' +alias envKill='docker-compose -f acs-community-packaging/dev/docker-compose.yml kill' +alias envRm='docker-compose -f acs-community-packaging/dev/docker-compose.yml rm' + diff --git a/dev/cherry-pick-old-projects-setup.sh b/dev/cherry-pick-old-projects-setup.sh new file mode 100644 index 000000000..bc9464c76 --- /dev/null +++ b/dev/cherry-pick-old-projects-setup.sh @@ -0,0 +1,170 @@ +#!/bin/bash -ex +# Script: cherry-pick-old-projects-setup.sh +# +# *********************************************************************************************************** +# ***** BEFORE RUNNING, edit the calls to setupRemotes (approx line 100) to specify the source branch ****** +# ***** (2nd arg) to be checked out. ****** +# *********************************************************************************************************** +# +# Clones and moves files in local copies of the the original repository projects to make it easier to cherry +# pick commits into alfresco-community-repo and alfresco-enterprise-repo. Run from a folder that contains +# alfresco-enterprise-repo and alfresco-enterprise-repo projects. The clones of the original projects are +# placed in a folder called oldRepos. Once run these projects will be set up as remotes to the new projects +# ready to allow cherry picking of commits. + +if [[ ! -d alfresco-community-repo || ! -d alfresco-enterprise-repo ]] +then + echo "Script MUST be run in the parent folder of alfresco-community-repo and alfresco-enterprise-repo" + exit 1 +fi + +baseDir=`pwd` +oldReposDirName=oldRepos +oldReposDir=$baseDir/$oldReposDirName +mkdir -p $oldReposDir + +# +# Moves the contents of the current folder to a new sub folder. +# +moveContent() +{ + oldFolder=$1 + newModule=$2 + + mkdir -p ${newModule}/$oldFolder + for file in `ls -a $oldFolder` + do + if [[ $file != ".git" && $file != ".." && $file != "." && $file != ".tmp" && $file != "${newModule}" ]] + then + git mv $oldFolder/$file ${newModule}/$oldFolder + fi + done + + git commit -a -m "Moved content to new ${newModule} module" | grep -v "rename " +} + +mvCommit() +{ + from=$1 + to=$2 + + echo git mv $from $to + git mv $from $to + + if [[ -z "$(ls -A .tmp)" ]] + then + rmdir .tmp + fi + + git commit -a -m "Moved $from to $to" | grep -v "rename " +} + +# +# Moves all the root folder contents of a branch to a named folder in the root folder. +# +setupRemotes() +{ + oldRepo=$1 + oldBranch=$2 + newRepo=$3 + newModule=$4 + + echo + echo + cd $oldReposDir + rm -rf $oldRepo + git clone --single-branch --branch $oldBranch git@github.com:Alfresco/${oldRepo}.git + cd $oldRepo + + count=`find . -type f | grep -v '^\.\/.git\/' | wc -l` + echo Move $count files in $oldRepo + + # As the alfresco-repository src folder has so many files, the git mv and git commit commands fail, + # so let's do it in several parts + if [[ "$oldRepo" = "alfresco-repository" ]] + then + mkdir .tmp + mvCommit src/main/java/org/alfresco/repo .tmp/repo + mvCommit src/main/resources .tmp/resources + moveContent . $newModule + mvCommit .tmp/repo ${newModule}/src/main/java/org/alfresco/repo + mvCommit .tmp/resources ${newModule}/src/main/resources + else + moveContent . $newModule + fi +} + +# source project branch target project module +setupRemotes alfresco-core master alfresco-community-repo core +setupRemotes alfresco-data-model master alfresco-community-repo data-model +setupRemotes alfresco-repository master alfresco-community-repo repository +setupRemotes alfresco-remote-api master alfresco-community-repo remote-api +setupRemotes acs-community-packaging develop alfresco-community-repo packaging + +setupRemotes alfresco-enterprise-repository master alfresco-enterprise-repo repository +setupRemotes alfresco-enterprise-remote-api master alfresco-enterprise-repo remote-api +setupRemotes acs-packaging master alfresco-enterprise-repo packaging + + + +# +# Add remotes and fetch original projects +# + +echo +echo +cd $baseDir + +cd alfresco-community-repo +git remote add alfresco-core ../$oldReposDirName/alfresco-core +git remote add alfresco-data-model ../$oldReposDirName/alfresco-data-model +git remote add alfresco-repository ../$oldReposDirName/alfresco-repository +git remote add alfresco-remote-api ../$oldReposDirName/alfresco-remote-api +git remote add acs-community-packaging ../$oldReposDirName/acs-community-packaging +git config merge.renameLimit 999999 +git fetch alfresco-core | grep -v 'new tag]' +git fetch alfresco-data-model | grep -v 'new tag]' +git fetch alfresco-repository | grep -v 'new tag]' +git fetch alfresco-remote-api | grep -v 'new tag]' +git fetch acs-community-packaging | grep -v 'new tag]' +cd .. + +cd alfresco-enterprise-repo +git remote add alfresco-enterprise-repository ../$oldReposDirName/alfresco-enterprise-repository +git remote add alfresco-enterprise-remote-api ../$oldReposDirName/alfresco-enterprise-remote-api +git remote add acs-packaging ../$oldReposDirName/acs-packaging +git config merge.renameLimit 999999 +git fetch alfresco-enterprise-repository | grep -v 'new tag]' +git fetch alfresco-enterprise-remote-api | grep -v 'new tag]' +git fetch acs-packaging | grep -v 'new tag]' +cd .. + + + + + + +# +# remote remove repositories +# +echo You may now cherry pick to alfresco-community-repo and alfresco-enterprise-repo +echo after you press RETURN the remotes will be removed. +read DONE + +cd alfresco-community-repo +git remote remove alfresco-core +git remote remove alfresco-data-model +git remote remove alfresco-repository +git remote remove alfresco-remote-api +git remote remove acs-community-packaging +git config --unset merge.renameLimit +cd .. + +cd alfresco-enterprise-repo +git remote remove alfresco-enterprise-repository +git remote remove alfresco-enterprise-remote-api +git remote remove acs-packaging +git config --unset merge.renameLimit +cd .. + +rm -rf $oldReposDir \ No newline at end of file diff --git a/dev/dev-acs-amps-overlay/pom.xml b/dev/dev-acs-amps-overlay/pom.xml new file mode 100644 index 000000000..2a9b50fa4 --- /dev/null +++ b/dev/dev-acs-amps-overlay/pom.xml @@ -0,0 +1,358 @@ + + 4.0.0 + dev-acs-community-amps-overlay + Content Services WAR with amps + war + + + org.alfresco + alfresco-dev-community-tomcat-env + 7.0.0-SNAPSHOT + + + + 7.0.86 + 8983 + + + + + org.alfresco + content-services-community + war + + + org.alfresco + alfresco-share-services + amp + + + org.postgresql + postgresql + + + mysql + mysql-connector-java + + + + + alfresco + + + maven-war-plugin + 2.6 + + + + org.alfresco + content-services-community + war + + + org.alfresco + alfresco-share-services + amp + + + false + + + + prepare-exploded-war + + exploded + + + + + + org.alfresco.maven.plugin + alfresco-maven-plugin + 3.0.1 + + + + + org.apache.tomcat.maven + tomcat7-maven-plugin + 2.2 + + + solr6 + ${tomcat.default.solr6.port} + ${runtime.data.folder}/alf_data + localhost + /solr + none + pkcs12 + AES/CBC/PKCS5Padding + AES + mp6yc0UD9e + metadata + mp6yc0UD9e + AES + + false + true + ${runtime.tomcat.conf.folder}/alfresco-context.xml + ${runtime.tomcat.conf.folder}/tomcat-users.xml + + + org.alfresco + alfresco-server-root + ${dependency.alfresco-server-root.version} + / + war + true + + + ${project.build.directory}/tomcat/webapps/alfresco-server-root/META-INF/context.xml + + + org.alfresco + api-explorer + ${alfresco.api-explorer.version} + /api-explorer + war + true + + + + + + org.apache.tomcat.embed + tomcat-embed-core + ${tomcat.version} + + + org.apache.tomcat + tomcat-util + ${tomcat.version} + + + org.apache.tomcat + tomcat-coyote + ${tomcat.version} + + + org.apache.tomcat + tomcat-api + ${tomcat.version} + + + org.apache.tomcat + tomcat-jdbc + ${tomcat.version} + + + org.apache.tomcat + tomcat-dbcp + ${tomcat.version} + + + org.apache.tomcat + tomcat-servlet-api + ${tomcat.version} + + + org.apache.tomcat + tomcat-jsp-api + ${tomcat.version} + + + org.apache.tomcat + tomcat-jasper + ${tomcat.version} + + + org.apache.tomcat + tomcat-jasper-el + ${tomcat.version} + + + org.apache.tomcat + tomcat-el-api + ${tomcat.version} + + + org.apache.tomcat + tomcat-catalina + ${tomcat.version} + + + org.apache.tomcat + tomcat-tribes + ${tomcat.version} + + + org.apache.tomcat + tomcat-catalina-ha + ${tomcat.version} + + + org.apache.tomcat + tomcat-annotations-api + ${tomcat.version} + + + org.apache.tomcat + tomcat-juli + ${tomcat.version} + + + org.apache.tomcat.embed + tomcat-embed-logging-juli + ${tomcat.version} + + + org.apache.tomcat.embed + tomcat-embed-logging-log4j + ${tomcat.version} + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + unpack-tomcat-config + generate-resources + + unpack + + + ${project.build.directory}/tomcat-conf + + + org.alfresco + alfresco-dev-community-tomcat + ${project.version} + config + true + zip + + + + + + + + org.apache.maven.plugins + maven-antrun-plugin + + + + + copy-tomcat-config + + run + + generate-resources + + + + + + + + + + + + + + + + + + + + + + ant-contrib + ant-contrib + 20020829 + + + + + + + + + run + + + + org.apache.tomcat.maven + tomcat7-maven-plugin + + + run-exploded-webapp + verify + + run + + + + + + + + + withShare + + + + org.apache.tomcat.maven + tomcat7-maven-plugin + + + + org.alfresco + share + /share + ${alfresco.share.version} + war + true + + + + + + + org.apache.sis.core + sis-utility + 0.6 + + + org.apache.sis.core + sis-metadata + 0.6 + + + org.apache.sis.storage + sis-storage + 0.6 + + + + + + + + diff --git a/dev/dev-tomcat/pom.xml b/dev/dev-tomcat/pom.xml new file mode 100644 index 000000000..b1b3fb64f --- /dev/null +++ b/dev/dev-tomcat/pom.xml @@ -0,0 +1,62 @@ + + + 4.0.0 + alfresco-dev-community-tomcat + Tomcat Configuration + pom + + + org.alfresco + alfresco-dev-community-tomcat-env + 7.0.0-SNAPSHOT + + + + ${basedir}/src/main/tomcat + + + + + + maven-assembly-plugin + false + + + dev-tomcat-config-zip + package + + single + + + true + + src/assembly/tomcat-conf.xml + + + + + + + org.codehaus.mojo + properties-maven-plugin + + + + read-alfresco-global-properties + initialize + + read-project-properties + + + + ${alfresco.properties.file} + + true + + + + + + + diff --git a/dev/dev-tomcat/src/assembly/tomcat-conf.xml b/dev/dev-tomcat/src/assembly/tomcat-conf.xml new file mode 100644 index 000000000..277f0d7e7 --- /dev/null +++ b/dev/dev-tomcat/src/assembly/tomcat-conf.xml @@ -0,0 +1,18 @@ + + + + config + + zip + + false + + + ${dev.tomcat.conf.folder} + + + + diff --git a/dev/dev-tomcat/src/main/tomcat/alfresco-context.xml b/dev/dev-tomcat/src/main/tomcat/alfresco-context.xml new file mode 100644 index 000000000..73c883925 --- /dev/null +++ b/dev/dev-tomcat/src/main/tomcat/alfresco-context.xml @@ -0,0 +1,8 @@ + + + + + \ No newline at end of file diff --git a/dev/dev-tomcat/src/main/tomcat/shared/classes/alfresco-global.properties b/dev/dev-tomcat/src/main/tomcat/shared/classes/alfresco-global.properties new file mode 100644 index 000000000..3c1cdf3ab --- /dev/null +++ b/dev/dev-tomcat/src/main/tomcat/shared/classes/alfresco-global.properties @@ -0,0 +1,127 @@ +alfresco.cluster.interface=127.0.0.1 + +## Legacy external executables (Docker containers) +alfresco-pdf-renderer.url=http://localhost:8090/ +img.url=http://localhost:8090/ +jodconverter.url=http://localhost:8090/ +tika.url=http://localhost:8090/ +transform.misc.url=http://localhost:8090/ + +jodconverter.enabled=true + +## +# PostgreSQL RDBMS +## +db.name=alfresco +db.username=alfresco +db.password=alfresco +db.driver=org.postgresql.Driver +db.url=jdbc:postgresql:${db.name} +db.master.url=jdbc:postgresql:template1 +db.master.username=${db.username} +db.master.password=${db.password} +db.drop.command=drop database if exists ${db.name} +db.create.command=create database ${db.name} + +## +# MySQL +## +#db.name=alfresco +#db.username=alfresco +#db.password=alfresco +#db.driver=com.mysql.jdbc.Driver +#db.url=jdbc:mysql://localhost/${db.name}?useUnicode=true&characterEncoding=UTF-8 +#db.master.url=jdbc:mysql://localhost/ +#db.master.username=${db.username} +#db.master.password=${db.password} +#db.drop.command=drop database if exists ${db.name} +#db.create.command=create database ${db.name} CHARACTER SET utf8 COLLATE utf8_bin; + +## +# Oracle +## +#db.username=alfresco +#db.password=alfresco +#db.host=localhost +#db.master.username=SYS AS SYSDBA +#db.master.password=alfresco +#db.url=jdbc:oracle:thin:@${db.host}:1521/ORCL +#db.driver=oracle.jdbc.OracleDriver +#db.drop.command=drop user ${db.username} cascade; +#db.create.command=grant connect,resource to ${db.username} identified by ${db.password}; + +## +# SQL Server +## +#db.name=alfresco +#db.username=alfresco +#db.password=alfresco +#db.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver +#db.url=jdbc:sqlserver://${db.host};databaseName=${db.name}; +#db.master.url=jdbc:sqlserver://${db.host};databaseName=master +#db.master.username=${db.username} +#db.master.password=${db.password} +#db.drop.command=drop database ${db.name}; +#db.create.command=CREATE DATABASE ${db.name}; ALTER DATABASE ${db.name} SET ALLOW_SNAPSHOT_ISOLATION ON; + +## +# H2 +## +#db.name=alfresco +#db.username=alfresco +#db.password=alfresco +#db.params=MODE=PostgreSQL;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=10000;MVCC=TRUE +#db.driver=org.h2.jdbcx.JdbcDataSource +#db.url=${db.master.url} +#db.master.url=jdbc:h2:${test.working.dir}/h2_data/${db.name};${db.params} +#db.master.username=${db.username} +#db.master.password=${db.password} +#db.drop.command=drop database if exists ${db.name} +#db.create.command=create database ${db.name} + + +## +# MariaDB +## +#db.name=alfresco +#db.username=alfresco +#db.password=alfresco +#db.driver=org.gjt.mm.mysql.Driver +#db.url=jdbc:mysql://localhost/${db.name} +#db.master.url=jdbc:mysql://localhost/ +#db.master.username=${db.username} +#db.master.password=${db.password} +#db.drop.command=drop database if exists ${db.name} +#db.create.command=create database ${db.name} + + +solr.solrPingCronExpression=0 0/30 * * * ? * +solr.secureComms=none +index.subsystem.name=solr6 +solr.host=localhost +solr.port=8983 +Dsolr.base.url=/solr + +transform.service.enabled=true + +# Check every minute rather than the default of every hour +mimetype.config.cronExpression=0 0/1 * * * ? +rendition.config.cronExpression=2 0/1 * * * ? +local.transform.service.cronExpression=4 0/1 * * * ? +transform.service.cronExpression=6 0/1 * * * ? + +# To switch to 5 T-Engines set ...core-aio.url to an empty string and add in the individual urls. +# Then comment in/out images in the BAT docker-compose +#localTransform.core-aio.url= +#localTransform.pdfrenderer.url=http://localhost:8090/ +#localTransform.imagemagick.url=http://localhost:8091/ +#localTransform.libreoffice.url=http://localhost:8092/ +#localTransform.tika.url=http://localhost:8093/ +#localTransform.misc.url=http://localhost:8094/ + +alfresco.host=localhost +alfresco.port=8080 +share.host=localhost +share.port=8080 + + diff --git a/dev/dev-tomcat/src/main/tomcat/shared/classes/alfresco/extension/custom-log4j.properties b/dev/dev-tomcat/src/main/tomcat/shared/classes/alfresco/extension/custom-log4j.properties new file mode 100644 index 000000000..3a3ce7fca --- /dev/null +++ b/dev/dev-tomcat/src/main/tomcat/shared/classes/alfresco/extension/custom-log4j.properties @@ -0,0 +1,22 @@ +log4j.logger.org.alfresco.repo.content.transform.TransformerDebug=debug + +#log4j.logger.org.alfresco.util.exec.RuntimeExecBootstrapBean=debug +#log4j.logger.org.alfresco.util.exec.RuntimeExec=debug + +#log4j.logger.org.alfresco.repo.rendition2=debug +#log4j.logger.org.alfresco.repo.content.metadata=debug +#log4j.logger.org.alfresco.repo.rendition2.LocalTransformClient=debug +#log4j.logger.org.alfresco.repo.rendition2.LegacyTransformClient=debug +#log4j.logger.org.alfresco.repo.rendition.RenditionServiceImpl=debug +#log4j.logger.org.alfresco.enterprise.repo.rendition2.RemoteTransformClient=debug + +#log4j.logger.org.alfresco.repo.content.transform.LocalTransformServiceRegistry=debug +#log4j.logger.org.alfresco.enterprise.repo.rendition2.RemoteTransformServiceRegistry=debug +#log4j.logger.org.alfresco.repo.rendition2.RenditionDefinitionRegistry2Impl=debug +#log4j.logger.org.alfresco.repo.content.MimetypeMap=debug +#log4j.logger.org.alfresco.repo.content.transform.LocalTransform=debug + +#log4j.logger.org.alfresco.repo.rawevents=debug + +#log4j.logger.org.alfresco.repo.jscript.RhinoScriptProcessor=debug +#log4j.logger.RhinoScriptProcessor.calls=debug diff --git a/dev/dev-tomcat/src/main/tomcat/shared/classes/alfresco/keystore/keystore b/dev/dev-tomcat/src/main/tomcat/shared/classes/alfresco/keystore/keystore new file mode 100644 index 000000000..fa967e99b Binary files /dev/null and b/dev/dev-tomcat/src/main/tomcat/shared/classes/alfresco/keystore/keystore differ diff --git a/dev/dev-tomcat/src/main/tomcat/solr-context.xml b/dev/dev-tomcat/src/main/tomcat/solr-context.xml new file mode 100644 index 000000000..ec025b11f --- /dev/null +++ b/dev/dev-tomcat/src/main/tomcat/solr-context.xml @@ -0,0 +1,13 @@ + + + + + + + + + + \ No newline at end of file diff --git a/dev/dev-tomcat/src/main/tomcat/tomcat-users.xml b/dev/dev-tomcat/src/main/tomcat/tomcat-users.xml new file mode 100644 index 000000000..745ed55d0 --- /dev/null +++ b/dev/dev-tomcat/src/main/tomcat/tomcat-users.xml @@ -0,0 +1,21 @@ + + + + + + diff --git a/dev/docker-compose.yml b/dev/docker-compose.yml new file mode 100644 index 000000000..e879b6fc3 --- /dev/null +++ b/dev/docker-compose.yml @@ -0,0 +1,60 @@ +# This docker-compose file will start up the environment needed for testing with T-Engines, ActiveMQ etc. +# Based on the community version in acs-deployment + +# Using version 2 as 3 does not support resource constraint options (cpu_*, mem_* limits) for non swarm mode in Compose +version: "2" + +services: + transform-core-aio: + image: alfresco/alfresco-transform-core-aio:2.3.5 + mem_limit: 1536m + environment: + JAVA_OPTS: " -Xms256m -Xmx1536m" + ports: + - 8090:8090 + + postgres: + image: postgres:11.7 + mem_limit: 512m + environment: + - POSTGRES_PASSWORD=alfresco + - POSTGRES_USER=alfresco + - POSTGRES_DB=alfresco + command: postgres -c max_connections=300 -c log_min_messages=LOG + ports: + - 5432:5432 + + solr6: + image: alfresco/alfresco-search-services:2.0.0 + mem_limit: 2g + environment: + #Solr needs to know how to register itself with Alfresco + - SOLR_ALFRESCO_HOST=alfresco + - SOLR_ALFRESCO_PORT=8080 + #Alfresco needs to know how to call solr + - SOLR_SOLR_HOST=solr6 + - SOLR_SOLR_PORT=8983 + #Create the default alfresco and archive cores + - SOLR_CREATE_ALFRESCO_DEFAULTS=alfresco,archive + #HTTP by default + - ALFRESCO_SECURE_COMMS=none + - "SOLR_JAVA_MEM=-Xms2g -Xmx2g" + ports: + - 8083:8983 #Browser port + + activemq: + image: alfresco/alfresco-activemq:5.15.8 + mem_limit: 1g + ports: + - 8161:8161 # Web Console + - 5672:5672 # AMQP + - 61616:61616 # OpenWire + - 61613:61613 # STOMP + +# proxy: +# image: alfresco/acs-community-ngnix:1.0.0 +# mem_limit: 128m +# depends_on: +# - alfresco +# ports: +# - 8080:8080 diff --git a/dev/pom.xml b/dev/pom.xml new file mode 100644 index 000000000..744ba293c --- /dev/null +++ b/dev/pom.xml @@ -0,0 +1,27 @@ + + + 4.0.0 + alfresco-dev-community-tomcat-env + Development Tomcat Environment + pom + + + org.alfresco + acs-community-packaging + 7.0.0-SNAPSHOT + + + + + ${project.build.directory}/dev-instance/runtime + ${project.build.directory}/dev-instance/tomcat + ${runtime.tomcat.conf.folder}/shared/classes/alfresco-global.properties + + + + dev-tomcat + dev-acs-amps-overlay + + + diff --git a/pom.xml b/pom.xml index 92a9cbe64..7eadc4709 100644 --- a/pom.xml +++ b/pom.xml @@ -1,15 +1,15 @@ 4.0.0 acs-community-packaging + pom Alfresco Content Services Community Packaging 7.0.0-SNAPSHOT - pom org.alfresco alfresco-community-repo ../alfresco-community-repo/pom.xml - 8.304 + 8.305 @@ -31,7 +31,7 @@ - 8.304 + 8.305 ${dependency.alfresco-community-repo.version} ${alfresco.share.version} @@ -80,6 +80,12 @@ docker-alfresco + + run + + dev + +