Skip to content

Instantly share code, notes, and snippets.

@philwebb
Created April 30, 2012 18:08
Show Gist options
  • Save philwebb/2560555 to your computer and use it in GitHub Desktop.
Save philwebb/2560555 to your computer and use it in GitHub Desktop.
WebJars without Spring
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>test</groupId>
<artifactId>test</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<repositories>
<repository>
<id>webjars</id>
<url>http://webjars.github.com/m2</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.2</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<overlays>
<overlay>
<groupId>com.github.twitter</groupId>
<artifactId>bootstrap</artifactId>
<type>jar</type>
</overlay>
<overlay>
<groupId>com.jquery</groupId>
<artifactId>jquery</artifactId>
<type>jar</type>
</overlay>
</overlays>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.github.twitter</groupId>
<artifactId>bootstrap</artifactId>
<version>2.0.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.jquery</groupId>
<artifactId>jquery</artifactId>
<version>1.7.1</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
@mwanji
Copy link

mwanji commented May 14, 2012

Thanks for this. It does pop up one warning: the maven-war-plugin has no version specified. Current latest is 2.2.

@philwebb
Copy link
Author

Thanks @mwanji, I have updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment