Skip to content

Commit

Permalink
Merge 76caf4b into defb3d4
Browse files Browse the repository at this point in the history
  • Loading branch information
gludington committed Feb 19, 2014
2 parents defb3d4 + 76caf4b commit 9ddec2a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
Expand Up @@ -16,6 +16,8 @@ public interface JasmineConfiguration {
String getSrcDirectoryName();
String getSpecDirectoryName();

String getWebjarDirectoryName();

ScriptSearch getSources();
ScriptSearch getSpecs();

Expand Down
Expand Up @@ -445,6 +445,14 @@ public abstract class AbstractJasmineMojo extends AbstractMojo implements Jasmin
)
protected String connectorClass;

/**
* <p>The context from which webjar scripts will be served.</p>
*
* @since 1.3.1.5
*/
@Parameter(property="webjarDirectoryName", defaultValue="webjar")
protected String webjarDirectoryName;

@Parameter(defaultValue="${project}", readonly=true)
protected MavenProject mavenProject;

Expand Down Expand Up @@ -518,6 +526,11 @@ public String getSpecDirectoryName() {
return this.specDirectoryName;
}

@Override
public String getWebjarDirectoryName() {
return webjarDirectoryName;
}

@Override
public List<String> getPreloadSources() {
this.addRequireJsIfNecessary(); // This is temporary until the scriptLoaderPath parameter is removed
Expand Down
Expand Up @@ -45,7 +45,7 @@ public Handler createHandler() throws IOException {
classPathContextHandler.setHandler(new ClassPathResourceHandler(configuration.getProjectClassLoader()));
classPathContextHandler.setAliases(true);

ContextHandler webJarsContextHandler = contexts.addContext("/webjar", "");
ContextHandler webJarsContextHandler = contexts.addContext("/" + this.configuration.getWebjarDirectoryName(), "");
webJarsContextHandler.setHandler(new WebJarResourceHandler(configuration.getProjectClassLoader()));
webJarsContextHandler.setAliases(true);

Expand Down

0 comments on commit 9ddec2a

Please sign in to comment.