Hi all,
Sorry about the last message regarding missing posts - this will be the third time I've posted this message about creating a custom binding - the last two appear to have been gobbled up by Google. Because I've already written two long emails I'll keep this one brief, in case I lose this one too! :-)
In short, I need help getting a new binding to compile. I'm lost on how to get properly started. I note there is a
maven archetype, but it fails for me with the following:
mvn archetype:generate -B -DarchetypeGroupId=org.openhab.archetype -DarchetypeArtifactId=org.openhab.archetype.binding -DarchetypeVersion=1.2.0-SNAPSHOT -Dauthor=jgiles -Dversion=1.2.0 -DartifactId=org.openhab.binding.opensprinklerpi -Dpackage=org.openhab.binding.opensprinklerpi -Dbinding-name=openpsrinklerpi
[INFO] Scanning for projects...
[ERROR] Internal error: java.lang.RuntimeException: Could not resolve target platform specification artifact org.openhab:targetplatform:target:openhab:1.3.0-SNAPSHOT -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: Could not resolve target platform specification artifact org.openhab:target
platform:target:openhab:1.3.0-SNAPSHOT
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:491)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: java.lang.RuntimeException: Could not resolve target platform specification artifact org.openhab:targetplatform:target:openhab:1.3.0-SNAPSHOT
at org.eclipse.tycho.core.resolver.DefaultTargetPlatformConfigurationReader.addTargetArtifact(DefaultTargetPlatformConfigurationReader.java:334)
at org.eclipse.tycho.core.resolver.DefaultTargetPlatformConfigurationReader.setTarget(DefaultTargetPlatformConfigurationReader.java:288)
at org.eclipse.tycho.core.resolver.DefaultTargetPlatformConfigurationReader.getTargetPlatformConfiguration(DefaultTargetPlatformConfigurationReader.java:71)
at org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.setupProject(DefaultTychoDependencyResolver.java:78)
at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:77)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:274)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
... 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/InternalErrorExceptionIf I instead copy/paste the exec binding and make modifications, things work fine until I try to export the plugin, at which point I get error messages in my Manifest.mf file about "No available bundle exports package 'org.openhab.core.binding'". I've tried adding the relevant jar files from a downloaded openhab download, but to no avail. Personally I wonder whether there is a version descrepancy between 1.2.0 and 1.3.0?
Any pointers to get me started would be much appreciated - I've already built the OpenSprinkler Pi library, and I'm eager to get started on the higher level OpenHab binding.
Thanks!