Closed stoicflame closed 8 years ago
To be more precise: there were errors in 2.2 (one for each generated meta model class), but the Enunciate Gradle plugin continued and produced a report which covered all available classes.
@juergenzimmermann can you tell me if 78bf8140b69f86f73beebd8318a7450ebabbac85 fixes your problem?
(Clone the project, gradlew jar, then use build/libs/enunciate-gradle-2.5.0.jar in your buildscript classpath)
There's something weird going on with this. I changed my build to use new enunciate-cradle:2.5.0, and tried to use the new sourcepath(..) method. How ever no matter what I tried I keep getting the error "Could not find method sourcepath() for arguments [...."
Getting a bit desperate I downloaded the jar from "https://plugins.gradle.org/m2/gradle/plugin/com/webcohesion/enunciate/enunciate-gradle/2.5.0/enunciate-gradle-2.5.0.jar' and decompiled it.
There doesn't seem to be a source path(.) method in the decompiled EnunciateTask
I'm wondering if you've had some kind of packaging or uploading error?
@svanders, the deployed version of enunciate-gradle 2.5 doesn't have the sourcepath
method in it; hence the reference to 78bf814 which adds it. You'll need to build enunciate-gradle-2.5.0.jar yourself (with 78bf814 applied) in order to see the sourcepath
method.
+1 It will be nice to declare additional sourcepath in Gradle task config without any custom building.
Well, the change will be in the next release.
I am hoping someone will test it before the release, just to ensure that it actually works as intended.
I just tried the cloned and compiled the Enunciate plugin for Gradle. The good news: no error message. The bad news: a) No report is generated. b) I'm getting these warnings:
warning: [options] bootstrap class path not set in conjunction with -source 1.5
warning: [options] source value 1.5 is obsolete and will be removed in a future release
warning: [options] target value 1.5 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
When I add export("docs", ...)
, then I get a Swagger-based report - the warnings remain.
The Swagger-based report itself is not usable :-( The URL to be fetched is wrong:
file:///C:/Users/ziju0001/shop/dist/ui/index.html/swagger.json
When I enter a different URL it is appended to the prefix file:///C:/Users/ziju0001/shop/dist/ui/index.html
Thanks for testing, @juergenzimmermann! Are you really using java 1.5? Even IBM has moved on, and that says a lot :)
Anyway, while the Enunciate Ant task does take an source level option, it does not take a bootstrap classpath. That is why you get the warnings. But since the bootstrap classpath is unlikely to affect your output, it probably does not matter.
Would it be worth fixing the bootstrap classpath issue in Ant, @stoicflame ? There are probably a lot of users stuck with 1.7 production code for a good while yet, and bootstrap classpath is necessary for (safe and silent) compilation from 1.8.
@juergenzimmermann as for the output, how did you come up with the dist/ui/index.html/swagger.json bit?
The output should be in the folder dist
, with subfolder ui
containing (among others) index.html
and swagger.json
.
I would look at the output in a browser with just file:///C:/Users/ziju0001/shop/dist/ui/index.html
. Works in a least FireFox.
If you'd like to open an issue at the main project, I'd be happy to address the bootstrap classpath issue with Ant.
This is in response to stoicflame/enunciate#421. The gradle plugin needs some way to configure additional source paths.