when weaving , Xlint:cantFindType 问题

最近使用allure生成测试报告。引入官方介绍的插件

when weaving , Xlint:cantFindType 问题_第1张图片

执行单独测试用例的测试,突然出现下列错误问题。

[AppClassLoader@18b4aac2] warning javax.* types are not being woven because the weaver option '-Xset:weaveJavaxPackages=true' has not been specified
[AppClassLoader@18b4aac2] error can't determine implemented interfaces of missing type org.apache.commons.csv.CSVFormat
when weaving type org.apache.logging.log4j.core.layout.AbstractCsvLayout
when weaving classes 
when weaving 
 [Xlint:cantFindType]
[AppClassLoader@18b4aac2] error can't determine implemented interfaces of missing type org.apache.commons.csv.CSVFormat
when weaving type org.apache.logging.log4j.core.layout.AbstractCsvLayout
when weaving classes 
when weaving 
 [Xlint:cantFindType]
2019-11-22 10:49:07,192 main INFO Log4j appears to be running in a Servlet environment, but there's no log4j-web module available. If you want better web container support, please add the log4j-web JAR to your web archive or server lib directory.
[AppClassLoader@18b4aac2] error can't determine implemented interfaces of missing type org.jsoup.nodes.Document
when weaving type org.hibernate.validator.internal.constraintvalidators.hv.SafeHtmlValidator
when weaving classes 
when weaving 
 [Xlint:cantFindType]

看了很多文章(国内的国外的)也没找到,最后从日志入手发现这句话

[AppClassLoader@18b4aac2] warning javax.* types are not being woven because the weaver option '-Xset:weaveJavaxPackages=true' has not been specified

查询发现可能是 aspectjweaer 包的版本导致。

因为allure文档上面引入的是1.8.10,而我的项目里面引入到包是高于这个版本的。

最终处理方案:

1)插件里面aspectjweaer改为原有项目的最新版本。未尝试。

2)插件里面aspectjweaer相关的都注释掉。执行测试成功,同时测试报告也可以正常展示。注释内容如下。


   



    
        io.qameta.allure
        allure-testng
        LAST_VERSION
        test
    



    
        
            org.apache.maven.plugins
            maven-surefire-plugin
            2.20
            
                
                  
                
            
             
        
    

有些特殊的问题可以从包冲突考虑下。

希望帮到有缘人。

 

你可能感兴趣的:(when weaving , Xlint:cantFindType 问题)