Skip to content

Commit

Permalink
CUBA 7 support (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
mariodavid authored Mar 30, 2019
1 parent df67cf7 commit 76087bd
Show file tree
Hide file tree
Showing 32 changed files with 374 additions and 377 deletions.
Binary file removed .DS_Store
Binary file not shown.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ out
test-run
.idea
.ideaDataSources
classes
classes
.DS_Store
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).


## [1.3.0] - 2019-03-30

### Dependencies
- CUBA 7.0.x

## [1.2.0] - 2018-10-30

### Bugfix
- handle no-results in SQL execution correctly (#23)

### Dependencies
- CUBA 6.10.x

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ It mainly consists of the three parts:

| Platform Version | Add-on Version |
| ---------------- | -------------- |
| 7.0.x | 1.3.x |
| 6.10.x | 1.2.x |
| 6.9.x | 1.1.x |
| 6.8.x | 1.0.x |
Expand Down
9 changes: 3 additions & 6 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ To create a release of this application component do the following:

1. commit & push your changes to Github
2. wait for travis to be build
3. switch isSnapshot in build.gradle to false (make sure it is currently 0.3.1, isSnapshot = true)
4. commit & push your changes to Github
5. ./tag-release.sh 0.3.1 (which creates a git tag and pushes it to Github)
6. Update the title "version 0.3.1" and description of the tag in the Github UI
7. ./upload-to-repository.sh <<MY_REPO_USERNAME>> <<MY_REPO_PASSWORD>> (optional <<MY_REPO_URL>> as third parameter, otherwise will use bintray)

3a. `./gradlew release -Prelease.useAutomaticVersion=true` to update to next patch version (0.3.2)
3b. `./gradlew release -Prelease.useAutomaticVersion=true -Prelease.releaseVersion=0.4.0 -Prelease.newVersion=0.4.1-SNAPSHOT` to update to next minor version (0.4.0)
4. Update the title "version 0.3.1" and description of the tag in the Github UI
52 changes: 24 additions & 28 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

buildscript {
ext.cubaVersion = '6.10.2'
ext.cubaVersion = '7.0.3'
repositories {

mavenLocal()
Expand All @@ -11,16 +11,6 @@ buildscript {
password(rootProject.hasProperty('repoPass') ? rootProject['repoPass'] : 'cuba123')
}
}


maven {
url "https://dl.bintray.com/mariodavid/cuba-components"
}

maven {
url "https://dl.bintray.com/balvi/cuba-components"
}

}
dependencies {
classpath "com.haulmont.gradle:cuba-plugin:$cubaVersion"
Expand All @@ -33,6 +23,10 @@ buildscript {
}


plugins {
id 'net.researchgate.release' version '2.6.0'
}

apply plugin: "com.github.kt3k.coveralls"


Expand All @@ -46,7 +40,6 @@ def webModule = project(":${modulePrefix}-web")
def servletApi = 'javax.servlet:javax.servlet-api:3.1.0'


apply(plugin: 'idea')
apply(plugin: 'cuba')


Expand All @@ -55,8 +48,8 @@ apply(plugin: 'cuba')
cuba {
artifact {
group = 'de.diedavids.cuba.runtimediagnose'
version = "1.2.0"
isSnapshot = false
version = project.properties['version'].replaceAll('-SNAPSHOT', '')
isSnapshot = project.properties['version'].contains('-SNAPSHOT')
}
tomcat {
dir = "$project.rootDir/deploy/tomcat"
Expand All @@ -71,8 +64,8 @@ subprojects {
apply plugin: 'com.jfrog.bintray'

bintray {
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('UPLOAD_REPOSITORY_USERNAME')
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('UPLOAD_REPOSITORY_PASSWORD')
user = System.getenv('BINTRAY_USERNAME')
key = System.getenv('BINTRAY_PASSWORD')

configurations = ['archives']

Expand Down Expand Up @@ -150,14 +143,15 @@ test.finalizedBy(project.tasks.coberturaCheck)
configure([globalModule, coreModule, guiModule, webModule]) {
apply(plugin: 'java')
apply(plugin: 'maven')
apply(plugin: 'idea')
apply(plugin: 'cuba')

dependencies {
testCompile('junit:junit:4.12')


testCompile('org.spockframework:spock-core:1.0-groovy-2.4')
compile('org.codehaus.groovy:groovy-all:2.5.4')

testCompile('org.spockframework:spock-core:1.2-groovy-2.5')
testCompile('org.springframework:spring-test:4.3.1.RELEASE')
testRuntime "cglib:cglib-nodep:3.2.4"
}
Expand All @@ -178,12 +172,11 @@ configure([globalModule, coreModule, guiModule, webModule]) {
apply plugin: 'net.saliman.cobertura'
apply plugin: 'codenarc'


codenarc {
toolVersion = "0.24"
toolVersion = "1.3"
ignoreFailures = false
reportFormat = 'html'
reportsDir = new File("./build/reports/codenarc")
reportsDir = project.file("build/reports/codenarc")
}

codenarcMain {
Expand Down Expand Up @@ -215,6 +208,12 @@ configure([globalModule, coreModule, guiModule, webModule]) {
}

configure(globalModule) {
dependencies {
if (!JavaVersion.current().isJava8()) {
runtime('javax.xml.bind:jaxb-api:2.3.1')
runtime('org.glassfish.jaxb:jaxb-runtime:2.3.1')
}
}
entitiesEnhancing {
main { enabled = true }
}
Expand All @@ -238,7 +237,7 @@ configure(coreModule) {

dependencies {
compile(globalModule)
provided(servletApi)
compileOnly(servletApi)
jdbc(hsql)
testRuntime(hsql)

Expand Down Expand Up @@ -298,7 +297,7 @@ configure(webModule) {
}

dependencies {
provided(servletApi)
compileOnly(servletApi)
compile(guiModule)

}
Expand Down Expand Up @@ -362,13 +361,10 @@ task restart(dependsOn: ['stop', ":${modulePrefix}-core:deploy", ":${modulePrefi
}
}

task wrapper(type: Wrapper) {
gradleVersion = '4.3.1'
}

apply from: 'extra.gradle'



clean {
delete = ['build/libs', 'build/tmp']
}
}
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version=1.3.0-SNAPSHOT
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip
2 changes: 1 addition & 1 deletion modules/core/db/init/hsql/20.create-db.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- begin DDCRD_DIAGNOSE_EXECUTION_LOG
alter table DDCRD_DIAGNOSE_EXECUTION_LOG add constraint FK_DDCRD_DIAGNOSE_EXECUTION_LOG_EXECUTION_RESULT_FILE foreign key (EXECUTION_RESULT_FILE_ID) references SYS_FILE(ID)^
create index IDX_DDCRD_DIAGNOSE_EXECUTION_LOG_EXECUTION_RESULT_FILE on DDCRD_DIAGNOSE_EXECUTION_LOG (EXECUTION_RESULT_FILE_ID)^
-- end DDCRD_DIAGNOSE_EXECUTION_LOG
-- end DDCRD_DIAGNOSE_EXECUTION_LOG
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import de.diedavids.cuba.runtimediagnose.diagnose.DiagnoseExecutionLogService
import de.diedavids.cuba.runtimediagnose.diagnose.DiagnoseType
import groovy.sql.Sql
import net.sf.jsqlparser.statement.Statements
import org.apache.commons.lang.StringUtils
import org.apache.commons.lang3.StringUtils
import org.eclipse.persistence.internal.jpa.EJBQueryImpl
import org.springframework.stereotype.Service

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd">
xmlns:context="http://www.springframework.org/schema/context">

<!-- Annotation-based beans -->
<context:component-scan base-package="de.diedavids.cuba.runtimediagnose"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,57 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<app-component xmlns="http://schemas.haulmont.com/cuba/app-component.xsd"
dependsOn="com.haulmont.cuba">
<module blocks="*"
name="global">
<artifact appJar="true"
name="runtime-diagnose-global"/>
<property name="cuba.persistenceConfig"
value="+de/diedavids/cuba/runtimediagnose/persistence.xml"/>
<property name="cuba.metadataConfig"
value="+de/diedavids/cuba/runtimediagnose/metadata.xml"/>
<property name="cuba.viewsConfig"
value="+de/diedavids/cuba/runtimediagnose/views.xml"/>

<module name="global" blocks="*">
<artifact name="runtime-diagnose-global" appJar="true"/>

<property name="cuba.persistenceConfig" value="+de/diedavids/cuba/runtimediagnose/persistence.xml"/>
<property name="cuba.metadataConfig" value="+de/diedavids/cuba/runtimediagnose/metadata.xml"/>
<property name="cuba.viewsConfig" value="+de/diedavids/cuba/runtimediagnose/views.xml"/>
</module>
<module blocks="core"
dependsOn="global"
name="core">
<artifact appJar="true"
name="runtime-diagnose-core"/>
<property name="cuba.springContextConfig"
value="+de/diedavids/cuba/runtimediagnose/spring.xml"/>
<property name="cuba.mainMessagePack"
value="+de.diedavids.cuba.runtimediagnose.core"/>
<artifact classifier="db"
configuration="dbscripts"
ext="zip"
name="runtime-diagnose-core"/>
<module name="core" dependsOn="global" blocks="core">
<artifact name="runtime-diagnose-core" appJar="true"/>
<artifact name="runtime-diagnose-core" classifier="db" ext="zip" configuration="dbscripts"/>

<property name="cuba.springContextConfig" value="+de/diedavids/cuba/runtimediagnose/spring.xml"/>
<property name="cuba.mainMessagePack" value="+de.diedavids.cuba.runtimediagnose.core"/>
</module>
<module blocks="web,desktop"
dependsOn="global"
name="gui">
<artifact appJar="true"
name="runtime-diagnose-gui"/>
<module name="gui" dependsOn="global" blocks="web,desktop">
<artifact name="runtime-diagnose-gui" appJar="true"/>
</module>
<module blocks="web"
dependsOn="gui"
name="web">
<artifact appJar="true"
name="runtime-diagnose-web"/>
<artifact classifier="web"
configuration="webcontent"
ext="zip"
name="runtime-diagnose-web"/>
<property name="cuba.springContextConfig"
value="+de/diedavids/cuba/runtimediagnose/web-spring.xml"/>
<module name="web" dependsOn="gui" blocks="web">
<artifact name="runtime-diagnose-web" appJar="true"/>
<artifact name="runtime-diagnose-web" classifier="web" ext="zip" configuration="webcontent"/>

<property name="cuba.springContextConfig" value="+de/diedavids/cuba/runtimediagnose/web-spring.xml"/>
<property name="cuba.dispatcherSpringContextConfig"
value="+de/diedavids/cuba/runtimediagnose/web-dispatcher-spring.xml"/>
<property name="cuba.windowConfig"
value="+de/diedavids/cuba/runtimediagnose/web-screens.xml"/>
<property name="cuba.menuConfig"
value="+de/diedavids/cuba/runtimediagnose/web-menu.xml"/>
<property name="cuba.permissionConfig"
value="+de/diedavids/cuba/runtimediagnose/web-permissions.xml"/>
<property name="cuba.mainMessagePack"
value="+de.diedavids.cuba.runtimediagnose.web"/>
<property name="cuba.windowConfig" value="+de/diedavids/cuba/runtimediagnose/web-screens.xml"/>
<property name="cuba.menuConfig" value="+de/diedavids/cuba/runtimediagnose/web-menu.xml"/>
<property name="cuba.permissionConfig" value="+de/diedavids/cuba/runtimediagnose/web-permissions.xml"/>
<property name="cuba.mainMessagePack" value="+de.diedavids.cuba.runtimediagnose.web"/>
</module>
</app-component>
</app-component>
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class ZipFileHelper {
zipEntry.size = data.length
zipEntry.compressedSize = zipEntry.size
CRC32 crc32 = new CRC32()
crc32.update(data)
crc32.update(data,0, data.length)
zipEntry.crc = crc32.value

zipEntry
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ cuba.webContextName = runtime-diagnose
# Web session inactivity timeout in seconds
cuba.httpSessionExpirationTimeoutSec = 1800

cuba.web.theme = halo
cuba.web.theme = hover
cuba.web.foldersPaneEnabled=false
cuba.availableLocales = English|en
cuba.localeSelectVisible = false
cuba.restApiUrl = http://localhost:8080/runtime-diagnose-portal/api
cuba.webAppUrl = http://localhost:8080/runtime-diagnose
cuba.themeConfig=com/haulmont/cuba/havana-theme.properties com/haulmont/cuba/halo-theme.properties com/haulmont/cuba/hover-theme.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.3.xsd">
xmlns:context="http://www.springframework.org/schema/context">

</beans>
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd"
xmlns:context="http://www.springframework.org/schema/context">
xmlns:context="http://www.springframework.org/schema/context"
xmlns:gui="http://schemas.haulmont.com/cuba/spring/cuba-gui.xsd">
<!-- Annotation-based beans -->
<context:component-scan base-package="de.diedavids.cuba.runtimediagnose"/>
<bean class="com.haulmont.cuba.web.sys.remoting.WebRemoteProxyBeanCreator">
Expand All @@ -23,4 +22,5 @@
</map>
</property>
</bean>
<gui:screens base-packages="de.diedavids.cuba.runtimediagnose.web"/>
</beans>
Loading

0 comments on commit 76087bd

Please sign in to comment.