NetBeans 8.1上的CDI部署失败 - maven项目

时间:2016-04-27 20:44:11

标签: netbeans-8 mahout-recommender

我在Netbeans IDE 8.1上创建了一个maven Web应用程序。然后,我添加了一些资源(js,css,...)和一个网页index.html

我还将这些依赖项添加到pom.xml文件

stringPermutations

这是错误:

<dependency>
        <groupId>org.apache.mahout</groupId>
        <artifactId>mahout-core</artifactId>
        <version>0.8</version>
    </dependency>
    <dependency>
        <groupId>org.apache.mahout</groupId>
        <artifactId>mahout-integration</artifactId>
        <version>0.8</version>
    </dependency>
    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>5.1.25</version>
    </dependency>

1 个答案:

答案 0 :(得分:0)

我找到了解决方案:

只需在META-INF文件夹下添加beans.xml文件

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee 
       http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"
       bean-discovery-mode="all">
</beans>