Libsass-mave-plugin多个输入和输出目录

时间:2015-09-22 14:20:45

标签: java maven sass

我有libsass-maven-plugin项目

<plugin>
    <groupId>com.github.warmuuh</groupId>
    <artifactId>libsass-maven-plugin</artifactId>
    <executions>
        <execution>
            <phase>generate-resources</phase>
            <goals>
                <goal>compile</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <inputPath>${basedir}/inputpath</inputPath>
        <outputPath>${basedir}/outputpath</outputPath>
        <generateSourceMap>false</generateSourceMap>
    </configuration>
</plugin>

是否可以在不使用maven配置文件的情况下指定更多输入和输出路径?

1 个答案:

答案 0 :(得分:2)

只需使用多次执行。请记住为所有人添加唯一ID。

<plugin>
    <groupId>com.github.warmuuh</groupId>
    <artifactId>libsass-maven-plugin</artifactId>
    <executions>
        <execution>
            <id>firstId</id>
            <phase>generate-resources</phase>
            <goals>
                <goal>compile</goal>
            </goals>
            <configuration>
                <inputPath>firstInputPath</inputPath>
                <outputPath>firstOutputPath</outputPath>
                <generateSourceMap>false</generateSourceMap>
            </configuration>
        </execution>
        <execution>
            <id>secondId</id>
            <phase>generate-resources</phase>
            <goals>
                <goal>compile</goal>
            </goals>
            <configuration>
                <inputPath>secondInputPath</inputPath>
                <outputPath>secondOutputPath</outputPath>
                <generateSourceMap>false</generateSourceMap>
            </configuration>
        </execution>
    </executions>
</plugin>