manolo / gwt-api-generator

Generator for creating GWT JSInterop clients from Polymer Web Components
Apache License 2.0
50 stars 24 forks source link

No pom file #56

Closed amahdy closed 8 years ago

amahdy commented 8 years ago
g-10-64-12-198:tt amahdy$ gwt-api-generator --package=alexwolfe/Buttons --pom
[12:52:35] Using cwd:  /Users/amahdy/tt/src/main/resources//com/vaadin/polymer/public/
[12:52:35] Using bower dir:  ./bower_components
[12:52:35] bower not-cached git://github.com/alexwolfe/Buttons.git#*
[12:52:35] bower resolve git://github.com/alexwolfe/Buttons.git#*
[12:52:36] bower download https://github.com/alexwolfe/Buttons/archive/v2.0.0.tar.gz
[12:52:39] bower extract archive.tar.gz
[12:52:39] bower invalid-meta Buttons is missing "ignore" entry in bower.json
[12:52:39] bower resolved git://github.com/alexwolfe/Buttons.git#2.0.0
[12:52:39] bower install Buttons#2.0.0
g-10-64-12-198:tt amahdy$ ls -la
total 0
drwxr-xr-x   3 amahdy  staff   102 Dec 16 12:52 .
drwxr-xr-x+ 73 amahdy  staff  2482 Dec 16 12:38 ..
drwxr-xr-x   3 amahdy  staff   102 Dec 16 12:52 src
Saulis commented 8 years ago

I believe the problem here is that the execution is interrupted by some error (which isn't logged onto the console). Here's the gulp log:

Saulis-MacBook-Pro:gwt-api-generator Saulis$ gulp --package=alexwolfe/buttons --pom
[13:55:26] Using gulpfile ~/Dev/gwt-api-generator/gulpfile.js
[13:55:26] Starting 'default'...
[13:55:26] Starting 'clean:target'...
[13:55:26] Finished 'clean:target' after 3.23 ms
[13:55:26] Starting 'clean:resources'...
[13:55:26] Finished 'clean:resources' after 60 ms
[13:55:26] Starting 'clean'...
[13:55:26] Finished 'clean' after 3.35 μs
[13:55:26] Starting 'clean:target'...
[13:55:26] Finished 'clean:target' after 509 μs
[13:55:26] Starting 'clean:resources'...
[13:55:26] Finished 'clean:resources' after 178 μs
[13:55:26] Starting 'clean'...
[13:55:26] Finished 'clean' after 2.7 μs
[13:55:26] Starting 'bower:configure'...
[13:55:26] Finished 'default' after 70 ms
[13:55:26] Finished 'bower:configure' after 1.61 ms
[13:55:26] Starting 'bower:install'...
[13:55:26] Using cwd:  /Users/Saulis/Dev/gwt-api-generator/src/main/resources//com/vaadin/polymer/public/
[13:55:26] Using bower dir:  ./bower_components
[13:55:26] bower cached git://github.com/alexwolfe/buttons.git#2.0.0
[13:55:26] bower validate 2.0.0 against git://github.com/alexwolfe/buttons.git#*
[13:55:27] bower install Buttons#2.0.0
[13:55:27] Finished 'bower:install' after 1.5 s
[13:55:27] Starting 'clean:target'...
[13:55:27] Finished 'clean:target' after 580 μs
[13:55:27] Starting 'pre-analyze:missing-events'...
[13:55:27] Starting 'pre-analyze:new-syntax-events'...
[13:55:27] Starting 'pre-analyze:missing-behaviors'...
[13:55:27] Starting 'generate:gwt-module'...
[13:55:27] Finished 'pre-analyze:missing-events' after 22 ms
[13:55:27] Finished 'pre-analyze:missing-behaviors' after 9.54 ms
[13:55:27] Finished 'pre-analyze:new-syntax-events' after 11 ms
[13:55:27] Starting 'pre-analyze'...
[13:55:27] Finished 'pre-analyze' after 2.86 μs
[13:55:27] Starting 'analyze'...
[13:55:27] Finished 'analyze' after 2.05 ms
[13:55:27] Starting 'parse'...
[13:55:27] Finished 'parse' after 9.26 μs
[13:55:27] Starting 'generate:elements'...
[13:55:27] Starting 'generate:events'...
[13:55:27] Starting 'generate:widgets'...
[13:55:27] Starting 'generate:widget-events'...
[13:55:27] Finished 'generate:gwt-module' after 17 ms
Saulis-MacBook-Pro:gwt-api-generator Saulis$

Seems it stops before the generate: tasks are finished.

amahdy commented 8 years ago

Happens also with PolymerElements/paper-elemnts but not PolymerElements/paper-icon-button

I also noticed that no java source code gets generated in the previously mentioned example, just resource folder (separate bug?).

manolo commented 8 years ago

alexwolfe/Buttons is not a polymer element, so you wont get any java source file since gwt-api-generator is only able to generate gwt wrappers for polymer elements following polymer projects conventions (import names, jsdoc, etc.). In a future though, it could parse other kind of projects like typescript definition files etc.

If you want to wrap a classic js library like alexwolfe/Buttons, you have first to create a new polymer element around the library, you might take a look to my wrapper for the pouchdb library: https://github.com/manolo/vaadin-pouchdb

manolo commented 8 years ago

PolymerElements/paper-elemnts is misspelled try either:

  $ gwt-api-generator --pom --package=PolymerElements/paper-elements
  or
  $ bower install PolymerElements/paper-elements
  $ gwt-api-generator --pom 

Note that pom.xml is only generated in the case there are elements to generate and there is no error