Skip to content

Commit

Permalink
Check Maven dependency updates on Travis CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jreznot committed Jun 5, 2019
1 parent 71f1442 commit 90b22cf
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 10 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ install:

script:
- ./gradlew --no-daemon test javadoc -Dlogback.configurationFile=com/haulmont/cuba/test-silent-logback.xml
- ./gradlew --no-daemon dependencyUpdates -PdependencyUpdates -Drevision=release

cache:
directories:
Expand Down
11 changes: 11 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,17 @@ Start the following command to run static code analysis:
> gradlew javadoc findbugsMain
```

### Check Maven dependency updates

1. Install the corresponding cuba-gradle-plugin to .m2
2. Run command:

```
> gradlew dependencyUpdates -PdependencyUpdates -Drevision=release
```

It will print available version updates for Maven dependencies.

## Development process guidelines

### Code style
Expand Down
35 changes: 34 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ buildscript {
repositories {
mavenLocal()

if (System.getenv('HAULMONT_REPOSITORY_URL')) {
if (System.getenv('HAULMONT_REPOSITORY_URL') && !rootProject.hasProperty('dependencyUpdates')) {
maven {
credentials {
username System.getenv('HAULMONT_REPOSITORY_USER')
Expand All @@ -42,13 +42,46 @@ buildscript {
dependencies {
classpath group: 'com.haulmont.gradle', name: 'cuba-plugin', version: cubaVersion
classpath group: 'gradle.plugin.com.github.spotbugs', name: 'spotbugs-gradle-plugin', version: '1.6.8'

if (rootProject.hasProperty('dependencyUpdates')) {
classpath "com.github.ben-manes:gradle-versions-plugin:0.21.0"
}
}
}

apply(plugin: 'base')
apply(plugin: 'maven')
apply(plugin: 'cuba')

if (rootProject.hasProperty('dependencyUpdates')) {
apply plugin: "com.github.ben-manes.versions"

dependencyUpdates {
resolutionStrategy {
componentSelection { rules ->
rules.all { ComponentSelection selection ->
boolean rejected = ['alpha', 'beta', 'rc', 'RC', 'cr', 'm', 'preview', 'b', 'ea'].any { qualifier ->
selection.candidate.version ==~ /(?i).*[.-]$qualifier[.\d-+]*/
}
if (rejected) {
selection.reject('Release candidate')
}
}
}
}

checkForGradleUpdate = false
}

/*
* Check dependency updates:
*
* 1. Install the corresponding cuba-gradle-plugin to .m2
* 2. Run command:
* > gradlew dependencyUpdates -PdependencyUpdates -Drevision=release
*/
}

bom.load file('modules/global/src/com/haulmont/cuba/bom.properties')

cuba {
Expand Down
18 changes: 9 additions & 9 deletions modules/global/src/com/haulmont/cuba/bom.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,26 +49,26 @@ com.haulmont.thirdparty/swingx-core = 1.6.5-1.cuba.0
org.apache.poi/poi = 3.17

com.esotericsoftware/kryo-shaded = 4.0.2
de.javakaffee/kryo-serializers = 0.42
de.javakaffee/kryo-serializers = 0.45

org.dom4j/dom4j = 2.1.1
xml-apis/xml-apis = 1.4.01
javax.activation/activation = 1.1.1
org.freemarker/freemarker = 2.3.28
org.jsoup/jsoup = 1.11.3
org.jsoup/jsoup = 1.12.1
com.google.code.gson/gson = 2.8.5

org.codehaus.groovy = 2.5.6
org.codehaus.groovy = 2.5.7
org.codehaus.groovy/groovy = ${org.codehaus.groovy}
org.codehaus.groovy/groovy-sql = ${org.codehaus.groovy}
org.codehaus.groovy/groovy-templates = ${org.codehaus.groovy}
org.codehaus.groovy/groovy-json = ${org.codehaus.groovy}

ch.qos.logback/logback-classic = 1.2.3
org.slf4j/slf4j-api = 1.7.25
org.slf4j/log4j-over-slf4j = 1.7.25
org.slf4j/slf4j-api = 1.7.26
org.slf4j/log4j-over-slf4j = 1.7.26
org.json/json = 20180130
com.sun.mail/javax.mail = 1.6.0
com.sun.mail/javax.mail = 1.6.2
org.perf4j/perf4j = 0.9.16
com.google.code.findbugs/jsr305 = 3.0.2
javax.inject/javax.inject = 1
Expand All @@ -77,8 +77,8 @@ antlr/antlr = 2.7.7
org.antlr/antlr-runtime = 3.5.2
com.google.guava/guava = 27.1-jre
org.jgroups/jgroups = 3.6.17.Final
org.aspectj/aspectjrt = 1.9.2
org.aspectj/aspectjweaver = 1.9.2
org.aspectj/aspectjrt = 1.9.4
org.aspectj/aspectjweaver = 1.9.4
org.jmockit/jmockit = 1.39
junit/junit = 4.12
org.spockframework/spock-core = 1.3-groovy-2.5
Expand All @@ -100,7 +100,7 @@ com.vaadin/vaadin-push = ${com.vaadin}
com.vaadin/vaadin-compatibility-server = ${com.vaadin}
com.vaadin/vaadin-compatibility-client = ${com.vaadin}

org.springframework = 5.1.6.RELEASE
org.springframework = 5.1.7.RELEASE
org.springframework/spring-core = ${org.springframework}
org.springframework/spring-beans = ${org.springframework}
org.springframework/spring-context = ${org.springframework}
Expand Down

0 comments on commit 90b22cf

Please sign in to comment.