Orika仅在“mvn clean install”中失败,但可以从IDE或单次测试运行

时间:2014-05-11 13:51:17

标签: java orika

我今天遇到一个特定的问题,当我在我的项目上运行 mvn clean install 时,它在测试次数上失败,并显示以下消息:

Tests run: 12, Failures: 0, Errors: 12, Skipped: 0, Time elapsed: 1.709 sec <<< FAILURE! - in my.domain.service.registration.packaging.PackagingServiceIntegrationTest
shouldPerformChangeAndReviewAfterAddForShelfLife(my.domain.service.registration.packaging.PackagingServiceIntegrationTest)  Time elapsed: 0.406 sec  <<< ERROR!
ma.glasnost.orika.MappingException: Error encountered while mapping for the following inputs: 
rawSource=my.domain.model.registration.status.PackagingEntry@10c107e8
sourceClass=class my.domain.model.registration.status.PackagingEntry
destinationClass=class my.domain.model.draft.registration.status.PackagingEntryDraft
    at ma.glasnost.orika.generated.Country_ObjectFactory1309247994232113101825346964$16.create(Country_ObjectFactory1309247994232113101825346964$16.java)
    at ma.glasnost.orika.impl.mapping.strategy.InstantiateAndUseCustomMapperStrategy.getInstance(InstantiateAndUseCustomMapperStrategy.java:36)
    at ma.glasnost.orika.impl.mapping.strategy.UseCustomMapperStrategy.map(UseCustomMapperStrategy.java:46)
    at ma.glasnost.orika.impl.DefaultBoundMapperFacade.map(DefaultBoundMapperFacade.java:136)
    at ma.glasnost.orika.generated.Orika_AdjustRegProduct_AdjustRegProduct_Mapper13424360330059$22.mapAtoB(Orika_AdjustRegProduct_AdjustRegProduct_Mapper13424360330059$22.java)
    at ma.glasnost.orika.impl.mapping.strategy.UseCustomMapperStrategy$ForwardMapperReference.map(UseCustomMapperStrategy.java:74)
    at ma.glasnost.orika.impl.mapping.strategy.UseCustomMapperStrategy.map(UseCustomMapperStrategy.java:50)
    at ma.glasnost.orika.impl.DefaultBoundMapperFacade.map(DefaultBoundMapperFacade.java:136)
    at ma.glasnost.orika.generated.Orika_License_License_Mapper13424295393133$21.mapAtoB(Orika_License_License_Mapper13424295393133$21.java)
    at ma.glasnost.orika.impl.mapping.strategy.UseCustomMapperStrategy$ForwardMapperReference.map(UseCustomMapperStrategy.java:74)
    at ma.glasnost.orika.impl.mapping.strategy.UseCustomMapperStrategy.map(UseCustomMapperStrategy.java:50)
    at ma.glasnost.orika.impl.DefaultBoundMapperFacade.map(DefaultBoundMapperFacade.java:136)
    at ma.glasnost.orika.generated.Orika_PackagingEntryDraft_PackagingEntry_Mapper13424250032621$20.mapAtoB(Orika_PackagingEntryDraft_PackagingEntry_Mapper13424250032621$20.java)
    at ma.glasnost.orika.impl.mapping.strategy.UseCustomMapperStrategy$ForwardMapperReference.map(UseCustomMapperStrategy.java:74)
    at ma.glasnost.orika.impl.mapping.strategy.UseCustomMapperStrategy.map(UseCustomMapperStrategy.java:50)
    at ma.glasnost.orika.impl.MapperFacadeImpl.map(MapperFacadeImpl.java:676)
    at ma.glasnost.orika.impl.MapperFacadeImpl.map(MapperFacadeImpl.java:656)
    at my.domain.dto.utils.OrikaConverter.convert(OrikaConverter.java:30)

但是当我从IntelliJ运行它或使用

mvn clean -Dtest=PackagingServiceIntegrationTest

它正确传递。

我正在使用orika 1.4.1,您对可能的原因有什么了解吗?

0 个答案:

没有答案