Plugin Documentation

Goals available for this plugin:

GoalDescription
javascript:attach-compressedGoal used to package compressed JavaScript files and package them as a javascript archive attaching this new artifact to the project for beeing installed / deployed with the regular uncompressed js-archive.
javascript:attach-strippedGoal used to package stripped JavaScript files and package them as a javascript archive attaching this new artifact to the project for beeing installed / deployed with the regular uncompressed js-archive.
javascript:compileGoal which assemble javascript sources into the packaging directory. An optional assembler descriptor can be set to configure scripts to be merged. Other scripts are simply copied to the output directory.
javascript:compressGoal used to strip and compress the JavaScript files from the target script directory
javascript:generateManualRunnerNo description.
javascript:helpDisplay help information on javascript-maven-plugin.
Call
  mvn javascript:help -Ddetail=true -Dgoal=<goal-name>
to display parameter details.
javascript:inplaceGoal that copies javascript dependencies to the web application script folder, inside the webapp source directory. This allows to prepare the webapp for running on a lightweight servlet container that does not requires packaging (when using the jetty:run goal).
javascript:jasmineNo description.
javascript:jsunitGoal which runs javascript tests using jsunit framework. Tests can be writter either inside an html page, as documented by jsunit, or simply as javascript.
javascript:packageGoal which packages scripts and resources as a javascript archive to be installed / deployed in maven repositories.
javascript:prepare-jasmine-testsGoal which copies scripts to the jasmine target directory.
javascript:prepare-jsunit-testsGoal which copies scripts to the test-script directory.
javascript:prepare-titanium-jasmine-testsThis Mojo create the titanium project structure required to execute the jasmine tests.
javascript:titanium-compileGoal that will place in a titanium build directory the file needed to create a titanium package.
javascript:titanium-jasmineNo description.
javascript:titanium-packageCompile the titanium application based on the selected platform.
javascript:titanium-prepare-packageThis goal strips and compress the source scripts in order to create the distribution package.
javascript:war-compressGoal to be used from a war project, to compress the scripts present in the webapp packaging folder. Configured to run in the test phase as there is no way (in maven 2.0) to run between exploded webapp assembly and .war packaging.
javascript:war-packageGoal that prepares scripts for packaging as a web application.

System Requirements

The following specifies the minimum requirements to run this Maven plugin:

Maven2.0
JDK1.5
MemoryNo minimum requirement.
Disk SpaceNo minimum requirement.

Usage

You should specify the version in your project's plugin configuration:

<project>
  ...
  <build>
    <!-- To define the plugin version in your parent POM -->
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.codehaus.mojo.javascript</groupId>
          <artifactId>javascript-maven-plugin</artifactId>
          <version>1.1-softec</version>
        </plugin>
        ...
      </plugins>
    </pluginManagement>
    <!-- To use the plugin goals in your POM or parent POM -->
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo.javascript</groupId>
        <artifactId>javascript-maven-plugin</artifactId>
        <version>1.1-softec</version>
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>

For more information, see "Guide to Configuring Plug-ins"