cincheo / jsweet

A Java to JavaScript transpiler.
http://www.jsweet.org
Other
1.46k stars 160 forks source link

packaging a JSweet jar (candy) issue #42

Closed ssatguru closed 8 years ago

ssatguru commented 8 years ago

Good news - If the jar is packaged properly it works, I am able to successfully share the jar with another project. And that is so great. This makes it so easy to share JS libraries. No complicated includes, requires, references. Just add a jar to your classpath and you are good to go :)

Bad news - There seems to be some issue with the maven-plugin. It recognizes the "declaration" option but not the "dtsout" option. The ".d.ts" file is created but in default "target/js" folder. I tried various things but wasn't successful.Ended up moving the file manually. Attached is the pom file I was trying. pom.zip

renaudpawlak commented 8 years ago

Your pom.xml seems right.

Can you check and send me the trace when you activate the logs?

Thanks

renaudpawlak commented 8 years ago

Oh! Wait. After double-checking, I see a potential issue in your pom.xml because the option dtsOut has a uppercased O (on contrary to the command line version). So you should replace <dtsout>${basedir}/src/main/resources/src/typings</dtsout> with <dtsOut>${basedir}/src/main/resources/src/typings</dtsOut>.

ssatguru commented 8 years ago

You were right. It worked when I changed the tag to <dtsOut>. As an FYI the .d.ts file is not getting created at the root of "src/typings" instead,in my case, it gets created at "src/typings/org/ssatguru/babylonjs/component". It still works though so I guess that is ok.

Also do you think it might be a good idea for the plugin to check for bad configuration parms?

renaudpawlak commented 8 years ago

Cool. Thanks. The directory structure has no impacts on typings... so we will leave it this way.

Yes. Definitely, I was thinking of creating an issue in the maven plugin project to check if a wrong param has been used. I am not a Mojo expert but I assume it must be possible... I'll report now :)