使用Archetype构建OpenDaylight项目hello

mkdir hello

cd hello

root@odl_ubuntu:/mnt/hello# mvn archetype:generate -DarchetypeGroupId=org.opendaylight.controller -DarchetypeArtifactId=opendaylight-startup-archetype -DarchetypeRepository=https://nexus.opendaylight.org/content/repositories/opendaylight.release/ -DarchetypeCatalog=remote -DarchetypeVersion=1.3.4-Carbon

Define value for property 'groupId': org.opendaylight.hello
Define value for property 'artifactId': hello
[INFO] Using property: version = 0.1.0-SNAPSHOT
Define value for property 'package' org.opendaylight.hello: :
Define value for property 'classPrefix' Hello: :
Define value for property 'copyright': No
[INFO] Using property: copyrightYear = 2017
Confirm properties configuration:
groupId: org.opendaylight.hello
artifactId: hello
version: 0.1.0-SNAPSHOT
package: org.opendaylight.hello
classPrefix: Hello
copyright: No
copyrightYear: 2017
 Y: : Y
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype: opendaylight-startup-archetype:1.3.4-Carbon
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: org.opendaylight.hello
[INFO] Parameter: artifactId, Value: hello
[INFO] Parameter: version, Value: 0.1.0-SNAPSHOT
[INFO] Parameter: package, Value: org.opendaylight.hello
[INFO] Parameter: packageInPathFormat, Value: org/opendaylight/hello
[INFO] Parameter: classPrefix, Value: Hello
[INFO] Parameter: package, Value: org.opendaylight.hello
[INFO] Parameter: version, Value: 0.1.0-SNAPSHOT
[INFO] Parameter: copyright, Value: No
[INFO] Parameter: groupId, Value: org.opendaylight.hello
[INFO] Parameter: artifactId, Value: hello
[INFO] Parameter: copyrightYear, Value: 2017
[WARNING] Don't override file /mnt/hello/hello/pom.xml
[INFO] Project created from Archetype in dir: /mnt/hello/hello
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  20:41 min
[INFO] Finished at: 2018-11-24T05:28:24-08:00
[INFO] ------------------------------------------------------------------------

root@odl_ubuntu:/mnt/hello# mvn clean install -Dmaven.test.failure.ignore=true -DskipTests

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for hello 0.1.0-SNAPSHOT:
[INFO]
[INFO] ODL :: org.opendaylight.hello :: hello-api ......... SUCCESS [ 36.626 s]
[INFO] ODL :: org.opendaylight.hello :: hello-impl ........ SUCCESS [ 19.921 s]
[INFO] ODL :: org.opendaylight.hello :: hello-cli ......... SUCCESS [ 17.254 s]
[INFO] ODL :: org.opendaylight.hello :: hello-features .... SUCCESS [ 15.303 s]
[INFO] ODL :: org.opendaylight.hello :: hello-karaf ....... SUCCESS [01:25 min]
[INFO] ODL :: org.opendaylight.hello :: hello-artifacts ... SUCCESS [  3.388 s]
[INFO] ODL :: org.opendaylight.hello :: hello-it .......... SUCCESS [01:04 min]
[INFO] hello .............................................. SUCCESS [ 47.560 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  04:54 min
[INFO] Finished at: 2018-11-24T05:38:30-08:00
[INFO] ------------------------------------------------------------------------

 root@odl_ubuntu:/mnt/hello/hello/karaf/target/assembly/etc# vim org.apache.karaf.management.cfg

rmiRegistryHost=127.0.0.1

rmiServerHost=127.0.0.1

root@odl_ubuntu:/mnt/hello/hello/karaf/target/assembly/bin# ./karaf
Apache Karaf starting up. Press Enter to open the shell now...
100% [========================================================================]
Karaf started in 68s. Bundle stats: 295 active, 295 total
    ________                       ________                .__  .__       .__     __
    \_____  \ ______   ____   ____ \______ \ _____  ___.__.|  | |__| ____ |  |___/  |_
     /   |   \\____ \_/ __ \ /    \ |    |  \\__  \<   |  ||  | |  |/ ___\|  |  \   __\
    /    |    \  |_> >  ___/|   |  \|    `   \/ __ \\___  ||  |_|  / /_/  >   Y  \  |
    \_______  /   __/ \___  >___|  /_______  (____  / ____||____/__\___  /|___|  /__|
            \/|__|        \/     \/        \/     \/\/            /_____/      \/

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown OpenDaylight.
opendaylight-user@root>log:display | grep hello
2018-11-24 05:54:22,312 | INFO  | Event Dispatcher | BlueprintBundleTracker           | 173 - org.opendaylight.controller.blueprint - 0.6.4.Carbon | Creating blueprint container for bundle org.opendaylight.hello.impl_0.1.0.SNAPSHOT [208] with paths [bundleentry://208.fwk1752203484/org/opendaylight/blueprint/impl-blueprint.xml]
2018-11-24 05:54:22,320 | INFO  | Event Dispatcher | BlueprintContainerImpl           | 15 - org.apache.aries.blueprint.core - 1.6.1 | Bundle org.opendaylight.hello.impl/0.1.0.SNAPSHOT is waiting for dependencies [(objectClass=org.opendaylight.controller.md.sal.binding.api.DataBroker)]
2018-11-24 05:54:23,461 | INFO  | rint Extender: 3 | HelloProvider                    | 208 - org.opendaylight.hello.impl - 0.1.0.SNAPSHOT | HelloProvider Session Initiated
2018-11-24 05:54:23,543 | INFO  | ntAdminThread #8 | BlueprintBundleTracker           | 173 - org.opendaylight.controller.blueprint - 0.6.4.Carbon | Blueprint container for bundle org.opendaylight.hello.impl_0.1.0.SNAPSHOT [208] was successfully created
opendaylight-user@root>

猜你喜欢

转载自www.cnblogs.com/zjd1396/p/10013735.html