eclipse - 无法使用 sass-maven-plugin 编译 style.scss

我想使用 sass-maven-plugin 将一些 SASS Template style.scss 编译为 css style.css。我已将插件添加到我的 pom.xml build.plugins 中,如所述 here 。我的 pom.xml 如下所示:

<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>com.company.web</groupId>
  <artifactId>scss</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>jar</packaging>

  <name>scss</name>
  <url>http://maven.apache.org</url>

  <dependencies>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
      <version>2.4</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>javax.servlet.jsp</groupId>
      <artifactId>jsp-api</artifactId>
      <version>2.1</version>
      <scope>provided</scope>
    </dependency>

  </dependencies>

  <build>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.0.2</version>
        <configuration>
          <source>1.4</source>
          <target>1.4</target>
        </configuration>
      </plugin>

<!--       To use the plugin goals in your POM or parent POM -->
      <plugin>
        <groupId>org.jasig.maven</groupId>
        <artifactId>sass-maven-plugin</artifactId>
        <version>1.1.0</version>
      </plugin>

    </plugins>

   <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.tomcat.maven</groupId>
          <artifactId>tomcat6-maven-plugin</artifactId>
          <version>2.1</version>
        </plugin>

        <plugin>
          <groupId>org.apache.tomcat.maven</groupId>
          <artifactId>tomcat7-maven-plugin</artifactId>
          <version>2.1</version>
        </plugin>

      </plugins>

    </pluginManagement>

  </build>


</project>

我使用 eclipse 运行该项目(在项目上单击鼠标右键 -> 运行为 -> 运行配置 -> 并指定为 Goals : sass:update-stylesheets

eclipse 打印以下错误:

[ERROR] Failed to execute goal org.jasig.maven:sass-maven-plugin:1.1.0:update-stylesheets (default-cli) on project scss: The parameters 'resources' for goal org.jasig.maven:sass-maven-plugin:1.1.0:update-stylesheets are missing or invalid

我做错了什么?

最佳答案

您需要向插件添加配置,告诉它要编译的文件在哪里以及编译后的文件放在哪里。

查看 http://developer.jasig.org/projects/sass-maven-plugin/1.1.1/update-stylesheets-mojo.html 中的资源

https://stackoverflow.com/questions/16480277/

相关文章:

r - R中代数关系的笛卡尔积表

find - 如何为大量文件添加标题(空/非空)

r - 哪些参数被传递给回溯中的函数?

r - 为什么 na.omit 向空数据框添加一行?

javascript - 如何将事件监听器添加到对象数组

axapta - 根据用户输入启用/禁用向导的 FINISH 按钮

cassandra - Cassandra 是否是一个很好的候选数据库,因为它必须每秒支持超过 10

sql-server - 在 edmx 中重命名列的最佳方法是什么?

vbscript - 使用 VBScript 获取 Mac 地址

django - 如何修复 Django 错误 : "' unicode' object has n