Letractively / wro4j

Automatically exported from code.google.com/p/wro4j
0 stars 0 forks source link

mvn wro4j:run fails due to optional configuration missing #860

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. pom.xml has the following configuration.

                <configuration>
                    <destinationFolder>dist</destinationFolder>
                    <wroFile>WEB-INF/wro.groovy</wroFile>
                    <extraConfigFile>WEB-INF/wro_maven.properties</extraConfigFile>
                    <contextFolder>${basedir}</contextFolder>
                    <wroManagerFactory>ro.isdc.wro.maven.plugin.manager.factory.ConfigurableWroManagerFactory</wroManagerFactory>
                    <parallelProcessing>true</parallelProcessing>
                </configuration>

2. mvn wro4j:run output the following error

[INFO] --- wro4j-maven-plugin:1.7.4:run (default-cli) @ business ---
[INFO] C:\workspace\business
[INFO] Executing the mojo:
[INFO] Wro4j Model path: C:\workspace\business\WEB-INF\wro.groovy
[INFO] targetGroups: ${${targetGroups}}
[INFO] minimize: false
[INFO] ignoreMissingResources: ${${ignoreMissingResources}}
[INFO] parallelProcessing: true
[INFO] wroManagerFactory class: 
ro.isdc.wro.maven.plugin.manager.factory.ConfigurableWroManagerFactory
[INFO] destinationFolder: C:\workspace\business\dist
[INFO] jsDestinationFolder: C:\workspace\business\${${jsDestinationFolder}}
[INFO] cssDestinationFolder: C:\workspace\business\${${cssDestinationFolder}}
[INFO] groupNameMappingFile: C:\workspace\business\${${groupNameMappingFile}}
[Fatal Error] :1:1: 
プロローグにはコンテンツを指定できません。
[INFO] The following groups will be processed: [${${targetGroups}}]
[INFO] folder: C:\workspace\business\${${cssDestinationFolder}}
[INFO] folder: C:\workspace\business\${${jsDestinationFolder}}
[INFO] processing group: ${${targetGroups}}.css
[INFO] processing group: ${${targetGroups}}.js
[ERROR] Exception occured while processing: ro.isdc.wro.WroRuntimeException: No 
such group available in the model: ${${targetGroups}}, class: 
ro.isdc.wro.WroRuntimeException,caused by:
ro.isdc.wro.WroRuntimeException: No such group available in the model: 
${${targetGroups}}
        at ro.isdc.wro.model.group.processor.GroupsProcessor.process(GroupsProcessor.java:74)
        at ro.isdc.wro.cache.support.DefaultSynchronizedCacheStrategyDecorator.loadValue(DefaultSynchronizedCacheStrategyDecorator.java:101)
        at ro.isdc.wro.cache.support.DefaultSynchronizedCacheStrategyDecorator.loadValue(DefaultSynchronizedCacheStrategyDecorator.java:35)
        at ro.isdc.wro.cache.support.AbstractSynchronizedCacheStrategyDecorator.get(AbstractSynchronizedCacheStrategyDecorator.java:55)
        at ro.isdc.wro.manager.ResourceBundleProcessor.serveProcessedBundle(ResourceBundleProcessor.java:63)
        at ro.isdc.wro.manager.WroManager.process(WroManager.java:159)
        at ro.isdc.wro.maven.plugin.Wro4jMojo.processGroup(Wro4jMojo.java:254)
        at ro.isdc.wro.maven.plugin.Wro4jMojo.access$000(Wro4jMojo.java:46)
        at ro.isdc.wro.maven.plugin.Wro4jMojo$1.call(Wro4jMojo.java:134)
        at ro.isdc.wro.maven.plugin.Wro4jMojo$1.call(Wro4jMojo.java:131)
        at ro.isdc.wro.config.support.ContextPropagatingCallable.call(ContextPropagatingCallable.java:62)
        at ro.isdc.wro.util.concurrent.TaskExecutor$1.call(TaskExecutor.java:126)
        at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1288)
        at java.util.concurrent.ForkJoinTask.doInvoke(ForkJoinTask.java:377)
        at java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:654)
        at java.util.concurrent.ForkJoinTask$AdaptedCallable.run(ForkJoinTask.java:1298)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ForkJoinTask$AdaptedRunnable.exec(ForkJoinTask.java:1265)
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:334)
        at java.util.concurrent.ForkJoinWorkerThread.execTask(ForkJoinWorkerThread.java:604)
        at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:784)
        at java.util.concurrent.ForkJoinPool.work(ForkJoinPool.java:646)
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:398)

What is the expected output? What do you see instead?

According to document:

    minimize - a flag used to turn minimization on or off. This parameter is optional and by default its value is true. 

    targetGroups - (optional) a comma separated list of groups you want to build. If you do not specify this parameter, a file for each defined group will be generated. 

I don't set values for minimize and targetGroups, default value should be used.

What version of the product are you using? On what operating system?
1.7.4
Windows 7

With 1.7.3 mvn wro4j:run works fine.

Original issue reported on code.google.com by h.shiros...@gmail.com on 24 Mar 2014 at 7:49

GoogleCodeExporter commented 9 years ago
What maven version are you using?

Original comment by alex.obj...@gmail.com on 24 Mar 2014 at 8:27

GoogleCodeExporter commented 9 years ago
I use apache-maven 3.2.1.

Original comment by h.shiros...@gmail.com on 24 Mar 2014 at 8:30

GoogleCodeExporter commented 9 years ago
I can verify this bug as of wro4j 1.7.4.  I am also running Maven 3.2.1, so it 
seems likely to be version-specific.

Original comment by bengunnink on 24 Mar 2014 at 3:33

GoogleCodeExporter commented 9 years ago

Original comment by alex.obj...@gmail.com on 24 Mar 2014 at 6:49

GoogleCodeExporter commented 9 years ago
I've submitted a patch.

https://github.com/alexo/wro4j/pull/174

Original comment by h.shiros...@gmail.com on 25 Mar 2014 at 12:43

GoogleCodeExporter commented 9 years ago
Fixed in branch 1.7.x

Original comment by alex.obj...@gmail.com on 2 Apr 2014 at 4:18

GoogleCodeExporter commented 9 years ago
Issue 867 has been merged into this issue.

Original comment by alex.obj...@gmail.com on 3 Apr 2014 at 10:20

GoogleCodeExporter commented 9 years ago
Issue 867 has been merged into this issue.

Original comment by alex.obj...@gmail.com on 3 Apr 2014 at 10:21