Lui*_*Koh 3 eclipse api maven opendaylight
我正在尝试根据https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL:Startup_Project_Archetype上的 API 教程创建自定义 API
工具:OpenDaylight Lithium、Eclipse、Maven 3.3.9
我可以编译该文件夹api,但不能编译impl( FlowImpl.java) 中的文件夹。
这是错误消息:
[INFO] Starting audit...
/home/shaoxu/Desktop/distribution-karaf-0.3.3-Lithium-SR3/flow/impl/src/main/java/org/opendaylight/flow/impl/FlowImpl.java:1: Line does not match expected header line of '^/[*]+$'.
Audit done.
[INFO] There is 1 error reported by Checkstyle 6.2 with check-license.xml ruleset.
[ERROR] src/main/java/org/opendaylight/flow/impl/FlowImpl.java[1] (header) RegexpHeader: Line does not match expected header line of '^/[*]+$'.
Run Code Online (Sandbox Code Playgroud)
Eclipse 中没有错误信息。
这是源代码:
package org.opendaylight.flow.impl;
import java.util.concurrent.Future;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.flow.rev150105.FlowService;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.flow.rev150105.FlowPathInput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.flow.rev150105.FlowPathOutput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.flow.rev150105.FlowPathOutputBuilder;
import org.opendaylight.yangtools.yang.common.RpcResult;
import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
public class FlowImpl implements FlowService {
@Override
public Future<RpcResult<FlowPathOutput>> flowPath(FlowPathInput input) {
FlowPathOutputBuilder flowBuilder = new FlowPathOutputBuilder();
flowBuilder.setPath(input.getNodes());
return RpcResultBuilder.success(flowBuilder.build()).buildFuture();
}
}
Run Code Online (Sandbox Code Playgroud)
错误是什么?
您收到的错误是由 OpenDaylight 中每个文件开头的版权/许可证标头的强制格式引起的:
\n\n/*\n * Copyright (c) 2016 ... and others. All rights reserved.\n *\n * This program and the accompanying materials are made available under the\n * terms of the Eclipse Public License v1.0 which accompanies this distribution,\n * and is available at http://www.eclipse.org/legal/epl-v10.html\n */\nRun Code Online (Sandbox Code Playgroud)\n\n如果您使用原型,则应该已为您生成此标头。有两种方法可以解决该问题:要么添加上面的许可证头(如果您对许可证感到满意),要么禁用许可证检查 \xe2\x80\x94 如果您想执行后者,请编辑您的问题并添加您正在使用的 POM,impl以便我可以解释如何进行操作。
您提到您正在使用锂,我强烈建议改用铍甚至硼进行新开发。目前,Beryllium 的 wiki 页面大多是最新的。
\n| 归档时间: |
|
| 查看次数: |
2243 次 |
| 最近记录: |