Skip to content

Commit

Permalink
Master (#9)
Browse files Browse the repository at this point in the history
* Fix regression with partitioned tables in PostgreSQL

PostgreSQL JDBC Driver introduced separating type for partitioned table from  40.2.12 pgjdbc/pgjdbc#1708

* Add subscreensItem.menuInclude to menu data (moqui#600)

* Fixed the problem that moqui cannot be deployed as non-root webapp in Tomcat

* Fixed a runtime error if Currency is BTC

* Fixed a runtime error if Currency is BTC

* Fixed the retries of Elastic Client

* Add subscreensItem.menuInclude to menu data

* Docker-Image-Pull Feature (moqui#553)

* Improvement: In Moqui-Multi-Instance added a Async-Pull-Image-Feature which pulls the image by Using Docker-Engine-Api from multiple registry like AWS, Azure, Docker-Hub

* Update AUTHORS

* Added: added the generic way to process cmd , by adding an extra field(authTokenPass) inside the entity InstanceImage , now user has separate field for cmd and password so all types of registries is easily configurable

* Update ServerEntities.xml by adding description

* Library updates, including Jetty 10.0.13 to 10.015 which had reported vulnerabilities; there are lots of dependencies updated in this set, see diff for full details

* In ScreenRenderImpl change addFormFieldValue() and related methods to handle first, second, and last rows, for qvt and other client rendered output that needs full data for a form in a map/object

* In root build.gradle change gitStatusAll task to be more tolerant of repos with no master branch

* Add text-area.@autogrow attribute, supported only in qvt for now

* Update various libraries including Groovy to 3.0.19 (which has some minor non-backward compatible changes single 3.0.10 with odd boolean behavior in rare cases, adjusted for in the framework long ago but should be watched for in custom code), Jetty to 10.0.16, H2 database, SLF4J, SnakeYAML, Apache Commons Lang3

* In build.gradle gitStatusAll task also handle upstream remotes with no master branch

* Currency (moqui#614)

* Use moqui.basic.Uom entity to determine currency formatting and rounding details

* Add currency-hide-symbol attribute as a complement to currency-unit-field, displaying the value without the currency symbol

* Update authors file

* Add and Handle Hmac Sha256 with timestamp

* A couple of minor bug fixes in the EntityAutoServiceRunner and ContextJavaUtil (moqui#618)

* In EntityAutoServiceRunner, remove unwanted break statement to ensure support for multiple PK fields with wildcard (*).

* In ContextJavaUtil, add missing future keyword.

* Updated authors file.

* Allow for 10 second threshold in nowTimestamp

* In L10nFacadeImpl.formatCurrency() use disableAuthz() for entity find on Uom; small change to currency formatting test to pass with current OOTB settings

* In addons.xml, added new moqui-sso component.

---------

Co-authored-by: Yao Chunlin <chunlinyao@gmail.com>
Co-authored-by: David E. Jones <dej@dejc.com>
Co-authored-by: Wei Zhang <zhangw@shinetechsoftware.com>
Co-authored-by: Rohit pawar <72196393+rohitpawar2811@users.noreply.github.com>
Co-authored-by: Jens Hardings <jhp@moit.cl>
Co-authored-by: acetousk <acetousk@users.noreply.github.com>
Co-authored-by: Ayman Abi Abdallah <aabiabdallah@gmail.com>
  • Loading branch information
8 people committed Nov 6, 2023
1 parent b468570 commit dd5985a
Show file tree
Hide file tree
Showing 18 changed files with 328 additions and 102 deletions.
10 changes: 6 additions & 4 deletions AUTHORS
Expand Up @@ -46,21 +46,22 @@ Written in 2015 by Sam Hamilton - samhamilton
Written in 2015 by Leonardo Carvalho - CarvalhoLeonardo
Written in 2015 by Swapnil M Mane - swapnilmmane
Written in 2015 by Anton Akhiar - akhiar
Written in 2015-2018 by Jens Hardings - jenshp
Written in 2015-2023 by Jens Hardings - jenshp
Written in 2016 by Shifeng Zhang - zhangshifeng
Written in 2016 by Scott Gray - lektran
Written in 2016 by Mark Haney - mphaney
Written in 2016 by Qiushi Yan - yanqiushi
Written in 2017 by Oleg Andrieiev - oandreyev
Written in 2018 by Zhang Wei - zhangwei1979
Written in 2018 by Nirendra Singh - nirendra10695
Written in 2018-2021 by Ayman Abi Abdallah - aabiabdallah
Written in 2018-2023 by Ayman Abi Abdallah - aabiabdallah
Written in 2019 by Daniel Taylor - danieltaylor-nz
Written in 2020 by Jacob Barnes - Tellan
Written in 2020 by Amir Anjomshoaa - amiranjom
Written in 2021 by Deepak Dixit - dixitdeepak
Written in 2021 by Taher Alkhateeb - pythys
Written in 2022 by Zhang Wei - hellozhangwei
Written in 2023 by Rohit Pawar - rohitpawar2811

===========================================================================

Expand Down Expand Up @@ -93,20 +94,21 @@ Written in 2015 by Jimmy Shen - shendepu
Written in 2015-2016 by Sam Hamilton - samhamilton
Written in 2015 by Leonardo Carvalho - CarvalhoLeonardo
Written in 2015 by Anton Akhiar - akhiar
Written in 2015-2016 by Jens Hardings - jenshp
Written in 2015-2023 by Jens Hardings - jenshp
Written in 2016 by Shifeng Zhang - zhangshifeng
Written in 2016 by Scott Gray - lektran
Written in 2016 by Mark Haney - mphaney
Written in 2016 by Qiushi Yan - yanqiushi
Written in 2017 by Oleg Andrieiev - oandreyev
Written in 2018 by Zhang Wei - zhangwei1979
Written in 2018 by Nirendra Singh - nirendra10695
Written in 2018-2020 by Ayman Abi Abdallah - aabiabdallah
Written in 2018-2023 by Ayman Abi Abdallah - aabiabdallah
Written in 2019 by Daniel Taylor - danieltaylor-nz
Written in 2020 by Jacob Barnes - Tellan
Written in 2020 by Amir Anjomshoaa - amiranjom
Written in 2021 by Deepak Dixit - dixitdeepak
Written in 2021 by Taher Alkhateeb - pythys
Written in 2022 by Zhang Wei - hellozhangwei
Written in 2023 by Rohit Pawar - rohitpawar2811

===========================================================================
1 change: 1 addition & 0 deletions addons.xml
Expand Up @@ -52,6 +52,7 @@
<component name="moqui-orientdb" group="moqui" version="1.0.4" branch="master"/>
<component name="moqui-poi" group="moqui" version="1.0.1" branch="master"/>
<component name="moqui-sftp" group="moqui" version="1.0.1" branch="master"/>
<component name="moqui-sso" group="moqui" version="1.0.1" branch="master"/>
<component name="moqui-wikitext" group="moqui" version="1.0.3" branch="master"/>

<component name="moqui-atomikos" group="moqui" version="1.0.0" branch="master"/><!-- not actively maintained -->
Expand Down
25 changes: 19 additions & 6 deletions build.gradle
Expand Up @@ -417,13 +417,26 @@ task gitStatusAll {
def curGrgit = Grgit.open(dir: gitDir)
logger.lifecycle("\nGit status for ${gitDir} (branch:${curGrgit.branch.current()?.name}, tracking:${curGrgit.branch.current()?.trackingBranch?.name})")

if (curGrgit.remote.list().find({ it.name == 'upstream'})) {
def upstreamAhead = curGrgit.log { range curGrgit.resolve.toCommit('refs/remotes/upstream/master'), curGrgit.resolve.toCommit('refs/remotes/origin/master') }
if (upstreamAhead) logger.lifecycle("- origin/master ${upstreamAhead.size()} commits ahead of upstream/master")
try {
if (curGrgit.remote.list().find({ it.name == 'upstream'})) {
def upstreamAhead = curGrgit.log { range curGrgit.resolve.toCommit('refs/remotes/upstream/master'), curGrgit.resolve.toCommit('refs/remotes/origin/master') }
if (upstreamAhead) logger.lifecycle("- origin/master ${upstreamAhead.size()} commits ahead of upstream/master")
}
} catch (Exception e) {
logger.error("Error finding commits ahead of upstream", e)
}
try {
def masterLatest = curGrgit.resolve.toCommit('refs/remotes/origin/master')
if (masterLatest == null) {
logger.error("No origin/master branch exists, can't determine unpushed commits")
} else {
def unpushed = curGrgit.log { range masterLatest, curGrgit.resolve.toCommit('HEAD') }
if (unpushed) logger.lifecycle("--- ${unpushed.size()} commits unpushed (ahead of origin/master)")
for (Commit commit in unpushed) logger.lifecycle(" - ${commit.getAbbreviatedId(8)} - ${commit.shortMessage}")
}
} catch (Exception e) {
logger.error("Error finding unpushed commits", e)
}
def unpushed = curGrgit.log { range curGrgit.resolve.toCommit('refs/remotes/origin/master'), curGrgit.resolve.toCommit('HEAD') }
if (unpushed) logger.lifecycle("--- ${unpushed.size()} commits unpushed (ahead of origin/master)")
for (Commit commit in unpushed) logger.lifecycle(" - ${commit.getAbbreviatedId(8)} - ${commit.shortMessage}")
def curStatus = curGrgit.status()
if (curStatus.isClean()) logger.lifecycle("* nothing to commit, working directory clean")
if (curStatus.staged.added || curStatus.staged.modified || curStatus.staged.removed) logger.lifecycle("--- Changes to be committed::")
Expand Down
84 changes: 42 additions & 42 deletions framework/build.gradle
Expand Up @@ -12,7 +12,7 @@
* <http://creativecommons.org/publicdomain/zero/1.0/>.
*/

version = '3.1.0-rc1'
version = '3.1.0-rc2'

apply plugin: 'java-library'
apply plugin: 'groovy'
Expand All @@ -27,7 +27,7 @@ buildscript {
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.github.ben-manes:gradle-versions-plugin:0.45.0'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.47.0'
// uncomment to add the Error Prone compiler: classpath 'net.ltgt.gradle:gradle-errorprone-plugin:0.0.8'
}
}
Expand Down Expand Up @@ -68,17 +68,17 @@ tasks.withType(GroovyCompile) { options.compilerArgs << "-proc:none" }
// NOTE: for dependency types and 'api' definition see: https://docs.gradle.org/current/userguide/java_library_plugin.html
dependencies {
// Groovy
// NOTE: Groovy 3.0.10-3.0.12 has a bug that somehow causes EntityDefinition.isViewEntity (public final boolean) to switch
// NOTE: Groovy 3.0.10-3.0.18 has a bug that somehow causes EntityDefinition.isViewEntity (public final boolean) to switch
// from true during constructor to false later on; see EntityFindBuilder.java:112-114 and EntityDefinition.groovy:50-53,94-95;
// for now using Boolean instead of boolean to resolve, but staying at 3.0.9 to avoid risk with other code
api 'org.codehaus.groovy:groovy:3.0.9' // Apache 2.0
api 'org.codehaus.groovy:groovy-dateutil:3.0.9' // Apache 2.0
api 'org.codehaus.groovy:groovy-groovysh:3.0.9' // Apache 2.0
api 'org.codehaus.groovy:groovy:3.0.19' // Apache 2.0
api 'org.codehaus.groovy:groovy-dateutil:3.0.19' // Apache 2.0
api 'org.codehaus.groovy:groovy-groovysh:3.0.19' // Apache 2.0
// jline, an older version, is required by groovy-groovysh but not in its dependencies
implementation 'jline:jline:2.14.6' // BSD
api 'org.codehaus.groovy:groovy-json:3.0.9' // Apache 2.0
api 'org.codehaus.groovy:groovy-templates:3.0.9' // Apache 2.0
api 'org.codehaus.groovy:groovy-xml:3.0.9' // Apache 2.0
api 'org.codehaus.groovy:groovy-json:3.0.19' // Apache 2.0
api 'org.codehaus.groovy:groovy-templates:3.0.19' // Apache 2.0
api 'org.codehaus.groovy:groovy-xml:3.0.19' // Apache 2.0
// jansi is needed for groovydoc only, so in compileOnly (not included in war) - don't update to version 2, keep at version 1 for compatibility
compileOnly 'org.fusesource.jansi:jansi:1.18'
// Findbugs need only during compile (used by freemarker and various moqui classes)
Expand All @@ -93,33 +93,33 @@ dependencies {
// ========== General Libraries from Maven Central ==========

// Apache Commons
api 'org.apache.commons:commons-csv:1.9.0' // Apache 2.0
api 'org.apache.commons:commons-csv:1.10.0' // Apache 2.0
// NOTE: commons-email depends on com.sun.mail:javax.mail, included below, so use module() here to not get dependencies
api module('org.apache.commons:commons-email:1.5') // Apache 2.0
api 'org.apache.commons:commons-lang3:3.12.0' // Apache 2.0; used by cron-utils
api 'org.apache.commons:commons-lang3:3.13.0' // Apache 2.0; used by cron-utils
api 'commons-beanutils:commons-beanutils:1.9.4' // Apache 2.0
api 'commons-codec:commons-codec:1.15' // Apache 2.0
api 'commons-codec:commons-codec:1.16.0' // Apache 2.0
api 'commons-collections:commons-collections:3.2.2' // Apache 2.0
api 'commons-digester:commons-digester:2.1' // Apache 2.0
api 'commons-fileupload:commons-fileupload:1.4' // Apache 2.0
api 'commons-io:commons-io:2.11.0' // Apache 2.0
api 'commons-fileupload:commons-fileupload:1.5' // Apache 2.0
api 'commons-io:commons-io:2.13.0' // Apache 2.0
api 'commons-logging:commons-logging:1.2' // Apache 2.0
api 'commons-validator:commons-validator:1.7' // Apache 2.0

// Cron Utils
api 'com.cronutils:cron-utils:9.2.0' // Apache 2.0
api 'com.cronutils:cron-utils:9.2.1' // Apache 2.0

// Flexmark (markdown)
api 'com.vladsch.flexmark:flexmark:0.64.0'
api 'com.vladsch.flexmark:flexmark-ext-tables:0.64.0'
api 'com.vladsch.flexmark:flexmark-ext-toc:0.64.0'
api 'com.vladsch.flexmark:flexmark:0.64.8'
api 'com.vladsch.flexmark:flexmark-ext-tables:0.64.8'
api 'com.vladsch.flexmark:flexmark-ext-toc:0.64.8'

// Freemarker
// Remember to change the version number in FtlTemplateRenderer and MNode class when upgrading
api 'org.freemarker:freemarker:2.3.32' // Apache 2.0

// H2 Database
api 'com.h2database:h2:2.1.214' // MPL 2.0, EPL 1.0
api 'com.h2database:h2:2.2.222' // MPL 2.0, EPL 1.0

// Java Specifications
api 'javax.transaction:jta:1.1'
Expand All @@ -144,38 +144,38 @@ dependencies {
api 'com.beust:jcommander:1.82'

// Jackson Databind (JSON, etc)
api 'com.fasterxml.jackson.core:jackson-databind:2.14.2'
api 'com.fasterxml.jackson.core:jackson-databind:2.15.2'

// Jetty HTTP Client and Proxy Servlet
api 'org.eclipse.jetty:jetty-client:10.0.13' // Apache 2.0
api 'org.eclipse.jetty:jetty-proxy:10.0.13' // Apache 2.0
api 'org.eclipse.jetty:jetty-client:10.0.16' // Apache 2.0
api 'org.eclipse.jetty:jetty-proxy:10.0.16' // Apache 2.0

// javax.mail
// NOTE: javax.mail depends on 'javax.activation:activation' which is the old package for 'javax.activation:javax.activation-api' used by jaxb-api
api module('com.sun.mail:javax.mail:1.6.2') // CDDL

// Joda Time (used by elasticsearch, aws)
api 'joda-time:joda-time:2.12.2' // Apache 2.0
api 'joda-time:joda-time:2.12.5' // Apache 2.0

// JSoup (HTML parser, cleaner)
api 'org.jsoup:jsoup:1.15.3' // MIT
api 'org.jsoup:jsoup:1.16.1' // MIT

// Apache Shiro
api module('org.apache.shiro:shiro-core:1.11.0') // Apache 2.0
api module('org.apache.shiro:shiro-web:1.11.0') // Apache 2.0
api module('org.apache.shiro:shiro-core:1.12.0') // Apache 2.0
api module('org.apache.shiro:shiro-web:1.12.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)
api 'org.slf4j:slf4j-api:2.0.6'
implementation 'org.apache.logging.log4j:log4j-core:2.19.0'
implementation 'org.apache.logging.log4j:log4j-api:2.19.0'
runtimeOnly 'org.apache.logging.log4j:log4j-jcl:2.19.0'
runtimeOnly 'org.apache.logging.log4j:log4j-slf4j2-impl:2.19.0'
api 'org.slf4j:slf4j-api:2.0.9'
implementation 'org.apache.logging.log4j:log4j-core:2.20.0'
implementation 'org.apache.logging.log4j:log4j-api:2.20.0'
runtimeOnly 'org.apache.logging.log4j:log4j-jcl:2.20.0'
runtimeOnly 'org.apache.logging.log4j:log4j-slf4j2-impl:2.20.0'

// SubEtha SMTP (module as depends on old javax.mail location; also uses SLF4J, activation included elsewhere)
api module('org.subethamail:subethasmtp:3.1.7')

// Snake YAML
api 'org.yaml:snakeyaml:1.33' // Apache 2.0
api 'org.yaml:snakeyaml:2.2' // Apache 2.0

// Apache Jackrabbit - uncomment here or include elsewhere when Jackrabbit repository configurations are used
// api 'org.apache.jackrabbit:jackrabbit-jcr-rmi:2.12.1' // Apache 2.0
Expand All @@ -190,11 +190,11 @@ dependencies {
// ========== test dependencies ==========

// junit-platform-launcher is a dependency from spock-core, included explicitly to get more recent version as needed
testImplementation 'org.junit.platform:junit-platform-launcher:1.9.2'
testImplementation 'org.junit.platform:junit-platform-launcher:1.10.0'
// junit-platform-suite required for test suites to specify test class order, etc
testImplementation 'org.junit.platform:junit-platform-suite:1.9.2'
testImplementation 'org.junit.platform:junit-platform-suite:1.10.0'
// junit-jupiter-api for using JUnit directly, not generally needed for Spock based tests
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.2'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.0'
// Spock Framework
testImplementation platform("org.spockframework:spock-bom:2.1-groovy-3.0") // Apache 2.0
testImplementation 'org.spockframework:spock-core:2.1-groovy-3.0' // Apache 2.0
Expand All @@ -203,16 +203,16 @@ dependencies {

// ========== executable war dependencies ==========
// Jetty
execWarRuntimeOnly 'org.eclipse.jetty:jetty-server:10.0.13' // Apache 2.0
execWarRuntimeOnly 'org.eclipse.jetty:jetty-webapp:10.0.13' // Apache 2.0
execWarRuntimeOnly 'org.eclipse.jetty:jetty-jndi:10.0.13' // Apache 2.0
execWarRuntimeOnly 'org.eclipse.jetty.websocket:websocket-javax-server:10.0.13' // Apache 2.0
execWarRuntimeOnly ('org.eclipse.jetty.websocket:websocket-javax-client:10.0.13') { // Apache 2.0
execWarRuntimeOnly 'org.eclipse.jetty:jetty-server:10.0.16' // Apache 2.0
execWarRuntimeOnly 'org.eclipse.jetty:jetty-webapp:10.0.16' // Apache 2.0
execWarRuntimeOnly 'org.eclipse.jetty:jetty-jndi:10.0.16' // Apache 2.0
execWarRuntimeOnly 'org.eclipse.jetty.websocket:websocket-javax-server:10.0.16' // Apache 2.0
execWarRuntimeOnly ('org.eclipse.jetty.websocket:websocket-javax-client:10.0.16') { // Apache 2.0
exclude group: 'javax.websocket' } // we have the full websocket API, including the client one causes problems
execWarRuntimeOnly 'javax.websocket:javax.websocket-api:1.1'
execWarRuntimeOnly ('org.eclipse.jetty.websocket:websocket-jetty-server:10.0.13') // Apache 2.0
execWarRuntimeOnly ('org.eclipse.jetty.websocket:websocket-jetty-server:10.0.16') // Apache 2.0
// only include this if using Endpoint and MessageHandler annotations:
// execWarRuntime ('org.eclipse.jetty:jetty-annotations:10.0.13') // Apache 2.0
// execWarRuntime ('org.eclipse.jetty:jetty-annotations:10.0.16') // Apache 2.0
execWarRuntimeOnly 'org.apache.logging.log4j:log4j-slf4j18-impl:2.18.0'
}

Expand Down
4 changes: 3 additions & 1 deletion framework/entity/BasicEntities.xml
Expand Up @@ -389,7 +389,9 @@ along with this software (see the LICENSE.md file). If not, see
<field name="uomId" type="id" is-pk="true"/>
<field name="uomTypeEnumId" type="id"/>
<field name="abbreviation" type="text-short"/>
<field name="description" type="text-medium"/>
<field name="description" type="text-medium" enable-localization="true"/>
<field name="fractionDigits" type="number-integer"/>
<field name="symbol" type="text-short" enable-localization="true"/>
<relationship type="one" title="UomType" related="moqui.basic.Enumeration" short-alias="type">
<key-map field-name="uomTypeEnumId"/></relationship>
<relationship type="many" related="moqui.basic.UomConversion" short-alias="conversions">
Expand Down
3 changes: 3 additions & 0 deletions framework/entity/ServerEntities.xml
Expand Up @@ -196,6 +196,9 @@ along with this software (see the LICENSE.md file). If not, see
<field name="username" type="text-short"/>
<field name="password" type="text-medium" encrypt="true"/>
<field name="emailAddress" type="text-medium"/>
<!-- To pull an image from a remote registryLocation, you may need to generate a token using a command example: AWS-ECR -->
<!-- Note: if you are using authTokenCmd to authenticate on registry then must keep the password field empty simply-->
<field name="authTokenCmd" type="text-medium"/>
<relationship type="one" related="moqui.server.instance.InstanceImageType" short-alias="imageType"/>
<relationship type="one" related="moqui.server.instance.InstanceHostType" short-alias="hostType"/>
</entity>
Expand Down
1 change: 1 addition & 0 deletions framework/entity/ServiceEntities.xml
Expand Up @@ -383,6 +383,7 @@ along with this software (see the LICENSE.md file). If not, see
<moqui.basic.Enumeration enumId="SmatNone" description="No Auth" enumTypeId="SystemMessageAuthType"/>
<moqui.basic.Enumeration enumId="SmatLogin" description="User Login (basic, api_key, etc)" enumTypeId="SystemMessageAuthType"/>
<moqui.basic.Enumeration enumId="SmatHmacSha256" description="HMAC SHA-256" enumTypeId="SystemMessageAuthType"/>
<moqui.basic.Enumeration enumId="SmatHmacSha256Timestamp" description="HMAC SHA-256 with Timestamp" enumTypeId="SystemMessageAuthType"/>
</seed-data>
</entity>
<entity entity-name="SystemMessageEnumMap" package="moqui.service.message" use="configuration">
Expand Down

0 comments on commit dd5985a

Please sign in to comment.