问题
I would like to work with the newer version of l2switch plugin, but when I try to compile the project i get the following errors:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project loopremover-impl: Compilation failure: Compilation failure:
[ERROR] /C:/Users/kevin/git/l2switch/loopremover/implementation/src/main/java/org/opendaylight/l2switch/loopremover/topology/TopologyLinkDataChangeHandler.java:[283,41] cannot find symbol
[ERROR] symbol: method getAugmentation(java.lang.Class<org.opendaylight.yang.gen.v1.urn.opendaylight.l2switch.loopremover.rev140714.StpStatusAwareNodeConnector>)
[ERROR] location: variable nc of type org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnector
[ERROR] /C:/Users/kevin/git/l2switch/loopremover/implementation/src/main/java/org/opendaylight/l2switch/loopremover/flow/InitialFlowWriter.java:[248,21] cannot find symbol
[ERROR] symbol: method setKey(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionKey)
[ERROR] location: class org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :loopremover-impl
I think the problem isn't in my .m2 folder, since i was able to properly compile the Openflowplugin project. Also i'm using the java 8.0 and my OS is windows 10 (i'm using a plugin of maven to compile via prompt) The command that i'm using to compile is mvn clean install -U -DskipTests
ps: i've not edited any code of the l2switch project, i just imported the master branch from the github repository and tried to compile
回答1:
l2switch is currently not being maintained by anyone and thus did not participate in the Fluorine release cycle. It needs version bumps and code changes to conform with upstream changes in yangtools, mdsal etc. For the compile errors above, getAugmentation is now augmentation and setKey is now key. These upstream changes were made in Fluorine along with others. This was all documented on the ODL mailing lists and TSC JIRA items during the Fluorine release cycle. Any contributions to reboot the project and get it building again and maintain it going forward would be welcomed by the ODL community.
来源:https://stackoverflow.com/questions/53109420/problem-when-compiling-the-latest-version-of-l2switch