<plugins>
<plugin>
<groupId>com.github.mcheely</groupId>
<artifactId>requirejs-maven-plugin</artifactId>
<version>2.0.0</version>
<executions>
<execution>
<goals>
<goal>optimize</goal>
</goals>
</execution>
</executions>
<configuration>
<!-- path to optimizer json config file -->
<configFile>${basedir}/src/main/webapp/js/build/build-config.js</configFile>
<!-- optional path to optimizer executable -->
<optimizerFile>${basedir}/src/main/webapp/js/build/r.js</optimizerFile>
<!-- whether or not to process config with maven filters -->
<filterConfig>true</filterConfig>
<!-- Skip requirejs optimization if true -->
<skip>false</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<warSourceExcludes>js/**,css/**</warSourceExcludes>
<packagingExcludes>%regex[js/lib/(?!require).*],template/**</packagingExcludes>
</configuration>
</plugin>
</plugins>
build-config.js looks like
({
appDir: "${basedir}/src/main/webapp",
baseUrl: "js",
dir: "../../target/build",
optimizeCss: "standard.keepLines",
mainConfigFile: "../../src/main/webapp/js/main.js",
inlineText: true,
removeCombined: true,
fileExclusionRegExp: /^build/,
modules: [
{
name: "main"
}
]
})
The war-exclusion works fine, but the target/build is not included in the war built.
http://resthub.org/docs/quickstart/ - Just downloaded and ran
mvn package -Poptimize fails.
I am on windows 7 16-bit, jdk1.7
build-config.js looks like
The war-exclusion works fine, but the target/build is not included in the war built.
http://resthub.org/docs/quickstart/ - Just downloaded and ran
mvn package -Poptimizefails.I am on windows 7 16-bit, jdk1.7