使用Grails 2.3.7和Tiles 3.0.3 Maven抛出错误

时间:2014-04-17 18:15:29

标签: grails

当我在我的grails 2.3.7项目的pom中包含tiles-core 3.0.3时,我得到了。

Caused by: java.lang.LinkageError: loader constraint violation: when resolving overridden method "org.apache.tools.ant.helper.ProjectHelper2$RootHandler.setDocumentLocator(Lorg/xml/sax/Locator;)V" the class loader (instance of org/grails/launcher/RootLoader) of the current class, org/apache/tools/ant/helper/ProjectHelper2$RootHandler, and its superclass loader (instance of <bootloader>), have different Class objects for the type andler.setDocumentLocator(Lorg/xml/sax/Locator;)V used in the signature

我假设一个依赖项被一个旧版本覆盖,但我不知道哪个。有任何想法吗?我尝试在瓷砖上回到2.0.1,我仍然得到同样的东西。

1 个答案:

答案 0 :(得分:2)

应该是

   <dependency>
        <groupId>org.apache.tiles</groupId>
        <artifactId>tiles-core</artifactId>
        <version>${tiles.version}</version>
        <!-- IMPORTANT -->
        <exclusions>
            <exclusion>
                <artifactId>xml-apis</artifactId>
                <groupId>xml-apis</groupId>
            </exclusion>
        </exclusions>
    </dependency>