petclinic-uncached
Details
.bowerrc 3(+3 -0)
diff --git a/.bowerrc b/.bowerrc
new file mode 100644
index 0000000..dca141d
--- /dev/null
+++ b/.bowerrc
@@ -0,0 +1,3 @@
+{
+ "directory": "src/main/webapp/bower_components"
+}
bower.json 11(+11 -0)
diff --git a/bower.json b/bower.json
new file mode 100644
index 0000000..65f2293
--- /dev/null
+++ b/bower.json
@@ -0,0 +1,11 @@
+{
+ "name": "spring-petclinic",
+ "authors": [
+ "ihabritane.faycal@gmail.com"
+ ],
+ "dependencies": {
+ "bootstrap": "~2.3.0",
+ "jquery": "~2.0.3",
+ "jquery-ui": "~1.10.3"
+ }
+}
pom.xml 49(+29 -20)
diff --git a/pom.xml b/pom.xml
index 431193a..c07501e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -36,9 +36,6 @@
<mysql-driver.version>5.1.36</mysql-driver.version>
<!-- Web dependencies -->
- <webjars-bootstrap.version>2.3.0</webjars-bootstrap.version>
- <webjars-jquery-ui.version>1.10.3</webjars-jquery-ui.version>
- <webjars-jquery.version>2.0.3-1</webjars-jquery.version>
<dandelion.version>1.1.1</dandelion.version>
<dandelion.datatables.version>1.1.0</dandelion.datatables.version>
@@ -223,23 +220,7 @@
</exclusion>
</exclusions>
</dependency>
- <!-- Webjars (static dependencies distributed as JAR files) -->
- <dependency>
- <groupId>org.webjars</groupId>
- <artifactId>bootstrap</artifactId>
- <version>${webjars-bootstrap.version}</version>
- </dependency>
- <dependency>
- <groupId>org.webjars</groupId>
- <artifactId>jquery-ui</artifactId>
- <version>${webjars-jquery-ui.version}</version>
- </dependency>
- <dependency>
- <groupId>org.webjars</groupId>
- <artifactId>jquery</artifactId>
- <version>${webjars-jquery.version}</version>
- </dependency>
-
+
<!-- Test Artifacts -->
<dependency>
<groupId>org.springframework</groupId>
@@ -408,6 +389,34 @@
</plugin>
</plugins>
</reporting>
+ <profiles>
+ <profile>
+ <id>bower-install</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <executable>bower</executable>
+ <arguments>
+ <argument>install</argument>
+ </arguments>
+ <workingDirectory>${basedir}</workingDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
<url>demopetclinic</url>
</project>
diff --git a/src/main/resources/spring/mvc-core-config.xml b/src/main/resources/spring/mvc-core-config.xml
index 641ea44..aa4fcca 100644
--- a/src/main/resources/spring/mvc-core-config.xml
+++ b/src/main/resources/spring/mvc-core-config.xml
@@ -28,9 +28,6 @@
(see header.jsp for more details) -->
<mvc:resources mapping="/resources/**" location="/resources/"/>
- <!-- uses WebJars so Javascript and CSS libs can be declared as Maven dependencies (Bootstrap, jQuery...) -->
- <mvc:resources mapping="/webjars/**" location="classpath:/META-INF/resources/webjars/"/>
-
<mvc:view-controller path="/" view-name="welcome"/>
<!-- serve static resources (*.html, ...) from src/main/webapp/
diff --git a/src/main/webapp/WEB-INF/jsp/fragments/staticFiles.jsp b/src/main/webapp/WEB-INF/jsp/fragments/staticFiles.jsp
index add2832..1a863f8 100644
--- a/src/main/webapp/WEB-INF/jsp/fragments/staticFiles.jsp
+++ b/src/main/webapp/WEB-INF/jsp/fragments/staticFiles.jsp
@@ -9,25 +9,23 @@ PetClinic :: a Spring Framework demonstration
<title>PetClinic :: a Spring Framework demonstration</title>
- <spring:url value="/webjars/bootstrap/2.3.0/css/bootstrap.min.css" var="bootstrapCss"/>
+ <spring:url value="/bower_components/bootstrap/docs/assets/css/bootstrap.css" var="bootstrapCss"/>
<link href="${bootstrapCss}" rel="stylesheet"/>
<spring:url value="/resources/css/petclinic.css" var="petclinicCss"/>
<link href="${petclinicCss}" rel="stylesheet"/>
- <spring:url value="/webjars/jquery/2.0.3/jquery.js" var="jQuery"/>
+ <spring:url value="/bower_components/jquery/jquery.js" var="jQuery"/>
<script src="${jQuery}"></script>
<!-- jquery-ui.js file is really big so we only load what we need instead of loading everything -->
- <spring:url value="/webjars/jquery-ui/1.10.3/ui/jquery.ui.core.js" var="jQueryUiCore"/>
+ <spring:url value="/bower_components/query-ui/ui/jquery.ui.core.js" var="jQueryUiCore"/>
<script src="${jQueryUiCore}"></script>
- <spring:url value="/webjars/jquery-ui/1.10.3/ui/jquery.ui.datepicker.js" var="jQueryUiDatePicker"/>
+ <spring:url value="/bower_components/query-ui/ui/jquery.ui.datepicker.js" var="jQueryUiDatePicker"/>
<script src="${jQueryUiDatePicker}"></script>
<!-- jquery-ui.css file is not that big so we can afford to load it -->
- <spring:url value="/webjars/jquery-ui/1.10.3/themes/base/jquery-ui.css" var="jQueryUiCss"/>
+ <spring:url value="/bower_components/query-ui/themes/base/jquery.ui.base.css" var="jQueryUiCss"/>
<link href="${jQueryUiCss}" rel="stylesheet"></link>
</head>
-
-
diff --git a/src/test/jmeter/petclinic_test_plan.jmx b/src/test/jmeter/petclinic_test_plan.jmx
index cd36ba0..c620770 100644
--- a/src/test/jmeter/petclinic_test_plan.jmx
+++ b/src/test/jmeter/petclinic_test_plan.jmx
@@ -135,7 +135,7 @@
<stringProp name="HTTPSampler.response_timeout"></stringProp>
<stringProp name="HTTPSampler.protocol"></stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
- <stringProp name="HTTPSampler.path">${CONTEXT_WEB}/webjars/jquery/2.0.3/jquery.js</stringProp>
+ <stringProp name="HTTPSampler.path">${CONTEXT_WEB}/bower_components/jquery/jquery.js</stringProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>