mirror of
https://github.com/Alfresco/alfresco-sdk.git
synced 2025-05-19 17:15:24 +00:00
Improved support for using different databases, #400
This commit is contained in:
parent
a32a537206
commit
2782f30a42
@ -47,26 +47,11 @@
|
||||
to bring in newer versions with bug fixes etc -->
|
||||
<aikau.version>1.0.85</aikau.version>
|
||||
|
||||
<!-- Alfresco Repo Database configuration.
|
||||
By default it uses a flat file H2 database to be able to run embedded.
|
||||
The H2 database implementation is brought in via the tomcat7-maven-plugin as a dependency.
|
||||
The data files for the H2 database will be created in a relative path, such as alf_data_dev/h2_data/alf_dev,
|
||||
see alfresco.db.url below.
|
||||
For more information about the db parameters see:http://www.h2database.com/html/features.html
|
||||
-->
|
||||
<alfresco.db.name>alf_dev</alfresco.db.name>
|
||||
<alfresco.db.username>alfresco</alfresco.db.username>
|
||||
<alfresco.db.password>alfresco</alfresco.db.password>
|
||||
<alfresco.db.params>AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=10000;MVCC=FALSE;LOCK_MODE=0
|
||||
</alfresco.db.params>
|
||||
<alfresco.db.url>jdbc:h2:${alfresco.data.location}/h2_data/${alfresco.db.name};${alfresco.db.params}
|
||||
</alfresco.db.url>
|
||||
<alfresco.db.datasource.class>org.h2.jdbcx.JdbcDataSource</alfresco.db.datasource.class>
|
||||
|
||||
<!-- JRebel Hot reloading of classpath stuff and web resource stuff -->
|
||||
<jrebel.version>1.1.6</jrebel.version>
|
||||
|
||||
<!-- Environment to use, Alfresco Maven Plugin will copy alfresco-global.properties from this directory -->
|
||||
<!-- Environment to use, Alfresco Maven Plugin will
|
||||
copy alfresco-global-*.properties files from this directory, such as src/test/properties/local -->
|
||||
<env>local</env>
|
||||
|
||||
<!-- Compile with Java 7, default is 5 -->
|
||||
|
@ -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 with Enterprise Database, such as SQL Server, Oracle etc
|
||||
#
|
||||
# Configuration when running Tomcat embedded from Maven.
|
||||
# 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
|
||||
|
||||
index.subsystem.name=solr4
|
||||
solr.host=localhost
|
||||
solr.port=8080
|
||||
solr.secureComms=none
|
||||
|
||||
# Don't try and recover any index
|
||||
index.recovery.mode=NONE
|
||||
# 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
|
||||
|
||||
# Alfresco Repository Enterprise Database Configuration, such as SQL Server, Oracle etc
|
||||
# The Enterprise Driver is brought in via the tomcat7-maven-plugin as a dependency.
|
||||
db.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||
db.url=jdbc:sqlserver://localhost:1433;databaseName=alfrescoaio
|
||||
db.username=alfresco
|
||||
db.password=alfresco
|
||||
db.pool.initial=10
|
||||
db.pool.max=100
|
||||
|
||||
# File servers related properties
|
||||
# For local runs we disable CIFS and FTP
|
||||
cifs.enabled=false
|
||||
ftp.enabled=false
|
@ -0,0 +1,76 @@
|
||||
# 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 with H2 Database
|
||||
#
|
||||
# Configuration when running Tomcat embedded from Maven.
|
||||
# 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
|
||||
|
||||
index.subsystem.name=solr4
|
||||
solr.host=localhost
|
||||
solr.port=8080
|
||||
solr.secureComms=none
|
||||
|
||||
# Don't try and recover any index
|
||||
index.recovery.mode=NONE
|
||||
# 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
|
||||
|
||||
# Alfresco Repository H2 Database configuration.
|
||||
# The H2 database implementation and Driver is brought in via the tomcat7-maven-plugin as a dependency.
|
||||
# The data files for the H2 database will be created in a relative path, such as alf_data_dev/h2_data/alf_dev,
|
||||
# see alfresco.db.url below.
|
||||
# For more information about the db parameters see:http://www.h2database.com/html/features.html
|
||||
db.driver=org.h2.jdbcx.JdbcDataSource
|
||||
db.url=jdbc:h2:${alfresco.data.location}/h2_data/alf_dev;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=10000;MVCC=FALSE;LOCK_MODE=0
|
||||
db.username=alfresco
|
||||
db.password=alfresco
|
||||
db.pool.initial=10
|
||||
db.pool.max=100
|
||||
hibernate.dialect=org.hibernate.dialect.H2Dialect
|
||||
|
||||
# File servers related properties
|
||||
# For local runs we disable CIFS and FTP
|
||||
cifs.enabled=false
|
||||
ftp.enabled=false
|
@ -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 with MySQL Database
|
||||
#
|
||||
# Configuration when running Tomcat embedded from Maven.
|
||||
# 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
|
||||
|
||||
index.subsystem.name=solr4
|
||||
solr.host=localhost
|
||||
solr.port=8080
|
||||
solr.secureComms=none
|
||||
|
||||
# Don't try and recover any index
|
||||
index.recovery.mode=NONE
|
||||
# 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
|
||||
|
||||
# Alfresco Repository MySQL Database configuration.
|
||||
# The MySQL Driver is brought in via the tomcat7-maven-plugin as a dependency.
|
||||
db.driver=org.gjt.mm.mysql.Driver
|
||||
db.url=jdbc:mysql://localhost:3306/alfrescoaio?useUnicode=yes&characterEncoding=UTF-8
|
||||
db.username=alfresco
|
||||
db.password=alfresco
|
||||
db.pool.initial=10
|
||||
db.pool.max=100
|
||||
|
||||
# File servers related properties
|
||||
# For local runs we disable CIFS and FTP
|
||||
cifs.enabled=false
|
||||
ftp.enabled=false
|
@ -16,10 +16,9 @@
|
||||
# -------------------
|
||||
|
||||
########################################################################################################################
|
||||
# Alfresco configuration for running locally
|
||||
# Alfresco configuration for running locally with PostgreSQL Database
|
||||
#
|
||||
# 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.
|
||||
########################################################################################################################
|
||||
|
||||
@ -58,14 +57,14 @@ 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}
|
||||
# Alfresco Repository PostgreSQL Database configuration.
|
||||
# The PostgreSQL Driver is brought in via the tomcat7-maven-plugin as a dependency.
|
||||
db.driver=org.postgresql.Driver
|
||||
db.url=jdbc:postgresql://localhost:5432/alfrescoaio
|
||||
db.username=alfresco
|
||||
db.password=alfresco
|
||||
db.pool.initial=10
|
||||
db.pool.max=100
|
||||
hibernate.dialect=org.hibernate.dialect.H2Dialect
|
||||
|
||||
# File servers related properties
|
||||
# For local runs we disable CIFS and FTP
|
@ -40,26 +40,11 @@
|
||||
<!-- Alfresco Share version, so we can bring in correct alfresco-share-services artifact -->
|
||||
<alfresco.share.version>5.2.a-EA</alfresco.share.version>
|
||||
|
||||
<!-- Alfresco Repo Database configuration.
|
||||
By default it uses a flat file H2 database to be able to run embedded.
|
||||
The H2 database implementation is brought in via the tomcat7-maven-plugin as a dependency.
|
||||
The data files for the H2 database will be created in a relative path, such as alf_data_dev/h2_data/alf_dev,
|
||||
see alfresco.db.url below.
|
||||
For more information about the db parameters see:http://www.h2database.com/html/features.html
|
||||
-->
|
||||
<alfresco.db.name>alf_dev</alfresco.db.name>
|
||||
<alfresco.db.username>alfresco</alfresco.db.username>
|
||||
<alfresco.db.password>alfresco</alfresco.db.password>
|
||||
<alfresco.db.params>AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=10000;MVCC=FALSE;LOCK_MODE=0
|
||||
</alfresco.db.params>
|
||||
<alfresco.db.url>jdbc:h2:${alfresco.data.location}/h2_data/${alfresco.db.name};${alfresco.db.params}
|
||||
</alfresco.db.url>
|
||||
<alfresco.db.datasource.class>org.h2.jdbcx.JdbcDataSource</alfresco.db.datasource.class>
|
||||
|
||||
<!-- JRebel Hot reloading of classpath stuff and web resource stuff -->
|
||||
<jrebel.version>1.1.6</jrebel.version>
|
||||
|
||||
<!-- Environment to use, Alfresco Maven Plugin will copy alfresco-global.properties from this directory -->
|
||||
<!-- Environment to use, Alfresco Maven Plugin will
|
||||
copy alfresco-global-*.properties files from this directory, such as src/test/properties/local -->
|
||||
<env>local</env>
|
||||
|
||||
<!-- Compile with Java 7, default is 5 -->
|
||||
|
@ -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 with Enterprise Database, such as SQL Server, Oracle etc
|
||||
#
|
||||
# Configuration when running Tomcat embedded from Maven.
|
||||
# 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
|
||||
|
||||
index.subsystem.name=solr4
|
||||
solr.host=localhost
|
||||
solr.port=8080
|
||||
solr.secureComms=none
|
||||
|
||||
# Don't try and recover any index
|
||||
index.recovery.mode=NONE
|
||||
# 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
|
||||
|
||||
# Alfresco Repository Enterprise Database Configuration, such as SQL Server, Oracle etc
|
||||
# The Enterprise Driver is brought in via the tomcat7-maven-plugin as a dependency.
|
||||
db.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||
db.url=jdbc:sqlserver://localhost:1433;databaseName=alfrescoaio
|
||||
db.username=alfresco
|
||||
db.password=alfresco
|
||||
db.pool.initial=10
|
||||
db.pool.max=100
|
||||
|
||||
# File servers related properties
|
||||
# For local runs we disable CIFS and FTP
|
||||
cifs.enabled=false
|
||||
ftp.enabled=false
|
@ -0,0 +1,76 @@
|
||||
# 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 with H2 Database
|
||||
#
|
||||
# Configuration when running Tomcat embedded from Maven.
|
||||
# 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
|
||||
|
||||
index.subsystem.name=solr4
|
||||
solr.host=localhost
|
||||
solr.port=8080
|
||||
solr.secureComms=none
|
||||
|
||||
# Don't try and recover any index
|
||||
index.recovery.mode=NONE
|
||||
# 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
|
||||
|
||||
# Alfresco Repository H2 Database configuration.
|
||||
# The H2 database implementation and Driver is brought in via the tomcat7-maven-plugin as a dependency.
|
||||
# The data files for the H2 database will be created in a relative path, such as alf_data_dev/h2_data/alf_dev,
|
||||
# see alfresco.db.url below.
|
||||
# For more information about the db parameters see:http://www.h2database.com/html/features.html
|
||||
db.driver=org.h2.jdbcx.JdbcDataSource
|
||||
db.url=jdbc:h2:${alfresco.data.location}/h2_data/alf_dev;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=10000;MVCC=FALSE;LOCK_MODE=0
|
||||
db.username=alfresco
|
||||
db.password=alfresco
|
||||
db.pool.initial=10
|
||||
db.pool.max=100
|
||||
hibernate.dialect=org.hibernate.dialect.H2Dialect
|
||||
|
||||
# File servers related properties
|
||||
# For local runs we disable CIFS and FTP
|
||||
cifs.enabled=false
|
||||
ftp.enabled=false
|
@ -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 with MySQL Database
|
||||
#
|
||||
# Configuration when running Tomcat embedded from Maven.
|
||||
# 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
|
||||
|
||||
index.subsystem.name=solr4
|
||||
solr.host=localhost
|
||||
solr.port=8080
|
||||
solr.secureComms=none
|
||||
|
||||
# Don't try and recover any index
|
||||
index.recovery.mode=NONE
|
||||
# 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
|
||||
|
||||
# Alfresco Repository MySQL Database configuration.
|
||||
# The MySQL Driver is brought in via the tomcat7-maven-plugin as a dependency.
|
||||
db.driver=org.gjt.mm.mysql.Driver
|
||||
db.url=jdbc:mysql://localhost:3306/alfrescoaio?useUnicode=yes&characterEncoding=UTF-8
|
||||
db.username=alfresco
|
||||
db.password=alfresco
|
||||
db.pool.initial=10
|
||||
db.pool.max=100
|
||||
|
||||
# File servers related properties
|
||||
# For local runs we disable CIFS and FTP
|
||||
cifs.enabled=false
|
||||
ftp.enabled=false
|
@ -16,10 +16,9 @@
|
||||
# -------------------
|
||||
|
||||
########################################################################################################################
|
||||
# Alfresco configuration for running locally
|
||||
# Alfresco configuration for running locally with PostgreSQL Database
|
||||
#
|
||||
# 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.
|
||||
########################################################################################################################
|
||||
|
||||
@ -44,6 +43,9 @@ solr.secureComms=none
|
||||
|
||||
# Don't try and recover any index
|
||||
index.recovery.mode=NONE
|
||||
# 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
|
||||
@ -55,14 +57,14 @@ 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}
|
||||
# Alfresco Repository PostgreSQL Database configuration.
|
||||
# The PostgreSQL Driver is brought in via the tomcat7-maven-plugin as a dependency.
|
||||
db.driver=org.postgresql.Driver
|
||||
db.url=jdbc:postgresql://localhost:5432/alfrescoaio
|
||||
db.username=alfresco
|
||||
db.password=alfresco
|
||||
db.pool.initial=10
|
||||
db.pool.max=100
|
||||
hibernate.dialect=org.hibernate.dialect.H2Dialect
|
||||
|
||||
# File servers related properties
|
||||
# For local runs we disable CIFS and FTP
|
@ -129,6 +129,12 @@ public class RunMojo extends AbstractMojo {
|
||||
@Parameter(property = "maven.alfresco.enablePostgreSQL", defaultValue = "false")
|
||||
protected boolean enablePostgreSQL;
|
||||
|
||||
/**
|
||||
* Switch to enable/disable the Enterprise database (such as Oracle or MS SQL Server) when running embedded Tomcat.
|
||||
*/
|
||||
@Parameter(property = "maven.alfresco.enableEnterpriseDb", defaultValue = "false")
|
||||
protected boolean enableEnterpriseDb;
|
||||
|
||||
/**
|
||||
* Switch to enable/disable the Platform/Repository (alfresco.war) when running embedded Tomcat.
|
||||
*/
|
||||
@ -261,6 +267,7 @@ public class RunMojo extends AbstractMojo {
|
||||
|
||||
if (enableTestProperties) {
|
||||
copyAlfrescoGlobalProperties();
|
||||
renameAlfrescoGlobalProperties();
|
||||
}
|
||||
|
||||
if (enablePlatform) {
|
||||
@ -445,14 +452,14 @@ public class RunMojo extends AbstractMojo {
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy the alfresco-global.properties file that will be used when
|
||||
* running Alfresco. It contains database connection parameters and
|
||||
* Copy the different alfresco-global-*.properties files (there are one for each open source db and one for
|
||||
* enterprise db config) that will be used when running Alfresco. It contains database connection parameters and
|
||||
* other general configuration for Alfresco Repository (alfresco.war)
|
||||
*
|
||||
* @throws MojoExecutionException
|
||||
*/
|
||||
protected void copyAlfrescoGlobalProperties() throws MojoExecutionException {
|
||||
getLog().info("Copying alfresco-global.properties to test resources");
|
||||
getLog().info("Copying and filtering alfresco-global-*.properties files to target/test-classes");
|
||||
executeMojo(
|
||||
plugin(
|
||||
groupId("org.apache.maven.plugins"),
|
||||
@ -476,6 +483,45 @@ public class RunMojo extends AbstractMojo {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename the configured database specific alfresco-global-*.properties file to
|
||||
* alfresco-global.properties so it will be used during Tomcat run.
|
||||
*
|
||||
* @throws MojoExecutionException
|
||||
*/
|
||||
protected void renameAlfrescoGlobalProperties() throws MojoExecutionException {
|
||||
String alfrescoGlobalFilePath = "${project.build.testOutputDirectory}/alfresco-global-";
|
||||
if (enableH2) {
|
||||
alfrescoGlobalFilePath += "h2.properties";
|
||||
getLog().info("Renaming alfresco-global-h2.properties to alfresco-global.properties");
|
||||
} else if (enableMySQL) {
|
||||
alfrescoGlobalFilePath += "mysql.properties";
|
||||
getLog().info("Renaming alfresco-global-mysql.properties to alfresco-global.properties");
|
||||
} else if (enablePostgreSQL) {
|
||||
alfrescoGlobalFilePath += "postgresql.properties";
|
||||
getLog().info("Renaming alfresco-global-postgresql.properties to alfresco-global.properties");
|
||||
} else if (enableEnterpriseDb) {
|
||||
alfrescoGlobalFilePath += "enterprise.properties";
|
||||
getLog().info("Renaming alfresco-global-enterprise.properties to alfresco-global.properties");
|
||||
} else {
|
||||
throw new MojoExecutionException("Invalid database configuration, use enableH2, enableMySQL, " +
|
||||
"enablePostgreSQL, or enabaleEnterpriseDb");
|
||||
}
|
||||
executeMojo(
|
||||
plugin(
|
||||
groupId("com.coderplus.maven.plugins"),
|
||||
artifactId("copy-rename-maven-plugin"),
|
||||
version("1.0")
|
||||
),
|
||||
goal("rename"),
|
||||
configuration(
|
||||
element(name("sourceFile"), alfrescoGlobalFilePath),
|
||||
element(name("destinationFile"), "${project.build.testOutputDirectory}/alfresco-global.properties")
|
||||
),
|
||||
execEnv
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy the Alfresco Enterprise license to its correct place in the Platform WAR, if it exists.
|
||||
* It is not enough to have it on the test classpath, then it will start up as Trial license...
|
||||
|
Loading…
x
Reference in New Issue
Block a user