I am currently using Maven to create my Rhino JavaScript project, load dependent libraries, and manage classpath at runtime. I can run the JavaScript entry point using the Maven exec plugin as follows:
<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.1</version> <executions> <execution> <goals> <goal>java</goal> </goals> </execution> </executions> <configuration> <mainClass>org.mozilla.javascript.tools.shell.Main</mainClass> <classpathScope>runtime</classpathScope> <arguments> <argument>path/to/entryPoint.js</argument> </arguments> </configuration> </plugin>
This works well, but the problem is that maven takes about 10 seconds to start, which is about 10 times longer than starting my program. Is there any way:
- improves the performance of the maven exec plugin, so it takes less time to run or
- export class path that maven will use at runtime so that I can only run my program from a script?
source share