Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8099015
Showing
4 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/.idea | ||
/*.iml | ||
/target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
web: java $JAVA_OPTS -jar target/dependency/jetty-runner.jar --port $PORT target/*.war |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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/maven-v4_0_0.xsd"> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>com.jamesward</groupId> | ||
<artifactId>sample-jetty-war</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<packaging>war</packaging> | ||
|
||
<repositories> | ||
<repository> | ||
<id>webjars</id> | ||
<url>http://webjars.github.com/m2</url> | ||
</repository> | ||
</repositories> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.webjars</groupId> | ||
<artifactId>bootstrap</artifactId> | ||
<version>2.1.1</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-war-plugin</artifactId> | ||
<version>2.2</version> | ||
<configuration> | ||
<failOnMissingWebXml>false</failOnMissingWebXml> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-dependency-plugin</artifactId> | ||
<version>2.3</version> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals><goal>copy</goal></goals> | ||
<configuration> | ||
<artifactItems> | ||
<artifactItem> | ||
<groupId>org.mortbay.jetty</groupId> | ||
<artifactId>jetty-runner</artifactId> | ||
<version>8.1.6.v20120903</version> | ||
<destFileName>jetty-runner.jar</destFileName> | ||
</artifactItem> | ||
</artifactItems> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>WebJars Sample - Jetty WAR</title> | ||
<link rel='stylesheet' href='/webjars/bootstrap/2.1.1/css/bootstrap.min.css'> | ||
<script type='text/javascript' src='/webjars/jquery/1.8.2/jquery.min.js'></script> | ||
<script type='text/javascript' src='/webjars/bootstrap/2.1.1/js/bootstrap.min.js'></script> | ||
<style type="text/css"> | ||
body { | ||
margin-top: 50px; | ||
} | ||
</style> | ||
<script type="text/javascript"> | ||
$(function() { | ||
$("#showModalButton").bind('click', function(event) { | ||
$('#myModal').modal() | ||
}) | ||
}) | ||
</script> | ||
</head> | ||
<body> | ||
<div class="navbar navbar-fixed-top"> | ||
<div class="navbar-inner"> | ||
<div class="container-fluid"> | ||
<a id="titleLink" class="brand" href="/">hello, bootstrap</a> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="container"> | ||
<button id="showModalButton" class="btn btn-primary btn-large"><i class="icon-exclamation-sign icon-white"></i> Show a Modal</button> | ||
</div> | ||
|
||
<div id="myModal" class="modal hide fade"> | ||
<div class="modal-header"> | ||
<button class="close" data-dismiss="modal">×</button> | ||
<h3>This is a Modal</h3> | ||
</div> | ||
<div class="modal-body"> | ||
<p>Bootstrap depends on jQuery. So when you specify Bootstrap as a dependency you get jQuery too.</p> | ||
</div> | ||
<div class="modal-footer"> | ||
<a href="#" class="btn" data-dismiss="modal">Close</a> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |