eclipse-archived / smarthome

Eclipse SmartHome™ project
https://www.eclipse.org/smarthome/
Eclipse Public License 2.0
862 stars 783 forks source link

Clean component XMLs and refactor remaining XMLs to annotations #6672

Closed htreu closed 5 years ago

htreu commented 5 years ago

This refactors all remaining component XML files to annotations on the corresponding classes. Since the XML files are build artefacts, the mvn clean job removes them from all OSGI-INF folders.

kaikreuzer commented 5 years ago

Hm, Travis keeps failing...

maggu2810 commented 5 years ago

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-packaging-plugin:1.2.0:package-plugin (default-package-plugin) on project org.eclipse.smarthome.config.dispatch.test: /home/travis/build/eclipse/smarthome/bundles/config/org.eclipse.smarthome.config.dispatch.test/build.properties: bin.includes value(s) [OSGI-INF/] do not match any files. -> [Help 1]

I assume OSGI-INF should be removed from bin.includes of all build.properties files.

htreu commented 5 years ago

Not from all but the specific one in org.eclipse.smarthome.config.dispatch.test. I actually removed the folder but forgot to remove the reference in build.properties. done.

kaikreuzer commented 5 years ago

This time it failed on automation bundles:

[ERROR] /home/travis/build/eclipse/smarthome/bundles/automation/org.eclipse.smarthome.automation.module.script.rulesupport/src/main/java/org/eclipse/smarthome/automation/module/script/rulesupport/internal/loader/ScriptFileWatcher.java [1:1]: @Reference : Missing method unbind for reference ScriptEngineManager
[ERROR] /home/travis/build/eclipse/smarthome/bundles/automation/org.eclipse.smarthome.automation.module.script.rulesupport/src/main/java/org/eclipse/smarthome/automation/module/script/rulesupport/internal/RuleSupportScriptExtension.java [1:1]: @Reference : Missing method unbind for reference RuleRegistry
[ERROR] /home/travis/build/eclipse/smarthome/bundles/automation/org.eclipse.smarthome.automation.module.script.rulesupport/src/main/java/org/eclipse/smarthome/automation/module/script/rulesupport/internal/RuleSupportScriptExtension.java [1:1]: @Reference : Missing method unbind for reference RuleProvider
[ERROR] /home/travis/build/eclipse/smarthome/bundles/automation/org.eclipse.smarthome.automation.module.script.rulesupport/src/main/java/org/eclipse/smarthome/automation/module/script/rulesupport/internal/RuleSupportScriptExtension.java [1:1]: @Reference : Missing method unbind for reference ScriptedCustomModuleHandlerFactory
[ERROR] /home/travis/build/eclipse/smarthome/bundles/automation/org.eclipse.smarthome.automation.module.script.rulesupport/src/main/java/org/eclipse/smarthome/automation/module/script/rulesupport/internal/RuleSupportScriptExtension.java [1:1]: @Reference : Missing method unbind for reference ScriptedCustomModuleTypeProvider
[ERROR] /home/travis/build/eclipse/smarthome/bundles/automation/org.eclipse.smarthome.automation.module.script.rulesupport/src/main/java/org/eclipse/smarthome/automation/module/script/rulesupport/internal/RuleSupportScriptExtension.java [1:1]: @Reference : Missing method unbind for reference ScriptedPrivateModuleHandlerFactory
maggu2810 commented 5 years ago

It does not build on my machine:

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:1.2.0:compile (default-compile) on project org.eclipse.smarthome.io.console.karaf: Compilation failure: Compilation failure: 
[ERROR] /home/rathgeb/bin/pkgs/eclipse/esh/git/smarthome/bundles/io/org.eclipse.smarthome.io.console.karaf/src/main/java/org/eclipse/smarthome/io/console/karaf/internal/ConsoleSupportKaraf.java:[115] 
[ERROR]         final Registry registry = sessionFactory.getRegistry();
[ERROR]                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] Type mismatch: cannot convert from org.apache.karaf.shell.api.console.Registry to java.rmi.registry.Registry
[ERROR] /home/rathgeb/bin/pkgs/eclipse/esh/git/smarthome/bundles/io/org.eclipse.smarthome.io.console.karaf/src/main/java/org/eclipse/smarthome/io/console/karaf/internal/ConsoleSupportKaraf.java:[123] 
[ERROR]         registry.unregister(wrapperOld);
[ERROR]                  ^^^^^^^^^^
[ERROR] The method unregister(CommandWrapper) is undefined for the type Registry
[ERROR] /home/rathgeb/bin/pkgs/eclipse/esh/git/smarthome/bundles/io/org.eclipse.smarthome.io.console.karaf/src/main/java/org/eclipse/smarthome/io/console/karaf/internal/ConsoleSupportKaraf.java:[126] 
[ERROR]         registry.register(wrapperNew);
[ERROR]                  ^^^^^^^^
[ERROR] The method register(CommandWrapper) is undefined for the type Registry
[ERROR] /home/rathgeb/bin/pkgs/eclipse/esh/git/smarthome/bundles/io/org.eclipse.smarthome.io.console.karaf/src/main/java/org/eclipse/smarthome/io/console/karaf/internal/ConsoleSupportKaraf.java:[140] 
[ERROR]         final Registry registry = sessionFactory.getRegistry();
[ERROR]                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] Type mismatch: cannot convert from org.apache.karaf.shell.api.console.Registry to java.rmi.registry.Registry
[ERROR] /home/rathgeb/bin/pkgs/eclipse/esh/git/smarthome/bundles/io/org.eclipse.smarthome.io.console.karaf/src/main/java/org/eclipse/smarthome/io/console/karaf/internal/ConsoleSupportKaraf.java:[147] 
[ERROR]         registry.unregister(wrapperOld);
[ERROR]                  ^^^^^^^^^^
[ERROR] The method unregister(CommandWrapper) is undefined for the type Registry
[ERROR] 5 problems (5 errors)
kaikreuzer commented 5 years ago

@maggu2810 Thanks for being a replacement for the stuck Travis ;-)

htreu commented 5 years ago

Thanks @maggu2810. Due to Travis being lazy I will now also run the build locally before adding new commits. Stay tuned.

maggu2810 commented 5 years ago

Thanks for your work. If I can assist with some task, feel free to ping me.

maggu2810 commented 5 years ago

The onewire test fails for me. But this could be caused by some timing related issue, too.

maggu2810 commented 5 years ago

It has been Timing related... It works now

kaikreuzer commented 5 years ago

So shall we merge without waiting for Travis?

maggu2810 commented 5 years ago

Okay for me. For you, too?

kaikreuzer commented 5 years ago

Sure!