diff --git a/server/zanata-overlay/.gitignore b/server/zanata-overlay/.gitignore deleted file mode 100644 index 08eb0a07a69..00000000000 --- a/server/zanata-overlay/.gitignore +++ /dev/null @@ -1 +0,0 @@ -!bin/ \ No newline at end of file diff --git a/server/zanata-overlay/README.md b/server/zanata-overlay/README.md deleted file mode 100644 index dd116c9f8d6..00000000000 --- a/server/zanata-overlay/README.md +++ /dev/null @@ -1,48 +0,0 @@ -Zanata Overlay -============== - -This modules builds an overlay zip for distribution. The produced artifact is a -zip file which can be extracted on top of an EAP or wildfly distribution and will -contain all the necessary artifacts for Zanata to run. - -It's built using gradle, which is assumed to be present in the environment. - -To build the overlay simply run: - -```sh -gradle -``` - -Optional parameters: - -| `zanata.war.location` | Location of the war file to be packaged | -|-----------------------|--------------------------------------------------------------------------------------------------| -| `zanata.version` | Version of the package being build. By default the build will look at the top-level pom.xml file | - -Example: - -```sh -gradle -Dzanata.war.location= -Dzanata.version= -``` - -Repo Contents -------------- - -_common_ - -Contains all the common artifacts to be packaged for all distributions. - -_config_ - -Contains all configuration files for the build. - -_distros_ - -Folders for each different distribution to be built. The contents of each -distribution will be packaged exclusively for that distribution. If there is a -need for another distribution, simply add a new folder here and it will be -detected automatically. - -_build.gradle_ - -The gradle build file. \ No newline at end of file diff --git a/server/zanata-overlay/build.gradle b/server/zanata-overlay/build.gradle deleted file mode 100644 index b9df4318721..00000000000 --- a/server/zanata-overlay/build.gradle +++ /dev/null @@ -1,129 +0,0 @@ -/** - * System Properties: - * zanata.version: Zanata version being built - * zanata.war.location: Location of the war file to package (optional) - */ - -defaultTasks 'package' -apply plugin: 'java' - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - runtime "mysql:mysql-connector-java:5.1.29" -} - -final def BUILD_DIR = "target" - -task 'package'(dependsOn: 'copyToLib') << { - def distros = findAvailableDistros() - def zanataVersion = readProjectVersion() - - distros.each { distro -> - def distroName = "zanata-$zanataVersion-$distro" - def distroDir = "$BUILD_DIR/$distroName" - // Make a build directory fro the distribution - ant.mkdir(dir: distroDir) - // Copy the common files for all distributions - ant.copy(todir: distroDir) { - fileset(dir: "common") - } - // Make sure executable files have the right permissions - ant.chmod(dir: "$distroDir/", perm: "ug+x", includes: "**/*.sh") - // Copy specific distribution files - ant.copy(todir: distroDir) { - fileset(dir: "distros/$distro") - } - // Copy extra needed files - ant.copy(todir: "$distroDir/standalone/deployments") { - fileset(dir: "$BUILD_DIR/deps") { - include(name: "mysql-connector-java-*.jar") - } - globmapper(from: "mysql-connector-java-*.jar", - to: "mysql-connector-java.jar") - } - // Copy the Zanata file - // If the system property zanata.war.location is passed, it will use - // it as the location of the Zanata war file, otherwise it will try to - // determine one from the locally installed dependencies - def zanataWarLocation = System.getProperty("zanata.war.location") - if(zanataWarLocation) { - // use one passed in - ant.copy(file: zanataWarLocation, - tofile: "$distroDir/standalone/deployments/zanata.war") - } else { - // Use zanata.war copied from the maven local or remote repo - ant.copy(todir: "$distroDir/standalone/deployments") { - fileset(dir: "$BUILD_DIR/deps") { - include(name: "*.war") - } - globmapper(from: "*.war", - to: "zanata.war") - } - } - // Download remote dependencies - downloadRemoteDeps(distro, distroDir) - // Zip it up - ant.zip(destfile: "$BUILD_DIR/${distroName}.zip", basedir: distroDir) - // Cleanup - //ant.delete(dir: "$BUILD_DIR/deps") - ant.delete(dir: distroDir) - } -} - -task copyToLib(type: Copy) { - into "$BUILD_DIR/deps" - from configurations.runtime -} - -List findAvailableDistros() { - new File("distros").listFiles() - .findAll { !it.name.startsWith(".") && it.isDirectory() } - .collect { it.name } -} - -static String readProjectVersion() { - // Read from system properties first - if( System.properties['zanata.version'] ) { - return System.properties['zanata.version'] - } - // Parse from the top-level pom - else { - (new groovy.util.XmlParser()).parse(new File("../pom.xml")).version. - text() - } -} - -def replaceTemplates(String distroDir, String zanataVersion) { - def engine = new groovy.text.SimpleTemplateEngine() - def templateFile = new File(distroDir, - "bin/zanata-installer/installer.properties") - def template = engine.createTemplate(templateFile) - def result = template.make(['version': zanataVersion]) - templateFile.newWriter() << result -} - -def downloadRemoteDeps(String distro, String distroDir) { - def config = new groovy.util.ConfigSlurper(). - parse(new File('config/remote-deps.groovy').toURL()) - config."$distro"?.each { depName, value -> - def dep = config."$distro"."$depName" - def destFile = new File("$distroDir/${dep.toFile}") - download(dep.url, destFile) - if (dep.extract) { - ant.unzip(src: "${destFile.absolutePath}", - dest: "${destFile.parent}") - ant.delete(file: "${destFile.absolutePath}") - } - } -} - -def download(String url, File destFile) { - def file = new FileOutputStream(destFile) - def out = new BufferedOutputStream(file) - out << new URL(url).openStream() - out.close() -} diff --git a/server/zanata-overlay/common/bin/standalone-zanata.bat b/server/zanata-overlay/common/bin/standalone-zanata.bat deleted file mode 100755 index 5e54a2ed528..00000000000 --- a/server/zanata-overlay/common/bin/standalone-zanata.bat +++ /dev/null @@ -1 +0,0 @@ -standalone.bat -c standalone-zanata.xml -P=../standalone/configuration/zanata.properties \ No newline at end of file diff --git a/server/zanata-overlay/common/bin/standalone-zanata.sh b/server/zanata-overlay/common/bin/standalone-zanata.sh deleted file mode 100755 index 83b919a5c76..00000000000 --- a/server/zanata-overlay/common/bin/standalone-zanata.sh +++ /dev/null @@ -1 +0,0 @@ -./standalone.sh -c standalone-zanata.xml -P=../standalone/configuration/zanata.properties \ No newline at end of file diff --git a/server/zanata-overlay/common/standalone/configuration/zanata.properties b/server/zanata-overlay/common/standalone/configuration/zanata.properties deleted file mode 100644 index b5ebc56845b..00000000000 --- a/server/zanata-overlay/common/standalone/configuration/zanata.properties +++ /dev/null @@ -1,6 +0,0 @@ -# JDBC url for the Zanata database (includes host, port, schema name) -zanata.db.url=jdbc:mysql://localhost:3306/zanata?characterEncoding=UTF-8 -# Database username -zanata.db.username=zanata -# Database password -zanata.db.password=zanatapw diff --git a/server/zanata-overlay/config/remote-deps.groovy b/server/zanata-overlay/config/remote-deps.groovy deleted file mode 100644 index 4ba5da239f2..00000000000 --- a/server/zanata-overlay/config/remote-deps.groovy +++ /dev/null @@ -1,28 +0,0 @@ -/** - * This is where all Remote dependencies are configured for each of the Zanata - * overlay distributions. - * Each distribution under the 'distros' folder may have a configuration entry - * on this file. Each of those entries must have the following structure: - * - * <> { - * <> { - * url = "Url where the dependency is to be downloaded from" - * toFile = "File (on the distro build folder) where the downloaded dependecny should reside" - * extract = true|false // Indicates if the dependency is to be extracted in place. If it is, the original file will be removed after extraction. - * } - * - * ... More dependencies - * } - * - * The dependency name is not relevant, just an identifier. - * - * For example: - * - * 'wildfly' { - * hibernatemodule { - * url = "https://bintray.com/artifact/download/sflanigan/generic/wildfly-module-hibernate-main-4.2.20.Final.zip" - * toFile = "/hibernate-module.zip" - * extract = true - * } - * } - */ diff --git a/server/zanata-overlay/distros/eap-7/standalone/configuration/standalone-zanata.xml b/server/zanata-overlay/distros/eap-7/standalone/configuration/standalone-zanata.xml deleted file mode 100644 index 2ec108d910a..00000000000 --- a/server/zanata-overlay/distros/eap-7/standalone/configuration/standalone-zanata.xml +++ /dev/null @@ -1,562 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${zanata.db.url} - com.mysql.jdbc.Driver - mysql-connector-java.jar - - 0 - 20 - FailingConnectionOnly - - - ${zanata.db.username} - ${zanata.db.password} - - - NOWARN - - - true - false - - - - - - jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE - h2 - - sa - sa - - - - - org.h2.jdbcx.JdbcDataSource - - - - - - - - - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${jboss.bind.address:127.0.0.1} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/server/zanata-overlay/distros/wildfly/standalone/configuration/standalone-zanata.xml b/server/zanata-overlay/distros/wildfly/standalone/configuration/standalone-zanata.xml deleted file mode 100644 index a51217fe06f..00000000000 --- a/server/zanata-overlay/distros/wildfly/standalone/configuration/standalone-zanata.xml +++ /dev/null @@ -1,619 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${zanata.db.url} - com.mysql.jdbc.Driver - mysql-connector-java.jar - - 0 - 20 - FailingConnectionOnly - - - ${zanata.db.username} - ${zanata.db.password} - - - NOWARN - - - true - false - - - - - - jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE - h2 - - sa - sa - - - - - org.h2.jdbcx.JdbcDataSource - - - - - - - - - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${jboss.bind.address:127.0.0.1} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -