My build works fine on my local machine (with mvn clean install -pl :org.openhab.binding.blink ), however the one at GitHub fails with the error below. Do you have any hints?
Thanks a lot
Building add-on: org.openhab.binding.blink
+ mvn clean verify -B -T 1.5C -U -am -amd -pl :org.openhab.binding.blink,:org.openhab.addons.bom.openhab-core-index,:org.openhab.addons.bom.runtime-index,:org.openhab.addons.bom.test-index,-:org.openhab.addons.reactor.features.karaf,-:org.openhab.addons.features.karaf.openhab-addons,-:org.openhab.addons.features.karaf.openhab-addons-external
[INFO] Scanning for projects...
Error: ] Could not find the selected project in the reactor: :org.openhab.addons.reactor.features.karaf @
Error: Could not find the selected project in the reactor: :org.openhab.addons.reactor.features.karaf -> [Help 1]
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: 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
Error: Process completed with exit code 1.
If you haven’t modified parent (reactor) pom for karaf features it shouldn’t be necessary. Error you have indicates that your project structure miss pom.xml with <artifactId>org.openhab.addons.reactor.features.karaf</artifactId>. Even if such file exists it might be commented in parent (double check pom.xml in project root directory).
Now, few notes about options you pass, cause they seem to me conflicting with your intention. You try to build your binding, but you end up building pretty much everything.
If you place -am switch to the command it will build dependencies of blink binding, runtime-index and so on. If you place such switch combined with karaf features it will force rebuilding of all bindings.
To make fast build of your binding it should be sufficient to rely on -amd which means build modules depending on binding, which in result will include also features.
Try with below command (not sure if you need boms):
Also note that adding -U forces downloading of latest snapshots which can consume significant amount of time. Fastest builds are with -o -nsu, making -U makes sense if you hit a compile issue which comes from recent core snapshot.
Do you think it’s a good idea to add this to the documentation?
Maybe here: Developer Guide | openHAB ?
This page only mentions the bundles/pom.xml and I tried searching for the bom one but couldn’t find it.
If you nowadays create a binding using the skeleton it should already be added automatically to all POM files including this BOM which is done by archetype-post-generate.groovy in the archetype used by the skeleton scripts.