cantaloupe icon indicating copy to clipboard operation
cantaloupe copied to clipboard

Reconsider WAR builds

Open aindlq opened this issue 3 years ago • 4 comments

While updating to 5.0 I've just stumbled on the fact that there is no WAR builds anymore (https://github.com/cantaloupe-project/cantaloupe/issues/339), I wonder if you are open to reconsider this change but maybe with slightly different approach?

As I can see the main issue was because you had jar and war all in one bundle, so that is why all these hackery in the pom file was necessary, but what if one have separate builds (sub projects) for JAR and WAR build. E.g as it is done for blazegraph, there is a sub-project for standalone jar - https://github.com/blazegraph/database/tree/master/blazegraph-jar and a sub-project for war - https://github.com/blazegraph/database/tree/master/bigdata-war

We are trying to use cantaloupe in https://github.com/researchspace/researchspace, and with 4.* the WAR build was extremely convenient. We are using Gradle with Gretty plugin (https://gretty-gradle-plugin.github.io/gretty-doc/index.html) for the build, and it has a nice feature where one can just start multiple webapps in one go in dev environment (https://gretty-gradle-plugin.github.io/gretty-doc/Farm-web-app-list.html#_repository_based_web_app_references) and then even generate runnable zip bundle out of it (https://gretty-gradle-plugin.github.io/gretty-doc/Product-generation.html).

Obviously we can hack something in a fork for our use case, but I wonder if there is a possibility to have a kind of official WAR builds.

Also have you considered pushing cantaloupe builds to maven central?

aindlq avatar May 06 '21 10:05 aindlq

Hi @aindlq,

I've considered some kind of WAR wrapper. Really what's missing is an artifact repo. I've only used Maven Central a little bit for one other project and I'm still unfamiliar/uncomfortable with it. It was a real bear to set up, and then it broke when I tried to push another version and I don't remember what I had to do to fix it.

(So I guess it could be argued that what's missing is not an artifact repo but rather a competent developer :smile:)

I've also looked into GitHub Packages. This seemed really nice, but it doesn't currently support public packages.

AWS CodeArtifact could be another option.

Some kind of artifact repo is going to be needed soon for other reasons, so this is going to have to get solved one way or another.

adolski avatar May 06 '21 15:05 adolski

In my opinion you need to bite the bullet and publish to Maven Central. Especially taking into account recent events with JCenter/Bintray (https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/).

So many projects had to migrate to Maven Central. But as a result now there should be a good amount of up-to-date knowledge on how to do that, e.g https://getstream.io/blog/publishing-libraries-to-mavencentral-2021/ or https://dzone.com/articles/how-to-publish-artifacts-to-maven-central

Let me know if I can help in any way.

aindlq avatar May 06 '21 15:05 aindlq

Hi @adolski we were wondering if resolving this issue is on the 2022 roadmap. We are happy to help (see @aindlq ) message above and other users of cantaloupe would really appreciate a war wrapper. Could you please give us an indication if this is something you are looking at in the near future?

dianat avatar Jan 19 '22 17:01 dianat

Hi @dianat , this is a low/zero priority for me for the foreseeable future.

adolski avatar Jan 19 '22 22:01 adolski