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

force=true ignored

Open dfernandez79 opened this issue 13 years ago • 3 comments

I don´t know if this issue belongs here or to the lesscss-java

I've set the force configuration to true, but unmodified files are ignored.

This is a fragment of mvn -X lesscss:compile output:

    [DEBUG] Configuring mojo 'org.lesscss:lesscss-maven-plugin:1.3.0:compile' with basic configurator -->
    [DEBUG]   (f) compress = true
    [DEBUG]   (f) force = true
    [DEBUG]   (f) includes = [billing.less, searchfield.less, singup.less]
    [DEBUG]   (f) outputDirectory = /Users/diegof/Projects/console-web/src/main/webapp/static/stylesheets
    [DEBUG]   (f) sourceDirectory = /Users/diegof/Projects/console-web/src/main/less
    [DEBUG] -- end configuration --
    [DEBUG] sourceDirectory = /Users/diegof/Projects/console-web/src/main/less
    [DEBUG] outputDirectory = /Users/diegof/Projects/console-web/src/main/webapp/static/stylesheets
    [DEBUG] includes = [billing.less, searchfield.less, singup.less]
    [DEBUG] excludes = []
    [DEBUG] force = true
    [DEBUG] lessJs = null
    [DEBUG] included files = [billing.less, searchfield.less, singup.less]
    [INFO] Bypassing LESS source: billing.less (not modified)
    [INFO] Bypassing LESS source: searchfield.less (not modified)
    [INFO] Bypassing LESS source: singup.less (not modified)
    [INFO] Compilation finished in 567 ms

In the output you can see the "Bypassing" message even when force = true

dfernandez79 avatar Jul 04 '12 20:07 dfernandez79

The problem is in CompileMojo.java:129 :

     if (output.lastModified() < lessSource.getLastModifiedIncludingImports()) {

It should be:

     if (force || output.lastModified() < lessSource.getLastModifiedIncludingImports()) {

But a better solution is to let the compiler decide and report if the file was compiled or ignored (ie. the current version of the lesscss-java also checks if the output exists).

dfernandez79 avatar Jul 04 '12 21:07 dfernandez79

I'm seeing the same problem and I agree with the pull request sent by dfernandez79. Any idea on when this will be integrated in a new release?

gbilodeau avatar Nov 01 '13 15:11 gbilodeau

Hey , I am experience a similar issue related to this force configuration. When is this pull request can be merged ?

zacyang avatar Jan 13 '14 06:01 zacyang