atomfrede / generator-jhipster-swagger2markup

JHipster module to create static api docs with swagger2markup
Apache License 2.0
40 stars 15 forks source link

default goal generates incorrect Swagger2MarkupIntTest #16

Closed jjzabkar closed 8 years ago

jjzabkar commented 8 years ago

Thanks for a swell plugin! I found this small issue, fixed by a small manual workaround.

Issue

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (default-testCompile) on project jjzjhipsterswagger: Compilation failure: Compilation failure:
[ERROR] dir/jjz-jhipster-swagger/src/test/java/com/jjz/jhipster/swagger/web/rest/Swagger2MarkupIntTest.java:[3,27] package com.mycompany.myapp does not exist
[ERROR] dir/jjz-jhipster-swagger/src/test/java/com/jjz/jhipster/swagger/web/rest/Swagger2MarkupIntTest.java:[26,43] cannot find symbol

Steps to Reproduce

$ yo jhipster
    ? (1/15) What is the base name of your application? jjzjhipsterswagger
    ? (2/15) What is your default Java package name? com.jjz.jhipster.swagger
    ? (3/15) Which *type* of authentication would you like to use? HTTP Session Authentication (stateful, default Spring Security mechanism)
    ? (4/15) Which *type* of database would you like to use? SQL (H2, MySQL, PostgreSQL, Oracle)
    ? (5/15) Which *production* database would you like to use? PostgreSQL
    ? (6/15) Which *development* database would you like to use? H2 with in-memory persistence
    ? (7/15) Do you want to use Hibernate 2nd level cache? No
    ? (8/15) Do you want to use a search engine in your application? No
    ? (9/15) Do you want to use clustered HTTP sessions? No
    ? (10/15) Do you want to use WebSockets? No
    ? (11/15) Would you like to use Maven or Gradle for building the backend? Maven
    ? (12/15) Would you like to use Grunt or Gulp.js for building the frontend? Grunt (recommended)
    ? (13/15) Would you like to use the LibSass stylesheet preprocessor for your CSS? No
    ? (14/15) Would you like to enable translation support with Angular Translate? Yes
    ? (15/15) Which testing frameworks would you like to use? Gatling
$ yo jhipster-swagger2markup default
$ mvn test swagger2markup:process-swagger install

Results in error documented (here)[https://github.com/jjzabkar/jjz-jhipster-swagger/commit/653361cc1e63de2b1ab6ec765b5b222aec8fbb67].

Manual Workaround

Manually update Swagger2MarkupIntTest: (https://github.com/jjzabkar/jjz-jhipster-swagger/commit/4ba413e909a41d1e1491191dbe1e433c9fef70af#commitcomment-15496279)

Environment Info

Using latest versions of all JHipster dependencies documented here.

Example

(https://github.com/jjzabkar/jjz-jhipster-swagger/commits/generate-default-2)

Verification results of each step documented in commit comments.

atomfrede commented 8 years ago

Thanks for the awesome report, all required information are available! That issue is alreadz fixed in the latest master branch. I wanted to wait for the new swagger2markup maven plugin but I guess I'll do a release with the old plugin to fix this issue.

jjzabkar commented 8 years ago

To be clear: are you saying that I should use the new version - with the new Maven Group - of swagger2markup-maven-plugin :

io.github.robwin:swagger2markup-maven-plugin:0.9.2

...instead of:

com.redowlanalytics:swagger2markup-maven-plugin:0.8.0

...?

atomfrede commented 8 years ago

No definitly not yet. The current `ìo.github.robwin``artifact is not properly deplyoed to maven central, such that it doesn't work at all. I'll do a release for your described error as it is a failure in my jhipster module.

atomfrede commented 8 years ago

@jjzabkar I've released a new version of the module.