mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-05-29 06:19:38 +00:00
Use wro4j instead of lesscss plugin
It's better maintained and it seems to provide more features as well.
This commit is contained in:
parent
e20b96a4c2
commit
131a588e09
4 changed files with 30 additions and 68 deletions
86
pom.xml
86
pom.xml
|
@ -5,12 +5,12 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.springframework.samples</groupId>
|
||||
<artifactId>springboot-petclinic</artifactId>
|
||||
<version>1.4.1</version>
|
||||
<version>1.4.2</version>
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>1.4.1.RELEASE</version>
|
||||
<version>1.4.2.RELEASE</version>
|
||||
</parent>
|
||||
<name>petclinic</name>
|
||||
|
||||
|
@ -25,6 +25,7 @@
|
|||
<webjars-bootstrap.version>3.3.6</webjars-bootstrap.version>
|
||||
<webjars-jquery-ui.version>1.11.4</webjars-jquery-ui.version>
|
||||
<webjars-jquery.version>2.2.4</webjars-jquery.version>
|
||||
<wro4j.version>1.8.0</wro4j.version>
|
||||
|
||||
<thymeleaf.version>3.0.2.RELEASE</thymeleaf.version>
|
||||
<thymeleaf-layout-dialect.version>2.0.4</thymeleaf-layout-dialect.version>
|
||||
|
@ -169,78 +170,31 @@
|
|||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<!-- right now lesscss maven plugin does NOT support @Import from
|
||||
classpath https://github.com/marceloverdijk/lesscss-maven-plugin/issues/72
|
||||
workaround here will be unpacking the bootstrap on-the-fly remove this plugin
|
||||
config when the issue is resolved OR a better resolution is found -->
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<groupId>ro.isdc.wro4j</groupId>
|
||||
<artifactId>wro4j-maven-plugin</artifactId>
|
||||
<version>${wro4j.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>unpack</id>
|
||||
<phase>process-resources</phase>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<wroManagerFactory>ro.isdc.wro.maven.plugin.manager.factory.ConfigurableWroManagerFactory</wroManagerFactory>
|
||||
<cssDestinationFolder>${project.build.directory}/classes/static/resources/css</cssDestinationFolder>
|
||||
<wroFile>${basedir}/src/main/wro/wro.xml</wroFile>
|
||||
<extraConfigFile>${basedir}/src/main/wro/wro.properties</extraConfigFile>
|
||||
<contextFolder>${basedir}/src/main/less</contextFolder>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.webjars</groupId>
|
||||
<artifactId>bootstrap</artifactId>
|
||||
<version>${webjars-bootstrap.version}</version>
|
||||
<overWrite>false</overWrite>
|
||||
<outputDirectory>${project.basedir}/target/less
|
||||
</outputDirectory>
|
||||
<includes>**/*.less</includes>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-resources</id>
|
||||
<phase>validate</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.directory}/less</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/less</directory>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.lesscss</groupId>
|
||||
<artifactId>lesscss-maven-plugin</artifactId>
|
||||
<version>1.7.0.1.1</version>
|
||||
<configuration>
|
||||
<sourceDirectory>${project.build.directory}/less</sourceDirectory>
|
||||
<outputDirectory>${project.build.directory}/classes/static/resources/css</outputDirectory>
|
||||
<compress>true</compress>
|
||||
<includes>
|
||||
<include>petclinic.less</include>
|
||||
</includes>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
|
|
@ -11,8 +11,6 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
@import "META-INF/resources/webjars/bootstrap/3.3.6/less/bootstrap.less";
|
||||
|
||||
@icon-font-path: "../../webjars/bootstrap/fonts/";
|
||||
|
||||
@spring-green: #6db33f;
|
||||
|
|
4
src/main/wro/wro.properties
Normal file
4
src/main/wro/wro.properties
Normal file
|
@ -0,0 +1,4 @@
|
|||
#List of preProcessors
|
||||
preProcessors=lessCssImport
|
||||
#List of postProcessors
|
||||
postProcessors=less4j
|
6
src/main/wro/wro.xml
Normal file
6
src/main/wro/wro.xml
Normal file
|
@ -0,0 +1,6 @@
|
|||
<groups xmlns="http://www.isdc.ro/wro">
|
||||
<group name="petclinic">
|
||||
<css>classpath:META-INF/resources/webjars/bootstrap/3.3.6/less/bootstrap.less</css>
|
||||
<css>/petclinic.less</css>
|
||||
</group>
|
||||
</groups>
|
Loading…
Reference in a new issue