【问题标题】:Get Maven to download complete opendaylight sources获取 Maven 以下载完整的 opendaylight 资源
【发布时间】:2014-10-21 13:29:33
【问题描述】:

我正在尝试通过附加 Eclipse 调试器来调试我的 opendaylight 模块。不幸的是,eclipse 无法找到由 maven 管理的几个依赖项的源文件。

我已经尝试过 eclipses m2 插件中的“下载源代码”操作,我也运行过

mvn eclipse:eclipse -DdownloadSources=true

以上内容导致下载了一些资源。奇怪的是,仍然缺少一些东西。在我的具体情况下,我需要 sal.implementation 工件的来源来分析 FlowProgrammerService

在我项目的 .pom 文件中,sal.implementation 未列为依赖项,而是在“Import-Package”下

<build>
<plugins>
  <plugin>
    <groupId>org.apache.felix</groupId>
    <artifactId>maven-bundle-plugin</artifactId>
    <version>2.3.6</version>
    <extensions>true</extensions>
    <configuration>
      <instructions>
        <Import-Package>
          org.opendaylight.controller.sal.core,
          org.opendaylight.controller.sal.utils,
          org.opendaylight.controller.sal.packet,
          org.opendaylight.controller.sal.match,
          org.opendaylight.controller.sal.action,
          org.opendaylight.controller.sal.flowprogrammer,
          org.opendaylight.controller.switchmanager,
          org.apache.felix.dm,
          org.osgi.service.component,
          org.slf4j,
          org.eclipse.osgi.framework.console,
          org.osgi.framework
        </Import-Package>
        <Export-Package>
          org.opendaylight.controller.tutorial_L2_forwarding
        </Export-Package>
        <Bundle-Activator>
          org.opendaylight.controller.tutorial_L2_forwarding.internal.Activator
        </Bundle-Activator>
      </instructions>
      <manifestLocation>${project.basedir}/META-INF</manifestLocation>
    </configuration>
  </plugin>
</plugins>

只有 distribution/opendaylight/pom.xml 将 sal.implementation 列为依赖项。

...
<dependency>
  <groupId>org.opendaylight.controller</groupId>
  <artifactId>sal.implementation</artifactId>
</dependency>
...

现在,我如何告诉 maven 下载这些额外的资源?是否有其他方法可以以 eclipse 可以处理的方式附加这些源?

【问题讨论】:

    标签: eclipse maven debugging m2eclipse opendaylight


    【解决方案1】:

    您可以安装 JBoss Tools Maven 集成功能,它基本上增强了 m2e 的自动源查找机制。见http://tools.jboss.org/features/maven.html#enhanced-source-lookup-mechanism

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-11-06
      • 1970-01-01
      • 2019-11-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多