Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade libraries #5

Closed
c0c0n3 opened this issue Jan 23, 2017 · 2 comments
Closed

Upgrade libraries #5

c0c0n3 opened this issue Jan 23, 2017 · 2 comments

Comments

@c0c0n3
Copy link
Owner

c0c0n3 commented Jan 23, 2017

We should upgrade to Spring Boot 1.4.3. (We're currently on 1.3.4.)
In build.gradle, replace

classpath("org.springframework.boot:spring-boot-gradle-plugin:1.3.4.RELEASE")

with

classpath "org.springframework.boot:spring-boot-gradle-plugin:1.4.3.RELEASE"

Have a look at the Spring Boot Plugin usage snippet.

This automatically brings in a new Spring dependency set in the server project because we don't specify lib versions except for Gson (=2.4), so we get whatever is in the Spring Boot pom---which is good in general. But the other projects have explicit version numbers---for various reasons. So review the dependencies in these build files:

  • server.gradle. See if the new Boot brings in Gson too---it could be one of the libs we depend on now depends on Gson. If that is the case, take action depending on which version Boot brings in. Take into account that jclient uses 2.5. First price would be have the same Gson version across the board if possible.
  • jclient.gradle. Gson is on 2.5, see point above. As for Http Client, keep the version pinned to 4.3.1 if you want to be able to use in Insight. (See README file.)
  • cli.gradle. Keep the deps as they are. (See README.)
  • util.gradle. This is a dependency of server, so you need to match all version numbers to those brought in by Boot. (Technically you don't need to do this for the test deps, but it's best to do it to avoid issues going forward.) NB we can't use Boot dependency management in util as this lib is supposed to be as Spring free as possible! So keep the deps explicit.

After you're through with this, all is left to do is...lots of testing!

@c0c0n3 c0c0n3 mentioned this issue Jan 23, 2017
3 tasks
@c0c0n3 c0c0n3 mentioned this issue Jun 5, 2017
11 tasks
@c0c0n3
Copy link
Owner Author

c0c0n3 commented Jun 16, 2017

Rather upgrade to Spring Boot 1.5.1. Here's what to change:

build.gradle
- classpath("org.springframework.boot:spring-boot-gradle-plugin:1.3.4.RELEASE")
+ classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.4.RELEASE")

- gradleVersion = '2.12'
+ gradleVersion = '3.4'

The last line upgrades our Gradle wrapper, see #6.

components/cli/cli.gradle
- apply plugin: 'spring-boot'
+ apply plugin: 'org.springframework.boot'

With the lib upgrade, we also need to use the new boot plugin, see #4.

components/jclient/jclient.gradle
- compile 'com.google.code.gson:gson:2.5'
+ compile 'com.google.code.gson:gson:2.8.1'

Using same Gson version as in server.gradle, see below.

components/server/server.gradle
- apply plugin: 'spring-boot'
+ apply plugin: 'org.springframework.boot'

- compile("com.google.code.gson:gson:2.4")
+ compile("com.google.code.gson:gson:2.8.1")

- compile("org.springframework.boot:spring-boot-starter-hornetq")
- compile("org.hornetq:hornetq-jms-server")
+ compile("org.springframework.boot:spring-boot-starter-artemis")
+ compile("org.apache.activemq:artemis-jms-server")

The first change set up there is to use the new boot plugin, see #4. The second change set is to upgrade Gson---none of the Boot libs we use depend on it, so we have to add it. (In fact, if you comment out the Gson dep compilation fails on Gson imports.) The third change set is for migrating from HornetQ to Artemis, see #9.

components/util/util.gradle
- compile 'org.springframework:spring-web:4.1.7.RELEASE'
+ compile 'org.springframework:spring-web:4.3.9.RELEASE'

- compile 'org.yaml:snakeyaml:1.14'
+ compile 'org.yaml:snakeyaml:1.17'

The two changes above is all you need to match the (implicit) version numbers in server.gradle. I figured that out looking at the output of:

gradle :server:dependencies > deps

@c0c0n3 c0c0n3 mentioned this issue Jun 22, 2017
9 tasks
c0c0n3 added a commit that referenced this issue Jun 27, 2017
this commit implements #6 and #5 but the build is obviously gonna
be broken until I change the Java code to use the new libs.
c0c0n3 added a commit that referenced this issue Jun 27, 2017
this commit only changes the source code to make it compile with the
new SpringBoot libs.
@c0c0n3
Copy link
Owner Author

c0c0n3 commented Jun 27, 2017

implemented changes in v1.1.0-beta, see #11.

@c0c0n3 c0c0n3 closed this as completed Jun 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant