2009/12/9 stephanos <[email protected]>

> I'm not really familiar with Rhino but I want to compile .js source
> files
> via a maven plugin to a (bytecode) JAR (so that I can load it in OSGi
> and
> call it from another JAR).
>
> So far I couldn't find any clues on how to compile JS to JAR with
> maven.
> Any ideas?
>

If you can't find a maven  plugin to do what you want, it's usually easiest
to get the antrun plugin to do what you need.  Assuming that that there's an
ant task to do the same.  Mind you, it's possible to get the antrun plugin
to call a shell command if you need.

There's also the exec plugin, if you just need to run a java class.  I'm not
really sure how the rhino compiler works.

OK, looking through the distribution, you need to call the exec plugin with
org.mozilla.javascript.tools.jsc.M
ain as the class to execute.  I'll leave the precise details out as I'm
offline right now and can't look them up.

-Dom
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to