From 7edac56eed03deefc85f47dbbdb9bc3565e28892 Mon Sep 17 00:00:00 2001 From: Ole Hejlskov Date: Fri, 5 Oct 2018 12:13:49 +0200 Subject: [PATCH] Remove DB specific properties --- .../alfresco-global-enterprise.properties | 72 ------------------ .../local/alfresco-global-h2.properties | 76 ------------------- .../local/alfresco-global-mysql.properties | 72 ------------------ ....properties => alfresco-global.properties} | 0 .../alfresco-global-enterprise.properties | 69 ----------------- .../local/alfresco-global-h2.properties | 73 ------------------ .../local/alfresco-global-mysql.properties | 69 ----------------- ....properties => alfresco-global.properties} | 0 .../maven/plugin/AbstractRunMojo.java | 46 ----------- .../maven/plugin/IntegrationTestMojo.java | 1 - .../org/alfresco/maven/plugin/RunMojo.java | 1 - 11 files changed, 479 deletions(-) delete mode 100644 archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/integration-tests/src/test/properties/local/alfresco-global-enterprise.properties delete mode 100644 archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/integration-tests/src/test/properties/local/alfresco-global-h2.properties delete mode 100644 archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/integration-tests/src/test/properties/local/alfresco-global-mysql.properties rename archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/integration-tests/src/test/properties/local/{alfresco-global-postgresql.properties => alfresco-global.properties} (100%) delete mode 100644 archetypes/alfresco-platform-jar-archetype/src/main/resources/archetype-resources/src/test/properties/local/alfresco-global-enterprise.properties delete mode 100644 archetypes/alfresco-platform-jar-archetype/src/main/resources/archetype-resources/src/test/properties/local/alfresco-global-h2.properties delete mode 100644 archetypes/alfresco-platform-jar-archetype/src/main/resources/archetype-resources/src/test/properties/local/alfresco-global-mysql.properties rename archetypes/alfresco-platform-jar-archetype/src/main/resources/archetype-resources/src/test/properties/local/{alfresco-global-postgresql.properties => alfresco-global.properties} (100%) diff --git a/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/integration-tests/src/test/properties/local/alfresco-global-enterprise.properties b/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/integration-tests/src/test/properties/local/alfresco-global-enterprise.properties deleted file mode 100644 index 37f66eef..00000000 --- a/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/integration-tests/src/test/properties/local/alfresco-global-enterprise.properties +++ /dev/null @@ -1,72 +0,0 @@ -# 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 \ No newline at end of file diff --git a/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/integration-tests/src/test/properties/local/alfresco-global-h2.properties b/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/integration-tests/src/test/properties/local/alfresco-global-h2.properties deleted file mode 100644 index 235d86b2..00000000 --- a/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/integration-tests/src/test/properties/local/alfresco-global-h2.properties +++ /dev/null @@ -1,76 +0,0 @@ -# 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 \ No newline at end of file diff --git a/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/integration-tests/src/test/properties/local/alfresco-global-mysql.properties b/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/integration-tests/src/test/properties/local/alfresco-global-mysql.properties deleted file mode 100644 index 1d0d739a..00000000 --- a/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/integration-tests/src/test/properties/local/alfresco-global-mysql.properties +++ /dev/null @@ -1,72 +0,0 @@ -# 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 \ No newline at end of file diff --git a/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/integration-tests/src/test/properties/local/alfresco-global-postgresql.properties b/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/integration-tests/src/test/properties/local/alfresco-global.properties similarity index 100% rename from archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/integration-tests/src/test/properties/local/alfresco-global-postgresql.properties rename to archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/integration-tests/src/test/properties/local/alfresco-global.properties diff --git a/archetypes/alfresco-platform-jar-archetype/src/main/resources/archetype-resources/src/test/properties/local/alfresco-global-enterprise.properties b/archetypes/alfresco-platform-jar-archetype/src/main/resources/archetype-resources/src/test/properties/local/alfresco-global-enterprise.properties deleted file mode 100644 index 7821440e..00000000 --- a/archetypes/alfresco-platform-jar-archetype/src/main/resources/archetype-resources/src/test/properties/local/alfresco-global-enterprise.properties +++ /dev/null @@ -1,69 +0,0 @@ -# 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 - -# 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 \ No newline at end of file diff --git a/archetypes/alfresco-platform-jar-archetype/src/main/resources/archetype-resources/src/test/properties/local/alfresco-global-h2.properties b/archetypes/alfresco-platform-jar-archetype/src/main/resources/archetype-resources/src/test/properties/local/alfresco-global-h2.properties deleted file mode 100644 index db3a2ce4..00000000 --- a/archetypes/alfresco-platform-jar-archetype/src/main/resources/archetype-resources/src/test/properties/local/alfresco-global-h2.properties +++ /dev/null @@ -1,73 +0,0 @@ -# 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 - -# 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 \ No newline at end of file diff --git a/archetypes/alfresco-platform-jar-archetype/src/main/resources/archetype-resources/src/test/properties/local/alfresco-global-mysql.properties b/archetypes/alfresco-platform-jar-archetype/src/main/resources/archetype-resources/src/test/properties/local/alfresco-global-mysql.properties deleted file mode 100644 index e1837c35..00000000 --- a/archetypes/alfresco-platform-jar-archetype/src/main/resources/archetype-resources/src/test/properties/local/alfresco-global-mysql.properties +++ /dev/null @@ -1,69 +0,0 @@ -# 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 - -# 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 \ No newline at end of file diff --git a/archetypes/alfresco-platform-jar-archetype/src/main/resources/archetype-resources/src/test/properties/local/alfresco-global-postgresql.properties b/archetypes/alfresco-platform-jar-archetype/src/main/resources/archetype-resources/src/test/properties/local/alfresco-global.properties similarity index 100% rename from archetypes/alfresco-platform-jar-archetype/src/main/resources/archetype-resources/src/test/properties/local/alfresco-global-postgresql.properties rename to archetypes/alfresco-platform-jar-archetype/src/main/resources/archetype-resources/src/test/properties/local/alfresco-global.properties 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 67074e64..d4986405 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 @@ -741,53 +741,7 @@ public abstract class AbstractRunMojo 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.getBuild().getTestOutputDirectory() + "/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"); - } - if (!FileUtils.fileExists(alfrescoGlobalFilePath)) { - throw new MojoExecutionException("Missing file: " + alfrescoGlobalFilePath + ", when converting from older " + - "SDK versions generate an SDK 3 AIO or Platform JAR project and copy " + - "alfresco-global-*.properties files from it. Then configure any custom settings from old SDK " + - "project repo/src/main/properties/local/alfresco-global.properties file in the new " + - "alfresco-global-h2.properties file, or other config file corresponding to the database you are using."); - } - - 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. diff --git a/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/IntegrationTestMojo.java b/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/IntegrationTestMojo.java index 229daa8c..614057a1 100644 --- a/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/IntegrationTestMojo.java +++ b/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/IntegrationTestMojo.java @@ -91,7 +91,6 @@ public class IntegrationTestMojo extends AbstractRunMojo { if (enableTestProperties && enablePlatform) { copyAlfrescoGlobalProperties(); - renameAlfrescoGlobalProperties(); } String testJarArtifactId = null; diff --git a/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/RunMojo.java b/plugins/alfresco-maven-plugin/src/main/java/org/alfresco/maven/plugin/RunMojo.java index 1f859e8b..faa3f193 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 @@ -58,7 +58,6 @@ public class RunMojo extends AbstractRunMojo { if (enableTestProperties && enablePlatform) { copyAlfrescoGlobalProperties(); - renameAlfrescoGlobalProperties(); } if (enablePlatform) {