cincheo/jsweet

packaging a JSweet jar (candy) issue

Closed this issue · 4 comments

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

Your pom.xml seems right.

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

  • Delete your .m2/repository/org/jsweet to make sure that your local repo is in the right state.
  • Just add the <verbose>true</verbose> option in the jsweet maven plugin.
  • Copy and paste the console output

Thanks

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>.

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?

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 :)