我正在尝试使用sass-maven-plugin,其中有一个useCompass选项。我想将目录中的图像合并成精灵图片,但是我无法让该目录被“看到”。我一直收到的错误是说匹配icons/*.png的加载路径找不到任何文件。请参见下面的完整错误信息。
注意:如果我只使用compass compile从命令行运行它,则可以正常工作。但是使用maven目标运行它仍然会出现错误。
pom.xml
|-src
|-main
|-scss
|-styleguide
-styleguide.scss
|-images
|-icons
-my.png
pom.xml
<plugin>
<groupId>org.jasig.maven</groupId>
<artifactId>sass-maven-plugin</artifactId>
<executions>
<execution>
<id>sassProcessResources</id>
<phase>generate-resources</phase>
<goals>
<goal>update-stylesheets</goal>
</goals>
<configuration>
<useCompass>true</useCompass>
<sassSourceDirectory>${basedir}/src/main/scss</sassSourceDirectory>
<destination>${project.build.outputDirectory}/styleguide-components/resources/css</destination>
</configuration>
</execution>
</executions>
</plugin>
SCSS文件
@import "icons/*.png";
错误
Compilation of template C:/code/DiscoveryStyleGuide/styleguide/src/main/scss/styleguide/sprite/Sprite.scss failed: No files were found in the load path matching "icons/*.png". Your current load paths are: ./images
config.rb
# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "compiled"
sass_dir = "/"
images_dir = "images"
# javascripts_dir = "javascripts"