You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fineract.apache.org by "Michael Vorburger (Jira)" <ji...@apache.org> on 2020/08/02 15:54:00 UTC

[jira] [Comment Edited] (FINERACT-1101) Swagger CodeGen Test Build using Gradle instead of Maven

    [ https://issues.apache.org/jira/browse/FINERACT-1101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17169566#comment-17169566 ] 

Michael Vorburger edited comment on FINERACT-1101 at 8/2/20, 3:53 PM:
----------------------------------------------------------------------

Using {{../../gradlew build}} instead of {{build/swagger-code-fineract/gradlew}} to use "our" (Fineract's) Gradle Wrapper instead of the one Swagger Client generated seems to be a workaround. But this is brittle, and could break in the future, of course (there is no guarantee that the Gradle version that Apache Fineract core uses tomorrow will remain able to build the code generated by Swagger); it would be much better if Swagger CodeGen was updated to use a more recent Gradle wrapper.

More importantly, for some reason (which I have not further investigated), Gradle doesn't seem to run those generated tests, like Maven currently does? The tests seem great - let's make sure that we keep those, whatever we end up deciding to do here.

> the Travis CI should should at least use the Maven Wrapper {{{{./mvnw}}}} instead of {{{{mvn}}}}

There actually is no Maven Wrapper in the generated client project; so ignore this point (but this could be an enhancement to propose to Swagger CodeGen).

> add Caching of Maven artifacts in addition to Gradle to the Travis CI configuration, to make it a bit faster.

Ignore this, we actually already have {{$HOME/.m2}} in {{cache.directories}} in {{.travis.yml}}, so all good.


was (Author: vorburger):
Using {{../../gradlew build}} instead of \{{[build/swagger-code-fineract/]./gradlew} to use "our" (Fineract's) Gradle Wrapper instead of the one Swagger Client generated seems to be a workaround. But this is brittle, and could break in the future, of course (there is no guarantee that the Gradle version that Apache Fineract core uses tomorrow will remain able to build the code generated by Swagger); it would be much better if Swagger CodeGen was updated to use a more recent Gradle wrapper.

More importantly, for some reason (which I have not further investigated), Gradle doesn't seem to run those generated tests, like Maven currently does? Those seem great - let's make sure that we keep those, whatever we end up deciding to do here.

> the Travis CI should should at least use the Maven Wrapper {{{{./mvnw}}}} instead of {{{{mvn}}}}

There actually is no Maven Wrapper in the generated client project; so ignore this point (but this could be an enhancement to propose to Swagger CodeGen).

> add Caching of Maven artifacts in addition to Gradle to the Travis CI configuration, to make it a bit faster.

Ignore this, we actually already have {{$HOME/.m2}} in {{cache.directories}} in {{.travis.yml}}, so all good.

> Swagger CodeGen Test Build using Gradle instead of Maven
> --------------------------------------------------------
>
>                 Key: FINERACT-1101
>                 URL: https://issues.apache.org/jira/browse/FINERACT-1101
>             Project: Apache Fineract
>          Issue Type: Sub-task
>            Reporter: Michael Vorburger
>            Assignee: Chinmay Kulkarni
>            Priority: Minor
>
> Looking at [https://travis-ci.org/github/apache/fineract/builds/714158191] for [https://github.com/apache/fineract/pull/1228] for FINERACT-838, I've noticed that the Swagger Client Code Generation seems  to be built using Maven {{mvn}}... but on {{docs/developers/swagger/client.md}} we document the use of Gradle. This seems inconsistent, and requiring Fineract developers to have Maven installed just for this may be unnecessary? 
> [~Grandolf49] was there a particular reason why you chose to build the client using Maven instead of Gradle on Travis in your PR? If none, would you be willing to raise a PR to change that?
> If that is not possible, the Travis CI should should at least use the Maven Wrapper {{./mvnw}} instead of {{mvn}}. And we should add Caching of Maven artifacts in addition to Gradle to the Travis CI configuration, to make it a bit faster.
> [~Manthan] [~ptuomola] FYI.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)