将Cometd添加到现有的Maven项目中

时间:2014-09-01 16:06:40

标签: maven cometd

我正在尝试在现有的Maven项目中使用Cometd框架。我是新手,并不了解如何处理这个问题。如果我使用Cometd和Maven开始一个新项目,一切都很好,但是如何将框架添加到现有项目?

这是工作的cometd项目的依赖部分:

<dependencies>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>
    </dependency>
    <dependency>
        <groupId>org.cometd.javascript</groupId>
        <artifactId>cometd-javascript-dojo</artifactId>
        <version>${project.version}</version>
        <type>war</type>
    </dependency>
    <dependency>
        <groupId>org.cometd.javascript</groupId>
        <artifactId>cometd-javascript-jquery</artifactId>
        <version>${project.version}</version>
        <type>war</type>
    </dependency>
    <dependency>
        <groupId>org.cometd.javascript</groupId>
        <artifactId>cometd-examples-dojo</artifactId>
        <version>${project.version}</version>
        <type>war</type>
    </dependency>
    <dependency>
        <groupId>org.cometd.javascript</groupId>
        <artifactId>cometd-examples-jquery</artifactId>
        <version>${project.version}</version>
        <type>war</type>
    </dependency>
    <dependency>
        <groupId>org.cometd.java</groupId>
        <artifactId>cometd-java-examples</artifactId>
        <version>${project.version}</version>
        <type>war</type>
    </dependency>
    <dependency>
        <groupId>org.cometd.java</groupId>
        <artifactId>cometd-java-oort</artifactId>
        <version>${project.version}</version>
    </dependency>
    <dependency>
        <groupId>org.cometd.java</groupId>
        <artifactId>cometd-java-server</artifactId>
        <version>${project.version}</version>
    </dependency>
    <dependency>
        <groupId>org.cometd.java</groupId>
        <artifactId>cometd-java-websocket-javax-server</artifactId>
        <version>${project.version}</version>
    </dependency>
    <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-servlets</artifactId>
        <version>${jetty-version}</version>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>${slf4j-version}</version>
        <scope>runtime</scope>
    </dependency>

    <dependency>
        <groupId>org.eclipse.jetty.websocket</groupId>
        <artifactId>javax-websocket-server-impl</artifactId>
        <version>${jetty-version}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-webapp</artifactId>
        <version>${jetty-version}</version>
        <scope>test</scope>
    </dependency>
</dependencies>

将这些添加到现有项目时,需要使用cometD并尝试使用Maven构建它,我收到以下错误:Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.4:war (default-war) on project autodeploy.web.ui.war: overlay [ id org.cometd.javascript:cometd-javascript-jquery] is not a dependency of the project.

0 个答案:

没有答案