jsHint not working anymore when upgrading from 1.7.0 to 1.7.1

83 مرّة مشاهدة
التخطي إلى أول رسالة غير مقروءة

nerd...@gmail.com

غير مقروءة،
28‏/02‏/2014، 5:44:30 ص28‏/2‏/2014
إلى wr...@googlegroups.com
Hello,

I use wro4j at build time with the following configuration. I use two separate execution configurations to configure jsHint.

<plugin>
    <groupId>ro.isdc.wro4j</groupId>
    <artifactId>wro4j-maven-plugin</artifactId>
    <version>${wro4j.version}</version>
    <executions>
        <execution>
            <id>compile-artifacts</id>
            <phase>compile</phase>
            <goals>
                <goal>run</goal>
            </goals>
            <configuration>
                <destinationFolder>${project.build.directory}/${project.build.finalName}/static</destinationFolder>
                <cssDestinationFolder>${project.build.directory}/${project.build.finalName}/static/css</cssDestinationFolder>
                <jsDestinationFolder>${project.build.directory}/${project.build.finalName}/static/js</jsDestinationFolder>
                <groupNameMappingFile>${project.build.outputDirectory}/wro-mapping.properties</groupNameMappingFile>
            </configuration>
        </execution>
        <execution>
            <id>hint-artifacts</id>
            <phase>generate-resources</phase>
            <goals>
                <goal>jshint</goal>
            </goals>
            <configuration>
                <targetGroups>main</targetGroups>
                <minimize>false</minimize>
                <options>browser,jquery,curly,eqnull,undef</options>
            </configuration>
        </execution>
    </executions>

    <!-- Shared configuration for all plugin execution runs -->
    <configuration>
        <ignoreMissingResources>false</ignoreMissingResources>
        <wroManagerFactory>ro.isdc.wro.maven.plugin.manager.factory.ConfigurableWroManagerFactory</wroManagerFactory>
        <contextFolder>${basedir}/src/main/webapp/static</contextFolder>
        <wroFile>${basedir}/src/main/resources/wro.xml</wroFile>
        <extraConfigFile>${basedir}/src/main/resources/wro.properties</extraConfigFile>
    </configuration>

</plugin>


This configuration works with 1.7.0. I wanted to upgrade (tried 1.7.1 and 1.7.3) but now this is what happens:

[INFO] --- wro4j-maven-plugin:1.7.1:jshint (hint-artifacts) @ shop ---
[INFO] /home/kai/Work/source/shop/src/main/webapp/static                                                                                               [INFO] Executing the mojo: 
[INFO] Wro4j Model path: /home/kai/Work/source/shop/src/main/resources/wro.xml
[INFO] targetGroups: main
[INFO] minimize: false
[INFO] ignoreMissingResources: false
[INFO] parallelProcessing: false
[INFO] failNever: false
[INFO] options: browser,jquery,curly,eqnull,undef
[INFO] wroManagerFactory class: ro.isdc.wro.maven.plugin.manager.factory.ConfigurableWroManagerFactory
[INFO] The following groups will be processed: [main]
[INFO] processing group: main.css
[ERROR] Exception occured while processing: ro.isdc.wro.WroRuntimeException: No resources found in group: debug, class: ro.isdc.wro.WroRuntimeException,caused by: 
ro.isdc.wro.WroRuntimeException: No resources found in group: debug
        at ro.isdc.wro.model.group.processor.GroupsProcessor.process(GroupsProcessor.java:80)

As you can see, it tries to process "main.css" but can not find any files in there. Which is true, because only JS files are in this group. This is the ouput with 1.7.0:

[INFO] --- wro4j-maven-plugin:1.7.0:jshint (hint-artifacts) @ shop ---
[INFO] Executing the mojo: 
[INFO] Wro4j Model path: /home/kai/Work/source/shop/src/main/resources/wro.xml
[INFO] targetGroups: main
[INFO] minimize: false
[INFO] ignoreMissingResources: false
[INFO] failNever: false
[INFO] options: browser,jquery,curly,eqnull,undef
[INFO] wroManagerFactory class: ro.isdc.wro.maven.plugin.manager.factory.ConfigurableWroManagerFactory
[INFO] The following groups will be processed: [main]
[INFO] processing group: main.css
[INFO] processing group: main.js
[INFO] ----------------------------------------
[INFO] Total resources: 1
[INFO] No lint errors found.
[INFO] ----------------------------------------

Any hints or workarounds?

Alex Objelean

غير مقروءة،
28‏/02‏/2014، 5:52:01 ص28‏/2‏/2014
إلى wr...@googlegroups.com،nerd...@gmail.com
Hi,

the quickest workaround is to add the following configuration option:
ignoreEmptyGroup=true

If it still fails, please open an issue and it will be fixed asap.

Thanks,
Alex

nerd...@gmail.com

غير مقروءة،
28‏/02‏/2014، 7:20:43 ص28‏/2‏/2014
إلى wr...@googlegroups.com،nerd...@gmail.com
As a workaround, this works. Thanks, I did forget about this option.

I can not see, what change introduced this "new" behaviour. Any ideas? I would expect that the jsHint plugin is only interessted in JS-groups.

Kai

Alex Objelean

غير مقروءة،
28‏/02‏/2014، 9:42:17 ص28‏/2‏/2014
إلى wr...@googlegroups.com
After looking into the release notes, I didn't notice any known changes in regard to this. So, probably there was a change which modified the default behavior (sorry about this). 
There is no such thing as "js" group. A group is a collection of arbitrary resources (of type css and/or js). What would make sense, is to not try to process css resources when invoking jshint plugin. I will open an issue for this.

Regards,
Alex


--
You received this message because you are subscribed to the Google Groups "wro4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wro4j+un...@googlegroups.com.
To post to this group, send email to wr...@googlegroups.com.
Visit this group at http://groups.google.com/group/wro4j.
For more options, visit https://groups.google.com/groups/opt_out.

الرد على الكل
رد على الكاتب
إعادة توجيه
0 رسالة جديدة