【问题标题】:Getting Error in Pom.xml while running Twitter Websocket example?运行 Twitter Websocket 示例时在 Pom.xml 中出现错误?
【发布时间】:2013-03-18 09:56:29
【问题描述】:

从 apache camel 2.10 错误运行 twitter websocket 示例时出现错误,

描述资源路径位置类型 maven-remote-resources-plugin(目标“进程”)被 m2e 忽略。 pom.xml /camel-example-twitter-websocket line 26 Maven项目构建生命周期映射问题

而我的 Pom.xml 文件是,

<?xml version="1.0" encoding="UTF-8"?>

<!--

    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.apache.camel</groupId>
    <artifactId>examples</artifactId>
    <version>2.10.4</version>
    <relativePath>..</relativePath>
  </parent>

  <artifactId>camel-example-twitter-websocket</artifactId>
  <name>Camel :: Example :: Twitter WebSocket</name>
  <description>An example that pushes new tweets to a web page using web-socket</description>

  <dependencies>

    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-twitter</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-websocket</artifactId>
    </dependency>

    <!-- logging to the console -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
    </dependency>

  </dependencies>

  <build>
    <plugins>
      <!-- Allows the example to be run via 'mvn compile exec:java' -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <configuration>
          <mainClass>org.apache.camel.example.websocket.CamelTwitterWebSocketMain</mainClass>
          <includePluginDependencies>false</includePluginDependencies>
        </configuration>
      </plugin>
    </plugins>

    <pluginManagement>
        <plugins>
            <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
            <plugin>
                <groupId>org.eclipse.m2e</groupId>
                <artifactId>lifecycle-mapping</artifactId>
                <version>1.0.0</version>
                <configuration>
                    <lifecycleMappingMetadata>
                        <pluginExecutions>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>org.apache.felix</groupId>
                                    <artifactId>
                                        maven-bundle-plugin
                                    </artifactId>
                                    <versionRange>
                                        [2.3.7,)
                                    </versionRange>
                                    <goals>
                                        <goal>cleanVersions</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <ignore></ignore>
                                </action>
                            </pluginExecution>
                        </pluginExecutions>
                    </lifecycleMappingMetadata>
                </configuration>
            </plugin>
        </plugins>
    </pluginManagement>
  </build>

</project>

希望您的建议

【问题讨论】:

    标签: twitter websocket apache-camel


    【解决方案1】:

    我不认为这是一个错误。它很可能只是 Maven 写了一条 WARN 消息之类的。

    您不能按照文档中的说明运行示例吗? http://camel.apache.org/twitter-websocket-example.html

    【讨论】:

    • 赛义德,在很多地方发布同样的问题而不说出来不是很好。此外,当您参考其他资源时,请提供链接。 SO 的其他阅读者都无法找到“fuse ide forum”。
    • 条款我下次会小心......好吧,我运行它并得到它但无法运行 localhost:9090 请检查我的这篇文章
    • 我也先试了一下 [root@localhost camel-example-twitter-websocket]# mvn compile bash: mvn: command not found
    • 还有这个 [root@localhost camel-example-twitter-websocket]# mvn exec java bash: mvn: command not found
    • 如果你想从命令行运行,你需要先安装 Apache Maven - 看这里maven.apache.org
    猜你喜欢
    • 2017-07-09
    • 2015-08-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-11-10
    • 2011-03-31
    相关资源
    最近更新 更多