[SOLVED] Compiling bundle with maven

Hi All,

Im dipping my toe into this. Essentially some UI changes have been made to HabPanel and ysc as suggest a recompile of the bundle.

I used this guide, https://www.openhab.org/docs/developer/, to install git, maven and the java sdk. I checked my paths also.

I then installed VS Studio and the java extension pack.

My current directory looks like so:

When i run the command from this directory, mvn clean install -DskipChecks, I get a BUILD failure.

[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (C:\wamp\www\org.openhab.ui.habpanel\2.4.0). Please verify you invoked Maven from the correct directory. -> [Help 1]

Can anyone suggest a course of action? @ysc . It seems like im not in the right directory?

I’m not sure what you’re trying to do. Do you want to build HABpanel from the latest 2.5 sources? If so, why don’t you just download the latest jar file from Cloudbees?

To build it from the latest sources, you would first clone the entire webui repo, then change to the bundles/org.openhab.ui.habpanel directory and run mvn clean install. Something like this.

$ git clone https://github.com/openhab/openhab-webui.git
$ cd openhab-webui/bundles/org.openhab.ui.habpanel
$ mvn clean install

Hi Mark, yes some changes have been made to the ui and i want to recompile these for use.

Im using the 2.4 as the source, so id prefer to use 2.4. OK, ill give that a go and see if I can select 2.4

Thanks Mark, that looks like its done the trick :smiley: .

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  07:17 min
[INFO] Finished at: 2019-07-19T08:45:34Z
[INFO] ------------------------------------------------------------------------

Nup, didnt work.

In the 2.4 stable, was there a web-ui build that had HabPanel in it? I cant seem to find it. I need to build off 2.4, not 2.5 as my changes were based on 2.4.

cloning the repository gives me the latest which wont work for this.

23:24:56.024 [WARN ] [org.apache.felix.fileinstall         ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.ui.habpanel-2.5.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.ui.reactor.bundles [198]
  Unresolved requirement: Import-Package: io.swagger.annotations; version="[1.5.0,2.0.0)"; resolution:="optional"
  Unresolved requirement: Import-Package: com.google.gson; version="[2.8.0,3.0.0)"

        at org.eclipse.osgi.container.Module.start(Module.java:444) ~[?:?]
        at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[?:?]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [10:org.apache.felix.fileinstall:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [10:org.apache.felix.fileinstall:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1221) [10:org.apache.felix.fileinstall:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:515) [10:org.apache.felix.fileinstall:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [10:org.apache.felix.fileinstall:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [10:org.apache.felix.fileinstall:3.6.4]

FYI cloudbees is no more, Jenkins moved in December.

https://ci.openhab.org/job/openHAB-Distribution/

Fixed the dependency issue, had to install a specific jar file.

Yeah, that’s what I meant. :wink: I updated the link in my bookmark, but the old name remained…