Author: etnu
Date: Sat Jan 12 01:15:56 2008
New Revision: 611391
URL: http://svn.apache.org/viewvc?rev=611391&view=rev
Log:
Added support to pom.xml to automatically pull in static web content.
Currently, anything in ../../javascript with either an "html", "css", or "js"
file extension will be included, including paths. This may be changed to be an
explicit list of files instead of pulling everything in the directory.
This change will only work if you actually use a jar or war inside of a servlet
container that is properly configured to serve static files out of the root of
the jar. This behavior comes automatically with jetty, but you must use the
jetty:run-war goal and not jetty:run, because jetty:run examines files on the
local file system in src/main/webapp.
Do NOT move static content files into src/main/webapp directory. These files
are shared with other language implementations and do not belong in the java
code base.
Modified:
incubator/shindig/trunk/java/gadgets/pom.xml
Modified: incubator/shindig/trunk/java/gadgets/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/shindig/trunk/java/gadgets/pom.xml?rev=611391&r1=611390&r2=611391&view=diff
==============================================================================
--- incubator/shindig/trunk/java/gadgets/pom.xml (original)
+++ incubator/shindig/trunk/java/gadgets/pom.xml Sat Jan 12 01:15:56 2008
@@ -21,6 +21,23 @@
<finalName>gadgets</finalName>
<plugins>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <webResources>
+ <resource>
+ <!-- this is relative to the pom.xml directory -->
+ <directory>../../javascript/</directory>
+ <includes>
+ <include>**/*.js</include>
+ <include>**/*.html</include>
+ <include>**/*.css</include>
+ </includes>
+ </resource>
+ </webResources>
+ </configuration>
+ </plugin>
+ <plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>