Skullabs/kikaha

2.0.4 to 2.1.3.Final Migration

jmilagroso opened this issue · 2 comments

2.0.4 packages .jar and .zip files.
I am using .zip (plus maven profile) file when deploying updates, extracts it, runs kikaha.sh start.

In the 2.1.3.Final, it only generates .jar file, how should I deploy/run this on staging/production environment?

miere commented

Hi @jmilagroso
Thanks for asking.

Kikaha 2.1.x changed its default packaging mode from zip to jar, but zip support is still available.
The kikaha-maven-plugin still able to generate zip files by using the mvn clean package kikaha:package command.

By defining the following two properties on your pom.xml your project will always generate a zip when you use the mvn clean install command:

<!-- Disable uber-jar auto-packaging  -->
<config.plugins.jar.enabled>true</config.plugins.jar.enabled>
<!-- Enable zip auto-packaging  -->
<config.plugins.package.enabled>true</config.plugins.package.enabled>

Although I have a topic (here) that covers this behavior at the Kikaha's documentation, improvements and suggestions are always welcome...

About the migration, please keep posting your questions here. When you got your project finished I will use the questions asked here to make a migration guide.

Successfully migrated from 2.0.4 to 2.1.3.Final

Changed
final DefaultResponse defaultResponse = DefaultResponse.ok()...
to
final DefaultResponse defaultResponse = (DefaultResponse) DefaultResponse.ok()

due to MutableResponse error.

Changed <version>2.0.4</version> to <version>2.1.3.Final</version>
Added <config.plugins.jar.enabled>false</config.plugins.jar.enabled>
Added <config.plugins.package.enabled>true</config.plugins.package.enabled>
Changed <artifactId>kikaha-urouting-jackson</artifactId> to <artifactId>kikaha-jackson</artifactId>

circle.yml for auto deployment:
Changed mvn clean validate compile test package kikaha:package -P <maven custom profile> to mvn clean install -P <maven custom profile>

Build and deploy using CircleCI is seamless with minimal changes.

Thanks!

@miere