P.S.: The "compile" goal only by default uses a subdirectory of
Maven's global <outputDirectory> (${project.build.outputDirectory}/
scripts/classes). To configure the goals consistently, you should
rather reconfigure the "compile" goal than change the global
<outputDirectory>, like so:
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/myjoo/
scripts/classes</outputDirectory>
<outputFileName>${project.build.directory}/myjoo/scripts/
module.js</outputFileName>
</configuration>
</execution>
<execution>
<goals>
<goal>war-package</goal>
</goals>
<configuration>
<packageSourceDirectory>${project.build.directory}/
myjoo</packageSourceDirectory>
</configuration>
</execution>
</executions>
But again, Maven recommends to use the defaults if you don't have any
special reasons to change them.