Hi Guys,
Hopefully this is an easy one, am I missing something?
I have a RPi4 set up and running openHAB2, using the openHABian distribution all working a treat. This is the final platform so I decided that binding development should not happen on that device.
I was looking at picking up the Roku binding as I have 3 NOW TV boxes that all run the Roku control protocol. First task was to get the environment running but I decided to build a new binding skeleton rather than just go for the code that was abandoned some time ago.
So on a Win7 machine I installed Oracle JDK 8 and the Apache Maven 3.x. Paths have been set as below:
openHAB2 installed okay and is running
echo %PATH%
C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Lenovo\Touch Fingerprint Software\;C:\Program Files
(x86)\Lenovo\Access Connections\;C:\Program Files (x86)\Common Files\Lenovo;C:\ProgramData\Lenovo\ReadyApps;C:\Program Files\Git\cmd;C:\Program Files\TortoiseGit\bin;C:\Program Files\PuTTY\;C:\Program Files\SDCC\bin;C:\Program Files (x86)\GnuWin32\bin;C:\apache-maven-3.6.3\bin
echo %JAVA_HOME%
C:\Program Files\Java\jdk1.8.0_251
BTW. I think there is an error in the docs as it relates to %JAVA% which I think should be %JAVA_HOME%
I follow the instructions to create the skeleton, although it is unclear what the root should be, but I assume it is C:\Users<username>\openhab-2-5-x\git\ as it is the only place I can find openhab-addons/bundles.
create_openhab_binding_skeleton.cmd MyNewBinding “” generates errors and warnings.
create_openhab_binding_skeleton.cmd roku "Mark Spavin" spavinm
[WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: Failure to find org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 in https://jcen
ter.bintray.com was cached in the local repository, resolution will not be reattempted until the update interval of jcenter has elapsed or updates are forced
[WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: Failure to find org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 in https://jcenter.bintray.com was cached in the local repository, resolution will not be reattempted until the update interval of jcenter has elapsed or updates are forced
[WARNING] Archetype not found in any catalog. Falling back to central repository.
[WARNING] Add a repository with id 'archetype' in your settings.xml if archetype's repository is elsewhere.
[WARNING] Don't override file C:\Users\Mark\openhab-2-5-x\git\openhab-addons\bundles\org.openhab.binding.roku\pom.xml
[INFO] Project created from Archetype in dir: C:\Users\Mark\openhab-2-5-x\git\openhab-addons\bundles\org.openhab.binding.roku
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.322 s
[INFO] Finished at: 2020-05-14T23:03:40+01:00
[INFO] ------------------------------------------------------------------------
1 file(s) copied.
Method invocation failed because [System.Object[]] doesn't contain a method named 'replace'.
At line:1 char:97
+ (Get-Content org.openhab.binding.$env:BindingIdInLowerCase/src/main/feature/feature.xml).replace <<<< ('-core/${project.version}'
, '-core/${ohc.version}') | Set-Content org.openhab.binding.$env:BindingIdInLowerCase/src/main/feature/feature.xml
+ CategoryInfo : InvalidOperation: (replace:String) [], RuntimeException
+ FullyQualifiedErrorId : MethodNotFound
I have uninstalled, checked reinstalled but always the same error. However the binding folder does seem to be there, so I attempted the second step from the addons root.
mvn clean install -pl :org.openhab.binding.roku
[INFO] Scanning for projects...
[ERROR] [ERROR] Could not find the selected project in the reactor: :org.openhab.binding.roku @
[ERROR] Could not find the selected project in the reactor: :org.openhab.binding.roku -> [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/MavenExecutionException
I am not familiar with the Maven environment, but thought I would learn “on the job” so to speak. Even with the detailed trace the error do not make any sense at all as yet.
I can see plenty of folks have been building bindings, has anyone any info that may get me rolling?
Sorry its a long post
Cheers
Mark