Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Merge branch 'integration/master' into update-search
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Eng committed Jun 19, 2015
2 parents 1d168cf + e15076e commit 472115c
Show file tree
Hide file tree
Showing 79 changed files with 3,785 additions and 8,672 deletions.
39 changes: 18 additions & 21 deletions docs/release-notes.md
@@ -1,19 +1,22 @@
## 3.7

<h5>Infrastructure Changes</h5>

* Zanata now uses Infinispan as its cache provider, and the cache needs to be configured in Jboss' `standalone.xml` file. Please see the [Infinispan](user-guide/system-admin/configuration/infinispan) section for more information.
<h5>Deployment</h5>

* This release adds a one-time migration of some data, which can cause a timeout during server startup. This applies to
all plain text and libreoffice formats, so is only a concern for servers that are upgrading from an earlier version and
already have several hundred such documents. To avoid the timeout, add or change the following property in
`standalone.xml`. A value of 1000 seconds is sufficient in our tests. Since the migration is performed only once, the
property can safely be reverted or removed before subsequent startups.
* Deployment for this release may require a longer timeout due to underlying database schema changes and data migration. This is dependent on database size and system performance, and the system administrator should consider increasing the JBoss timeout value in standalone.xml. This example sets a timeout of two hours, which should be more than enough:

<system-properties>
...
<property name="jboss.as.management.blocking.timeout" value="1000"/>
<property name="jboss.as.management.blocking.timeout" value="7200"/>
...
</system-properties>
* The Zanata administrator will also need to reindex HProject table via the Administration menu. See [Manage search](user-guide/admin/manage-search) for more information.


<h5>Infrastructure Changes</h5>

* Zanata now uses Infinispan as its cache provider, and the cache needs to be configured in Jboss' `standalone.xml` file. Please see the [Infinispan](user-guide/system-admin/configuration/infinispan) section for more information.

* [1207423](https://bugzilla.redhat.com/show_bug.cgi?id=1207423) - zanata-assets(javascipts and css style) now are packaged as jar and is part of zanata-server dependency.
[Release](http://repository-zanata.forge.cloudbees.com/release/org/zanata/zanata-assets/) and [snapshot](http://repository-zanata.forge.cloudbees.com/snapshot/org/zanata/zanata-assets/)
Expand All @@ -25,19 +28,7 @@ Example usage in html file: `<link rel="shortcut icon" href="#{assets['img/logo/
* [PR 633](https://github.com/zanata/zanata-server/pull/633) - Use JNDI to obtain mail server from app server
* Zanata now uses `java:jboss/mail/Default` mail session for SMTP configuration. See "Email configuration" in [System admin guide](http://docs.zanata.org/en/latest/user-guide/system-admin/configuration/installation/index.html) for details.

<h5>Deployment</h5>

* Deployment for this release may require a longer timeout due to underlying database changes. This is dependent on database size and the system administrator should consider increasing the JBoss timeout value in standalone.xml.

<system-properties>
...
<property name="jboss.as.management.blocking.timeout" value="2000"/>
</system-properties>
* The Zanata administrator will also need to reindex HProject table via the Administration menu. See [Manage search](user-guide/admin/manage-search) for more information.


<h5>Bug fixes</h5>
* [1194543](https://bugzilla.redhat.com/show_bug.cgi?id=1194543) - Manual document re-upload makes previous translations fuzzy
* [1029734](https://bugzilla.redhat.com/show_bug.cgi?id=1029734) - po header contains invalid entry will cause upload/push failure
Expand All @@ -62,6 +53,10 @@ Example usage in html file: `<link rel="shortcut icon" href="#{assets['img/logo/
* [1224030](https://bugzilla.redhat.com/show_bug.cgi?id=1224030) - Search form does not trigger search if paste text
* [1198898](https://bugzilla.redhat.com/show_bug.cgi?id=1198898) - Exception on using the URL to view a language not yet added to Zanata
* [1116172](https://bugzilla.redhat.com/show_bug.cgi?id=1116172) - Captcha no longer used, dead code still exists
* [1230419](https://bugzilla.redhat.com/show_bug.cgi?id=1230419) - Only show "approved" figure in version page if "Review required" is enable or value more than 0
* [1229940](https://bugzilla.redhat.com/show_bug.cgi?id=1229940) - When deleting a version or project remove links and replace icon from the activity feed
* [1230424](https://bugzilla.redhat.com/show_bug.cgi?id=1230424) - Update message "Archived" to "Deleted" in activity table

-----------------------

<h5>New Features</h5>
Expand All @@ -77,6 +72,8 @@ Example usage in html file: `<link rel="shortcut icon" href="#{assets['img/logo/
* [1204982](https://bugzilla.redhat.com/show_bug.cgi?id=1204982) - Documentation update for zanata.org/help + readthedocs
* [1211849](https://bugzilla.redhat.com/show_bug.cgi?id=1211849) - Project maintainer can change project/version slug
* [1082840](https://bugzilla.redhat.com/show_bug.cgi?id=1082840) - Project maintainer can delete a project or project version
* [1209669](https://bugzilla.redhat.com/show_bug.cgi?id=1209669) - New REST endpoint for editor suggestions.
*

## 3.6.3

Expand Down
51 changes: 51 additions & 0 deletions etc/scripts/extractAppserver.groovy
@@ -0,0 +1,51 @@
/*
* Copyright 2015, Red Hat, Inc. and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

/**
* @author Sean Flanigan <a href="mailto:sflaniga@redhat.com">sflaniga@redhat.com</a>
*/

import groovy.util.AntBuilder

// NB: project is a MavenProject
// http://maven.apache.org/ref/3-LATEST/maven-core/apidocs/org/apache/maven/project/MavenProject.html

String downloadDir = project.properties.get('download.dir') // ~/Downloads
String cargoExtractDir = project.properties.get('cargo.extract.dir') // target/cargo/installs
String url = project.properties.get('cargo.installation') // http://example.com/jbosseap6.zip

String filename = url.substring(url.lastIndexOf('/')+1)
String filePath = "${downloadDir}/${filename}"
String basename = filename.substring(0, filename.lastIndexOf('.'))
String extractDir = "${cargoExtractDir}/${basename}"

def ant = new AntBuilder()
ant.mkdir(dir: downloadDir)
ant.get(src: url, dest: filePath, skipexisting: "true")
ant.unzip(src: filePath, dest:"${extractDir}")

def files = new File(extractDir).listFiles()
if (files.length != 1) {
throw new Exception('zip should contain exactly one top-level dir; see ' + extractDir)
}
def topLevelDir = files[0].path

project.properties.put('appserver.home', topLevelDir)
30 changes: 30 additions & 0 deletions frontend/README.md
@@ -0,0 +1,30 @@
## This is a module to build zanata frontend javascript projects

At the moment it only contains "user profile page" bundle.

To build it, just run

```mvn install```

It will build and deploy to local maven repository a jar file containing the javascript bundle.
The jar file can be used directly under any servlet 3 compatible container and the bundle is accessible as static resources.
See [Servlet 3 static resources](http://www.webjars.org/documentation#servlet3).

The following Maven properties can be overridden on the command line with ```-Dkey=value```:

```
<node.version>v0.12.2</node.version>
<npm.version>2.7.6</npm.version>
<node.install.directory>${download.dir}/zanata-frontend/node-${node.version}-npm-${npm.version}</node.install.directory>
<npm.cli.script>${node.install.directory}/node/npm/bin/npm-cli.js</npm.cli.script>
```

By default it will try to install npm modules from npm registry (default cache TTL is 10 seconds).
If you activate profile ```-DnpmOffline``` the cache-min option will become 9999999 which means it will try to install npm modules from cache first.

## NPM shrinkwrap

Currently the user profile page module has been "shrinkwrapped" which means its npm module dependencies has been fixed to certain version. If you want to add or upgrade an individual version, you will need to consult [npm shrinkwrap documentation](https://docs.npmjs.com/cli/shrinkwrap#building-shrinkwrapped-packages) for detail instruction.

Since we use maven to copy our source to target/ then run npm from maven, you will need to run above commands under target/ then copy the new npm-shrinkwrap.json file back to src/.

37 changes: 23 additions & 14 deletions frontend/pom.xml
@@ -1,11 +1,10 @@
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<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>
<parent>
<groupId>org.zanata</groupId>
<artifactId>server</artifactId>
<version>3.7.0-SNAPSHOT</version>
<version>3.8.0-SNAPSHOT</version>
</parent>
<artifactId>frontend</artifactId>
<name>frontend</name>
Expand All @@ -15,10 +14,11 @@
<node.version>v0.12.2</node.version>
<npm.version>2.7.6</npm.version>
<web.target>${project.build.directory}/web</web.target>
<bundle.output>${project.build.directory}/build</bundle.output>
<bundle.dest>${bundle.output}/META-INF/resources</bundle.dest>
<node.install.directory>${project.build.directory}</node.install.directory>
<bundle.dest>${project.build.outputDirectory}/META-INF/resources</bundle.dest>
<node.install.directory>${download.dir}/zanata-frontend/node-${node.version}-npm-${npm.version}</node.install.directory>
<npm.cli.script>${node.install.directory}/node/npm/bin/npm-cli.js</npm.cli.script>
<!-- in seconds. 10 is the default value -->
<npm.cache.min>10</npm.cache.min>

<!-- ==== list of modules to build by npm and node ==== -->
<module.user-profile-page>user-profile-page</module.user-profile-page>
Expand Down Expand Up @@ -85,6 +85,8 @@
<arguments>
<argument>${npm.cli.script}</argument>
<argument>install</argument>
<argument>--cache-min</argument>
<argument>${npm.cache.min}</argument>
</arguments>
</configuration>
</execution>
Expand All @@ -100,7 +102,7 @@
<argument>${npm.cli.script}</argument>
<argument>run</argument>
<argument>build</argument>
<argument>bundleDest=${bundle.dest}</argument>
<argument>--env.bundleDest=${bundle.dest}</argument>
</arguments>
</configuration>
</execution>
Expand All @@ -115,14 +117,21 @@
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<classesDirectory>${bundle.output}</classesDirectory>
</configuration>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>npmOffline</id>
<activation>
<property>
<name>npmOffline</name>
</property>
</activation>
<properties>
<npm.cache.min>9999999</npm.cache.min>
</properties>
</profile>
</profiles>

</project>

0 comments on commit 472115c

Please sign in to comment.