Skip to content

Commit

Permalink
Merge pull request #2 from moqui/master
Browse files Browse the repository at this point in the history
merge from moqui/moqui-framework master
  • Loading branch information
Wei Zhang authored May 8, 2018
2 parents 732a76b + 7de5572 commit 5480477
Show file tree
Hide file tree
Showing 80 changed files with 1,331 additions and 394 deletions.
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: java -Xmx1024M -cp . MoquiStart port=5000 conf=conf/MoquiProductionConf.xml
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,14 @@
[![Gitter Chat at https://gitter.im/moqui/moqui-framework](https://badges.gitter.im/moqui/moqui-framework.svg)](https://gitter.im/moqui/moqui-framework?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Stack Overflow](https://img.shields.io/badge/stack%20overflow-moqui-blue.svg)](http://stackoverflow.com/questions/tagged/moqui)


For information about community infrastructure for code, discussions, support, etc see the Community Guide:

<https://www.moqui.org/docs/moqui/Community+Guide>

For details about running and deploying Moqui see:

<http://www.moqui.org/framework/docs/RunDeploy.html>
<https://www.moqui.org/docs/framework/Run+and+Deploy>

Note that a runtime directory is required for Moqui Framework to run, but is not included in the source repository. The
Gradle get component, load, and run tasks will automatically add the default runtime (from the moqui-runtime repository).
Expand All @@ -25,13 +30,13 @@ see the [ReleaseNotes.md](https://github.com/moqui/moqui-framework/blob/master/R

For an overview of features see:

<http://www.moqui.org/framework/docs/features.html>
<https://www.moqui.org/docs/framework/Framework+Features>

Get started with Moqui development quickly using the Tutorial at:

<http://www.moqui.org/framework/docs/Tutorial.html>
<https://www.moqui.org/docs/framework/Quick+Tutorial>

For comprehensive documentation of Moqui Framework and an overview of
Mantle Business Artifacts download the PDF of the **Making Apps with Moqui** book:

<http://www.moqui.org/MakingAppsWithMoqui-1.0.pdf>
<https://www.moqui.org/MakingAppsWithMoqui-1.0.pdf>
9 changes: 9 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ Moqui Framework 2.1.1 is a patch level new feature and bug fix release.
- Moved validate-* attributes from XML Form field element to sub-field elements so that in form-list different validation can be
done for header, first-/second-/last-row, and default-/conditional-field; as part of this the automatic validate settings from
transition.service-call are now set on the sub-field instead of the field element
- Add moqui-conf.screen-facade.screen and screen.subscreens-item elements that override screen.subscreens.subscreens-item elements
within a screen definition so that application root screens can be added under webroot and apps in a MoquiConf.xml file in a
component or in the active Moqui Conf XML file instead of using database records
- Add support for 'no sub-path' subscreens to extend or override screens, transitions, and resources under the parent screen by
looking first in each no sub-path subscreen for a given screen path and if not found then look under the parent screen; for
example this is used in the moqui-org component for the moqui.org web-site so that /index.html is found in the moqui-org
component and so that /Login resolves to the Login.xml screen in the moqui-org component instead of the default one under webroot
- Changed Markdown rendering from Pegdown to flexmark-java to support CommonMark 0.28, some aspects of GitHub Flavored Markdown,
and automatic table of contents

### Bug Fixes

Expand Down
2 changes: 2 additions & 0 deletions addons.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
<component name="AuthorizeDotNet" group="moqui" version="1.2.0" branch="master"/>
<component name="mantle-shippo" group="moqui" version="1.0.0" branch="master"/>
<component name="mantle-braintree" group="moqui" version="" branch="master"/><!-- no releases -->
<component name="mantle-paytrace" group="moqui" version="" branch="master"/><!-- no releases -->

<component name="mantle-ubpl" group="moqui" version="" branch="master"/><!-- no releases -->
<component name="mantle-oagis" group="moqui" version="" branch="master"/><!-- no releases -->
Expand All @@ -52,6 +53,7 @@
<component name="SimpleScreens" group="moqui" version="2.0.0" branch="master"/>
<component name="HiveMind" group="moqui" version="1.3.0" branch="master"/>
<component name="PopCommerce" group="moqui" version="2.0.0" branch="master"/>
<component name="moqui-org" group="moqui" version="" branch="master"/>

<!-- Third Party Components -->
<component name="moqui-zh_CN-addon" group="chunlinyao" version="" branch="master"/><!-- no releases -->
Expand Down
30 changes: 24 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
*/

buildscript {
repositories { jcenter() }
dependencies { classpath 'org.ajoberstar:gradle-git:1.3.2' }
repositories { jcenter() }
dependencies { classpath 'org.ajoberstar:grgit:2.1.0' }
}
// Not needed for explicit use, causes problems when not from git repo: plugins { id 'org.ajoberstar.grgit' version '1.3.2' }
// Not needed for explicit use, causes problems when not from git repo: plugins { id 'org.ajoberstar.grgit' version 'x.y.z' }

import org.ajoberstar.grgit.*

Expand Down Expand Up @@ -85,15 +85,31 @@ task gitPullAll {
description "Do a git pull to update moqui, runtime, and each installed component (for each where a .git directory is found)"
doLast {
// framework and runtime
if (file(".git").exists()) { logger.lifecycle("\nPulling moqui"); Grgit.open(dir: '.').pull() }
if (file("runtime/.git").exists()) { logger.lifecycle("\nPulling runtime"); Grgit.open(dir: 'runtime').pull() }
if (file(".git").exists()) { logger.lifecycle("\nPulling moqui"); doGitPullWithStatus('.') }
if (file("runtime/.git").exists()) { logger.lifecycle("\nPulling runtime"); doGitPullWithStatus('runtime') }
// all directories under runtime/component
for (File compDir in file('runtime/component').listFiles().findAll { it.isDirectory() && it.listFiles().find { it.name == '.git' } }) {
logger.lifecycle("\nPulling ${compDir.path}")
Grgit.open(dir: compDir.path).pull()
doGitPullWithStatus(compDir.path)
}
}
}
def doGitPullWithStatus(def gitDir) {
try {
def curGrgit = Grgit.open(dir: gitDir)
def beforeHead = curGrgit.head()
curGrgit.pull()
def afterHead = curGrgit.head()
if (beforeHead == afterHead) {
logger.lifecycle("Already up-to-date.")
} else {
List<Commit> commits = curGrgit.log { range(beforeHead, afterHead) }
for (Commit commit in commits) logger.lifecycle("- ${commit.getAbbreviatedId(7)} by ${commit.committer?.name}: ${commit.shortMessage}")
}
} catch (Throwable t) {
logger.error(t.message)
}
}
task gitStatusAll {
description "Do a git status to check moqui, runtime, and each installed component (for each where a .git directory is found)"
doLast {
Expand Down Expand Up @@ -247,6 +263,8 @@ task addRuntime {
copy { from fileTree(dir: moquiRuntime+'/ecomponent', include: '**/*.jar').files into 'wartemp/WEB-INF/lib' }
// add MoquiInit.properties fresh copy, just in case it was changed
copy { from file('MoquiInit.properties') into 'wartemp/WEB-INF/classes' }
// add Procfile to root
copy { from file('Procfile') into 'wartemp' }
// special case: copy elasticsearch plugin/module jars
copy { from fileTree(dir: '.', include: moquiRuntime+'/elasticsearch/**/*.jar') into file('wartemp') }
// special case: copy jackrabbit standalone jar (if exists)
Expand Down
6 changes: 6 additions & 0 deletions docker/moqui-mysql-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,19 @@ services:
# this one isn't needed: - ./runtime/db:/opt/moqui/runtime/db
- ./runtime/elasticsearch:/opt/moqui/runtime/elasticsearch
environment:
- instance_purpose=production
- entity_ds_db_conf=mysql
- entity_ds_host=moqui-database
- entity_ds_port=3306
- entity_ds_database=moqui
- entity_ds_user=moqui
- entity_ds_password=moqui
- entity_ds_crypt_pass='MoquiDefaultPassword:CHANGEME'
# moqui will accept traffic from other hosts but these are the values used for URL writing when specified:
- webapp_http_host=moqui.local
- webapp_http_port=80
- webapp_https_port=443
- webapp_https_enabled=true
- default_locale=en_US
- default_time_zone=US/Pacific

Expand Down
1 change: 1 addition & 0 deletions docker/moqui-ng-my-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ services:
# this one isn't needed when not using H2/etc: - ./runtime/db:/opt/moqui/runtime/db
- ./runtime/elasticsearch:/opt/moqui/runtime/elasticsearch
environment:
- instance_purpose=production
- entity_ds_db_conf=mysql
- entity_ds_host=moqui-database
- entity_ds_port=3306
Expand Down
1 change: 1 addition & 0 deletions docker/moqui-ng-my-kib-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ services:
# this one isn't needed when not using H2/etc: - ./runtime/db:/opt/moqui/runtime/db
- ./runtime/elasticsearch:/opt/moqui/runtime/elasticsearch
environment:
- instance_purpose=production
- entity_ds_db_conf=mysql
- entity_ds_host=moqui-database
- entity_ds_port=3306
Expand Down
1 change: 1 addition & 0 deletions docker/moqui-ng-pg-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ services:
# this one isn't needed when not using H2/etc: - ./runtime/db:/opt/moqui/runtime/db
- ./runtime/elasticsearch:/opt/moqui/runtime/elasticsearch
environment:
- instance_purpose=production
- entity_ds_db_conf=postgres
- entity_ds_host=moqui-database
- entity_ds_port=5432
Expand Down
8 changes: 8 additions & 0 deletions docker/nginx/my_proxy.conf
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
client_max_body_size 20M;

proxy_connect_timeout 3600s;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;

websocket_connect_timeout 3600s;
websocket_read_timeout 3600s;
websocket_send_timeout 3600s;
1 change: 1 addition & 0 deletions docker/simple/docker-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ docker build -t $NAME_TAG .
rm -Rf META-INF WEB-INF execlib
rm *.class
rm -Rf runtime
rm Procfile
55 changes: 29 additions & 26 deletions framework/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// tasks.withType(GroovyCompile) { options.compilerArgs << "-Xlint:unchecked" }
// tasks.withType(GroovyCompile) { options.compilerArgs << "-Xlint:deprecation" }

version = '2.1.1-rc1'
version = '2.1.1-rc2'

apply plugin: 'groovy'
apply plugin: 'war'
Expand Down Expand Up @@ -63,12 +63,12 @@ dependencies {
compile project(':moqui-util')

// Groovy
compile 'org.codehaus.groovy:groovy:2.4.13' // Apache 2.0
compile 'org.codehaus.groovy:groovy-json:2.4.13' // Apache 2.0
compile 'org.codehaus.groovy:groovy-templates:2.4.13' // Apache 2.0
compile 'org.codehaus.groovy:groovy-xml:2.4.13' // Apache 2.0
compile 'org.codehaus.groovy:groovy:2.4.15' // Apache 2.0
compile 'org.codehaus.groovy:groovy-json:2.4.15' // Apache 2.0
compile 'org.codehaus.groovy:groovy-templates:2.4.15' // Apache 2.0
compile 'org.codehaus.groovy:groovy-xml:2.4.15' // Apache 2.0
// jansi is needed for groovydoc only, so in providedCompile (not included in war)
compileOnly 'org.fusesource.jansi:jansi:1.16'
compileOnly 'org.fusesource.jansi:jansi:1.17.1'
// Findbugs need only during compile (used by freemarker and various moqui classes)
compileOnly 'com.google.code.findbugs:annotations:3.0.1'

Expand All @@ -82,7 +82,7 @@ dependencies {
// CUPS4J - print through CUPS server
compile name: 'cups4j', version: '0.6.4' // LGPL <== NOTE!
// CUPS4J sepends on Apache HTTP Client (unfortunate, adds about 1.1MB)
compile 'org.apache.httpcomponents:httpclient:4.5.3'
compile 'org.apache.httpcomponents:httpclient:4.5.5'

// ========== Libraries from jcenter ==========

Expand All @@ -101,12 +101,17 @@ dependencies {
// cron-utils (NOTE: not updating to 6.0.0 as adds dependency on Guava and threetenbp, evidently for pre Java 8 support but huge libs not worth it)
compile module('com.cronutils:cron-utils:5.0.5') // Apache 2.0

// Flexmark (markdown)
compile 'com.vladsch.flexmark:flexmark:0.32.20'
compile 'com.vladsch.flexmark:flexmark-ext-tables:0.32.20'
compile 'com.vladsch.flexmark:flexmark-ext-toc:0.32.20'

// Freemarker
compile 'org.freemarker:freemarker:2.3.27-incubating' // Apache 2.0
compile 'org.freemarker:freemarker:2.3.28' // Apache 2.0

// Java Specifications
compile 'javax.transaction:jta:1.1'
compile 'javax.cache:cache-api:1.0.0'
compile 'javax.cache:cache-api:1.1.0'
compile 'javax.jcr:jcr:2.0'
compile 'javax.websocket:javax.websocket-api:1.0' // using 1.0, don't update to 1.1 until used in Jetty, Tomcat, etc
providedCompile 'javax.servlet:javax.servlet-api:3.1.0'
Expand All @@ -115,30 +120,28 @@ dependencies {
// compile 'javax.jms:jms:1.1'

// H2 Database
compile 'com.h2database:h2:1.4.196' // MPL 2.0, EPL 1.0
compile 'com.h2database:h2:1.4.197' // MPL 2.0, EPL 1.0

// Jackson Databind (JSON, etc)
compile 'com.fasterxml.jackson.core:jackson-databind:2.9.2'
compile 'com.fasterxml.jackson.core:jackson-databind:2.9.5'

// Jetty HTTP Client and Proxy Servlet
compile 'org.eclipse.jetty:jetty-client:9.4.7.v20170914' // Apache 2.0
compile 'org.eclipse.jetty:jetty-proxy:9.4.7.v20170914' // Apache 2.0
compile 'org.eclipse.jetty:jetty-client:9.4.9.v20180320' // Apache 2.0
compile 'org.eclipse.jetty:jetty-proxy:9.4.9.v20180320' // Apache 2.0

// javax.mail
compile 'com.sun.mail:javax.mail:1.6.0' // CDDL
compile 'com.sun.mail:javax.mail:1.6.1' // CDDL

// JSoup (HTML parser, cleaner)
compile 'org.jsoup:jsoup:1.11.2' // MIT

// Pegdown (Markdown renderer; depends on parboiled, asm)
compile 'org.pegdown:pegdown:1.6.0' // Apache 2.0
compile 'org.jsoup:jsoup:1.11.3' // MIT

// Apache Shiro
compile module('org.apache.shiro:shiro-core:1.4.0') // Apache 2.0
compile module('org.apache.shiro:shiro-web:1.4.0') // Apache 2.0

// SLF4J, Log4j 2 (note Log4j 2 is used by various libraries, best not to replace it even if mostly possible with SLF4J)
compile 'org.slf4j:slf4j-api:1.7.25'
// Log4J version note: limited by embedded ElasticSearch through 6.2.4 still uses Log4J 2.9.1
compile 'org.apache.logging.log4j:log4j-core:2.9.1'
compile 'org.apache.logging.log4j:log4j-api:2.9.1'
runtime 'org.apache.logging.log4j:log4j-slf4j-impl:2.9.1'
Expand All @@ -154,7 +157,7 @@ dependencies {
// compile module('org.apache.xmlrpc:xmlrpc-client:3.1.3') // Apache 2.0

// Snake YAML
compile 'org.yaml:snakeyaml:1.19' // Apache 2.0
compile 'org.yaml:snakeyaml:1.21' // Apache 2.0

// Apache Jackrabbit - uncomment here or include elsewhere when Jackrabbit repository configurations are used
// compile 'org.apache.jackrabbit:jackrabbit-jcr-rmi:2.12.1' // Apache 2.0
Expand All @@ -174,16 +177,16 @@ dependencies {

// ========== executable war dependencies ==========
// Jetty
execWarRuntime 'org.eclipse.jetty:jetty-server:9.4.7.v20170914' // Apache 2.0
execWarRuntime 'org.eclipse.jetty:jetty-webapp:9.4.7.v20170914' // Apache 2.0
execWarRuntime 'org.eclipse.jetty:jetty-jndi:9.4.7.v20170914' // Apache 2.0
execWarRuntime module('org.eclipse.jetty.websocket:javax-websocket-server-impl:9.4.7.v20170914') // Apache 2.0
execWarRuntime ('org.eclipse.jetty.websocket:javax-websocket-client-impl:9.4.7.v20170914') { // Apache 2.0
execWarRuntime 'org.eclipse.jetty:jetty-server:9.4.9.v20180320' // Apache 2.0
execWarRuntime 'org.eclipse.jetty:jetty-webapp:9.4.9.v20180320' // Apache 2.0
execWarRuntime 'org.eclipse.jetty:jetty-jndi:9.4.9.v20180320' // Apache 2.0
execWarRuntime module('org.eclipse.jetty.websocket:javax-websocket-server-impl:9.4.9.v20180320') // Apache 2.0
execWarRuntime ('org.eclipse.jetty.websocket:javax-websocket-client-impl:9.4.9.v20180320') { // Apache 2.0
exclude group: 'javax.websocket' } // we have the full websocket API, including the client one causes problems
execWarRuntime 'javax.websocket:javax.websocket-api:1.0' // using 1.0, don't update to 1.1 until used in Jetty, Tomcat, etc
execWarRuntime ('org.eclipse.jetty.websocket:websocket-server:9.4.7.v20170914') // Apache 2.0
execWarRuntime ('org.eclipse.jetty.websocket:websocket-server:9.4.9.v20180320') // Apache 2.0
// only include this if using Endpoint and MessageHandler annotations:
// execWarRuntime ('org.eclipse.jetty:jetty-annotations:9.4.7.v20170914') // Apache 2.0
// execWarRuntime ('org.eclipse.jetty:jetty-annotations:9.4.9.v20180320') // Apache 2.0
}

// setup task dependencies to make sure the start sourceSets always get run
Expand Down
3 changes: 3 additions & 0 deletions framework/data/CommonL10nData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ along with this software (see the LICENSE.md file). If not, see
<moqui.basic.LocalizedMessage locale="default" original="EnumerationNameTemplate" localized="${description}"/>
<moqui.basic.LocalizedMessage locale="default" original="StatusItemNameTemplate" localized="${description}"/>
<moqui.basic.LocalizedMessage locale="default" original="StatusTransitionNameTemplate" localized="${transitionName} (${description})"/>
<moqui.basic.LocalizedMessage locale="default" original="StatusFlowTransitionNotFoundTemplate"
localized="Status change not allowed from ${lookedUpStatusName?:lookedUpStatusId} to ${parameterStatusName?:parameterStatusId}"/>

<moqui.basic.LocalizedMessage locale="default" original="UomNameTemplate" localized="${description?:''} (${abbreviation?:uomId})"/>
<moqui.basic.LocalizedMessage locale="default" original="UserGroupNameTemplate" localized="${description} [${userGroupId}]"/>
<moqui.basic.LocalizedMessage locale="default" original="UsernameTemplate"
Expand Down
Loading

0 comments on commit 5480477

Please sign in to comment.