Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/336.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 无法在wro4j maven插件(NPE)中使用ConfigurableWroManagerFactory_Java_Maven_Wro4j - Fatal编程技术网

Java 无法在wro4j maven插件(NPE)中使用ConfigurableWroManagerFactory

Java 无法在wro4j maven插件(NPE)中使用ConfigurableWroManagerFactory,java,maven,wro4j,Java,Maven,Wro4j,我在使用ConfigurableWroManagerFactorywroManagerFactory时收到一个NPE,似乎无法找到原因。似乎Context.get().getFilterConfig()返回null Stacktrace(这是WroRuntimeException的根本原因) 和我的wro.properties #If true, it is DEVELOPMENT mode, by default this value is true debug=true # Default

我在使用
ConfigurableWroManagerFactory
wroManagerFactory时收到一个NPE,似乎无法找到原因。似乎
Context.get().getFilterConfig()返回null

Stacktrace(这是
WroRuntimeException
的根本原因)

和我的
wro.properties

#If true, it is DEVELOPMENT mode, by default this value is true
debug=true
# Default is true
gzipEnabled=true

# MBean name to be used if JMX is enabled
#mbeanName=wro
#jmxEnabled=true

# Default is 0
cacheUpdatePeriod=0
# Default is 0
modelUpdatePeriod=0
# Default is false.
disableCache=false
# Default is UTF-8
encoding=UTF-8

managerFactoryClassName=ro.isdc.wro.manager.factory.ConfigurableWroManagerFactory
preProcessors=jsLint,lessCssImport,cssUrlRewriting,cssImport,semicolonAppender
postProcessors=googleClosureSimple,less4j

resourceWatcherUpdatePeriod=5

使用构建时解决方案(maven插件)时,应该使用

ro.isdc.wro.maven.plugin.manager.factory.ConfigurableWroManagerFactory
请注意,该类位于与您使用的不同的包中。
另外,请尝试升级到1.7.1版。

能否尝试使用1.7.1版?谢谢。更改为使用
…maven.plugin.manager.
包实现了这一技巧~maven插件共享了多少
wro.properties
配置?例如,如果pom插件在
wro.properties
中已经存在,我是否需要在pom插件中指定
?pom插件配置中的配置优先于wro.properties中的配置。我知道这让人困惑,也许这是将来可以改进的。更新:更重要的是,wro.properties中的属性总是被pom.xml.Ok中插件配置中的属性覆盖,这是有道理的。只是确认一下——如果
pom.xml
插件配置中不存在它,它会返回到
wro.properties
选项吗?
#If true, it is DEVELOPMENT mode, by default this value is true
debug=true
# Default is true
gzipEnabled=true

# MBean name to be used if JMX is enabled
#mbeanName=wro
#jmxEnabled=true

# Default is 0
cacheUpdatePeriod=0
# Default is 0
modelUpdatePeriod=0
# Default is false.
disableCache=false
# Default is UTF-8
encoding=UTF-8

managerFactoryClassName=ro.isdc.wro.manager.factory.ConfigurableWroManagerFactory
preProcessors=jsLint,lessCssImport,cssUrlRewriting,cssImport,semicolonAppender
postProcessors=googleClosureSimple,less4j

resourceWatcherUpdatePeriod=5
ro.isdc.wro.maven.plugin.manager.factory.ConfigurableWroManagerFactory