Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/14.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
org.apache.tools.ant.BuildException java.lang.NoClassDefFoundError:org/springframework/beans/factory/Aware_Java_Spring_Maven_Noclassdeffounderror - Fatal编程技术网

org.apache.tools.ant.BuildException java.lang.NoClassDefFoundError:org/springframework/beans/factory/Aware

org.apache.tools.ant.BuildException java.lang.NoClassDefFoundError:org/springframework/beans/factory/Aware,java,spring,maven,noclassdeffounderror,Java,Spring,Maven,Noclassdeffounderror,在我的maven构建中,我得到以下错误 编译org.apache.tools.ant.BuildException时发生致命错误: java.lang.NoClassDefFoundError: org/springframework/beans/factory/Aware 从依赖树我注意到 (org.springframework:springbeans:jar:3.1.3.RELEASE:compile-因与3.1.4.RELEASE冲突而省略) 在我的pom.xml中,我添加了以下依赖项,

在我的maven构建中,我得到以下错误

编译org.apache.tools.ant.BuildException时发生致命错误: java.lang.NoClassDefFoundError: org/springframework/beans/factory/Aware

从依赖树我注意到

(org.springframework:springbeans:jar:3.1.3.RELEASE:compile-因与3.1.4.RELEASE冲突而省略)

在我的pom.xml中,我添加了以下依赖项,但错误似乎没有消失

<spring.version>3.1.3.RELEASE</spring.version>
<dependencies>
    <dependency>
        <groupId>org.grails</groupId>
        <artifactId>grails-dependencies</artifactId>
        <version>${grails.version}</version>
        <type>pom</type>
    </dependency>
    <dependency>
        <groupId>org.grails</groupId>
        <artifactId>grails-plugin-testing</artifactId>
        <version>${grails-test-plugin.version}</version>
    </dependency>
    <dependency>
        <groupId>org.grails</groupId>
        <artifactId>grails-test</artifactId>
        <version>${grails-test-plugin.version}</version>
    </dependency>

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-core</artifactId>
        <version>${spring.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-beans</artifactId>
        <version>${spring.version}</version>
    </dependency>


    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-test</artifactId>
        <version>${spring.version}</version>
    </dependency>
    <dependency>
        <groupId>org.grails.plugins</groupId>
        <artifactId>tomcat</artifactId>
        <version>${grails.version}</version>
        <scope>provided</scope>
        <type>zip</type>
    </dependency>
    <dependency>
        <groupId>org.grails.plugins</groupId>
        <artifactId>cache</artifactId>
        <version>1.0.0</version>
        <scope>compile</scope>
        <type>zip</type>
    </dependency>

    <dependency>
        <groupId>org.grails.plugins</groupId>
        <artifactId>hibernate</artifactId>
        <version>${grails.version}</version>
        <scope>runtime</scope>
        <type>zip</type>
    </dependency>
    <dependency>
        <groupId>org.grails.plugins</groupId>
        <artifactId>filterpane</artifactId>
        <version>2.2.1</version>
        <scope>runtime</scope>
        <type>zip</type>
    </dependency>
    <dependency>
        <groupId>org.grails.plugins</groupId>
        <artifactId>console</artifactId>
        <version>1.2</version>
        <scope>runtime</scope>
        <type>zip</type>
    </dependency>
    <dependency>
        <groupId>org.grails.plugins</groupId>
        <artifactId>resources</artifactId>
        <version>1.1.6</version>
        <scope>runtime</scope>
        <type>zip</type>
    </dependency>
    <dependency>
        <groupId>org.grails.plugins</groupId>
        <artifactId>database-migration</artifactId>
        <version>1.1</version>
        <scope>runtime</scope>
        <type>zip</type>
    </dependency>
    <dependency>
        <groupId>org.grails.plugins</groupId>
        <artifactId>jawr</artifactId>
        <version>3.3.3</version>
        <scope>runtime</scope>
        <type>zip</type>
    </dependency>
    <dependency>
        <groupId>org.grails.plugins</groupId>
        <artifactId>jaxrs</artifactId>
        <version>0.8</version>
        <scope>runtime</scope>
        <type>zip</type>
    </dependency>
    <dependency>
        <groupId>org.grails.plugins</groupId>
        <artifactId>yui-minify-resources</artifactId>
        <version>0.1.4</version>
        <scope>runtime</scope>
        <type>zip</type>
    </dependency>
    <dependency>
        <groupId>org.grails.plugins</groupId>
        <artifactId>jquery</artifactId>
        <version>1.8.0</version>
        <scope>runtime</scope>
        <type>zip</type>
    </dependency>
    <dependency>
        <groupId>org.grails.plugins</groupId>
        <artifactId>webxml</artifactId>
        <version>1.4.1</version>
        <scope>provided</scope>
        <type>zip</type>
    </dependency>
    <dependency>
        <groupId>org.grails.plugins</groupId>
        <artifactId>richui</artifactId>
        <version>0.8</version>
        <scope>runtime</scope>
        <type>zip</type>
    </dependency>
</dependencies>
3.1.3.0版本
org.grails
grails依赖项
${grails.version}
聚甲醛
org.grails
grails插件测试
${grails test plugin.version}
org.grails
颗粒试验
${grails test plugin.version}
org.springframework
弹簧芯
${spring.version}
org.springframework
春豆
${spring.version}
org.springframework
弹簧试验
${spring.version}
org.grails.plugins
雄猫
${grails.version}
假如
拉链
org.grails.plugins
隐藏物
1.0.0
编译
拉链
org.grails.plugins
冬眠
${grails.version}
运行时
拉链
org.grails.plugins
过滤烷
2.2.1
运行时
拉链
org.grails.plugins
安慰
1.2
运行时
拉链
org.grails.plugins
资源
1.1.6
运行时
拉链
org.grails.plugins
数据库迁移
1.1
运行时
拉链
org.grails.plugins
加尔
3.3.3
运行时
拉链
org.grails.plugins
jaxrs
0.8
运行时
拉链
org.grails.plugins
yui缩小资源
0.1.4
运行时
拉链
org.grails.plugins
jquery
1.8.0
运行时
拉链
org.grails.plugins
webxml
1.4.1
假如
拉链
org.grails.plugins
丽水
0.8
运行时
拉链

请帮助

据我所知,我们应该找到一个使用spring beans的依赖项,该依赖项应该排除。您使用的是spring 3.1.3版本,但该依赖项也在寻找spring-beans.jar的3.1.4版本。这将确保忽略给定的jar,因此您将得到此错误。检查pom.xml以查找3.1.4版本