The Unified and Autonomous Development Platform
Hard code product name into build script
Robin Shenf9fef68429d9
diff --git a/product/build/package.gant b/product/build/package.gantindex 790d658fd4..6fea61e084 100644--- a/product/build/package.gant+++ b/product/build/package.gant@@ -5,9 +5,9 @@ target(default:"package the product") {// do not change this line of codechmod(dir: sandboxDir, perm: "755", includes: "${executables}")- File destFile = new File(buildDir, "${packageName}.zip");+ File destFile = new File(buildDir, "turbodev-${productVersion}.zip");zip(destfile: destFile) {- zipfileset(dir: sandboxDir, prefix: "${packageName}", excludes: "${executables}, boot/system.classpath")- zipfileset(dir: sandboxDir, prefix: "${packageName}", includes: "${executables}", filemode: "755")+ zipfileset(dir: sandboxDir, prefix: "turbodev-${productVersion}", excludes: "${executables}, boot/system.classpath")+ zipfileset(dir: sandboxDir, prefix: "turbodev-${productVersion}", includes: "${executables}", filemode: "755")}}diff --git a/product/build/prepare_package.gant b/product/build/prepare_package.gantindex 070fbaa73b..3ee41244e0 100644--- a/product/build/prepare_package.gant+++ b/product/build/prepare_package.gant@@ -17,9 +17,9 @@ target(default:"prepare to package the product") {}filterset(id: "appFilterSet") {- filter(token: "app.name", value: "${lowerCaseProductName}")- filter(token: "app.long.name", value: "${productName}")- filter(token: "app.description", value: "${productName}")+ filter(token: "app.name", value: "turbodev")+ filter(token: "app.long.name", value: "TurboDev")+ filter(token: "app.description", value: "TurboDev")filter(token: "app.class", value: "${bootstrapClass}")}filterset(id: "batchCommandCommonFilterSet") {@@ -33,37 +33,37 @@ target(default:"prepare to package the product") {copy(tofile: binDir.absolutePath + "/server.bat", file: "${jswPath}/AppCommand.bat.in") {filterset() {filter(token: "set_fixed_command", value: "")- filter(token: "properties_and_parameters", value: "wrapper.pidfile=../status/${lowerCaseProductName}.pid")+ filter(token: "properties_and_parameters", value: "wrapper.pidfile=../status/turbodev.pid")}}copy(tofile: binDir.absolutePath + "/restore.bat", file: "${jswPath}/AppCommand.bat.in") {filterset(refid: "batchCommandCommonFilterSet")filterset() {- filter(token: "properties_and_parameters", value: "wrapper.logfile.loglevel=NONE wrapper.console.title=\"${productName} Restore\" wrapper.pidfile=${lowerCaseProductName}_restore.pid wrapper.name=${lowerCaseProductName}_restore wrapper.displayname=\"${productName} Restore\" wrapper.description=\"${productName} Restore\" -- restore")+ filter(token: "properties_and_parameters", value: "wrapper.logfile.loglevel=NONE wrapper.console.title=\"TurboDev Restore\" wrapper.pidfile=turbodev_restore.pid wrapper.name=turbodev_restore wrapper.displayname=\"TurboDev Restore\" wrapper.description=\"TurboDev Restore\" -- restore")}}copy(tofile: binDir.absolutePath + "/backup.bat", file: "${jswPath}/AppCommand.bat.in") {filterset(refid: "batchCommandCommonFilterSet")filterset() {- filter(token: "properties_and_parameters", value: "wrapper.logfile.loglevel=NONE wrapper.console.title=\"${productName} Backup\" wrapper.pidfile=${lowerCaseProductName}_backup.pid wrapper.name=${lowerCaseProductName}_backup wrapper.displayname=\"${productName} Backup\" wrapper.description=\"${productName} Backup\" -- backup")+ filter(token: "properties_and_parameters", value: "wrapper.logfile.loglevel=NONE wrapper.console.title=\"TurboDev Backup\" wrapper.pidfile=turbodev_backup.pid wrapper.name=turbodev_backup wrapper.displayname=\"TurboDev Backup\" wrapper.description=\"TurboDev Backup\" -- backup")}}copy(tofile: binDir.absolutePath + "/upgrade.bat", file: "${jswPath}/AppCommand.bat.in") {filterset(refid: "batchCommandCommonFilterSet")filterset() {- filter(token: "properties_and_parameters", value: "wrapper.logfile.loglevel=NONE wrapper.console.title=\"${productName} Upgrade\" wrapper.pidfile=${lowerCaseProductName}_upgrade.pid wrapper.name=${lowerCaseProductName}_upgrade wrapper.displayname=\"${productName} Upgrade\" wrapper.description=\"${productName} Upgrade\" -- upgrade")+ filter(token: "properties_and_parameters", value: "wrapper.logfile.loglevel=NONE wrapper.console.title=\"TurboDev Upgrade\" wrapper.pidfile=turbodev_upgrade.pid wrapper.name=turbodev_upgrade wrapper.displayname=\"TurboDev Upgrade\" wrapper.description=\"TurboDev Upgrade\" -- upgrade")}}copy(tofile: binDir.absolutePath + "/apply_db_constraints.bat", file: "${jswPath}/AppCommand.bat.in") {filterset(refid: "batchCommandCommonFilterSet")filterset() {- filter(token: "properties_and_parameters", value: "wrapper.logfile.loglevel=NONE wrapper.console.title=\"${productName} Apply DB Constraints\" wrapper.pidfile=${lowerCaseProductName}_apply_db_constraints.pid wrapper.name=${lowerCaseProductName}_apply_db_constraints wrapper.displayname=\"${productName} Apply DB Constraints\" wrapper.description=\"${productName} Apply DB Constraints\" -- apply_db_constraints")+ filter(token: "properties_and_parameters", value: "wrapper.logfile.loglevel=NONE wrapper.console.title=\"TurboDev Apply DB Constraints\" wrapper.pidfile=turbodev_apply_db_constraints.pid wrapper.name=turbodev_apply_db_constraints wrapper.displayname=\"TurboDev Apply DB Constraints\" wrapper.description=\"TurboDev Apply DB Constraints\" -- apply_db_constraints")}}copy(tofile: binDir.absolutePath + "/reset_admin_password.bat", file: "${jswPath}/AppCommand.bat.in") {filterset(refid: "batchCommandCommonFilterSet")filterset() {- filter(token: "properties_and_parameters", value: "wrapper.logfile.loglevel=NONE wrapper.console.title=\"${productName} Reset Admin Password\" wrapper.pidfile=${lowerCaseProductName}_reset_admin_password.pid wrapper.name=${lowerCaseProductName}_reset_admin_password wrapper.displayname=\"${productName} Reset Admin Password\" wrapper.description=\"${productName} Reset Admin Password\" -- reset_admin_password")+ filter(token: "properties_and_parameters", value: "wrapper.logfile.loglevel=NONE wrapper.console.title=\"TurboDev Reset Admin Password\" wrapper.pidfile=turbodev_reset_admin_password.pid wrapper.name=turbodev_reset_admin_password wrapper.displayname=\"TurboDev Reset Admin Password\" wrapper.description=\"TurboDev Reset Admin Password\" -- reset_admin_password")}}@@ -77,62 +77,62 @@ target(default:"prepare to package the product") {}copy(tofile: binDir.absolutePath + "/restore.sh", file: "${jswPath}/sh.script.in") {filterset() {- filter(token: "app.name", value: "${lowerCaseProductName}_restore")- filter(token: "app.long.name", value: "${productName} Restore")- filter(token: "app.description", value: "${productName} Restore")+ filter(token: "app.name", value: "turbodev_restore")+ filter(token: "app.long.name", value: "TurboDev Restore")+ filter(token: "app.description", value: "TurboDev Restore")filter(token: "app.class", value: "${bootstrapClass}")}filterset(refid: "shellScriptCommonFilterSet")filterset() {- filter(token: "properties_and_parameters", value: "wrapper.logfile.loglevel=NONE wrapper.console.title='${productName} Restore' wrapper.name=${lowerCaseProductName}_restore wrapper.displayname='${productName} Restore' wrapper.description='${productName} Restore' -- restore")+ filter(token: "properties_and_parameters", value: "wrapper.logfile.loglevel=NONE wrapper.console.title='TurboDev Restore' wrapper.name=turbodev_restore wrapper.displayname='TurboDev Restore' wrapper.description='TurboDev Restore' -- restore")}}copy(tofile: binDir.absolutePath + "/backup.sh", file: "${jswPath}/sh.script.in") {filterset() {- filter(token: "app.name", value: "${lowerCaseProductName}_backup")- filter(token: "app.long.name", value: "${productName} Backup")- filter(token: "app.description", value: "${productName} Backup")+ filter(token: "app.name", value: "turbodev_backup")+ filter(token: "app.long.name", value: "TurboDev Backup")+ filter(token: "app.description", value: "TurboDev Backup")filter(token: "app.class", value: "${bootstrapClass}")}filterset(refid: "shellScriptCommonFilterSet")filterset() {- filter(token: "properties_and_parameters", value: "wrapper.logfile.loglevel=NONE wrapper.console.title='${productName} Backup' wrapper.name=${lowerCaseProductName}_backup wrapper.displayname='${productName} Backup' wrapper.description='${productName} Backup' -- backup")+ filter(token: "properties_and_parameters", value: "wrapper.logfile.loglevel=NONE wrapper.console.title='TurboDev Backup' wrapper.name=turbodev_backup wrapper.displayname='TurboDev Backup' wrapper.description='TurboDev Backup' -- backup")}}copy(tofile: binDir.absolutePath + "/upgrade.sh", file: "${jswPath}/sh.script.in") {filterset() {- filter(token: "app.name", value: "${lowerCaseProductName}_upgrade")- filter(token: "app.long.name", value: "${productName} Upgrade")- filter(token: "app.description", value: "${productName} Upgrade")+ filter(token: "app.name", value: "turbodev_upgrade")+ filter(token: "app.long.name", value: "TurboDev Upgrade")+ filter(token: "app.description", value: "TurboDev Upgrade")filter(token: "app.class", value: "${bootstrapClass}")}filterset(refid: "shellScriptCommonFilterSet")filterset() {- filter(token: "properties_and_parameters", value: "wrapper.logfile.loglevel=NONE wrapper.console.title='${productName} Upgrade' wrapper.name=${lowerCaseProductName}_upgrade wrapper.displayname='${productName} Upgrade' wrapper.description='${productName} Upgrade' -- upgrade")+ filter(token: "properties_and_parameters", value: "wrapper.logfile.loglevel=NONE wrapper.console.title='TurboDev Upgrade' wrapper.name=turbodev_upgrade wrapper.displayname='TurboDev Upgrade' wrapper.description='TurboDev Upgrade' -- upgrade")}}copy(tofile: binDir.absolutePath + "/apply_db_constraints.sh", file: "${jswPath}/sh.script.in") {filterset() {- filter(token: "app.name", value: "${lowerCaseProductName}_apply_db_constraints")- filter(token: "app.long.name", value: "${productName} Apply DB Constraints")- filter(token: "app.description", value: "${productName} Apply DB Constraints")+ filter(token: "app.name", value: "turbodev_apply_db_constraints")+ filter(token: "app.long.name", value: "TurboDev Apply DB Constraints")+ filter(token: "app.description", value: "TurboDev Apply DB Constraints")filter(token: "app.class", value: "${bootstrapClass}")}filterset(refid: "shellScriptCommonFilterSet")filterset() {- filter(token: "properties_and_parameters", value: "wrapper.logfile.loglevel=NONE wrapper.console.title='${productName} Apply DB Constraints' wrapper.name=${lowerCaseProductName}_apply_db_constraints wrapper.displayname='${productName} Apply DB Constraints' wrapper.description='${productName} Apply DB Constraints' -- apply_db_constraints")+ filter(token: "properties_and_parameters", value: "wrapper.logfile.loglevel=NONE wrapper.console.title='TurboDev Apply DB Constraints' wrapper.name=turbodev_apply_db_constraints wrapper.displayname='TurboDev Apply DB Constraints' wrapper.description='TurboDev Apply DB Constraints' -- apply_db_constraints")}}copy(tofile: binDir.absolutePath + "/reset_admin_password.sh", file: "${jswPath}/sh.script.in") {filterset() {- filter(token: "app.name", value: "${lowerCaseProductName}_reset_admin_password")- filter(token: "app.long.name", value: "${productName} Reset Admin Password")- filter(token: "app.description", value: "${productName} Reset Admin Password")+ filter(token: "app.name", value: "turbodev_reset_admin_password")+ filter(token: "app.long.name", value: "TurboDev Reset Admin Password")+ filter(token: "app.description", value: "TurboDev Reset Admin Password")filter(token: "app.class", value: "${bootstrapClass}")}filterset(refid: "shellScriptCommonFilterSet")filterset() {- filter(token: "properties_and_parameters", value: "wrapper.logfile.loglevel=NONE wrapper.console.title='${productName} Reset Admin Password' wrapper.name=${lowerCaseProductName}_reset_admin_password wrapper.displayname='${productName} Reset Admin Password' wrapper.description='${productName} Reset Admin Password' -- reset_admin_password")+ filter(token: "properties_and_parameters", value: "wrapper.logfile.loglevel=NONE wrapper.console.title='TurboDev Reset Admin Password' wrapper.name=turbodev_reset_admin_password wrapper.displayname='TurboDev Reset Admin Password' wrapper.description='TurboDev Reset Admin Password' -- reset_admin_password")}}diff --git a/product/pom.xml b/product/pom.xmlindex b4aa23169c..b870a7886f 100644--- a/product/pom.xml+++ b/product/pom.xml@@ -2,7 +2,6 @@<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><artifactId>server-product</artifactId>- <name>TurboDev</name><parent><groupId>com.turbodev</groupId><artifactId>server-parent</artifactId>@@ -10,26 +9,6 @@</parent><build><plugins>- <plugin>- <groupId>org.codehaus.gmaven</groupId>- <artifactId>groovy-maven-plugin</artifactId>- <version>2.0</version>- <executions>- <execution>- <phase>initialize</phase>- <goals>- <goal>execute</goal>- </goals>- <configuration>- <source>- project.properties["lowerCaseProductName"] = project.name.toLowerCase()- def wikiSpace = "GP" + project.version.find(/\d+\.\d+/).replace('.', '')- project.properties["docLink"] = "http://wiki.pmease.com/display/" + wikiSpace- </source>- </configuration>- </execution>- </executions>- </plugin><plugin><groupId>com.turbodev</groupId><artifactId>plugin-maven</artifactId>@@ -43,16 +22,8 @@<configuration><target><copy todir="${project.build.directory}/sandbox">- <fileset dir="system" excludes="site/images/**, site/avatars/**, **/*.keystore, **/*.jar"/>- <filterset>- <filter token="productName" value="${project.name}"/>- <filter token="lowerCaseProductName" value="${lowerCaseProductName}"/>- <filter token="docLink" value="${docLink}"/>- </filterset>+ <fileset dir="system"/></copy>- <copy todir="${project.build.directory}/sandbox">- <fileset dir="system" includes="site/images/**, site/avatars/**, **/*.keystore, **/*.jar"/>- </copy></target></configuration></execution>@@ -92,8 +63,6 @@<definition name="buildDirectory" value="${project.build.directory}"/><definition name="outputDirectory" value="${project.build.outputDirectory}"/><definition name="jswPath" value="${basedir}/build/jsw"/>- <definition name="productName" value="${project.name}"/>- <definition name="lowerCaseProductName" value="${lowerCaseProductName}"/><definition name="productVersion" value="${project.version}"/><definition name="bootstrapClass" value="${bootstrapClass}"/></gant>@@ -112,7 +81,7 @@<gant file="build/package.gant"><definition name="buildDirectory" value="${project.build.directory}"/><definition name="executables" value="${executables}"/>- <definition name="packageName" value="${lowerCaseProductName}-${project.version}"/>+ <definition name="productVersion" value="${project.version}"/></gant></target></configuration>diff --git a/product/system/conf/hibernate.properties b/product/system/conf/hibernate.propertiesindex ca900b07eb..5c960775f5 100644--- a/product/system/conf/hibernate.properties+++ b/product/system/conf/hibernate.properties@@ -1,11 +1,11 @@#-----------------------------------------------------------------------------------# To use embedded HSQLDB database shipped with @productName@, please uncomment HSQLDB+# To use embedded HSQLDB database shipped with TurboDev, please uncomment HSQLDB# database settings below and comment out settings for other databases.#----------------------------------------------------------------------------------hibernate.dialect=org.hibernate.dialect.HSQLDialecthibernate.connection.driver_class=org.hsqldb.jdbc.JDBCDriver-hibernate.connection.url=jdbc:hsqldb:file:${installDir}/sampledb/@lowerCaseProductName@;shutdown=true+hibernate.connection.url=jdbc:hsqldb:file:${installDir}/sampledb/turbodev;shutdown=truehibernate.connection.username=sahibernate.connection.password=@@ -13,9 +13,9 @@ hibernate.connection.password=#----------------------------------------------------------------------------------# To use MySQL/MariaDB database, please follow these steps:# 1. Uncomment MySQL/MariaDB settings below and comment out settings for other databases.-# 2. Create an empty @lowerCaseProductName@ schema at MySQL/MariaDB side.+# 2. Create an empty turbodev schema at MySQL/MariaDB side.# 3. Change the property "hibernate.connection.url", "hibernate.connection.username",-# and "hibernate.connection.password" so that @productName@ can connect and write to+# and "hibernate.connection.password" so that TurboDev can connect and write to# the database created in step 3.# 4. For MySQL, make sure to use "InnoDB" as default storage engine, for MariaDB, make# sure to use "XtraDB" or "InnoDB" as the default storage engine.@@ -23,7 +23,7 @@ hibernate.connection.password=#hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect#hibernate.connection.driver_class=org.mariadb.jdbc.Driver-#hibernate.connection.url=jdbc:mysql://localhost:3306/@lowerCaseProductName@+#hibernate.connection.url=jdbc:mysql://localhost:3306/turbodev#hibernate.connection.username=root#hibernate.connection.password=root@@ -39,7 +39,7 @@ hibernate.connection.password=#hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect#hibernate.connection.driver_class=org.postgresql.Driver-#hibernate.connection.url=jdbc:postgresql://localhost:5432/@lowerCaseProductName@+#hibernate.connection.url=jdbc:postgresql://localhost:5432/turbodev#hibernate.connection.username=postgres#hibernate.connection.password=postgres@@ -51,13 +51,13 @@ hibernate.connection.password=# other databases.# 3. Create an empty database at SQL Server side.# 4. Change the property "hibernate.connection.url", "hibernate.connection.username",-# and "hibernate.connection.password" so that @productName@ can connect and write to+# and "hibernate.connection.password" so that TurboDev can connect and write to# the database created in step 3.#----------------------------------------------------------------------------------#hibernate.dialect=org.hibernate.dialect.SQLServer2012Dialect#hibernate.connection.driver_class=com.microsoft.sqlserver.jdbc.SQLServerDriver-#hibernate.connection.url=jdbc:sqlserver://localhost:1433;databaseName=@lowerCaseProductName@+#hibernate.connection.url=jdbc:sqlserver://localhost:1433;databaseName=turbodev#hibernate.connection.username=sa#hibernate.connection.password=sa@@ -67,7 +67,7 @@ hibernate.connection.password=# 1. Uncomment Oracle settings below and comment out settings for other databases.# 2. Create an empty Oracle database.# 3. Change the property "hibernate.connection.url", "hibernate.connection.username",-# and "hibernate.connection.password" so that @productName@ can connect and write to+# and "hibernate.connection.password" so that TurboDev can connect and write to# the database created in step 3.# 4. Change property "hibernate.dialect" based on different Oracle versions:# 5.1 Use value "org.hibernate.dialect.Oracle9iDialect" if Oracle9i is used.@@ -79,8 +79,8 @@ hibernate.connection.password=#hibernate.dialect=org.hibernate.dialect.Oracle10gDialect#hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver#hibernate.connection.url=jdbc:oracle:thin:@localhost:1521:XE-#hibernate.connection.username=@lowerCaseProductName@-#hibernate.connection.password=@lowerCaseProductName@+#hibernate.connection.username=turbodev+#hibernate.connection.password=turbodevhibernate.connection.provider_class=org.hibernate.hikaricp.internal.HikariCPConnectionProvider