libsass-maven-plugin icon indicating copy to clipboard operation
libsass-maven-plugin copied to clipboard

mvn libsass:watch custom output path

Open bpetridean opened this issue 5 years ago • 3 comments

While running in watch mode the Output Path is set to target by default, how can I set it to another location?

Thanks, Bogdan.

bpetridean avatar Sep 02 '19 10:09 bpetridean

it should work similarly to how you set up the output path normally, see https://github.com/warmuuh/libsass-maven-plugin/blob/master/README.md#usage

warmuuh avatar Sep 02 '19 10:09 warmuuh

I have the following config in my pom.xml

 <plugin>
               <groupId>com.github.warmuuh</groupId>
               <artifactId>libsass-maven-plugin</artifactId>
               <version>${libsass.version}</version>
               <executions>
                   <execution>
                       <phase>generate-resources</phase>
                       <goals>
                           <goal>compile</goal>
                       </goals>
                       <configuration>
                           <inputPath>${project.basedir}/src/main/sass/assets/style/</inputPath>
                           <outputPath>${webappDirectory}/assets/style/</outputPath>
                           <sourceMapOutputPath>${webappDirectory}/assets/style/</sourceMapOutputPath>
                           <outputStyle>compressed</outputStyle>
                       </configuration>
                   </execution>
               </executions>
           </plugin>

Which works just fine upon compilation.

Then, for the css developers I also wanna activate the watcher and I do this:

mvn -X libsass:watch and the Output Path is set to .../target

Is there a way to set the outputPath through cmd line args? e.g. mvn -X libsass:watch -DoutputPath="/custom"

Thank you.

bpetridean avatar Sep 02 '19 10:09 bpetridean

try putting the configuration like i linked (not inside execution but inside the tag. this will then be picked up by "manual" executions of direct goals afaik.

warmuuh avatar Sep 02 '19 10:09 warmuuh