问题
DLUX is dropped from upstream releases, so I have to compile DLUX and add back to my application.
Firstly, I need to download & compile DLUX (odl-dlux-core, odl-dluxapps-*):
git clone -b stable/oxygen https://github.com/opendaylight/dlux.git
mvn clean install
Then create new ODL application:
mvn archetype:generate -DarchetypeGroupId=org.opendaylight.archetypes -DarchetypeArtifactId=opendaylight-startup-archetype -DarchetypeCatalog=remote -DarchetypeVersion=1.1.0-SNAPSHOT
mvn clean install
./karaf/target/assembly/bin/karaf
Next, how can I add dlux-core and all of dluxapps features to the repository and install them to my new application?
// The default repo location is `./karaf/target/assembly/system`,
// what I need to do to run the following commands?
feature:repo-add mvn:org.opendaylight.dlux/odl-dlux-core/0.7.4-SNAPSHOT/xml/features mvn:org.opendaylight.dlux/odl-dluxapps-<app_name>/<app_version>/xml/features
feature:install odl-dlux-core odl-dluxapps-<app_name>
回答1:
Unfortunately it is not as simple as adding the existing features to your new karaf distribution. As @vorburger said, you basically would need to do some maintenance tasks on the old DLUX source code, at the very least to update any of its OpenDaylight dependencies to the same version as the archetype (which I assume comes from master and is based on Neon). Once you bump versions, you may need to update the DLUX code to new APIs, if it is the case.
If DLUX is important to you, you may need to invest some effort to revive it. You may find the #opendaylight channel on Freenode IRC to be a good resource to find help.
回答2:
The DLUX (UI) application is no longer supported and therefore included in recent ODL distributions, because there were no more active maintainers for it.
If you are using DLUX and have an interest in it, we (the ODL community) would be excited if someone wanted to seriously work on helping to maintain DLUX. This is how open source works.
[Answering your Comment below that this is not about DLUX specific but more generally via Editing this Answer instead of Comment, because it's too long; perhaps best open a new and more specific question, if still not clear; instead of further extending this.]
I'm not sure if you would like to learn (a) how to add a new feature to an existing ODL Karaf, or (b) "patch" an existing feature?
If it's (a) in general, then I think this is duplicate of OpenDaylight Oxygen Deploy app built from opendaylight-startup-archetype ... does that help?
If it's (b) then you would just do your patch (and, ideally, get engaged on mailing lists with the "upstream" community, and contribute it back on https://git.opendaylight.org ?), then locally "mvn clean install" that, and then from another project as per (a) make a dependency to that feature - it will find it in your local Maven repo, and use that, instead of the original, to build your own Karaf distro. HTH?
来源:https://stackoverflow.com/questions/52341871/how-to-add-dlux-to-new-opendaylight-application