Usage

This page provides examples of how to use this extension.

Example Usage

Declare this extension in your POM like so:

<project>
    ...
    <build>
        <extensions>
            <extension>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>javascript-maven-plugin</artifactId>
                <version>2.0.0-alpha-1</version>
            </extension>
        </extensions>
    </build>
    ...
</project>

To take advantage of the extension's capabilities.

Overriding Predefined Dependencies/Plugins/Plugin Configurations

To override the a dependency, plugin or plugin's configuration you can specify that dependency or plugin (optionally with configuration) in your POM file. If the extension detects a conflicting depdendency or plugin it will retain the user-specified version and will not attempt to configure its own.

E.g., to override Jetty, retaining the resource bases but specifying a different context path, add the following to your POM:

<project>
    ...
    <build>
        <plugin>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jetty-maven-plugin</artifactId>
            <version>7.4.2.v20110526</version>
            <configuration>
                <webAppConfig>
                    <contextPath>/newContentPath</contextPath>
                    <resourceBases>
                        <resourceBase>/Users/huntc/Development/STS/javascript-maven-tools/target/checkout/javascript-maven-plugin/target/classes</resourceBase>
                        <resourceBase>/Users/huntc/Development/STS/javascript-maven-tools/target/checkout/javascript-maven-plugin/target/test-classes</resourceBase>
                    </resourceBases>
                </webAppConfig>
            </configuration>
        </plugin>
    </build>
    ...
</project>

Note that if you specify your own plugin you must specify all configuration options - none of the extension's predefined configuration settings will be applied to a user-specified plugin.