mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-15 12:25:50 +00:00
moving from Webjars to Bower #83
This commit is contained in:
parent
a768e877ef
commit
540d31ed21
6 changed files with 49 additions and 31 deletions
3
.bowerrc
Normal file
3
.bowerrc
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"directory": "src/main/webapp/bower_components"
|
||||
}
|
11
bower.json
Normal file
11
bower.json
Normal file
|
@ -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"
|
||||
}
|
||||
}
|
49
pom.xml
49
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>
|
||||
|
|
|
@ -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/
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue