**mvn error for compile/build binding under openhab instead of openhab2-addons git repository?**

mvn error for compile/build binding under openhab instead of openhab2-addons git repository?

Hello everyone,

Here is what I have done,

1 download/extract openhab 1.8.1 release
https://github.com/openhab/openhab/archive/v1.8.1.tar.gz

2
$cd openhab-1.8.1/bundles/binding/org.openhab.binding.systeminfo

3
$mvn package

[INFO] Scanning for projects…
[ERROR] Internal error: java.lang.RuntimeException: Could not resolve target platform specification artifact org.openhab:targetplatform:target:openhab:1.8.1-SNAPSHOT -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: Could not resolve target platform specification artifact org.openhab:targetplatform:target:openhab:1.8.1-SNAPSHOT
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:121)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: java.lang.RuntimeException: Could not resolve target platform specification artifact org.openhab:targetplatform:target:openhab:1.8.1-SNAPSHOT
at org.eclipse.tycho.core.resolver.DefaultTargetPlatformConfigurationReader.addTargetArtifact(DefaultTargetPlatformConfigurationReader.java:388)
at org.eclipse.tycho.core.resolver.DefaultTargetPlatformConfigurationReader.setTarget(DefaultTargetPlatformConfigurationReader.java:342)
at org.eclipse.tycho.core.resolver.DefaultTargetPlatformConfigurationReader.getTargetPlatformConfiguration(DefaultTargetPlatformConfigurationReader.java:75)
at org.eclipse.tycho.core.resolver.DefaultTychoResolver.setupProject(DefaultTychoResolver.java:86)
at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:72)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:266)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
… 11 more
[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/InternalErrorException

4
$sudo mvn package
xiaomin@xiaomin-Lenovo-G500:~/Downloads/openhab-source/openhab-1.8.1/bundles/binding/org.openhab.binding.systeminfo$ sudo mvn package
[sudo] password for xiaomin:
sudo: mvn: command not found

As I know under openhab2-addons, we can go into binding direcory like org.openhab.binding.
to use
$mvn package
to get .jar package file of the binding.

However, we could not do the same thing here.
Any information or suggestions? Any information will be appreciated. Thank you.
strong text